fmincon stoping criteria for simulation problem
조회 수: 1 (최근 30일)
이전 댓글 표시
I am using fmincon for my complex research problem. I am using the following syntax.
[Xnew, fval, exflg(k)] = fmincon(@linemin, Xold,[ ],[ ],[ ],[ ],[ ],[ ],@UAVdae, options);
@linemin function is an empty function. Xold will give the initial values, @UAVdae function has equalities & inequalities (30 equalities and 8 inequalities).
I run fmincon inside a loop and come up with a solution at every step size of loop. In my problem every iteration the solver stops prematurely with following sample output
Max Line search Directional First-order
Iter F-count f(x) constraint steplength derivative optimality Procedure
0 31 0 5.861 Infeasible start point
1 62 0 0.3442 1 0 8.39e+08
2 5030 0 1.204 0 0 0.146
Solver stopped prematurely.
fmincon stopped because it exceeded the function evaluation limit, options.MaxFunEvals = 5000 (the selected value).
I wish to know the following
1) Since @linemin function is an empty function (f = 0), will the results be still correct (i mean will the fmincon would have solved the equations correctly despite exceeding function evaluation limits)?
2) How should i make solver not to stop prematurely (I have tried increasing the max function evaluations, reducing the tolerance, modifying the problem to some extent etc. but it did no help)
댓글 수: 0
답변 (3개)
Alan Weiss
2015년 1월 30일
It is possible that you are using the 'sqp' algorithm. If so, I suggest that you use the 'interior-point' algorithm.
Also, does your objective function return empty [] or return zero? It should return a numeric value, 0.
Alan Weiss
MATLAB mathematical toolbox documentation
댓글 수: 0
Matt J
2015년 2월 2일
편집: Matt J
2015년 2월 2일
I suspect that you need to generate a better initial guess. Since the only work that fmincon needs to do for this problem is to satisfy the constraints, it will iterate endlessly if there is no local solution to all your nonlinear equations.
I would also add that, unless you have nonlinear inequalities, it probably makes more sense to be using fsolve, as opposed to fmincon.
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!