10 A = np.array([[2, 1]])
14 f = cs.Function(
"f", [x], [0.5 * cs.dot(x, H @ x)])
15 g = cs.Function(
"g", [x], [A @ x])
16 problem = pa.generate_and_compile_casadi_problem(f, g,
"example_name")
19 problem.C.lowerbound = np.full((problem.n,), -np.inf)
20 problem.C.upperbound = np.full((problem.n,), np.inf)
21 problem.D.lowerbound = np.full((problem.m,), -np.inf)
22 problem.D.upperbound = b
53 x_sol, y_sol, stats =
solver(problem, x, y)
57 status: {stats['status']}
58 inner iterations: {stats['inner']['iterations']}
59 outer iterations: {stats['outer_iterations']}
60 elapsed time: {stats['elapsed_time']}
63 f = {problem.f(x_sol)}