Change parameter_values of an AcadosOcpSolver

Hi :wave:

I’m using Python acados.
I want to modify the numbers of parameters to include new obstacles in my MPC controller.
I can set parameters number using parameter_values, but after creating my solver acados_ocp_solver = AcadosOcpSolver(ocp, json_file=solver_json) I didn’t find a way to modify it.

Is there a way to modify the solver parameters number ?
Or otherwise, what is the best practice to include new parameters without knowing the final number?

Thanks for your answers ~

Hi Remi :wave:

unfortunately it is not possible to change the problem dimensions (which include the number of parameters) after solver creation.

Best, Katrin

Thank you Kaethe,

I will then initialize the solver with enough parameters set to 0, and use only the number that I need.

1 Like