How to conditionalize a constraint in mip?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Christian Piwitt
am 24 Nov. 2015
Kommentiert: Nana
am 11 Jun. 2016
I have an integer variable X that counts down. When it takes the value of zero a binary variable A should take the value 1. Is there a way to do this in Matlab?
0 Kommentare
Akzeptierte Antwort
Matt J
am 24 Nov. 2015
Impose the linear constraints
A+X>=1
A<=1-X/Xmax
where Xmax is the maximum value that X can assume.
6 Kommentare
Nana
am 11 Jun. 2016
I thought a is similar with X, but then I realized X is count-down integer, not continuous variable. Anyway, do you still any idea to solve it? Thanks.
Weitere Antworten (1)
Matt J
am 24 Nov. 2015
Bearbeitet: Matt J
am 25 Nov. 2015
Decompose into 2 sub-problems.
- A version of the original problem where A is fixed at 0, and a lower bound of 1 is applied to X
- A version of the original problem where X is fixed at 0 and A is fixed at 1.
Then see which sub-problem produces the more optimal value.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Get Started with Optimization Toolbox finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!