how to get the value of interations needed by nlmpcmove

3 vues (au cours des 30 derniers jours)
Andre Hirsch
Andre Hirsch le 8 Août 2019
hello everyone,
I am currently using the nlmpcmove() function to calculate the optimal solutions for my nonlinear problem. Since the calculations take quite some time, I wanted to try and limit the maximum iterations allowed for the solver to caluclate the solution. This works quite well.
But now to my problem:
I want to know how many iterations the solver needed for the optimal or suboptimal solution. The output [~,~,info], doesn't seem to give me enough information to do so!?
Does anyone know a simple solution? Thank you in advance :)
cheers

Réponse acceptée

Harsha Priya Daggubati
Harsha Priya Daggubati le 14 Août 2019
Hi,
A manual approach to find the number of iterations if to plot your Cost Function against Number of iterations using a for loop and examine the plot. If incase you plot does not converge choose a threshold and compare with the two subsequent cost function values.
You can also try using fmincon which provides similar functionality.

Plus de réponses (0)

Catégories

En savoir plus sur Model Predictive Control Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by