IE 2252 Modeling in or Graphical Solutions
IE 2252 Modeling in or Graphical Solutions
GRAPHICAL SOLUTION
1
The Graphical Solution
2
y A QUICK REMINDER OF
4 BASIC GEOMETRY AND LINES
𝑎𝑎 𝒙𝒙 + 𝑏𝑏 𝒚𝒚 = c
3
6𝒙𝒙 + 8𝒚𝒚 = 24
2 Assume y= 0 (4,0)
Then x = 4
Assume x= 0 (0,3)
1
Then y = 3
-1
x
1 2 3 4
-1
3
y
4 INEQUALITIES
3
6𝒙𝒙 + 8𝒚𝒚 = 24
2
≤
1
-1
x
1 2 3 4
-1
4
y
4 INEQUALITIES
6𝒙𝒙 + 8𝒚𝒚 ≤ 24
3
1
6 ∗2 2
0
𝟏𝟏 + 8 ∗1
4 4 ≤ 24 ?
Does the inequality hold at this point?
2
No √X
Yes
1
-1
x
1 2 3 4
-1
5
y
4 INEQUALITIES
6𝒙𝒙 + 8𝒚𝒚 ≤ 24
3
-1
x
1 2 3 4
-1
6
y
4 INEQUALITIES
6𝒙𝒙 + 8𝒚𝒚 ≤ 24
3
-1
x
1 2 3 4
-1
7
y
4 INEQUALITIES
6𝒙𝒙 + 8𝒚𝒚 ≤ 24
3
𝑥𝑥 ≥ 0
2 𝑦𝑦 ≥ 0
-1
x
1 2 3 4
-1
8
𝑥𝑥y2
4 INEQUALITIES
𝑥𝑥2 ≤ 24
6 𝑥𝑥1+8𝑦𝑦
3
𝑥𝑥1 ≥ 0
2
𝑦𝑦
𝑥𝑥2 ≥ 0
-1
𝑥𝑥
x1
1 2 3 4
-1
9
𝑥𝑥2
4 INEQUALITIES
6 𝑥𝑥1+8 𝑥𝑥2 ≤ 24
3
𝑥𝑥1 ≥ 0
2
𝑥𝑥2 ≥ 0
-1
𝑥𝑥1
1 2 3 4
-1
10
Example 1: Giapetto’s Woodcarving
• Giapetto’s, Inc., builds wooden soldiers and trains.
– Each soldier :
• Sells for $27 and uses $10 worth of raw materials.
• Increases Giapetto’s variable labor/overhead costs by $14.
• Requires 2 hours of finishing labor.
• Requires 1 hour of carpentry labor.
– Each train :
• Sells for $21 and used $9 worth of raw materials.
• Increases Giapetto’s variable labor/overhead costs by $10.
• Requires 1 hour of finishing labor.
• Requires 1 hour of carpentry labor.
11
Ex. 1 - continued
• Each week Giapetto can obtain:
– All needed raw material.
– Only 100 finishing hours.
– Only 80 carpentry hours.
• Demand for trains is unlimited.
• At most 40 soldiers can be sold each week.
• Giapetto wants to maximize weekly profit :
(revenues – costs)
• Formulate a mathematical model of Giapetto’s
situation that can be used maximize weekly profit.
12
The LP model
13
The Graphical Solution
14
𝑥𝑥2 2 x1 + x2 ≤ 100 (finishing constraint)
100
x1 + x2 ≤ 80 (carpentry constraint)
x1 ≤ 40 (demand constraint)
80 x1 ≥ 0 (sign restriction)
x2 ≥ 0 (sign restriction)
60
40
20
20 40 60
𝑥𝑥1
80 15
X2
B
100
The feasible region finishing constraint Feasible Region
of the Giapetto LP is D
80
the five sided demand constraint
polygon DGFEH.
60
G
40
carpentry constraint
the interior of this
polygon (the shaded
20
area) is in the
F
z = 180
feasible region. z = 60
E A C
H
10 20 40 50 60 80 X1
16
• Having identified the feasible region for the Giapetto
LP, a search can begin for the optimal solution which
will be the point in the feasible region with the
largest z-value.
17
X2
B
100
finishing constraint Feasible Region
80
demand constraint
z = 3x1 + 2x2
60
G
F
z = 180
z = 60
E A C
H
10 20 40 50 60 80 X1
18
X2
B
100
The last isoprofit finishing constraint Feasible Region
intersecting (touching)
D
the feasible region
80
indicates the optimal demand constraint
60
G
For the Giapetto
problem, this occurs at 40
z = 100
carpentry constraint
point G.
20
F
(x1 = 20, x2 = 60, z = 180) z = 180
z = 60
E A C
H
10 20 40 50 60 80 X1
19
Binding and Nonbinding Constraints
• A constraint is binding (active) at the optimal solution if the
left-hand and right-hand side of the constraint are equal when
the optimal values of the decision variables are substituted
into the constraint. Otherwise, the constraint is called
nonbinding (inactive).
x1 + x2 ≤ 80 (carpentry constraint)
20 + 60 = 80
• The demand constraint for wooden soldiers is nonbinding:
x1 ≤ 40 (demand constraint)
20 < 40.
20
Convex Sets, Extreme Points, and LP
CONVEX NON-CONVEX
21
X2
B
100
finishing constraint Feasible Region
80
for the Giapetto LP is demand constraint
a convex set.
60
G
z = 100
40 carpentry constraint
CONVEX
20
F
z = 180
z = 60
E A C
H
10 20 40 50 60 80 X1
22
Are these sets convex or non-convex?
A E B A B
A B
C D
(a) (b) (c) (d)
23
A E B A B
A B
C D
(a) (b) (c) (d)
24
What are the extreme points of the convex sets
below?
A E B A B
A B
C D
(a) (b) (c) (d)
25
In figure (a), each point on the circumference of the circle is
an extreme point of the circle.
In figure (b), A, B, C, and D are extreme points of S. Point E is
not an extreme point since E is not an end point of the line
segment AB.
Extreme points are not defined for non-convex sets.
A E B A B
A B
C D
(a) (b) (c) (d)
26
It can be shown that:
27
X2
B
100
finishing constraint Feasible Region
80
For the Giapetto demand constraint
problem, the
60
G
optimal solution
(Point G) is an z = 100
extreme point of
40
carpentry constraint
F
z = 180
z = 60
E A C
H
10 20 40 50 60 80 X1
28
10 Dorian Auto
2 4 6 8 10 12 29
Dorian Auto X2
14 B
10
Feasible
8 Region
(unbounded)
To solve this LP 6
graphically begin by z = 600
30
Solution continued
31
Solution continued
32
Special Cases
• The Giapetto and Dorian LPs each has a unique
optimal solution.
• Some types of LPs do not have unique
solutions.
– Some LPs have an infinite number of solutions
(alternative or multiple optimal solutions).
– Some LPs have no feasible solutions (infeasible
LPs).
– Some LPs are unbounded: There are points in the
feasible region with arbitrarily large (in a max
problem) z-values.
33
X2
Some LPs have multiple B
60
optima. Consider the
following formulation: D
50
Feasible Region
40
1 1
s.t. ⋅ x1 + ⋅ x2 ≤ 1
40 60 E
30
z = 100
1 1
⋅ x1 + ⋅ x2 ≤ 1 z = 120
50 50
20
x1 , x2 ≥ 0
z = 60
10
34
• It is possible for an LP’s feasible region to be
empty, resulting in an infeasible LP.
• Because the optimal solution to an LP is the
best point in the feasible region, an infeasible
LP has no optimal solution.
35
The following X2
60
formulation is No Feasible Region
infeasible:
x1>=≥ 030
50
x1
40
1 1
s.t. ⋅ x1 + ⋅ x2 ≤ 1
40 60
xx2
2≥ 30
>=0
1 1 30
⋅ x1 + ⋅ x2 ≤ 1
50 50
x 1 ≥ 30
20
x 22 ≥ 20
30
x1 , x2 ≥ 0
10
37
max z = 2x1 – x2
s.t. x1 – x2 ≤ 1
2x1 +x2 ≥ 6 X2
Feasible Region
x1, x2 ≥ 0 6 D
39
40 40
Graphical Solution
LP has only
two decision
variables (two
dimensions),
the problem
can be solved
graphically.
Constraint 1:
x1≤ 4
41 41
Constraint 1:
The Feasible
Region
x1≤ 4
Constraint 2:
2x2 ≤ 12
Constraint 3:
3x1 + 2x2 = 18
Constraints 4 and 5:
x1≥ 0 , x2≥ 0
42
Optimal Solution
43
Optimal Solution
44
Diet Problem
45
Diet
Problem
46
47