Hello all,
I am a new Julia user coming from a Modelica background and I am trying to experiment with Modeling Toolkit and dynamic optimisation.
I was trying to follow this example ([Solving Dynamic Optimization Problems] => [Free final time problems]) in the official documentation page and I noticed something strange. While the tutorial says that the starting values provided in the u0map will be considered as guesses it seems that the problem is formulated with extra equations resulting in an overdetermined system. Now running the test I still get the results presented but the warning is that a least squares problem is solved instead. My intention is to expand on the example with my own model to impose periodic conditions but given this behaviour I could not see a workaround.
Just for reference running the code in the example I get :
┌ Warning: The control problem is overdetermined. The total number of conditions (# constraints + # fixed initial values given by op) exceeds the total number of states. The solvers will default to doing a nonlinear least-squares optimization.
└ @ ModelingToolkitBase C:\Users\chris\.julia\packages\ModelingToolkitBase\fjBdh\src\systems\optimal_control_interface.jl:96
┌ Warning: The control problem is overdetermined. The total number of conditions (# constraints + # fixed initial values given by op) exceeds the total number of states. The solvers will default to doing a nonlinear least-squares optimization.
└ @ ModelingToolkitBase C:\Users\chris\.julia\packages\ModelingToolkitBase\fjBdh\src\systems\optimal_control_interface.jl:96