fmincon constraints - min max problem
Show older comments
Hi,
I have a very simple question, but the answer may not be so simple. I'm doing optimization with fmincon and nonlinear constraints c(x) <= 0.
I have several similar constraints and my question is how the most optimal way is of handling them? My constraints are given as:
c1-1 <= 0
c2-1 <= 0
c3-1 <= 0
c1-c3 are all of the same order. I can see two ways of handling these constraints:
Option 1: Deal with the three above constraints individually in c(x), hence c is a vector of three elements.
Option 2: Have a single constraint on the form: max(c1,c2,c3)-1 <= 0, hence c is a single value.
Is it possible to say anything in general about the two methods? Is one of the methods more robust (faster convergence) or does it depend on the specific problem?
My thoughts on the above is that option 1 has more constraints, but each constraint is simple. Option 2 has only one constraint, but it can be highly nonlinear if the max function changes often between c1, c2 and c3. I cannot figure out which method is the best/worst of the two, so I hope someone can help me figure this out?
Best regards
Mads
Answers (1)
John D'Errico
on 1 Dec 2017
1 vote
I'm afraid I don't see what is your problem. Read the help docs for fmincon. Look at the examples.
Are c1, c2 c3 optimization variables? I so, then use bound constraints.
Are they expressions derived from your parameters? If they are linear then use the linear inequality constraints that fmincon allows. This allows you to provide multiple constraints.
If they are nonlinear functions of the parameters, then use the nonlinear constraint function. Again, multiple constraints are allowed.
Do NOT try to turn three constraints into one constraint using an artifice as you want to do. That will simply create a non-differentiable constraint, thus causing problems.
1 Comment
Mads Baandrup
on 1 Dec 2017
Categories
Find more on Systems of Nonlinear Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!