15 expression: casadi.SX,
17 use_hessian: bool =
True,
19 nres = expression.shape[0]
21 assert nx == cx.shape[0]
22 dx = casadi.SX.sym(
"dx", ndx)
25 self.
clam = casadi.SX.sym(
"lam", nres)
26 self.
expr = casadi.substitute(expression, cx, xplus)
32 self.
Hexpr = casadi.SX.zeros(ndx, ndx)
34 self.
fun = casadi.Function(
"f", [cx, dx], [self.
expr])
35 self.
Jfun = casadi.Function(
"Jf", [cx, dx], [self.
Jexpr])