How to conditionalize a constraint in mip?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Matt J
il 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 Commenti
Nana
il 11 Giu 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.
Più risposte (1)
Matt J
il 24 Nov 2015
Modificato: Matt J
il 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 Commenti
Vedere anche
Categorie
Scopri di più su Get Started with Optimization Toolbox in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!