alpaqa 0.0.1
Nonconvex constrained optimization
Namespaces | Variables
getting-started.py File Reference

Go to the source code of this file.

Namespaces

namespace  getting-started
 

Variables

 x1
 
 x2
 
 p = cs.SX.sym("p")
 
tuple f_expr = (1 - x1) ** 2 + p * (x2 - x1 ** 2) ** 2
 
 g_expr
 
 x = cs.vertcat(x1, x2)
 
 f = cs.Function("f", [x, p], [f_expr])
 
 g = cs.Function("g", [x, p], [g_expr])
 
 prob = pa.generate_and_compile_casadi_problem(f, g)
 
 lowerbound
 
 upperbound
 
 param
 
 innersolver = pa.StructuredPANOCLBFGSSolver()
 
 solver = pa.ALMSolver(innersolver)
 
 inner_solver
 
 x0 = np.array([0.1, 1.8])
 
 y0 = np.zeros((prob.m,))
 
 x_sol
 
 y_sol
 
 stats