alpaqa 0.0.1
Nonconvex constrained optimization
Variables
main Namespace Reference

Variables

 H
 
 A = np.array([[2, 1]])
 
 b = np.array([-1])
 
 x = cs.SX.sym("x", 2)
 
 f = cs.Function("f", [x], [0.5 * cs.dot(x, H @ x)])
 
 g = cs.Function("g", [x], [A @ x])
 
 problem = pa.generate_and_compile_casadi_problem(f, g, "example_name")
 
 lowerbound
 
 upperbound
 
 almparam
 
 panocparam
 
 lbfgsparam
 
 solver
 
 y = np.array([1])
 
 x_sol
 
 y_sol
 
 stats
 

Variable Documentation

◆ H

H
Initial value:
1= np.array([[3, -1],
2 [-1, 3]])

Definition at line 8 of file main.py.

◆ A

A = np.array([[2, 1]])

Definition at line 10 of file main.py.

◆ b

b = np.array([-1])

Definition at line 11 of file main.py.

◆ x

x = cs.SX.sym("x", 2)

Definition at line 13 of file main.py.

◆ f

f = cs.Function("f", [x], [0.5 * cs.dot(x, H @ x)])

Definition at line 14 of file main.py.

◆ g

g = cs.Function("g", [x], [A @ x])

Definition at line 15 of file main.py.

◆ problem

problem = pa.generate_and_compile_casadi_problem(f, g, "example_name")

Definition at line 16 of file main.py.

◆ lowerbound

lowerbound

Definition at line 19 of file main.py.

◆ upperbound

upperbound

Definition at line 20 of file main.py.

◆ almparam

almparam
Initial value:
1= pa.ALMParams(
2 ε = 1e-8, # tolerance
3 δ = 1e-8,
4 Δ = 10, # penalty update factor
5 max_iter = 20,
6 print_interval = 1,
7)
Examples
CUTEst/Rosenbrock/main.cpp, and CasADi/Rosenbrock/main.cpp.

Definition at line 25 of file main.py.

◆ panocparam

panocparam
Initial value:
1= pa.PANOCParams(
2 max_iter = 500,
3 print_interval = 10,
4)
Examples
CUTEst/Rosenbrock/main.cpp, and CasADi/Rosenbrock/main.cpp.

Definition at line 33 of file main.py.

◆ lbfgsparam

lbfgsparam
Initial value:
1= pa.LBFGSParams(
2 memory = 2,
3)
Examples
CUTEst/Rosenbrock/main.cpp, and CasADi/Rosenbrock/main.cpp.

Definition at line 38 of file main.py.

◆ solver

solver
Initial value:
1= pa.ALMSolver(
2 almparam, # Params for outer solver
3 pa.PANOCSolver(panocparam, lbfgsparam), # Inner solver
4)

Definition at line 43 of file main.py.

◆ y

y = np.array([1])

Definition at line 50 of file main.py.

◆ x_sol

x_sol

Definition at line 53 of file main.py.

◆ y_sol

y_sol

Definition at line 53 of file main.py.

◆ stats

stats

Definition at line 53 of file main.py.