Lecture 3 – Classic LP Examples. Topics Employee scheduling problem Energy distribution problem Feed mix problem Cutting stock problem Regression analysis Model Transformations. Examples of LP Formulations. 1. Employee Scheduling.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Topics
1. Employee Scheduling
Macrosoft has a 24houraday, 7daysaweek toll free hotline that is being set up to answer questions regarding a new product. The following table summarizes the number of fulltime equivalent employees (FTEs) that must be on duty in each time block.
FTEs
Interval
Time
1
04
15
2
48
10
3
812
40
4
1216
70
5
1620
40
6
200
35
Constraints for Employee Scheduling
Formulate an LP to determine how to staff the hotline at minimum cost.
(4 12.95)
(8 15.20)
min
121.6(x1 + • • • + x6) +
51.8(y1 + • • • + y6)
5
³
s.t.
y1
15
x1 + x6 +
6
5
³
y2
10
x1 + x2 +
6
All shifts must be covered
5
³
y3
40
x2 + x3 +
6
5
³
y4
70
x3 + x4 +
6
5
³
y5
40
x4 + x5 +
6
5
³
y6
35
x5 + x6 +
6
PT employee is 5/6 FT employee
Decision Variables
xt = # of fulltime employees that begin the day at the start of interval t and work for 8 hours
yt = # of parttime employees that are assigned interval t
2
x1 + x6
³
(x6 + x1 + y1)
3
At least 2/3 workers must be full time
2
³
(x1 + x2 + y2)
x1 + x2
3
.
.
.
2
³
x5 + x6
(x5 + x6 + y6)
3
Nonnegativity
xt ³ 0, yt ³ 0 t =1,2,…,6
2. Energy Generation Problem (with piecewise linear objective)
Austin Municipal Power and Light (AMPL) would like to determine optimal operating levels for their electric generators and associated distribution patterns that will satisfy customer demand. Consider the following prototype system
Demand requirements
4 MW
1
1
Demand
sectors
Plants
7 MW
2
2
3
6 MW
The two plants (generators) have the following (nonlinear) efficiencies:
Plant 1
[ 0, 6 MW]
[ 6MW, 10MW]
Unit cost ($/MW)
$10
$25
Plant 2
[ 0, 5 MW]
[5MW, 11MW]
Unit cost ($/MW)
$8
$28
For plant #1, e.g., if you generate at a rate of 8MW (per sec), then the cost ($) is = ($10/MW)(6MW) + ($25/MW)(2MW) = $110.
Problem Statement and Notation
Formulate an LP that, when solved, will yield optimal power generation and distribution levels.
Decision Variables
x
= power generated at plant
1 at operating level 1
11
1
x
²
2
²
²
²
²
²
²
12
2
1
x
²
²
²
²
²
²
²
21
2
x
2
²
²
²
²
²
²
²
22
y
1 to demand sector 1
= power sent from plant
11
2
y
1 ²²²
²
²
²
²
12
y
3
²
1
²
²
²
²
²
²
13
y
1
²
2
²
²
²
²
²
²
21
y
2
²
2
²
²
²
²
²
²
22
y
3
²
2
²
²
²
²
²
²
23
min
10x11 + 25x12 + 8x21 + 28x22
s.t.
y
y
y
= x11 + x12
+
+
Flow balance
11
12
13
y
y
y
= x21 + x22
+
+
21
22
23
y
y
+
= 4
11
21
y
y
Demand
+
= 7
12
22
y
y
= 6
+
13
23
0 £ x11 £ 6, 0 £x12£ 4
0 £ x21 £ 5, 0 £x22£ 6
y11, y12, y13, y21, y22, y32 0
Note that we can model the nonlinear operating costs as an LP only because the efficiencies have the right kind of structure. In particular, the plant is less efficient (more costly) at higher operating levels. Thus the LP solution will automatically select level 1 first.
General Formulation of Power Distribution Problem
The above formulation can be generalized for any number of plants, demand sectors, and generation levels.
Indices/Sets
plants
i Î I
j Î J
demand sectors
generation levels
k Î K
Data
Cik = unit generation cost ($/MW) for plant i at level k
uik = upper bound (MW) for plant i at level k
dj = demand (MW) in sector j
Decision Variables
xik = power (MW) generated at plant i at level k
yij = ower (MW) sent from plant i to sector j
å
å
cikxik
min
iÎI
kÎK
xik
å
å
s.t.
yij
=
" i Î I
jÎJ
kÎK
å
yij = dj
" j Î J
iÎI
0 £yij" i Î I, j Î J
3. Feed Mix Problem
Nutrient, k
Vitamins
Protein
Calcium
Crude Fat
Ingredient, i
Corn
8
10
6
8
Limestone
6
5
10
6
Soybeans
10
12
6
6
Fish Meal
4
18
6
9
Let aik= quantity of nutrient k per kg of ingredient i
Demand (kg)
Cattle
Sheep
Chicken
dj
10,000
6,000
8,000
Supply (kg)
Corn
Limestone
Soybeans
Fish Meal
si
6,000
10,000
4,0
00
5,000
Vitamins
Crude fat
Protein
Calcium
min max
min max
min max
min max
Cattle
6 
6 
7 
4 8
Sheep
6 
6 
6 
4 8
6 
Chicken
4 6
6 
4 8
The above values represent bounds:Ljk& Ujk
Soybeans
Fish meal
Limestone
Corn
cost/kg, ci
24¢
12¢
20¢
12¢
Formulate problem as a linear program whose solution yields desired feed production levels at minimum cost.
Indices/sets
i I
ingredients { corn, limestone, soybeans, fish meal }
j J
products { cattle, sheep, chicken feeds }
nutrients { vitamins, protein, calcium, crude fat }
k K
dj
demand for product j (kg)
si
supply of ingredient i (kg)
Ljk
lower bound on number of nutrients of type k per kg of product j
upper bound on number of nutrients of type k per kg of product j
Ujk
ci
cost per kg of ingredient i
aik
number of nutrients k per kg of ingredient i
Decision Variables
xij
amount (kg) of ingredient i used in producing product j
aikxij£ Ujkdj
"j J, kK
iÎI
å
aikxij ³ Ljk dj
"j J, kK
iÎI
LP Formulation
å
å
cixij
min
jÎJ
iÎI
å
xij = dj
"j J
s.t.
iÎI
xij£ si
å
"i I
jÎJ
"i I, j J
xij³ 0
Generalization of feed Mix Problem Gives
Blending Problems
Blended
commodities
Raw Materials
Qualities
corn, limestone,
protein, vitamins,
feed
soybeans, fish meal
calcium, crude fat
butane, catalytic
octane, volatility,
gasoline
reformate,
vapor pressure
heavy naphtha
pig iron,
carbon,
metals
ferrosilicon,
manganese,
carbide, various
chrome content
alloys
³
³
³
2 raw ingredients
1 quality
1 commodity
4. TrimLoss or Cutting Stock problem
Length
Width
Order
1
¢
5
10,000¢
2
¢
7
30,000¢
3
¢
9
20,000¢
Problem: What is trimloss?
¢
20
¢
10
5000'
5'
¢
5
9'
¢
7
Decision variables: xj= length of roll cut using pattern, j = 1, 2, … ?
¢
¢
10
roll
20
roll
x3
x9
x2
x8
x1
x5
x4
x7
x6
5¢
2
0
0
4
2
2
1
0
0
7¢
0
1
0
0
1
0
2
1
0
9¢
0
0
1
0
0
1
0
1
2
Trim loss
0
3
1
0
3
1
1
4
2
min
z =
10(x
+x
+x
) + 20(x
+x
+x
+x
+x
+x
)
7
9
1
2
3
4
5
6
8
³
s.t.
2x
+
4x
+
2x
+ 2x
+ x
10,000
1
7
4
5
6
³
+ x
x
+
x
+
2x
30,000
8
7
2
5
³
+ x
x
+
x
+ 2x
20,000
8
3
9
6
xj³ 0, j = 1, 2,…,9
+ 2x9
min
z =
3x2
+
x3
+
3x5
+ x6
+ x7
+
4x8
+ 5y1 + 7y2 + 9y3
4
s.t.
2x1
+
x4
+
2x5
+ 2x6
+ x7 – y1
=
10,000
x2
+
x5
+
2x7
+ x8
– y2
=
30,000
x3
+
x6
+
x8
+ 2x9
– y3
=
20,000
xj³ 0, j = 1,…,9; yi³ 0, i = 1, 2, 3
where yi is overproduction of width i
5. Constrained Regression
Data (x,y) = { (1,2) , (3,4) , (4,7) }
y
·
7
6
5
·
4
3
·
2
1
x
1 2 3 4 5
We want to “fit” a linear function y = ax + b to these data points; i.e., we have to choose optimal values for a and b.
Objective: Find parameters a and b that minimize the
maximum absolute deviation between the data yi and the fitted line yi = axi + b.
Ù
Ù
yi
yi
and
Ù
Predicted
value
observed
value
In addition, we’re going to impose a priori knowledge that the
slope of the line must be positive. (We don’t know about the intercept.)
known to be positive
a = slope of line
Decision variables
tive
positive or nega
b = yintercept
b = b+b, b+ 0, b 0
Ù
min max { yiyi : i = 1, 2, 3 }
Ù
where yi = axi + b
Ù
Let w = max { yiyi : i = 1, 2, 3 }
Optimization model:
min w
Ù
s.t. w³ yiyi, i = 1, 2, 3
Ù
w ³

1a + b – 2
y1
=
y1
Ù

y2
=
y2
w ³
3a + b – 4
Ù
w ³

=
y3
y3
4a + b – 7
Convert absolute value terms to linear terms:
Note: 2 ³x iff 2 ³x and 2 ³ x
Ù
Thus w ³

is equivalent to
y
y
i
i
w³axi + byi and w³ axi – b + yi
min w

s.t.
+


£
a + b
b
w
2

+


£

ab
+ b
w
2

+


£
3a + b
b
w
4


+


£

3a
b
+ b
w
4

+


£
4a + b
b
w
7

+

+

£


4a
b
b
w
7
a, b+, b, w³ 0
Minimize {c1x1 + c2x2 + … + cnxn}
ÛMaximize {–c1x1 – c2x2 – … – cnxn}