0

Question 1 : x , y are integer non negative variables

i have a condition - if x > 0 then y=0

Question 2 : a , b , c , d , e are integer non negative variables if any one of above > 0 then other 4 will be zero.

How to formulate above constraint as linear equations.I know how to handle above for Boolean variables but could not do for integer variable. I tried searching in other forums and WEB but could not get the solution.

talonmies
  • 70,661
  • 34
  • 192
  • 269

2 Answers2

0

As a starting point try creating some additional boolean variables, one for each of your non boolean variables. Then you can use a typical 'big m' modelling for each. Once you have something that works you can try reworking it to get a better model.

TimChippingtonDerrick
  • 2,042
  • 1
  • 12
  • 13
  • Thanks for reply , could you please give an example with equations. – Mohammad Shariq Aug 21 '16 at 11:47
  • @MohammadShariq Just google indicator-variables in MIP or read [AIMMS Modeling Guide - Integer Programming Tricks](http://www.idi.ntnu.no/~mlh/algkon/ip_tricks.pdf) (e.g. chapter 7.4) – sascha Aug 21 '16 at 12:24
0

You can use logical implication in CPLEX (if-then). Please check out the following page: Logical constraints for CPLEX

Michał Urbaniak
  • 1,249
  • 13
  • 28