MatthewPeterKelly / OptimTraj

A trajectory optimization library for Matlab
MIT License
623 stars 210 forks source link

long run time #30

Closed aknikzad94 closed 6 years ago

aknikzad94 commented 7 years ago

Hi, I'm solving a optimal control problem with your great solver, but some times it took so so long time to show the results, I attached a sample picture, Is there any trick like changing the stopping criteria to resolve this problem? capture123

MatthewPeterKelly commented 7 years ago

Hi aknikzad94,

I would need more details to make any real diagnosis of the issue. That being said, my guess is that there is an issue with your problem statement: the solution is either non-unique, or the gradients of your objective and constraint functions are not smooth. These can both be studied by careful tests on your problem statement, and are discussed in some detail in my tutorial paper on the topic: tutorial paper More resources here: tutorial website

If you problem statement is fully debugged, then you can adjust both the optimality and feasibility tolerances in OptimTraj. If can be done by setting the problem.options.nlpOpt struct, as described in the user's guide You can get an example of the default value of this struct by typing at the Matlab command prompt: default_nlpOpt = optimset('fmincon')

Best of luck,

Matt