0
$\begingroup$

There is an integer linear programming problem with this constraint:

$$\left|X1 - X2\right|= 5\text{ or }10\text{ or }20$$

How it can be solved with adding auxiliary variable $y$?

Main problem is that "or" between $5$ and $10$ and $20$.

$\endgroup$
0
$\begingroup$

Here is a tactic using 3 auxiliaries:

$$|X_1 - X_2| = 5y_1 + 10y_2 + 20y_3$$

$$y_1 + y_2 + y_3 = 1, all binary$$

Now you just need to model the left-hand-side, which isn't trivial.

$\endgroup$
  • 1
    $\begingroup$ You're quite close, actually. Just apply your approach to the constraint $$X_1-X_2 = -20~\text{or}~{-10}~\text{or}~{-5}~\text{or}~5~\text{or}~10~\text{or}~20$$ $\endgroup$ – Michael Grant Mar 23 '15 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.