0% found this document useful (0 votes)
33 views38 pages

IE 2252 LP Model Examples

Uploaded by

Ipek A.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views38 pages

IE 2252 LP Model Examples

Uploaded by

Ipek A.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

IE 2252

MODELING IN OPERATIONS RESEARCH

INTRODUCTION TO LP MODELS - 2

Department of Industrial Engineering

1
Linear Programming Models - Continued

2
Blending Problems
• LP models used for problems in which various inputs must be
mixed (blended) in some desired proportion to produce
goods.

• Some examples:
– Blending various types of crude oils to produce different types of
gasoline
– Blending various chemicals to produce other compounds
– Blending various types of metal alloys to produce various types of
steel

3
SUNCO OIL’s problem
• Sunco Oil manufactures three types of gasolines (gas 1, gas 2 and gas 3)
by blending three types of crude oil (crude 1, crude 2 and crude 3).
• The sales and purchase prices :

Sales Price per Barrel ($) Purchase Price per Barrel ($)
Gas Crude
1 70 1 45
2 60 2 35
3 50 3 25

• Gasoline types differ in their octane rating and sulfur content:


– Gas 1 (2) [3] must have an average octane rating of at least 10 (8) [6] and
contain at most 1 (2) [1]% sulfur.

Crude Octane Rating Sulfur Content(%)

1 12 0.5
2 6 2.0
3 8 3.0
4
SUNCO OIL’s problem
• It costs $4 to convert one barrel of oil into one barrel of gasoline.

• Sunco’s refinery can produce up to 14,000 barrels daily.

• Sunco must meet the demand:


– Gas 1: 3,000 barrels per day
– Gas 2: 2,000 barrels per day
– Gas 3: 1,000 barrels per day

• Sunco also has the option of advertising to stimulate demand: Assume that
each $ spent daily in advertising for a particular type of gas increases the
demand by 10 barrels.

• For each crude oil type, the maximum amount that can be purchased is
5000 barrels daily.
5
Decision variables
• ai: dollars spent daily on advertising gas i, for i=1,2,3

• xij: barrels of crude oil j used daily to produce gas i, for


i=1,2,3 and j=1,2,3.

– Barrels of crude 2 used daily: x12 + x22 + x32

– Barrels of gas 3 produced daily: x31 + x32 + x33

• To simplify, assume that gasoline cannot be stored.

6
Objective function: Max Profit
Daily revenues from gas sales:
70(x11 + x12 + x13)+ 60(x21 + x22 + x23)+ 50(x31 + x32 + x33)
Gas 1 Gas 2 Gas 3
Daily cost of purchasing crude oil:
45(x11 + x21 + x31)+ 35(x12 + x22 + x32)+ 25(x13 + x23 + x33)
Oil 1 Oil 2 Oil 3
Daily advertising costs:
a1 + a2 + a3

Daily production costs:


4(x11 + x12 + x13 + x21 + x22 + x23 + x31 + x32 + x33)

OBJECTIVE FUNCTION :
Max z = (70-45-4) x11+ … + (50-25-4) x33 – (a1 + a2 + a3)

7
SUNCO OIL’s problem: Constraints
• Gas 1 produced daily should be equal to its demand.

• Daily demand for gas 1 = 3,000 + demand generated by ads


• demand generated by ads = (10 units / $ spent) * $ spent
=10 a1

x11 + x12 + x13 = 3,000 + 10 a1

x11 + x12 + x13 -10 a1 =3,000


x21 + x22 + x23 -10 a2 = 2,000
x31 + x32 + x33 -10 a3 = 1,000

8
SUNCO OIL’s problem: Constraints

• Upper bound (5,000) on the purchased amount of crude oil:


x11 + x21 + x31 ≤ 5,000
x12 + x22 + x32 ≤ 5,000
x13 + x23 + x33 ≤ 5,000

• Refinery capacity (14,000 barrels):


x11 + x12 + x13 + x21 + x22 + x23 + x31 + x32 + x33 ≤ 14,000

9
SUNCO OIL’s problem: Constraints
Average octane levels (at least 10, 8 and 6 required for gas 1, 2 and 3):
• If we blend 2 barrels of crude oil 1, 3 barrels of 2, and 1 barrel of 3:
(total octane)/(#barrels)=(12*2+6*3+8*1)/(2+3+1)=50/6

• Similarly, we have
(12 x11 + 6 x12 + 8 x13 ) / (x11 + x12 + x13 ) ≥ 10
12 x11 + 6 x12 + 8 x13 ≥ 10 (x11 + x12 + x13 )

2 x11 - 4 x12 – 2 x13 ≥ 0


4 x21 - 2 x22 ≥0
6 x31 + 2 x33 ≥ 0 Redundant since x31, x33 ≥ 0 (so no need for the last one)

Crude Octane Rating Sulfur Content(%)


1 12 0.5
2 6 2.0
3 8 3.0 10
SUNCO OIL’s problem: Constraints
% of sulfur (at most 1%, 2% and 1% required for gas 1, 2 and 3):
• (total sulfur)/(#barrels) ≤ threshold
(.005 x11 + .02 x12 + .03 x13 ) / (x11 + x12 + x13 ) ≤ 0.01

-0.005 x11 + 0.01 x12 + 0.02 x13 ≤ 0


-0.015 x21 + 0.01 x23 ≤ 0
-0.005 x31 + 0.01 x32 + 0.02 x33 ≤ 0

• Nonnegativity: xij, ai ≥ 0

Crude Octane Rating Sulfur Content(%)


1 12 0.5
2 6 2.0
3 8 3.0 11
Complete LP Model
Max z = 21 x11 + 31 x12 + 41 x13 + 11 x21 + 21x22 + 31 x23 + 1 x31 + 11 x32 + 21x33
- a1- a2-a3

s.t. x11 + x21 + x31 ≤ 5,000


x11 + x12 + x13 -10 a1 =3,000 x12 + x22 + x32 ≤ 5,000
x21 + x22 + x23 -10 a2 = 2,000 x13 + x23 + x33 ≤ 5,000
x31 + x32 + x33 -10 a3 = 1,000
x11 + x12 + x13 + x21 + x22 + x23 + x31 + x32 + x33 ≤ 14,000

2 x11 - 4 x12 – 2 x13 ≥ 0


4 x21 - 2 x22 ≥0
-0.005 x11 + 0.01 x12 + 0.02 x13 ≤ 0
- 0.015 x21 + 0.01 x23 ≤ 0
-0.005 x31 + 0.01 x32 + 0.02 x33 ≤ 0

xij, ai ≥ 0 for all i=1,2,3 j=1,2,3 12


Optimal Solution
x11=2000
• 3000 barrels of gas 1
x12=1000
x13=0
x21=2200 • 9500 barrels of gas 2
x22=4000
x23=3300
x31=800
• 1000 barrels of gas 3
x32=0
x33=200
a1=0
a2=750 • Advertise only on gas 2

a3=0
z=287,750 13
Optimal Solution

14
Multiperiod Financial Models: Finco’s problem
• LPs can be used to model multi-period cash management problems. The
key is to determine the relations of cash on hand during different
periods.
• Finco Investment Corp. must determine investment strategy for the firm
during the next three years. Currently (time 0), $100,000 is available for
investment.
• Investment alternatives: A, B, C, D and E
• The cash flows associated with $1:

Cash Flow at time*


0 1 2 3
A -1 0,5 1 0
B 0 -1 0,5 1
C -1 1,2 0 0
D -1 0 0 1,9
E 0 0 -1 1,5
15
Multiperiod Financial Models: Finco’s problem
REPRESENTATION OF CASH FLOW
0.5A 1.2C

0 1
$100,000 𝑺𝑺𝒐𝒐 1.08 ∗ 𝑺𝑺𝒐𝒐 𝑺𝑺𝟏𝟏

A C D B

A 0.5B B 1.9D 1.5E

2 3
1.08 ∗ 𝑺𝑺𝟏𝟏 𝑺𝑺𝟐𝟐 1.08 ∗ 𝑺𝑺𝟐𝟐

16
Finco’s problem
• Finco requires that at most $75,000 be placed in a single investment.
• In addition to investments, Finco can earn interest at 8% per year by
keeping the uninvested cash in money market funds.
• Return from investments can be immediately reinvested.
• Finco cannot borrow funds, so the cash available for investment at any
time is limited to cash on hand.
• Formulate an LP that will maximize cash on hand at time 3.

Decision variables:
A: $s invested in A
B: $s invested in B
C: $s invested in C
D: $s invested in D
E: $s invested in E
St: $s invested in funds at time t; t=1,2,3

17
Cash Flow at time*
0 1 2 3
Finco’s problem A
B
-1
0
0,5
-1
1
0,5
0
1
C -1 1,2 0 0
D -1 0 0 1,9
• Objective function: E 0 0 -1 1,5
Time 3 cash on hand = B + 1.9 D + 1.5 E + 1.08 S2
max z= B + 1.9 D + 1.5 E + 1.08 S2
• Uninvested cash at time t that is carried over to time (t+1) =
Cash at time t - cash invested at time t

Time 0 : 100,000 - A - C - D = S0 Slack: amount of unused cash


Time 1 : 1.08 S0 + 0.5 A + 1.2 C - B = S1
Time 2 : 1.08 S1 + A + 0.5 B - E = S2

• At most $75,000 can be invested:


A ≤75,000; B ≤75,000; C ≤75,000; D ≤75,000; E ≤75,000

See the dynamic nature of the problem?


18
Complete LP Model
max z= B + 1.9 D + 1.5 E + 1.08 S2
s.t.
A + C + D + S0 = 100,000
0.5 A + 1.2 C + 1.08 S0 - B - S1= 0
A + 0.5 B + 1.08 S1 - E - S2 = 0
A ≤ 75,000
B ≤ 75,000
C ≤ 75,000
D ≤ 75,000
E ≤ 75,000
A, B, C, D, E, S0, S1, S2 ≥ 0
19
Workforce Planning
Suppose you run Pluto Dog’s hot dog stand which is open
seven days a week. You hire employees to work a five-day
workday with two consecutive days off. Each employee
receives the same weekly salary. Some days of the week are
busier than others and, based on past experience, you know
how many workers are required on a given day of the week.
In particular, your forecast calls for these staffing
requirements:
Day Mon Tue Wed Thu Fri Sat Sun
Staff 20 16 13 16 19 14 12
Requirement

You need to determine how many employees to start on each


day of the week in order to minimize the total number of
required employees, while still meeting or exceeding staffing
requirements each day of the week 20
Workforce Planning
Minimize
“Total number of employees to start in a week”

Subject to
“available number of employees in a day has to
be enough to meet the workforce requirement
of the day”
“number of employees start to work on any day
has to be nonnegative”
21
Workforce Planning
In the table below, for example, staff requirement of Monday
will be covered by those staffs starting working on Thursday,
Friday, Saturday, Sunday and Monday.

Mon Tue Wed Thu Fri Sat Sun

Mon x x x x x

Tue x x x x x

Wed x x x x x

Thu x x x x x

Fri x x x x x

Sat x x x x x

Sun x x x x x
22
Workforce Planning
Assume that 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑖𝑖 is the number of workers starting working on day 𝑖𝑖
Minimize
start1+start2+start3+start4+start5+start6+start7
subject to

start5+start4+start3+start2+start1>=19 // day 5 requirement

start6+start5+start4+start3+start2>=14 // day 6 requirement

start7+start6+start5+start4+start3>=12 // day 7 requirement

start1+start7+start6+start5+start4>=20 // day 1 requirement

start2+start1+start7+start6+start5>=16 // day 2 requirement

start3+start2+start1+start7+start6>=13 // day 3 requirement

start4+start3+start2+start1+start7>=16 // day 4 requirement


start1,start2,start3,start4,start5,start6,start7>=0 23
Workforce Planning
Sets and Indices

i: weekdays, i ∈ 𝐼𝐼 = 1,2, … , 𝐼𝐼 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝐼𝐼 = 7


Parameters

𝑟𝑟𝑖𝑖 : 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑜𝑜𝑜𝑜 𝑑𝑑𝑑𝑑𝑑𝑑 𝑖𝑖

Decision Variable

𝑆𝑆𝑖𝑖 : 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 𝑡𝑡𝑡𝑡 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑜𝑜𝑜𝑜 𝑑𝑑𝑑𝑑𝑑𝑑 𝑖𝑖

24
Workforce Planning

25
Sailco Production Planning Problem
• Sailco Co. must determine how many sailboats should be produced during
each of the next four quarters.
• Demand is known: Q1: 40, Q2: 60, Q3: 75, Q4: 25.

• At the beginning of the first quarter, Sailco has an inventory of 10 boats.


• Sailco can produce 40 boats (each costs $400) per quarter with regular labor
hours. They can produce more if workers work overtime. These boats cost
$450 to produce.
• At the end of each quarter a carrying or holding cost of $20 per boat is
incurred.
• Sailco must meet demand on time. In other words, sailboats manufactured
during a quarter cannot be used to meet demand for previous quarters,
backordering is not allowed.
• Use linear programming to determine a production schedule to minimize the
sum of production and inventory costs during the next four quarters.

26
Sailco Production Planning Problem

• For each quarter, Sailco must determine the number of sailboats


that should be produced by regular-time and by overtime labor.

• Decision variables :
– xt : number of sailboats produced by regular time labor during quarter t
– yt : number of sailboats produced by overtime labor during quarter t
– It : number of sailboats on hand at the end of quarter t

• Parameters:
– dt : demand during period t

27
Sailco Production Planning Problem
X1 Y1 X2 Y2 X3 Y3 X4 Y4

I0=10 I1 I2 I3 I4
Q1 Q2 Q3 Q4

d1 d2 d3 d4

Xt Yt

It-1 It=It-1+Xt+Yt-dt
Qt

dt
28
Sailco Production Planning Problem

• Inventory Balance Equation:


It = It-1+ xt + yt – dt (t = 1,2,3,4)

• Note that quarter t’s demand will be met on time if and only if
(iff ) It ≥ 0.

• Sailco’s constraints:
• Each period’s regular time production does not exceed 40.
• Inventory constraints for each time period.

29
Complete LP Model

min z = 400x1 + 400x2 + 400x3 + 400x4 + 450y1 + 450y2 + 450y3 +


450y4 + 20I1 +20I2 +20I3+20I4

subject to
x1≤40; x2≤40; x3≤40; x4≤40;
x1 + y1 + 10 - 40 = I1
x2 + y2 + I1 - 60 = I2
x3 + y3 + I2 - 75 = I3
x4 + y4 + I3 - 25 = I4
It ,xt, yt ≥ 0, t=1,2,3,4

30
Optimal Solution

40 0 40 10 40 35 25 0

10 10 0 0 0
Q1 Q2 Q3 Q4

40 60 75 25

31
Rolling Horizon

40 0 ? ? ? ? ? ?

10 ?10 ? ? ?
Q1 Q2 Q3 Q4

?40 ?60 ?75 ?25

32
Rolling Horizon

40 0 ? ? ? ? ? ?

10 15 ? ? ?
Q1 Q2 Q3 Q5
Q4

35 ?60 ?75 ?36


?25

33
Rolling Horizon Model

min z = 400x2 + 400x3 + 400x4 + 400x5 + 450y2 + 450y3 + 450y4 +


450y5 + 20I2 +20I3 +20I4+20I5
s.t.

x2≤40; x3≤40; x4≤40; x5≤40;

x2 + y2 + 15 = I2 + 60
x3 + y3 + I2 = I3 + 75
x4 + y4 + I3 = I4 + 25
x5 + y5 + I4 = I5 + 36

It ,xt, yt ≥ 0, t=2,3,4,5
34
If backlogs are allowed
X1 Y1 X2 Y2 X3 Y3 X4 Y4

B1=0 B2 B3 B4 B5=10

Q1 Q2 Q3 Q4
I0=10 I1 I2 I3 I4=0

d1 d2 d3 d4

Xt Yt

Bt Bt+1

Qt

It=It-1+Xt+Yt+Bt+1-Bt-dt
It-1

dt

35
Sailco Inventory Extension: Multi-product,
multi-period

• Suppose that there are 10 products and 12 months.


• Let i=1,…,10 be product index and t=1,…,12 be the month
index

– xit = number of product i produced by regular time labor


during month t
– yit = number of product i produced by overtime labor
during month t
– Iit = number of product i on hand at the end of month t

36
Sailco Inventory Extension: Multi-product,
multi-period
• Let cit be the unit cost of manufacturing product i in normal time
during period t and oit be the corresponding unit cost for
overtime

• Let hit be the cost of having one unit of product i in the inventory
at the end of month t

• Let Nt be the total normal time capacity in month t and Pt be the


total over time capacity

• Let dit be the demand for product i to be satisfied during period t


37
Exercise

• Formulate the corresponding multi-period, multi-


product LP using the “algebraic form”.

38

You might also like