fmincon and exitflag = -2 or 2 / non respect of constrained conditions
이전 댓글 표시
Hello everyone,
I'm creating a model on Matlab for optimization with inequality constraints, especially the minimization of a function with several variables (at least 4). I'm trying to run the optimization for many times to get a list of solutions, gotten by a parameter varying at each simulation.
However, I cannot solve problems I met: - exitflag = -2 most of the time and 2 for the other simulations. I don't know where I can correct or change to get exitflag = 1. - among constrained conditions I set, some of them aren't respected after minimizations.
If someone could advice me what method I could follow?
Thank you for the answer.
General description of the model: *------ objective : minimize a section ( I shape) submitted to a tension force *------ variables : thicknesses, height, wide *------- constraints : - section > 0 - variables >0 + linear inequality relation between two of them - tension stress < certain value in MPa : non respected condition
채택된 답변
추가 답변 (2개)
Alan Weiss
2012년 6월 6일
편집: John Kelly
2015년 3월 2일
0 개 추천
If you have a Global Optimization Toolbox license, you could try MultiStart. If you like, you can filter the initial points so the local solver uses only feasible starting points, although I am not sure this is really necessary. See this link for general information about how to use MultiStart, and this link to see the effect of using only feasible start points.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
댓글 수: 4
Helen
2012년 6월 7일
Walter Roberson
2012년 6월 7일
Multistart is part of the Global Optimization Toolbox, which is not provided with the MATLAB Student Version. It can, however, be added for about $US29
http://www.mathworks.com/academia/student_version/companion.html
Sargondjani
2012년 6월 8일
you have three input variables so you could make a 3D grid and solve for all points in the grid.
you could start with a wide grid with not so many points and then make a finer grid around the points that give feasible solutions, or something like that
Helen
2012년 7월 12일
Ahmed Rageh
2018년 7월 4일
0 개 추천
Where could I find TolX? the code has TolFun and TolCon only.
options = optimset('Display','iter','TolFun',1e-10,'TolCon',1e-10)
댓글 수: 1
Walter Roberson
2018년 7월 6일
TolX is still the name to use with optimset() .
If you were updating to the newer option routines, you would use StepTolerance, or XTolerance for GlobalSearch and MultiStart
카테고리
도움말 센터 및 File 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!