Unexpected interruption of optimization iterations

OpenSim Moco is a software toolkit to solve optimal control problems with musculoskeletal models defined in OpenSim using the direct collocation method.
POST REPLY
User avatar
Matthew Lee
Posts: 52
Joined: Sat Jun 20, 2020 7:46 pm

Unexpected interruption of optimization iterations

Post by Matthew Lee » Thu Nov 30, 2023 9:02 am

Dear Moco development team and Moco users,

Thank you all for your contributions to the biomechanics community! I recently ran into a problem with optimization iterations unexpectedly interrupted when doing a muscle-driven predictive simulation. The specific interruption prompt output by IPOPT is 'Restoration phase is called at point that is almost feasible, with constraint violation 8.756388e-06. Abort.'

EXIT: Restoration Failed!

In the last few iterations, the 'objective' changes very little, 'inf_pr' also maintains a small value (less than 1e-5), and the magnitude of 'inf_du' fluctuates around 1e+01 and 1e+02. I guess the large 'inf_du' value is the main reason for the iteration interruption.

How should I debug to solve this annoying problem? I would be very grateful if someone could give me some advice.

Best Wishes,
Matthew

User avatar
Nicholas Bianco
Posts: 1041
Joined: Thu Oct 04, 2012 8:09 pm

Re: Unexpected interruption of optimization iterations

Post by Nicholas Bianco » Thu Nov 30, 2023 3:59 pm

Hi Matthew,
In the last few iterations, the 'objective' changes very little, 'inf_pr' also maintains a small value (less than 1e-5), and the magnitude of 'inf_du' fluctuates around 1e+01 and 1e+02.
The small 'inf_pr' value indicates that the problem constraints are likely being met and the solver is struggling to converge for other reasons. What is the magnitude of the objective value? Keep the objective value scaled between [0.1, 10] is recommended for best convergence. You can scale the objective value by scaling all the weights in your objective by a common factor.

Best,
Nick

User avatar
Matthew Lee
Posts: 52
Joined: Sat Jun 20, 2020 7:46 pm

Re: Unexpected interruption of optimization iterations

Post by Matthew Lee » Thu Nov 30, 2023 4:30 pm

nbianco wrote:
Thu Nov 30, 2023 3:59 pm
What is the magnitude of the objective value?
Dear Nick,
Thanks very much for your quick reply!
The objective function value is around 0.7, which is within [0.1,10]. My convergence tolerance is set to 1e-3.

The final iterations are as follows:
iteration.JPG
iteration.JPG (110.95 KiB) Viewed 946 times
I look forward to getting more guidance from you, thank you very much!

Best Wishes,
Matthew

User avatar
Nicholas Bianco
Posts: 1041
Joined: Thu Oct 04, 2012 8:09 pm

Re: Unexpected interruption of optimization iterations

Post by Nicholas Bianco » Thu Nov 30, 2023 5:18 pm

Hi Matthew,

Thanks for the info. Could you provide a few more details about the problem you're trying solve?

You should also check to see if any variables are hitting their bounds, which can lead to convergence issues.

Best,
Nick

User avatar
Ross Miller
Posts: 375
Joined: Tue Sep 22, 2009 2:02 pm

Re: Unexpected interruption of optimization iterations

Post by Ross Miller » Sat Dec 02, 2023 5:33 am

One of my frustrations with IPOPT is that the value of "objective" printed to the screen during iteration is not exactly the value that is being targeted for minimization. Similarly, the data printed to the screen are related to the values being checked against the constraint and convergence tolerances, but are not exactly those values.

Ross

User avatar
Carlos Gonçalves
Posts: 135
Joined: Wed Jun 08, 2016 4:56 am

Re: Unexpected interruption of optimization iterations

Post by Carlos Gonçalves » Thu Dec 21, 2023 4:32 pm

I think I got the same problem in a simple simulation of isometric max torque.

Code: Select all

Restoration phase converged to a feasible point that is
unacceptable to the filter for the original problem.
Restoration phase in the restoration phase failed.
I had never seen this before. I will try different guess files and weights to see what happens.

Any suggestion?

POST REPLY