Fmincon cannot move away from initial point
38 views (last 30 days)
Show older comments
I am trying to run fmincon with 70 design variables. It performs the 0th iteration for the partial derivatives without problems.
Then in iteration 1, it changes values of the variables for 2-3 evaluations, after which fmincon starts decreasing and decreasing delta x with respect to the initial point every evaluation, until delta x gets below the threshold value and the optimisation stops. The result is that basically nothing happened: optimum design vector equals initial design vector.
Additional notes:
- Design vector, constraints and objective value are normalised.
- Some of the design variables are surrogates values. (IDF optimisation is a requirement) During analysis that happens every evaluation, the real values for these variables are computed. Then in the constraints that are passed to fmincon, the surrogates from the design vector and the real values that are computed, are constrained with equality constraints.
Does anyone have experience with such issue, and how to solve it?
Edit: To add to the above, after delta x falls below the threshold, not all constraints are entirely satisfied, even though the design vector is very close to the initial vector. So when it stops, it takes the only feasible design that is available, which is the initial design.
2 Comments
Matt J
on 10 Nov 2016
Then in iteration 1, it changes values of the variables for 2-3 evaluations after which fmincon starts decreasing ....The result is that basically nothing happened: optimum design vector equals initial design vector.
The above two statements seem to contradict each other. If you witness a decrease in the function, how is it also true that "nothing happened"?
Some of the design variables are surrogates values. (IDF optimisation is a requirement)
This needs clarification, like the meaning of "surrogate" and "IDF".
Answers (3)
Matt J
on 10 Nov 2016
The typical reason why an Optimization Toolbox solver does not move from the initial point is that you have given it a piece-wise constant function, for example because your objective uses discretizing operations like round, ceil, floor, etc... These are illegal first of all because they are non-differentiable, violating smoothness assumptions made by fmincon and friends.
Moreover, though, piecewise constant functions have local minima at all points except at the discontinuous boundaries between the pieces. Therefore, you stand an excellent chance of getting stuck at any starting point you choose.
3 Comments
Matt J
on 15 Apr 2024 at 15:57
For the case that any of the discretizing operators are used, do you have any idea to solve this problem?
These operators should not be used. An appropriate alternative to them would depend on the specifics of the objective function, and what it's trying to compute.
Walter Roberson
on 10 Nov 2016
fmincon() is a local optimizer, and you are trapped in a local minima. The other points that were evaluated at did not satisfy the constraints any better than the original point did.
Note: the non-linear constraint function is not used to constrain values for the first few calls to the objective function, as the first few calls to the objective function are used to estimate the Hessian. The linear constraints are used in determining where to probe the Hessian, if I recall correctly.
Also, in general, the algorithms do not necessarily call the nonlinear constraint function until a feasible location is found and then call the objective function there. They might do that, mostly, but only some of the algorithms promise to satisfy the non-linear constraints at every step.
Alan Weiss
on 10 Nov 2016
I suggest that you take a look at Final Point Equals Initial Point and also Optimizing a Simulation or Ordinary Differential Equation, especially the part about finite difference step sizes. And maybe consult other parts of the documentation about improving solutions (the other part of the Final Point Equals Initial Point section).
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
0 Comments
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!