fmincon stoping criteria for simulation problem

1 view (last 30 days)
IISc
IISc on 30 Jan 2015
Commented: IISc on 2 Feb 2015
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)

Answers (3)

Alan Weiss
Alan Weiss on 30 Jan 2015
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 on 2 Feb 2015
Edited: IISc on 2 Feb 2015
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 Comments
Torsten
Torsten on 2 Feb 2015
Call UAVdae with the solution returned from fmincon and check whether it satisfies your equalities and inequalities.
Best wishes
Torsten.
IISc
IISc on 2 Feb 2015
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.

Sign in to comment.


Matt J
Matt J on 2 Feb 2015
Edited: Matt J on 2 Feb 2015
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 Comment
IISc
IISc on 2 Feb 2015
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.

Sign in to comment.

Tags

Products

Community Treasure Hunt

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

Start Hunting!