IE 3340 - Operations Research: Lecture 3: Formulation of Linear Programming Problems
IE 3340 - Operations Research: Lecture 3: Formulation of Linear Programming Problems
E. Perez IE TXSTATE 1
Learning Objectives
Learn how to formulate linear programming models of real-life
situations
E. Perez IE TXSTATE 2
Today’s Agenda
Guidelines for Model Formulation
Diet Problem
Production Planning and Inventory Control
Multi-period Production Planning and Inventory Control
Manpower Planning
Bus Scheduling Model
Post Office
Urban Development Planning
Project Selection
Blending and Refining
E. Perez IE TXSTATE 3
Guidelines for Model Formulation
E. Perez IE TXSTATE 4
Formulation is like a Chess Game
I can teach you the rules, review “standard moves”, and discuss
examples.
But every game (problem) is different and requires thought.
Apply what you know: does this new problem fit a “standard
structure”?
Build a library of experience with a variety of problem types.
E. Perez IE TXSTATE 5
The Formulation Process
decision variables
Identify ___________________: what must be decided?
objective of the problem (e.g., max profit or
Identify & formulate the __________
min cost)
constraints what resources are in limited supply?
Identify __________:
related in constraints &
Identify how decision variables must be ________
formulate constraints
Constraints must define the feasible values of all decision variables
objective and
Make dimensional analyses to make sure that the _________
constraint are consistent
each ___________
Formulation is an iterative process
Propose a reasonable definition of variables and begin model formulation
If you cannot incorporate all issues, you will have learned how to redefine
variables to do so
E. Perez IE TXSTATE 6
Diet Problem
E. Perez IE TXSTATE 7
A Diet Problem
Many LP models arise from situations in which a decision maker
wants to minimize the cost of meeting certain requirements
1. 2000 kcal
2. 55 g protein
3. 800 mg calcium
E. Perez IE TXSTATE 8
A Diet Problem
Nutritional values
Food Serving Size Energy (kcal) Protein (g) Calcium (mg) Price per serving
Oatmeal 28 g 110 4 2 $0.30
Chicken 100 g 205 32 12 $2.40
Eggs 2 large 160 13 54 $1.30
Whole milk 237 cc 160 8 285 $0.90
Cherry pie 170 g 420 4 22 $0.20
Pork and beans 260 g 260 14 80 $1.90
E. Perez IE TXSTATE 9
A Diet Problem
Question to be answered
How many servings of each type of food?
Indices
i = type of food
Decision Variables
xi = number of servings food type i
We can represent the number of servings of each type
of food in the diet by the variables:
E. Perez IE TXSTATE 10
A Diet Problem
Objective Function
Food Serving Size Energy (kcal) Protein (g) Calcium (mg) Price per serving
Oatmeal 28 g 110 4 2 $0.30
Chicken 100 g 205 32 12 $2.40
Eggs 2 large 160 13 54 $1.30
Whole milk 237 cc 160 8 285 $0.90
Cherry pie 170 g 420 4 22 $2.00
Pork and beans 260 g 260 14 80 $1.90
Minimize Cost
E. Perez IE TXSTATE 11
A Diet Problem
Constraints
Food Serving Size Energy (kcal) Protein (g) Calcium (mg) Price per serving
Oatmeal 28 g 110 4 2 $0.30 x1
Chicken 100 g 205 32 12 $2.40 x2
Eggs 2 large 160 13 54 $1.30 x3
Whole milk 237 cc 160 8 285 $0.90 x4
Cherry pie 170 g 420 4 22 $2.00 x5
Pork and beans 260 g 260 14 80 $1.90 x6
1. 2000 kcal
Nutritional requirements
2. 55 g protein
3. 800 mg calcium
KCAL constraint:
110x1 + 205x2 + 160x3 + 160x4 + 420x5 + 260x6 2000
E. Perez IE TXSTATE 12
A Diet Problem
LP Formulation
Minimize Cost
0.3x1 + 2.40x2 + 1.30x3 + 0.90x4 + 2.0x5 + 1.9x6
subject to: Nutritional requirements
E. Perez IE TXSTATE 13
Production Planning and Inventory Control
E. Perez IE TXSTATE 14
Single Period Production Model
Example:
In preparation for the winter season, a clothing company is manufacturing
parka and goose overcoats, insulated pants, and gloves.
All products are manufactured in four different departments: cutting, insulating,
sewing, and packaging.
The company has received firm orders for its products.
The contract stipulates a penalty for undelivered items.
Devise an optimal production plan for the company based on the following data:
E. Perez IE TXSTATE 15
Single Period Production Model
Question to be answered
How many units of each type of product to produce?
Indices
i = type of product
Decision Variables
xi = number of units of product type i
E. Perez IE TXSTATE 16
Single Period Production Model
Objective
Function
Maximize the net profit, defined as: Total profit - Total penalty
The total profit: 30x1 + 40x2 + 20x3 + 10x4
The total penalty requires the use of a new variables s representing the shortage in
demand for product j
The total penalty: 15s1 + 20s2 + 10s3 + 8s4
The objective function:
Max z = 30x1 + 40x2 + 20x3 + 10x4 – (15s1 + 20s2 + 10s3 + 8s4 )
E. Perez IE TXSTATE 17
Single Period Production Model
Constraints
E. Perez IE TXSTATE 18
Single Period Production Model
LP Formulation
Maximize Profit
subject to:
Bounds
E. Perez IE TXSTATE 19
Multiperiod Production Planning and
Inventory Control
E. Perez IE TXSTATE 20
Multiperiod Production Planning and Inventory Control
Example:
Acme Manufacturing Company has a contract to deliver 100, 250, 190, 140,
220, and 110 home windows over the next 6 months.
Production cost (labor, material, and utilities) per window varies by period and
is estimated to be $50, $45, $55, $48, $52, and $50 over the next 6 months.
To take advantage of the fluctuations in manufacturing cost, Acme can
produce more windows than needed in a given month and hold the extra units
for delivery in later months.
This will incur a storage cost at the rate of $8 per window per month, assessed
on end-of-month inventory.
Develop a linear program to determine the optimum production schedule.
E. Perez IE TXSTATE 21
Multiperiod Production Planning and Inventory Control
Question to be answered
How many units to produce per month?
How many units left in inventory per month?
Indices
i = month of the year
Decision Variables
E. Perez IE TXSTATE 22
Multiperiod Production Planning and Inventory Control
Variables
The variables of the problem include the monthly production
amount and the end-of-month inventory. For i = 1, 2, …, 6
E. Perez IE TXSTATE 23
Multiperiod Production Planning and Inventory Control
Objective Function
E. Perez IE TXSTATE 24
Multiperiod Production Planning and Inventory Control
Constraints
The constraints of the problem can be determined directly from the figure
using the following balance equation:
Beginning inventory + Production amount - Ending inventory = Demand
E. Perez IE TXSTATE 25
Multiperiod Production Planning and Inventory Control
LP Formulation
Minimize Cost
subject to:
Bounds
E. Perez IE TXSTATE 26
Manpower Planning
E. Perez IE TXSTATE 27
Bus Scheduling Problem
Example:
Progress City is studying the feasibility of introducing a mass-transit bus
system to reduce in-city driving. The study seeks the minimum number of
buses that can handle the transportation needs.
The minimum number of buses needed fluctuated with time of the day
The required number of buses could be approximated by constant values over
successive 4-hour intervals.
To carry out the required daily maintenance, each bus can operate 8
successive hours a day only
Develop a linear program to determine the optimum number of buses in operation.
E. Perez IE TXSTATE 28
Bus Scheduling Problem
Question to be answered
Indices
i = shift number
Decision Variables
xi = number of buses needed in shift i
E. Perez IE TXSTATE 29
Bus Scheduling Problem
Variables
The variables of the model are the number of buses needed in
each shift
E. Perez IE TXSTATE 30
Bus Scheduling Problem
Objective Function
E. Perez IE TXSTATE 31
Bus Scheduling Problem
Constraints
Because of the overlapping of the shifts, the number of buses for the
successive 4-hour periods can be computed as
E. Perez IE TXSTATE 32
Bus Scheduling Problem
LP Formulation
Minimize Number of buses
subject to:
Bounds
E. Perez IE TXSTATE 33
Post Office Problem
Problem:
A post office requires different numbers of full-time employees on different
days of the week.
Union rules state that each fulltime employee must five consecutive days and
then two days off.
The post office wants to meet its daily requirements using only full-time
employees.
Formulate an LP that the post office can use to minimize the number of full time
employees who must be hired.
E. Perez IE TXSTATE 34
Post Office Problem
Question to be answered
Indices
i = day of the week
Decision Variables
xi = number of employees beginning work on day i
E. Perez IE TXSTATE 35
Post Office Problem
Objective Function
E. Perez IE TXSTATE 36
Post Office Problem
Constraints
The post office must ensure that enough employees are working every day
Who is working on Monday?
Everybody except the employees who begin to work on Tuesday or on
Wednesday
They get, respectively, Sunday and Monday, and Monday and Tuesday off
To ensure that at least 17 employees are working on Monday we require
that the constraint
x1 + x4 + x5 + x6 + x7 ≥ 17
E. Perez IE TXSTATE 37
Post Office Problem
Constraints
Adding similar constraints for the other six days of the week:
x1 + x4 + x5 + x6 + x7 ≥ 17 (Monday constraint)
x1 + x2 + x5 + x6 + x7 ≥ 13 (Tuesday constraint)
x1 + x2 + x3 + x6 + x7 ≥ 15 (Wednesday constraint)
x1 + x2 + x3 + x4 + x7 ≥ 19 (Thursday constraint)
x1 + x2 + x3 + x4 + x5 ≥ 14 (Friday constraint)
x2 + x3 + x4 + x5 + x6 ≥ 16 (Saturday constraint)
x3 + x4 + x5 + x6 + x7 ≥ 11 (Sunday constraint)
E. Perez IE TXSTATE 38
Post Office Problem
LP Formulation
Minimize Total number of employees
Min z = x1 + x2 + x3 + x4 + x5 + x6 + x7
subject to:
x1 + x4 + x5 + x6 + x7 ≥ 17 (Monday constraint)
x1 + x2 + x5 + x6 + x7 ≥ 13 (Tuesday constraint)
x1 + x2 + x3 + x6 + x7 ≥ 15 (Wednesday constraint)
x1 + x2 + x3 + x4 + x7 ≥ 19 (Thursday constraint)
x1 + x2 + x3 + x4 + x5 ≥ 14 (Friday constraint)
x2 + x3 + x4 + x5 + x6 ≥ 16 (Saturday constraint)
x3 + x4 + x5 + x6 + x7 ≥ 11 (Sunday constraint)
Bounds
x1, x2, x3, x4, x5, x6, x7, ≥ 0
E. Perez IE TXSTATE 39
Urban Development Planning
E. Perez IE TXSTATE 40
Urban Renewal Model
Problem:
The city of Erstville is faced with a severe budget shortage.
The city council votes to improve the tax base by condemning an
inner-city housing area and replacing it with a modern development.
The project involves two phases:
1. Demolishing substandard houses to provide land for the new
development and
2. Building the new development.
E. Perez IE TXSTATE 41
Urban Renewal Model
The following is a summary of the situation:
1. As many as 300 substandard houses can be demolished. Each house
occupies a .25-acre lot. The cost of demolishing a condemned house is $2000.
2. Lot sizes for new single-, double-, triple-, and quadruple-family homes (units)
are .18, .28, .4, and .5 acre, respectively. Streets, open space, and utility
easements account for 15% of available acreage.
3. In the new development, the triple and quadruple units account for at least
25% of the total. Single units must be at least 20% of all units and double units
at least 10%.
4. The tax levied per unit for single, double, triple, and quadruple units is $1000,
$1900, $2700, and $3400, respectively.
5. The construction cost per unit for single-, double-, triple-, and quadruple-family
homes is $50,000, $70,000, $130,000, and $160,000, respectively.
6. Financing through a local bank is limited to $15 million.
How many units of each type should be constructed to maximize tax collection?
E. Perez IE TXSTATE 42
Urban Renewal Model
Question to be answered
How many units of each type should be constructed/demolish to
maximize tax collection?
Indices
i = type of home
Decision Variables
E. Perez IE TXSTATE 43
Urban Renewal Model
Variables
The variables of the model are:
the number of units to be constructed of each type of housing,
the number houses must be demolished to make room for the new
development.
E. Perez IE TXSTATE 44
Urban Renewal Model
Objective Function
E. Perez IE TXSTATE 45
Urban Renewal Model
Constraints
The first constraint of the problem deals with land availability
E. Perez IE TXSTATE 46
Urban Renewal Model
Constraints
The number of demolished homes cannot exceed 300, which translates to
E. Perez IE TXSTATE 47
Urban Renewal Model
Constraints
Keep the demolition/construction cost within the allowable budget
E. Perez IE TXSTATE 48
Urban Renewal Model
LP Formulation
Maximize Total tax collection
subject to:
Bounds
E. Perez IE TXSTATE 49
Project Selection
E. Perez IE TXSTATE 50
Project Selection Problem
Problem: Star Oil Company is considering five different investment opportunities.
The cash out-flows and net present values (in millions) are given in the Table.
Star Oil has $40million available for investment now (time 0); it estimates that
one year from now (time1) $20 million will be available for investment.
Star Oil may purchase any fraction of each investment. In this case, the cash
outflows and NPV are adjusted accordingly.
For example, if Star Oil purchases one-fifth of investment 3, then a cash outflow of (1/5)(5) =$1
million would be required at time 1. The one-fifth share of investment 3 would yield an NPV
of $3.2million.
Star Oil wants to maximize the NPV that can be obtained by investing
Formulate an LP that will help achieve this goal. Assume that any funds leftover at
time 0 cannot be used at time 1.
E. Perez IE TXSTATE 51
Project Selection Problem
Question to be answered
What fraction of each investment to purchase?
Indices
i = type of investment
Decision Variables
E. Perez IE TXSTATE 52
Project Selection Problem
Objective Function
E. Perez IE TXSTATE 53
Project Selection Problem
Constraints
E. Perez IE TXSTATE 54
Project Selection Problem
Constraints
E. Perez IE TXSTATE 55
Project Selection Problem
LP Formulation
Maximize the NPV earned from investments
subject to:
Bounds
E. Perez IE TXSTATE 56
Blending and Refining
E. Perez IE TXSTATE 57
Blending and Refining
Problem:
Shale Oil has a capacity of 1,500,000 bbl of crude oil per day.
The final products from the refinery include three types of unleaded
gasoline with different octane numbers (ON):
1. regular with ON = 87,
2. premium with ON = 89,and
3. super with ON = 92
The refining process encompasses three stages:
1. A distillation tower that produces feedstock (ON=82) at the rate of .2 bbl
per bbl of crude oil,
2. A cracker unit that produces gasoline stock (ON=98) by using a portion of
the feedstock produced from the distillation tower at the rate of .5 bbl per
bbl of feedstock, and
3. A blender unit that blends the gasoline stock from the cracker unit and the
feedstock from the distillation tower.
E. Perez IE TXSTATE 58
Blending and Refining
Problem:
The company estimates the net profit per barrel of the three types of
gasoline to be $6.70, $7.20, and $8.10, respectively.
The input capacity of the cracker unit is 200,000 barrels of feedstock a
day.
The demand limits for regular, premium, and super gasoline are
50,000, 30,000, and 40,000 barrels, respectively, per day.
Develop a model for determining the optimum production schedule for the
refinery.
E. Perez IE TXSTATE 59
Blending and Refining
Question to be answered
How many barrels/day to produce certain type of final product?
Indices
i = bbl/day of input stream i
j = blend of final product j
Decision Variables
E. Perez IE TXSTATE 60
Blending and Refining
Variables
The variables can be defined in terms of two input streams to
the blender (feedstock and cracker gasoline) and the three final
products.
E. Perez IE TXSTATE 61
Blending and Refining
Objective Function
E. Perez IE TXSTATE 62
Blending and Refining
Constraints
E. Perez IE TXSTATE 63
Blending and Refining
Constraints
E. Perez IE TXSTATE 64
Blending and Refining
Constraints
E. Perez IE TXSTATE 65
Blending and Refining
Constraints
The octane number of a gasoline product is the weighted average of the
octane numbers of the input streams used in the blending process and can
be computed as:
E. Perez IE TXSTATE 66
Blending and Refining
Constraints
Octane number (ON) for premium is at least 89:
E. Perez IE TXSTATE 67
Blending and Refining
LP Formulation
Maximize Revenue
subject to:
Bounds
E. Perez IE TXSTATE 68
Questions?
Guidelines for Model Formulation
Diet Problem
Production Planning and Inventory Control
Multi-period Production Planning and Inventory Control
Manpower Planning
Bus Scheduling Model
Post Office
Urban Development Planning
Project Selection
Blending and Refining
E. Perez IE TXSTATE 69