Add in methods to scale the problem objective, constraints and their derivatives for IPOPT
IPOPT converges better if the objective and constraints are scaled. We can probably make smart scaling based on the dynamics that are being modeled.
If the user sets bounds on the trajectories, those could be used to make some scaling rules because the max/min of each state would be known.
If the user sets bounds on the trajectories, those could be used to make some scaling rules because the max/min of each state would be known.
Just curiosity: would scaling mean, that the values $\in (-1.0, 1.0)$ ?
Yes.
There is some general rule for keeping objective and constraint values small, but here is the basic documentation: https://coin-or.github.io/Ipopt/OPTIONS.html#OPT_NLP_Scaling and it ties to applying scaling to the internal linear solve routine.
Tips on scaling: https://github.com/coin-or/Ipopt/discussions/498#discussioncomment-1002700
Tips on scaling: coin-or/Ipopt#498 (comment)
I am afraid, far beyond my capabilities. :-( I suppose to understand, one needs to REALLY understand Ipopt.