-1

I have the next two if-then constraints

1.- IF x1+y2-n >= 0 THEN m2=0, ELSE m2=1

Where x1, x2 are discrete, n is a constant and m2 is a binary variable.

  1. IF 2x1 - y1 >= 0 THEN m1=0, ELSE m1=1

Where m1 is a binary variable.

How transform this constraints into normal constraints .

  • Search for the term *indicator-variables* in MIP and read [this guide](http://www.idi.ntnu.no/~mlh/algkon/ip_tricks.pdf). Chapter 4.7 is the most relevant. The general idea is to introduce some indicator-variable (binary) to mark if the left part of your implication is valid; then use another bigM-based constraint to formulate the right part. – sascha Aug 21 '16 at 22:24

1 Answers1

0

You can divide your problem into four sub problems:

Problem 1:

m2=0
m1=0
x1+y2-n >= 0
2x1 - y1 >= 0

Problem 2:

m2=1
m1=0
x1+y2-n < 0
2x1 - y1 >= 0

Problem 3:

m2=0
m1=1
x1+y2-n >= 0
2x1 - y1 < 0`

Problem 4:

m2=1
m1=1
x1+y2-n < 0
2x1 - y1 < 0

On each of the problems, extract feeasable solutions, and get the best of the four if needed.

ykaragol
  • 6,139
  • 3
  • 29
  • 56