opensim-org / opensim-core

SimTK OpenSim C++ libraries and command-line applications, and Java/Python wrapping.
https://opensim.stanford.edu
Apache License 2.0
800 stars 323 forks source link

IPOPT options in Moco #3850

Open mrrezaie opened 4 months ago

mrrezaie commented 4 months ago

Hi, there are a few things about IPOPT options, and I just wanted to bring them to your attention.

1. Convergence tolerance

In Moco, set_optim_convergence_tolerance would set an identical value for the following options in IPOPT, while their default values vary according to the IPOPT docs. For instance, 1e-3 would be greater than the default acceptable_tol, compl_inf_tol, and tol values, while it is smaller than the default acceptable_compl_inf_tol, acceptable_dual_inf_tol, and dual_inf_tol values. I wonder if there is a smarter and more robust way for this.

acceptable_compl_inf_tol = 1e-02
 acceptable_dual_inf_tol = 1e+10
          acceptable_tol = 1e-06
           compl_inf_tol = 1e-04
            dual_inf_tol = 1
                     tol = 1e-08

2. Constraint tolerance

The same for set_optim_constraint_tolerance.

acceptable_constr_viol_tol = 1e-2
           constr_viol_tol = 1e-4

3. Adaptive mu_strategy

In a few resources and other projects (such as Link 1, Link 2, Link 3, Link 4), it's been said that using adaptive mu_strategy can lead to better convergence and improved performance by reducing the number of iterations (in some cases). Currently, it's not available in MocoCasADiSolver, and I was just curious to see whether this option could be beneficial for Moco or not.

Thank you.