MATLAB Answers

0

Can I use Optimization tool like fmincon or ga etc if I have constraint optimization problem that optimization variable cannot be within a range inside upper and lower limit?

Asked by mumin chy on 21 Mar 2019
Latest activity Edited by Matt J
on 22 Mar 2019
Can I use Optimization tool like fmincon or ga etc if I have constraint optimization problem that optimization variable cannot be within a range inside upper and lower limit? I have an optimization problem with optimization variable x bounded to Lower_limit < x < Upper_Limit. But I have some constraint on x that x cannot be between inter_limit2 and inter_limit3. where Lower_limit < inter_limit2 < inter_limit3 < Upper_Limit.
Example : suppose I am solving an optimization problem where x should be within 1 and 10 or 29 and 99. The feasible space for x is from 1 to 10 and 29 to 99.
Any help?

  0 Comments

Sign in to comment.

2 Answers

Answer by Matt J
on 22 Mar 2019
Edited by Matt J
on 22 Mar 2019
 Accepted Answer

Example : suppose I am solving an optimization problem where x should be within 1 and 10 or 29 and 99. The feasible space for x is from 1 to 10 and 29 to 99.
This can be expressed using the mixed integer linear constraints,
28*b+1 <= x <= 89*b+10
where b is an additional unknown binary variable that you must include in your design vector. Since only ga and intlinprog support mixed integer constraints, you would have to use whichever of those is applicable to your objective function.

  0 Comments

Sign in to comment.


Answer by Walter Roberson
on 21 Mar 2019

You could use the nonlinear constraints for that, but it is unlikely to work at all well.
Instead, run the problem once for each combination of disjoint ranges, and pick the best overall solution.

  2 Comments

The important point is fmincon cannot jump from one domain to a second disjoint domain. So whatever domain you start the solver in, it will almost certainly stay there, never seeing if a better solution might exist in the other domain.

Sign in to comment.