Binary variables (Absolute values)

Click For Summary
SUMMARY

The discussion focuses on the formulation of absolute values in Mixed Integer Programming (MIP) using binary variables. The formula for absolute values is defined as y = |x1 - x2|, where x1 and x2 are constrained between 0 and U. The introduction of binary variables d1 and d2 allows for the representation of the sign of the difference between x1 and x2. The MIP formulation includes constraints that ensure the correct representation of absolute values, specifically highlighting the role of the coefficient 2 in the constraints related to d1 and d2.

PREREQUISITES
  • Understanding of Mixed Integer Programming (MIP)
  • Familiarity with binary variables in optimization
  • Knowledge of absolute value functions in mathematical programming
  • Experience with optimization constraints and formulations
NEXT STEPS
  • Study the implications of binary variables in MIP formulations
  • Explore the role of absolute values in optimization problems
  • Learn about the FICO Xpress Optimization tool and its documentation
  • Investigate advanced MIP techniques for handling non-linear constraints
USEFUL FOR

Mathematicians, operations researchers, and optimization practitioners interested in advanced MIP techniques and the application of binary variables in mathematical modeling.

Rev. Cheeseman
Messages
360
Reaction score
21
TL;DR
The value is from 0 to 1, but what do these 2s represent?
Hello,

According to https://www.fico.com/fico-xpress-op.../mipform/dhtml/chap2s1.html?scroll=ssecabsval the formula for absolute values are :

y = | x1 - x2| for two variables x1, x2 with 0 ≤ xi ≤ U

Introduce binary variables d1, d2 to mean
d1 : 1 if x1 - x2 is the positive value
d2 : 1 if x2 - x1 is the positive value

MIP formulation
0 ≤ xi ≤ U [1.i]
0 ≤ y - (x1-x2) ≤ 2 · U · d2 [2]
0 ≤ y - (x2-x1) ≤ 2 · U · d1 [3]
d1 + d2 = 1 [4]

Notice the bolded 2s above in the MIP formulation section, what do these 2s represent? I thought the range of the value is just 0 to 1.
 
Physics news on Phys.org
Consider <br /> y - (x_1 - x_2) = |x_1 - x_2| - (x_1-x_2) = \begin{cases}<br /> 0 &amp; x_1 \geq x_2\quad (d_2 = 0)\\<br /> 2|x_1 - x_2| &amp; x_1 &lt; x_2\quad (d_2 = 1).\end{cases} Therefore 0 \leq y - (x_1 - x_2) \leq 2Ud_2.
 
pasmith said:
Consider <br /> y - (x_1 - x_2) = |x_1 - x_2| - (x_1-x_2) = \begin{cases}<br /> 0 &amp; x_1 \geq x_2\quad (d_2 = 0)\\<br /> 2|x_1 - x_2| &amp; x_1 &lt; x_2\quad (d_2 = 1).\end{cases} Therefore 0 \leq y - (x_1 - x_2) \leq 2Ud_2.

Ok, I'm sorry if I sounds ignorant but the range of value is still 0 to 1, and not from 0 to 1 and then 2. Correct?
 

Similar threads

  • · Replies 24 ·
Replies
24
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 18 ·
Replies
18
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 2 ·
Replies
2
Views
1K