Acados Solver Plugins
Gnererate new acados solver plugins
- class acados_solver_plugins.solver_plugin_generator.SolverPluginGenerator(custom_export_path: str | None = None, library_name: str | None = None)[source]
Minimalist template-based code generation module to generate acados::AcadosSolver derived objects.
Relevant external API documentation : jinja2, acados_template.
- generate_solver_plugin(acados_ocp: acados_template.AcadosOcp, plugin_class_name: str, solver_description: str | None = None, x_index_map: dict | None = None, z_index_map: dict | None = None, p_index_map: dict | None = None, u_index_map: dict | None = None) acados_template.AcadosOcpSolver [source]
Generate the solver plugin from a python Acados OCP model.
- Parameters:
acados_ocp (AcadosOcp) – Acados OCP model
plugin_class_name (str) – Class name for the generated plugin of type “acados::<plugin_class_name>”
solver_description (str, optional) – Short description for the exported plugin, defaults to None
x_index_map (dict, optional) – Differential state index map, defaults to None
z_index_map (dict, optional) – Algebraic state index map, defaults to None
p_index_map (dict, optional) – Parameters index map, defaults to None
u_index_map (dict, optional) – Parameters index map, defaults to None
- Returns:
the acados OCP solver generated as a by-product
- Return type:
AcadosOcpSolver
- jinga_env_loader
Jinja environment loader initialized as a jinja2.PackageLoader looking for templates in the installation folder of the module.