how to get the value of interations needed by nlmpcmove

2 ビュー (過去 30 日間)
Andre Hirsch
Andre Hirsch 2019 年 8 月 8 日
回答済み: Harsha Priya Daggubati 2019 年 8 月 14 日
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

採用された回答

Harsha Priya Daggubati
Harsha Priya Daggubati 2019 年 8 月 14 日
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.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeModel Predictive Control Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by