PANOC-ALM  quadratic-penalty
Nonconvex constrained optimization
Namespaces | Variables
rosenbrock.py File Reference

Go to the source code of this file.

Namespaces

 rosenbrock
 

Variables

string name = "minimal_example"
 
 x = cs.SX.sym("x")
 
 y = cs.SX.sym("y")
 
 p = cs.SX.sym("p")
 
tuple cost = (1 - x) ** 2 + p * (y - x ** 2) ** 2
 
tuple constraint_g_cubic = (x - 1) ** 3 - y + 1
 
int constraint_g_linear = x + y - 2
 
 X = cs.vertcat(x, y)
 
 cost_function = cs.Function("f", [X, p], [cost])
 
 g = cs.vertcat(constraint_g_cubic, constraint_g_linear)
 
 g_function = cs.Function("g", [X, p], [g])
 
 cgen
 
 n
 
 m
 
 num_p
 
 prob = pa.compile_and_load_problem(cgen, n, m, num_p, name)
 
 lowerbound
 
 upperbound
 
 innersolver = pa.StructuredPANOCLBFGSSolver()
 
 solver = pa.ALMSolver(pa.ALMParams(), innersolver)
 
 param
 
 x_sol = np.array([1.0, 2.0])
 
 y_sol = np.zeros((m,))
 
 stats
 
 Y
 
tuple Z = (1 - X) ** 2 + 100 * (Y - X ** 2) ** 2
 
 color
 
 label
 
 marker