Hi guys,

I am using acados with Python interface to solve a MHE simple test program using my own model instead of export_pendulum_ode_model().

I tried to replicate as much as possible the structure of minimal_example_mhe.py.

The first section of my program, that implements an OCP to generate data to be fed to the MHE, works without problems. The following MHE section instead produces totally empty arrays after executing

`status = acados_solver_mhe.solve()`

.

In addition, with `acados_solver_mhe.get_stats('sqp_iter')`

, I checked that the MHE solver returns after just 0 SQP iteration. No error messages are produced.

The only difference compared to the original minimal_example_mhe.py is that I have an output y=h(x,u) that is a very complex function of the status x and so I was forced to generate the nonlinear cost_y_expr directly in the export_mhe_ode_model and add “model.cost_y_expr = cost_y_expr” in it at the end, instead of adding “model.cost_y_expr = cost_y_expr” inside export_mhe_solver.

I checked everything to try to solve this but I didn’t find any other difference with the original example.

I thank you in advance for your support.

Cheers,

Walter