PANOC-ALM  quadratic-penalty
Nonconvex constrained optimization
Functions
panocpy.casadi_problem Namespace Reference

Functions

Tuple[cs.CodeGenerator, int, int, int] generate_casadi_problem (cs.Function f, cs.Function g, bool second_order=False, str name="PANOC_ALM_problem")
 
Tuple[cs.CodeGenerator, int, int, int] generate_casadi_problem_full (cs.Function f, cs.Function g1, cs.Function g2, bool second_order=False, str name="PANOC_ALM_problem")
 
Union[pa.Problem, pa.ProblemWithParamcompile_and_load_problem (cs.CodeGenerator cgen, int n, int m, int p, str name="PANOC_ALM_problem")
 
Union[pa.ProblemFull, pa.ProblemFullWithParamcompile_and_load_problem_full (cs.CodeGenerator cgen, int n, int m1, int m2, int p, str name="PANOC_full_problem")
 
Union[pa.Problem, pa.ProblemWithParamgenerate_and_compile_casadi_problem (cs.Function f, cs.Function g, bool second_order=False, str name="PANOC_ALM_problem")
 

Function Documentation

◆ generate_casadi_problem()

Tuple[cs.CodeGenerator, int, int, int] panocpy.casadi_problem.generate_casadi_problem ( cs.Function  f,
cs.Function  g,
bool   second_order = False,
str   name = "PANOC_ALM_problem" 
)
Convert the objective and constraint functions into a CasADi code
generator.

:param f:            Objective function.
:param g:            Constraint function.
:param second_order: Whether to generate functions for evaluating Hessians.
:param name: Optional string description of the problem (used for filename).

:return:   * Code generator that generates the functions and derivatives
             used by the solvers.
           * Dimensions of the decision variables (primal dimension).
           * Number of nonlinear constraints (dual dimension).
           * Number of parameters.

Definition at line 8 of file casadi_problem.py.

+ Here is the caller graph for this function:

◆ generate_casadi_problem_full()

Tuple[cs.CodeGenerator, int, int, int] panocpy.casadi_problem.generate_casadi_problem_full ( cs.Function  f,
cs.Function  g1,
cs.Function  g2,
bool   second_order = False,
str   name = "PANOC_ALM_problem" 
)
Convert the objective and constraint functions into a CasADi code
generator.

:param f:            Objective function.
:param g1:           ALM constraint function.
:param g2:           Quadratic penalty constraint function.
:param second_order: Whether to generate functions for evaluating Hessians.
:param name: Optional string description of the problem (used for filename).

:return:   * Code generator that generates the functions and derivatives
             used by the solvers.
           * Dimensions of the decision variables (primal dimension).
           * Number of nonlinear constraints (dual dimension).
           * Number of parameters.

Definition at line 106 of file casadi_problem.py.

◆ compile_and_load_problem()

Union[pa.Problem, pa.ProblemWithParam] panocpy.casadi_problem.compile_and_load_problem ( cs.CodeGenerator  cgen,
int  n,
int  m,
int  p,
str   name = "PANOC_ALM_problem" 
)
Compile the C-code using the given code-generator and load it as a
panocpy Problem.

:param cgen: Code generator to generate C-code for the costs and the
             constraints with.
:param n:    Dimensions of the decision variables (primal dimension).
:param m:    Number of nonlinear constraints (dual dimension).
:param p:    Number of parameters.
:param name: Optional string description of the problem (used for filename).

:return:   * Problem specification that can be passed to the solvers.

Definition at line 227 of file casadi_problem.py.

+ Here is the caller graph for this function:

◆ compile_and_load_problem_full()

Union[pa.ProblemFull, pa.ProblemFullWithParam] panocpy.casadi_problem.compile_and_load_problem_full ( cs.CodeGenerator  cgen,
int  n,
int  m1,
int  m2,
int  p,
str   name = "PANOC_full_problem" 
)
Compile the C-code using the given code-generator and load it as a
panocpy ProblemFull.

:param cgen: Code generator to generate C-code for the costs and the
             constraints with.
:param n:    Dimensions of the decision variables (primal dimension).
:param m1:   Number of ALM constraints (dual dimension 1).
:param m2:   Number of quadratic penalty constraints (dual dimension 2).
:param p:    Number of parameters.
:param name: Optional string description of the problem (used for filename).

:return:   * ProblemFull specification that can be passed to the solvers.

Definition at line 257 of file casadi_problem.py.

◆ generate_and_compile_casadi_problem()

Union[pa.Problem, pa.ProblemWithParam] panocpy.casadi_problem.generate_and_compile_casadi_problem ( cs.Function  f,
cs.Function  g,
bool   second_order = False,
str   name = "PANOC_ALM_problem" 
)
Compile the objective and constraint functions into a panocpy Problem.

:param f:            Objective function.
:param g:            Constraint function.
:param second_order: Whether to generate functions for evaluating Hessians.
:param name: Optional string description of the problem (used for filename).

:return:   * Problem specification that can be passed to the solvers.

Definition at line 290 of file casadi_problem.py.

+ Here is the call graph for this function: