Professional Documents
Culture Documents
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
Macrosoft has a 24-hour-a-day, 7-days-a-week toll
free hotline that is being set up to answer questions
regarding a new product. The following table
summarizes the number of full-time equivalent
employees (FTEs) that must be on duty in each time
block.
(8 15.20) (4 12.95)
min 121.6(x1 + ••• + x6) + 51.8(y1 + ••• + y6)
5
s.t. x1 + x6 + 6
y1 15
5
x1 + x2 + 6
y2 10
5
x2 + x3 + 6
y3 40 All shifts must
5
be covered
x3 + x4 + 6
y4 70
5
x4 + x5 + 6
y5 40
5
x5 + x6 + 6
y6 35
x1 + x6 2 (x6 + x1 + y1)
3
2 (x + x + y )
x1 + x2 1 2 2 At least 2/3
.. 3
workers must
. be full time
2
x5 + x6 (x + x6 + y6)
3 5
xt yt t =1,2,…,6 Nonnegativity
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
1 4 MW
1
Demand
Plants 2 sectors 7 MW
2
3
6 MW
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
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
i I plants
j J demand sectors
k K generation levels
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 = power (MW) sent from plant i to sector j
General Network Formulation
min cikxik
iI kK
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
Indices/sets
i I ingredients { corn, limestone, soybeans, fish meal }
j J products { cattle, sheep, chicken feeds }
k K nutrients { vitamins, protein, calcium, crude fat }
Data
Decision Variables
xij amount (kg) of ingredient i used in producing
product j
LP Formulation
min cixij
iI jJ
Blended
Raw Materials Qualities commodities
corn, limestone, protein, vitamins, feed
soybeans, fish meal calcium, crude fat
10 20
5' 5000'
9' 5
7
x1 x2 x3 x4 x5 x6 x7 x8 x9
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
s.t. 2x 1 + 4x 4 + 2x 5 + 2x 6 + x 7 10,000
x 2 + x 5 + 2x 7 + x 8 30,000
x3 + x6 + x8 + 2x 9 20,000
xj 0, j = 1, 2,…,9
Alternative Formulation
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
7
6
5
4
3
2
1
1 2 3 4 5 x
observed Predicted
value value
Optimization model:
min w
s.t. w |yi - yi|, i = 1, 2, 3
Nonlinear constraints:
w y1 - y1 = 1a + b – 2
w y2- y2 = 3a + b – 4
w y3- y3 = 4a + b – 7
• Nonpositive variable:
xj ≤ 0 replace with xj = –yj where yj 0
• Unrestricted variables:
xj = y1j – y2j where y1j 0, y2j 0
What You Should Know
About LP Problems
• How to formulate various types of
problems.
• Difference between continuous and
integer variables.
• How to find solutions.
• How to transform variables and
functions into the standard form.