alpaqa 0.0.1
Nonconvex constrained optimization
Variables
getting-started Namespace Reference

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
 

Variable Documentation

◆ x1

x1

Definition at line 9 of file getting-started.py.

◆ x2

x2

Definition at line 9 of file getting-started.py.

◆ p

p = cs.SX.sym("p")

◆ f_expr

tuple f_expr = (1 - x1) ** 2 + p * (x2 - x1 ** 2) ** 2

Definition at line 14 of file getting-started.py.

◆ g_expr

g_expr
Initial value:
1= cs.vertcat(
2 (x1 - 0.5) ** 3 - x2 + 1,
3 x1 + x2 - 1.5,
4)

Definition at line 15 of file getting-started.py.

◆ x

x = cs.vertcat(x1, x2)

Definition at line 21 of file getting-started.py.

◆ f

f = cs.Function("f", [x, p], [f_expr])

Definition at line 23 of file getting-started.py.

◆ g

g = cs.Function("g", [x, p], [g_expr])

Definition at line 24 of file getting-started.py.

◆ prob

prob = pa.generate_and_compile_casadi_problem(f, g)

Definition at line 30 of file getting-started.py.

◆ lowerbound

lowerbound

Definition at line 34 of file getting-started.py.

◆ upperbound

upperbound

Definition at line 35 of file getting-started.py.

◆ param

param

Definition at line 40 of file getting-started.py.

◆ innersolver

innersolver = pa.StructuredPANOCLBFGSSolver()

Definition at line 43 of file getting-started.py.

◆ solver

solver = pa.ALMSolver(innersolver)

Definition at line 44 of file getting-started.py.

◆ inner_solver

inner_solver
Initial value:
1= pa.StructuredPANOCLBFGSSolver(
2 panoc_params={
3 'max_iter': 1000,
4 'stop_crit': pa.PANOCStopCrit.ApproxKKT,
5 },
6 lbfgs_params={
7 'memory': 10,
8 },
9)

Definition at line 47 of file getting-started.py.

◆ x0

x0 = np.array([0.1, 1.8])

Definition at line 71 of file getting-started.py.

◆ y0

y0 = np.zeros((prob.m,))

Definition at line 72 of file getting-started.py.

◆ x_sol

x_sol

Definition at line 75 of file getting-started.py.

◆ y_sol

y_sol

Definition at line 75 of file getting-started.py.

◆ stats

stats

Definition at line 75 of file getting-started.py.