Open gaowutong opened 1 month ago
Just to add a bit on this, the problem seems that between 3 to 2 rows it switches from using Forward to Adjoint.
In case of cvodes
and idas
some required functions (quadB
) is not created when parameter size is 0,
in fact using dae = {'x': x, 'p': SX.sym('p',1), 'ode': xdot}
does not expose the issue.
Thanks, this is a way to solve the issue.
I am happy the workaround is enough for you but I think this issue is not completely solved, I keep it open for now.
The code demonstrates an issue with the calculation of the Jacobian of a subset of the output vector xf. Specifically, the calculation works fine for the full sensitivity matrix and the first 3 rows, but fails for the first 2 rows.
The first and second output is:
While the third got unexpected error:
By the way, the code works fine for 'rk' and 'collocation' integrator, but fails for 'cvodes' and 'idas'.