Hi,
how should one set parameters for the terminal stage of optimization? My first assumption was
for ii = 0 : (N - 1)
...
ocp.set('p', p, ii); // parameters for Lagrange objective
end
ocp.set('p', p, N); // parameters for Mayer objective (terminal costs)
However, the last statement crashes Matlab if I use the cost module “ext_cost” (casadi expression). As a workaround I have to set the terminal parameters with
ocp.set('p', p);
before the loop, which is not very intuitive. Is this the intended workflow or is the Matlab crash a bug?
BR
Martin