leap_c.diff_mpc.utils.prepare_solver

Functions

prepare_batch_solver(→ None)

Prepare batch solver for problem instance given by solver_input, starting at ocp_iterate.

prepare_batch_solver_for_backward(→ None)

Prepare the backward batch solver such that the sensitivities can be retrieved.

Module Contents

leap_c.diff_mpc.utils.prepare_solver.prepare_batch_solver(batch_solver: acados_template.acados_ocp_batch_solver.AcadosOcpBatchSolver, ocp_iterate: acados_template.acados_ocp_iterate.AcadosOcpFlattenedBatchIterate, solver_input: leap_c.diff_mpc.data.AcadosOcpSolverInput) None[source]

Prepare batch solver for problem instance given by solver_input, starting at ocp_iterate.

Also caches the last call, such that repeated calls to this do not incur unnecessary cost by preparing a batch solver multiple times with the same inputs.

leap_c.diff_mpc.utils.prepare_solver.prepare_batch_solver_for_backward(batch_solver: acados_template.acados_ocp_batch_solver.AcadosOcpBatchSolver, ocp_iterate: acados_template.acados_ocp_iterate.AcadosOcpFlattenedBatchIterate, solver_input: leap_c.diff_mpc.data.AcadosOcpSolverInput) None[source]

Prepare the backward batch solver such that the sensitivities can be retrieved.

Also caches the last call, such that repeated calls to this do not incur unnecessary cost by preparing a batch solver multiple times with the same inputs.