Linear Programming problem (p.35-49):
Example 1.1 of exercises and computer practicals:
1. Define the decision variable
Xb and Xc
2. Define the objective function
w = 60Xb + 10Xc
3. Add constraints & restrictions
Xb + 2Xc = 1500
4Xb + Xc = 2000
Xb + Xc = 1000
Non-negativity constraint = Xb ≥ 0 and Xc ≥ 0
4. Define the feasible are
0Xb + 2Xc = 1500 → Xc = 750
1Xb + 0Xc = 1500 → Xb = 1500
(1500,750)
0Xb + 1Xc = 2000 → Xc = 2000
4Xb + 0Xc = 2000 → Xb = 500
(500,2000)
0Xb + 1Xc = 1000 → Xc = 1000
1Xb + 0Xc = 1000 → Xb = 1000
(1000,1000)
5. Determine the objective coefficient and the iso-profit lines
𝑋𝑏 60 𝑋𝑏
w = 60Xb + 10Xc → c = (60,10) ( 𝑋𝑐 ) → c = ( 10 ) and x = ( 𝑋𝑐 )
6. Optimal solution
Xb* = 500
Xc* = 0
w = 60 x 500 + 10 x 0 = 30.000
Example 1.2
1. Decide the decision variables
X1 = kilorad of direction 1
X2 = kilorad of direction 2
2. Define the objective function
min(0.2X1 + 0.1X2)
3. Add constraints and restrictions
0.3X1 + 0.2X2 ≤ 1.2
0.4X1 + 0.6X2 = 2.4
0.6X1 + 0.3X2 ≥ 1.8
, Non-negativity constraint = X1 ≥ 0 and X2 ≥ 0
Example 2.1
a) 1) −x1 + 2x2 = − 1 → x1 = 0, x2 = -0.5 → (0,-5). x2 = 0, x1 = 1 → (1,0)
(2) 3x1 + 3x2 = 3 → x1 = 0, x2 = 1 → (0,1). x2 = 0, x1 = 1 → (1,0)
(3) −x1 + x2 = 2 → x1 = 0, x2 = 2 → (0,2). x2 = 0, x1 = -2 → (-2,0)
(4) x1 + x2 = 4 → x1 = 0, x2 = 4 (0,4). x2 =0, x1 = 4 → (4,0)
(5) 2x1 + 3x2 = 12 → x1 = 0, x2 = 4 → (0,4). x2 = 0 , x1 = 6 → (6,0)
b) Unbounded region = V1 is unbounded because the feasible area has infinite solutions.
Empty region = V3 set of feasible solutions is not possible. Because 1-4 lies within the
feasible area of V2 but 5 says it should be ≥ 12. (can’t be in two feasible areas at the same
time).
c)
V1 V2 V3
W1 X1* = 0, X2* = 2 X1* = 0, X2* = 2 infeasible
W* = -0 + 0,2 = 0,2 W* = 0x2
W2 Half line Line segments infeasible
W* = 102 𝑋1 0 1
X =( 𝑋2 ) = λ1+ ( 2 ) + λ2( 3 )
𝑋1 0 1
X = ( 𝑋2 ) = ( 2 ) + λ ( 1 ) λ1+λ2 ≥ 0
λ ≥0 w* = 102
W3 Solution is unbounded X1* = 1, X2* = 3 infeasible
W*3 = 8
V1, W1 V1, W2
Example 1.3
1. Decide the decision variables
Xa = price of A
Xb = price of B
, 2. Define the objective function
Max ❵ w= 1000Xa + 1500Xb
3. Add constraints and restrictions
15-Xa ≥ 10 - Xb → 15-Xa + Xb ≥ 10
25-Xb ≥ 20 - Xa → 25-Xa + Xb ≥ 20
Xa ≤ 15
Xb ≤ 25
Xa, Xb ≥ 0
Example 2.2
Sensitivity analysis:
3x1 + x2 = 9 → x1 = 0, x2 = 9 → (0,9). x2 = 0, x1 = 3 → (3,0)
x1 + x2 = 5 → x1 = 0, x2 = 5 → (0,5). x2 =0, x1 = 5 → (5,0)
Right hand side ranging
α X W
-infinity ≤ α≤ 1 X1* = 0, X2* = 5 W* = 5
1 ≤α ≤ 3 X1* = 2, X2* = 3 W* = 2α + 3
3 ≤α ≤ +infinity X1* = 3, X2* = 0 W* = 3α
How to find 1? → for which value do you find the yellow point instead of the blue point? → the
gradient needs to be perpendicual to the line:
αx1 + x2
x1 + x2
→ α/1 = 1/1 → α = 1
Example 2.3
3x1 + x2 = 9 → x1 = 0, x2 = 9 → (0,9). x2 = 0, x1 = 3 → (3,0)
x1 + x2 = 𝛃
, 𝛃 X W
-infinity ≤ 𝛃 ≤ 0 infeasible infeasible
0≤𝛃≤3 X1* = 𝛃, X2* = 0 W* = 2𝛃
3≤𝛃≤9 X1* = (-3+9)/2+𝛃 W* = 2X1 + X2
X2* = (3𝛃 -9)/2 W* = 2((-3𝛃+9)/(2+𝛃)) + (3𝛃-9)/2
9 ≤ 𝛃 ≤ infinity X1*= 0, X2* = 9 W* = 9
Exercise 1.4
Xc = # commercials
Xn = # newspapers
Xm = # magazines
Max ( np = 2Xc + Xn + 0.5Xm)
25Xc + 10Xn + 5Xm ≤ 2000
Xc + 0.6Xn + 0.4Xm ≥ 100
Xc,Xn,Xm ≥ 0
Excercise 3.1
min{w = 4x1 + 5x2 + 6x3}
x1 − 2x2 + 3x3 ≤ 6
−2x1 + 3x2 − x3 ≥ 7
x1 + x2 + x3 = −3
x1 0, x2 0, x3 free.
max{w = -4x1 - 5x2 - 6x3}
x1 − 2x2 + 3x3 + Y1 = 6
−2x1 + 3x2 − X3 - Y2 = 7
-x1 - x2 - x3 = 3
max{w = -4x1 + 5x2* - 6x3^+ + 6X3^-}
x1 + 2x2* + 3x3^+ - 3X3^- + Y1 = 6
−2x1 - 3x2* − X3^+ + X3^- - Y2 = 7
-X1 + X2* - X3^+ + X3^- = 3
Exercise 3.2
x1 + x2 + x3 = 1
−x1 + 2x3 + x4 = 4