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") |
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.
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.