fmincon stoping criteria for simulation problem

조회 수: 1 (최근 30일)
IISc
IISc 2015년 1월 30일
댓글: IISc 2015년 2월 2일
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)

답변 (3개)

Alan Weiss
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

IISc
IISc 2015년 2월 2일
편집: IISc 2015년 2월 2일
Thanks for reply
1) I am using active-set algorithm. I tried SQP and interior point too. SQP gave me convergence at some more points however interior point does not converge at any of the points.
2) The objective function returns zero as required. I wish to know if solver has not converged, does this mean that i have not got correct solution of the non linear equations (please remember that i am not optimising anything, i just use fmincon to solve a large set of non linear equations) ?
regards,
Tarun Uppal
  댓글 수: 2
Torsten
Torsten 2015년 2월 2일
Call UAVdae with the solution returned from fmincon and check whether it satisfies your equalities and inequalities.
Best wishes
Torsten.
IISc
IISc 2015년 2월 2일
Dear Torsten,
I do call UAVdae in each step. The logic is as follows:
There is a for loop which gets incremnted at every stepsize(h).
Inside this loop i call fmincon with guess values as those from last iteration. The UAVdae function has integrated nonlinear equations every time.

댓글을 달려면 로그인하십시오.


Matt J
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.
  댓글 수: 1
IISc
IISc 2015년 2월 2일
Thanks Mr Matt J. I do have nonlinear inequalities in the problem. Thats why i prefered fmimcon as compared to fsolve. Since the simulation is inside the for loop, the values generated at the current time step beocme guess values for the next.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by