alpaqa 0.0.1
Nonconvex constrained optimization
Functions
alpaqa.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="alpaqa_problem")
 
Union[pa.Problem, pa.ProblemWithParam] generate_and_compile_casadi_problem (cs.Function f, cs.Function g, bool second_order=False, str name="alpaqa_problem")
 

Function Documentation

◆ generate_casadi_problem()

Tuple[cs.CodeGenerator, int, int, int] alpaqa.casadi_problem.generate_casadi_problem ( cs.Function  f,
cs.Function  g,
bool   second_order = False,
str   name = "alpaqa_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 16 of file casadi_problem.py.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ generate_and_compile_casadi_problem()

Union[pa.Problem, pa.ProblemWithParam] alpaqa.casadi_problem.generate_and_compile_casadi_problem ( cs.Function  f,
cs.Function  g,
bool   second_order = False,
str   name = "alpaqa_problem" 
)
Compile the objective and constraint functions into a alpaqa 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 116 of file casadi_problem.py.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: