Unit 4 LP Modeling and Selected IE Applications
Unit 4 LP Modeling and Selected IE Applications
Chapter 4:
Linear Programming Modeling and
Selected Engineering and Industrial
Applications
Course Instructors:
Dr. Anis Gharbi (Associate Professor)
Dr. Mohamed Labidi (Assistant Professor)
START HERE
2015
Index
Inde Objective
x s
introductio
Content
n
Homewor
Quiz
k
Summar
y
Introduction
How many units to produce from each product type in order to maximize the
profit?
Man
Product Machine Profit
Power
Type A 3h 1h 25 SR
Type B 2h 4h 15 SR
Availabilit
70 h 110 h
y
Toy Production: Formulation
Decision Variables
: number of units of product type A
: number of units of product type B
Objective Function:
Maximize Total Profit
Constraints
Man-Power availability
3 𝑥 𝐴+ 2 𝑥 𝐵 ≤ 70
Machine availability
𝑥 𝐴 + 4 𝑥 𝐵 ≤ 110
Integer variables
𝑥 𝐴 , 𝑥 𝐵 ∈ 𝐼𝑁
Toy Production: Solution
The small company, Pronuevo, launches a new product into a regional market
and wishes to have a publicity campaign using different media
Total budget of $ 250,000
Impact of the publicity campaign to reach at least 100,000 people
Publicity
People
Unit
# Media type potentially Maximum use quality
cost
reached
Free weekly
1 12,000 1,500 4 weeks 3
newspaper
2 Monthly magazine 1,500 8,000 2 months 7
3 Weekly magazine 2,000 12,000 8 weeks 8
4 Radio spot 6,000 9,000 60 broadcasts 2
5 Billboard 4x3 m 3,000 24,000 4 boards 6
6 TV spot 9,000 51,000 8 broadcasts 9
Publicity: Formulation
Decision variables:
: number of use of newspaper
: number of use of monthly magazine
: number of use of weekly magazine
: number of use of radio spot
: number of use of billboard
: number of use of TV spot
Publicity Campaign: Formulation
Objective Function:
Maximize the index of perception quality
12 𝑥 1+1.5 𝑥 2+ 2Integrality
𝑥 3 +6constraints:
𝑥 4 +3 𝑥5 +9 𝑥 6 ≥100
integers
Publicity: Solution
To assist in the housing industry, the home loans must be at least 50% of the
personal, car and home loans.
The bank management requires that the overall bad ratio debt not to exceed 4%.
The bank wants to determine the best loan policy that will maximize its profit
rate.
Banking: Formulation
Decision variables:
: amount of personal loans (in million SR)
: amount of car loans (in million SR)
: amount of home loans (in million SR)
: amount of farm loans (in million SR)
: amount of commercial loans (in million SR)
Banking: Formulation
Objective function:
𝑥1 + 𝑥2 + 𝑥 3+ 𝑥 4 + 𝑥 5 ≤ 12
Banking: Formulation (cont.)
The optimal solution consists in allocating 7.2 M to the home type and 4.8 M
to commercial type
The optimal profit is 0.996 M SAR
Alloy
The grades, available amounts and prices for all raw materials are the
following:
Raw material C% Cu % Mn % Availability Cost in
in t $/t
Iron alloy 1 2.5 0 1.3 400 200
Iron alloy 2 3 0 0.8 300 250
Iron alloy 3 0 0.3 0 600 150
Copper alloy 1 0 90 0 500 220
Copper alloy 2 0 96 4 200 240
Aluminum alloy 0 0.4 1.2 300 200
1
Aluminum alloy 0 0.6 0 250 165
2
Alloy
Determine the composition of the steel that minimizes the production cost!
Alloy: Formulation
Decision Variable
: the use of raw material 1
: the use of raw material 2
: the use of raw material 3
: the use of raw material 4
: the use of raw material 5
: the use of raw material 6
: the use of raw material 7
Alloy: Formulation
Objective Function
Minimize the production cost:
𝑀 𝑖𝑛 𝑍 :𝑐𝑜𝑠𝑡 1 𝑥1 +…+𝑐𝑜𝑠𝑡 7 𝑥 7
Constraints:
Demand Satisfaction
𝑥1 +… + 𝑥7 ≥ 𝑑𝑒𝑚𝑎𝑛𝑑
Alloy: Formulation
Constraint:
Minimum Requirement
Maximum Requirement
Alloy: Formulation
Constraint:
Availability of raw material
Non negativity
𝑥1 , … , 𝑥 7 ≥ 0
Alloy: Solution
3
B 5
4
7
9 D2
6
2 C 8
Unit transportation
cost
Transportation
Decision Variable:
: number of units transported from Source to Destination
Objective function
𝑀𝑖𝑛𝑍=5𝑥1𝐴+3𝑥1𝐵+6𝑥1𝐶+4𝑥2𝐴+7𝑥2𝐵+2𝑥2𝐶
Transportation: Formulation
Constraints
(Supply of )
(Supply of )
(Demand of A)
(Demand of B)
(Demand of C)
Transportation: Solution
Optimal solution
Animal Food
The company CowFood produces food for farm animals that is sold in two
forms:
Powder and granules
The raw materials used for the production of the food are:
oat, maize and molasses
Animal Food
The raw materials (with the exception of molasses) first need to be ground,
and then all raw materials that will form a product are blended. In the last
step of the production process the product mix is either transformed to
granules or sieved to obtain food in the form of powder.
Animal Food
The following table shows the availability of raw materials per day and the
respective prices.
Raw material Available Cost in $/kg
amount in kg
Oat 11,900 0.13
Maize 23,500 0.17
Molasses 750 0.12
Animal Food
The cost of the different production steps are given in the following table.
Grinding Blending Granulatin Sieving
g
0.25 0.05 0.42 0.17
A daily demand of:
nine tones of granules
twelve tones of powder
Which quantities of raw materials are required and how should they be
blended to minimize the total cost?
Animal Food: Formulation
Constants
The cost per kg of each raw material
Constants
The content of each nutrition in each raw material
Decision Variables
The quantity of each raw material to be used for the production of each food
Objective Function
Minimize the total cost:
Grinding Cost
𝑃𝐶𝑂𝑆𝑇 1 𝑢𝑠𝑒1 1+…+𝑃𝐶𝑂𝑆𝑇 1 𝑢𝑠𝑒22
Blending Cost
𝑃𝐶𝑂𝑆𝑇 2 𝑢𝑠𝑒1 1+…+𝑃𝐶𝑂𝑆𝑇 2 𝑢𝑠𝑒32
Granulating Cost
𝑃𝐶𝑂𝑆𝑇 3 𝑢𝑠𝑒1 1 +𝑃𝐶𝑂𝑆𝑇 3 𝑢𝑠𝑒21 +𝑃𝐶𝑂𝑆𝑇 3 𝑢𝑠𝑒 31
Sieving Cost
𝑃𝐶𝑂𝑆𝑇 4 𝑢𝑠𝑒1 2+𝑃𝐶𝑂𝑆𝑇 4 𝑢𝑠𝑒 22+𝑃𝐶𝑂𝑆𝑇 4 𝑢𝑠𝑒32
Animal Food: Formulation
Constraints:
The produced quantity of every food type corresponds to the sum of the raw
material used for its production
𝑢𝑠𝑒1 1+…+ 𝑢𝑠𝑒31=𝑝𝑟𝑜𝑑𝑢𝑐𝑒 1
𝑢𝑠𝑒1 2+ …+𝑢𝑠𝑒32=𝑝𝑟𝑜𝑑𝑢𝑐𝑒 2
Animal Food: Formulation
Constraints:
The required content of nutritional components
Component 1 & 2
Component 3
Animal Food: Formulation
Constraint:
The availability limit of raw material
Demand satisfaction
Animal Food: Formulation
Constraints:
Non negativity
Animal Food: Solution
How many units to produce from each product type in order to maximize the
profit?
Man
Product Machine Profit
Power
Type A 3h 1h 25 SR
Type B 2h 4h 15 SR
Availabilit
70 h 110 h
y
Toy Production: Formulation
Set:
PRODUCTS: set of product to be produced
Constants
: the profit for product m
: the machine hour needed to produce a product m
: the man power needed to produce a product m
: the maximum machine hour availablity
: the man power availability
Toy Production: Formulation
Decision Variables:
: number of units of product type m
Objective Function:
Maximize the total profit
❑
𝑀𝑎𝑥 𝑃= ∑ 𝑃𝑅𝑂𝐹𝐼𝑇 𝑚 𝑥 𝑚
𝑚∈𝑃 𝑅𝑂𝐷𝑈𝐶𝑇𝑆
Toy Production: Formulation
Constraints ❑
Machine availability
∑ 𝑀𝐴𝐶𝐻𝐼𝑁𝐸 𝑚 𝑥 𝑚 ≤ 𝑀𝑎𝑐h𝑖𝑛𝑒𝐴𝑣𝑎𝑖𝑙
𝑚∈𝑃𝑅𝑂𝐷𝑈𝐶𝑇𝑆
❑
∑
Man Power Availability
𝐿𝐴𝐵𝑂𝑅 𝑚 𝑥 𝑚 ≤ 𝑀𝑎𝑛𝐴𝑣𝑎𝑖𝑙
𝑚∈𝑃𝑅𝑂𝐷𝑈𝐶𝑇𝑆
Integer variables
∀ 𝑚∈ 𝑃𝑅𝑂𝐷𝑈𝐶𝑇 : 𝑥 𝑚 ∈ 𝐼𝑁
Toy Production: Solution
The small company, Pronuevo, launches a new product into a regional market
and wishes to have a publicity campaign using different media
Total budget of $ 250,000
Impact of the publicity campaign to reach at least 100,000 people
Publicity
People
Unit
# Media type potentially Maximum use quality
cost
reached
Free weekly
1 12,000 1,500 4 weeks 3
newspaper
2 Monthly magazine 1,500 8,000 2 months 7
3 Weekly magazine 2,000 12,000 8 weeks 8
4 Radio spot 6,000 9,000 60 broadcasts 2
5 Billboard 4x3 m 3,000 24,000 4 boards 6
6 TV spot 9,000 51,000 8 broadcasts 9
Publicity: Formulation
Set:
MEDIA: the set of media that may be used in this campaign
Constants
: the number of people potentially reached using medium m
: the unit cost of using a medium m
: the maximum number of uses of medium m
: the quality index for medium m used
: maximum budget
: audience target
Publicity: Formulation
Decision variables:
: the number of media used
Objective Function:
Maximize the index of perception quality
❑
∑ 𝑄𝑈𝐴𝐿𝐼𝑇𝑌 𝑚 𝑥 𝑚
𝑚∈𝑀𝐸𝐷𝐼𝐴
Publicity: Formulation
Constraints:
❑
∑
Budget
𝐶𝑂𝑆𝑇 𝑚 𝑥𝑚 ≤𝑇𝑜𝑡𝑎𝑙𝐵𝑢𝑑𝑔𝑒𝑡
𝑚∈𝑀𝐸𝐷𝐼𝐴
Maximum use
∀ 𝑚∈ 𝑀𝐸𝐷𝐼𝐴: 𝑥 𝑚 ≤ 𝑀𝐴𝑋𝑈𝑆𝐸 𝑚
Publicity: Formulation
Constraints:
Audience Target ❑
∑ 𝑅𝐸𝐴𝐶𝐻 𝑚 𝑥 𝑚 ≥ 𝑇𝑎𝑟𝑔𝑒𝑡
𝑚∈𝑀𝐸𝐷𝐼𝐴
Integer constraint
∀ 𝑚∈ 𝑀𝐸𝐷𝐼𝐴 : 𝑥 𝑚 ∈ 𝐼𝑁
Publicity: Solution
The company has seven different raw materials in stock that may be used for
the production of this steel.
Alloy
The grades, available amounts and prices for all raw materials are the
following:
Raw material C% Cu % Mn % Availability Cost in
in t $/t
Iron alloy 1 2.5 0 1.3 400 200
Iron alloy 2 3 0 0.8 300 250
Iron alloy 3 0 0.3 0 600 150
Copper alloy 1 0 90 0 500 220
Copper alloy 2 0 96 4 200 240
Aluminum alloy 0 0.4 1.2 300 200
1
Aluminum alloy 0 0.6 0 250 165
2
Alloy
Determine the composition of the steel that minimizes the production cost!
Alloy: Formulation
Sets
RAW: set of raw material r
COMP: set of chemical element c
Constants
: the unit cost of using a raw material
: the chemical element c on raw material r
the minimum chemical element c needed
the maximum chemical element c needed
: the raw material availability
: the customer demand
Alloy: Formulation
Decision Variables
: the use of raw material r
Objective Function
Minimize the production cost:
❑
𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒= ∑ 𝐶𝑂𝑆𝑇 𝑟 𝑢𝑠𝑒𝑟
𝑟 ∈ 𝑅𝐴𝑊
Alloy: Formulation
Constraints:
❑
∑
Demand Satisfaction
𝑢𝑠𝑒𝑟 ≥ 𝑑𝑒𝑚𝑎𝑛𝑑
𝑟 ∈ 𝑅𝐴𝑊
Minimum Requirement
❑ ❑
∀ 𝑐∈𝐶𝑂𝑀𝑃 : ∑ 𝑃 𝑐𝑟 𝑢𝑠𝑒𝑟 ≥𝑃𝑀𝑖𝑛𝑐 ∑ 𝑢𝑠𝑒𝑟
𝑟 ∈𝑅𝐴𝑊 𝑟 ∈𝑅𝐴𝑊
Alloy: Formulation
Constraints:
Minimum Requirement ❑ ❑
∀ 𝑐∈𝐶𝑂𝑀𝑃 : ∑ 𝑃 𝑐𝑟 𝑢𝑠𝑒𝑟 ≤𝑃𝑀𝑎𝑥 𝑐 ∑ 𝑢𝑠𝑒𝑟
𝑟 ∈𝑅𝐴𝑊 𝑟 ∈𝑅𝐴𝑊
Constraints:
Non negativity
∀ 𝑟 ∈ 𝑅𝐴𝑊 : 𝑥 𝑟 ≥ 0
Alloy: Solution
3 5
B
4
9 7
D2
6 8
2 C
Sets:
SOURCE: the origin i of transportation
DESTINATION: the destination j of transportation
Constants:
: the supply of origin i
: the demand of destination j
Transportation: Formulation
Decision Variables:
: number of units transported from Source to Destination
Objective function
❑ ❑
𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒= ∑ ∑ 𝑥 𝑖𝑗
𝑖∈𝑆𝑂𝑈𝑅𝐶𝐸 𝑗∈ 𝐷𝐸𝑆𝑇𝐼𝑁𝐴𝑇𝐼𝑂𝑁
Transportation: Formulation
Constraints
❑
Supply Constraint
∀ 𝑖∈𝑆𝑂𝑈𝑅𝐶𝐸 : ∑ 𝑥𝑖𝑗 =𝑆𝑈𝑃𝑃𝐿𝑌 𝑖
𝑗 ∈𝐷𝐸𝑆𝑇𝐼𝑁𝐴𝑇𝐼𝑂𝑁
❑
∑
Demand Constraint
∀ 𝑗 ∈𝐷𝐸𝑆𝑇𝐼𝑁𝐴𝑇𝐼𝑂𝑁 : 𝑥𝑖𝑗 =𝐷𝐸𝑀𝐴𝑁𝐷 𝑗
𝑖∈𝑆𝑂𝑈𝑅𝐶𝐸
Integer variables
∀ 𝑖∈𝑆𝑂𝑈𝑅𝐶𝐸 , ∀ 𝑗∈ 𝐷𝐸𝑆𝑇𝐼𝑁𝐴𝑇𝐼𝑂𝑁 : 𝑥𝑖𝑗 ∈ 𝐼𝑁
Transportation: Solution
Optimal solution
Animal Food
The company CowFood produces food for farm animals that is sold in two
forms:
Powder and granules
The raw materials used for the production of the food are:
oat, maize and molasses
Animal Food
The raw materials (with the exception of molasses) first need to be ground,
and then all raw materials that will form a product are blended. In the last
step of the production process the product mix is either transformed to
granules or sieved to obtain food in the form of powder.
Animal Food
The following table shows the availability of raw materials per day and the
respective prices.
Raw material Available Cost in $/kg
amount in kg
Oat 11,900 0.13
Maize 23,500 0.17
Molasses 750 0.12
Animal Food
The cost of the different production steps are given in the following table.
Sets
FOOD: the set of food product types f that are produced
RAW: set of raw material r
COMP: the set of nutritional components c
Constants
: the cost of raw material r
: the cost of production process p
: the required content of nutritional component c
the content of c in raw material r
: the maximum available quantity of raw material
: the daily demand of food product f
Animal Food: Formulation
Decision Variables
: the quantity of raw material r used for the production of food type f
: the amount of food f produced
Animal Food: Formulation
Objective Function
Minimize the production cost:
❑❑ ❑ ❑❑ ❑ ❑
𝑀𝑖𝑛𝑚𝑖𝑧𝑒= ∑ ∑ 𝐶𝑂𝑆𝑇𝑟.𝑢𝑠𝑒𝑟f+ ∑ ∑ ❑P𝐶𝑂𝑆𝑇𝑔𝑟∈𝑑𝑖𝑛𝑔.𝑢𝑠𝑒𝑟f+ ∑ ∑ P𝐶𝑂𝑆𝑇𝑏𝑙𝑒𝑛𝑑𝑖𝑛𝑔.𝑢𝑠𝑒𝑟f+ ∑ P𝐶𝑂𝑆𝑇𝑔𝑟𝑎𝑛𝑢𝑙𝑎𝑡𝑖𝑛𝑔.𝑢𝑠𝑒𝑟1+ ∑ P𝐶𝑂𝑆𝑇𝑠𝑖𝑒𝑣𝑖𝑛𝑔.𝑢𝑠𝑒𝑟2
𝑟∈𝑅𝐴𝑊 f∈FO D 𝑟∈𝑅𝐴𝑊 f∈FO D¿ 𝑟∈𝑅𝐴𝑊 f∈FO D 𝑟∈𝑅𝐴𝑊 𝑟 ∈ 𝑅𝐴 𝑊
𝑟≠𝑚𝑜𝑙𝑎𝑠 𝑒𝑠 ¿
Animal Food: Formulation
Constraints:
The produced quantity of every food type corresponds to the sum of the raw
❑
∑
material used for its production
∀ 𝑓 ∈ 𝐹𝑂𝑂𝐷: 𝑢𝑠𝑒 𝑟𝑓 =𝑝𝑟𝑜𝑑𝑢𝑐𝑒 𝑓
𝑟 ∈𝑅𝐴𝑊
Constraints:
The availability limit of raw material ❑
∀ 𝑟 ∈ 𝑅𝐴𝑊 : ∑ 𝑥 𝑟𝑓 ≤ 𝐴𝑉𝐴𝐼𝐿𝑟
𝑓 ∈ 𝐹𝑂𝑂𝐷
Demand satisfaction
∀ 𝑓 ∈ 𝐹𝑂𝑂𝐷 :𝑝𝑟𝑜𝑑𝑢𝑐𝑒 𝑓 ≥ 𝐷𝐸𝑀 𝑟
Non negativity
Animal Food: Solution
• Telecommunication
• Flight connection at hub
Telecommunication
Decision variables
Objective function
𝑀𝑖𝑛 𝑍 =𝑥 𝐴 + 𝑥 𝐵 + 𝑥𝐶 + 𝑥 𝐷 + 𝑥 𝐸 + 𝑥 𝐹 + 𝑥 𝐺
Telecommunication: Formulation
Constraints
Demand Satisfaction for each zone (zone 1)
(zone 2)
(zone 3)
(zone 4)
(zone 5)
Binary variables
𝑥𝑖 ∈{0,1 } for all 𝑖= 𝐴, 𝐵 , … , 𝐺
Telecommunication: Solution
Destinations
Berlin Bern Brussels London Rome Vienna
Bordeau
35 12 16 38 5 2
x
Clermon
t- 25 8 9 24 6 8
Ferrand
Origins Marseill
12 8 11 27 3 2
e
Nantes 38 15 14 30 2 9
Nice – 9 8 25 10 5
Toulous
– – – 14 6 7
e
Flight connection at hub
Sets
RAW: set of raw material r
COMP: set of chemical element c
Constants
: the unit cost of using a raw material
: the chemical element c on raw material r
the minimum chemical element c needed
the maximum chemical element c needed
: the raw material availability
: the customer demand
Flight connection at hub: Formulation
Decision Variables
= 1, if and only if the plane coming from i continues its journey to destination j
Objective Function
Maximizes the number of passengers staying on board their plane at the hub
❑ ❑
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 ∑ ∑ 𝑃𝐴𝑆𝑆𝑖𝑗 𝑐𝑜𝑛𝑡 𝑖𝑗
i∈Source j∈Destination
Flight connection at hub: Formulation
Constraints:
❑
∀ 𝑗 ∈𝐷𝑒𝑠𝑡𝑖𝑛𝑎𝑡𝑖𝑜𝑛:
Every destination is served by exactly one flight
∑ 𝑐𝑜𝑛𝑡 𝑖𝑗 =1
𝑖∈𝑆𝑜𝑢𝑟𝑐𝑒
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
30 15 15 25 33 40 45 45 26 14 25 30
The company has a capacity of 30,000 bicycles per month.
Bicycles
We assume that the storage capacity at the company is virtually unlimited (in
practice this means that the real capacity, that is quite obviously limited,
does not impose any limits in our case).
We are at the first of January. Which quantities need to be produced and
stored in the course of the next twelve months in order to satisfy the forecast
demand and minimize the total cost?
Bicycles: Formulation
Sets
MONTHS : the set of time periods t
Constants
: the production cost of a bicycle in normal hours
: the production cost of a bicycle in overtime hours
: the monthly storage cost per bicycle
: The production capacity in normal working hours
: the number of bicycles held in stock at the end of the month
: the initial stock level
: the forecasted demand for month t
Bicycles: Formulation
Decision Variables
: the numbers of bicycles to be produced respectively in normal working hours
during month t
: the numbers of bicycles to be produced respectively in overtime hours during
month t
: the numbers of bicycles to be stored at the end of month t
Bicycles: Formulation
Objective Function
Minimize the total cost (the sum of cost of production (in normal and additional
hours) and the storage cost)
❑
M inimize ∑ ( 𝐶𝑁𝑂𝑅𝑀 .𝑝𝑛𝑜𝑟𝑚𝑡 +𝐶𝑂𝑉𝐸𝑅 .𝑝𝑜𝑣𝑒𝑟 𝑡 +𝐶𝑆𝑇𝑂𝐶𝐾 .𝑠𝑡𝑜𝑟𝑒𝑡 )
t∈ MONTHS
Bicycles: Formulation
Constraints:
The balance constraint for the first month
𝑝𝑛𝑜𝑟𝑚1+𝑝𝑜𝑣𝑒𝑟 1 +𝐼𝑆𝑇𝑂𝐶𝐾 =𝐷𝐸𝑀 1+𝑠𝑡𝑜𝑟 𝑒 1
∀𝑡∈𝑀𝑂𝑁𝑇𝐻𝑆,𝑡≠1:𝑝𝑛𝑜𝑟𝑚𝑡+𝑝𝑜𝑣𝑒𝑟 𝑡+𝑠𝑡𝑜𝑟𝑒𝑡−1=𝐷𝐸𝑀𝑡+𝑠𝑡𝑜𝑟𝑒𝑡
Bicycles: Formulation
Constraints:
The production capacity in normal working hours is limited by the given capacity
CAP ∀ 𝑡 ∈ 𝑀𝑂𝑁𝑇𝐻𝑆 :𝑝𝑛𝑜𝑟𝑚𝑡 ≤ 𝐶𝐴𝑃
the additional production in overtime hours is limited to 50% of this capacity
Ju
Jan Feb Mar Apr May Jul Aug Sep Oct Nov Dec
n
Demand 30 15 15 25 33 40 45 45 26 14 25 30
Normal 28 15 15 28 30 30 30 30 26 14 25 30
Additiona
– – – – – 10 15 15 – – – –
l
Store – – – 3 – – – – – – – –
Drinking Glasses
The demand in thousands for the 12 coming weeks and for every glass type is
given in the following table.
We
1 2 3 4 5 6 7 8 9 10 11 12
ek
V1 20 22 18 35 17 19 23 20 29 30 28 32
V2 17 19 23 20 11 10 12 34 21 23 30 12
V3 18 35 17 10 9 21 23 15 10 0 13 17
V4 31 45 24 38 41 20 19 37 28 12 30 37
V5 23 20 23 15 10 22 18 30 28 7 15 10
V6 22 18 20 19 18 35 0 28 12 30 21 23
Drinking Glasses
For every glass type the initial stock is known, as well as the required final stock level (in
thousands).
Produc
Storage Initial Final Timew Timem Storage
tion
cost stock stock orker achine space
cost
V1 100 25 50 10 3 2 4
V2 80 28 20 10 3 1 5
V3 110 25 0 10 3 4 5
V4 90 27 15 10 2 8 6
V5 200 10 0 10 4 11 4
V6 140 20 10 10 4 9 9
Table above shows per batch of every glass type, the production and storage costs in $, together
with the required working time for workers and machines (in hours), and the required storage
space (measured in numbers of trays).
Drinking Glasses
The number of working hours of the personnel is limited to 390 hours per
week
The machines have a weekly capacity of 850 hours.
Storage space for up to 1,000 trays is available.
Which quantities of the different glass types need to be produced in every
period to minimize the total cost of production and storage?
Drinking Glasses: Formulation
Sets
PRODS: the set of products p
WEEKS: the set of time periods t
Constants
: the production cost for glass type p
: the storage cost for glass type p
the worker times required per unit of product p
the machine times required per unit of product p
: the storage area
: the initial stock level per product p
: the desired final stock level per product p
Drinking Glasses: Formulation
Constants
: the demand for product p in time period t
: the capacities of workers
: the capacities of machines
: the capacity of the storage area
Decision Variable
: the production of glass type p in time period t
: the stock level of every product p at the end of period t
Drinking Glasses: Formulation
Objective Function
Minimize the total cost (the sum of cost of production and the storage cost for all
product and time periods)
❑ ❑
𝑚𝑖𝑛𝑖𝑚𝑖𝑧𝑒 ∑ ∑ ( 𝐶𝑃𝑅𝑂𝐷𝑝 .𝑝𝑟𝑜𝑑𝑢𝑐𝑒𝑝𝑡+𝐶𝑆𝑇𝑂𝑅𝐸 𝑝 . 𝑠𝑡𝑜𝑟𝑒𝑝𝑡 )
𝑝∈ 𝑃𝑅𝑂𝐷𝑆 𝑡∈𝑊𝐸𝐸𝐾𝑆
Drinking Glasses: Formulation
Constraints:
The stock balance constraint
∀𝑝∈𝑃𝑅𝑂𝐷𝑆,∀𝑡∈𝑊𝐸𝐸𝐾𝑆:𝑠𝑡𝑜𝑟𝑒𝑝𝑡=𝑠𝑡𝑜𝑟𝑒𝑝,𝑡 −1+𝑝𝑟𝑜𝑑𝑢𝑐𝑒𝑝𝑡 −𝐷𝐸𝑀 𝑝𝑡
∀ p ∈ PRODS: store p , NT ≥ FSTOCK p
The final stock levels (at the end of the planning period)
Constraints:
❑
∑
the capacity limits on machine time
∀ t ∈WEEKS : 𝑇𝐼𝑀𝐸𝑀 𝑝 .𝑝𝑟𝑜𝑑𝑢𝑐𝑒 𝑝𝑡 ≤𝐶𝐴𝑃𝑀
𝑝 ∈𝑃𝑅𝑂𝐷𝑆
Constraints:
∀ p ∈ PRODS , ∀ t ∈WEEKS :𝑝𝑟𝑜𝑑𝑢𝑐𝑒 𝑝𝑡 ≥ 0
Non-negativity constraints for the production variables
Wee
1 2 3 4 5 6 7 8 9 10 11 12
k
1 Prod. 8.76 5.48 0.56 30.2 27.36 8.64 23 20 29 30 28 42
Store 38.76 22.24 4.8 - 10.36 – – – – – – 10
2 Prod. 0 16 23 20 11 10 12 34 21 23 30 22
Store 3 – – – – – – – – – – 10
3 Prod. 18 35 17 10 9 21 23 15 10 0 13 27
Store – – – – – – – – – – – 10
4 Prod. 16 45 24 38 41 20 19 37 28 12 30 47
Store – – – – – – – – – – – 10
5 Prod. 47.68 14.64 35.08 14.35 23.48 22.77 43.75 0 26.5 2.75 0 0
Store 24.68 19.32 31.4 30.75 44.23 45 70.75 40.75 39.25 35 20 10
6 Prod. 12 18 20 19 18 35 0.75 27.25 12 49 29.25 5.75
Store – – – – – – 0.75 – – 19 27.25 10
Back up files
Before leaving on holiday, you wish to backup your most important files onto
floppy disks.
You have got empty disks of 1.44Mb capacity. The sixteen files you would like
to save have the following sizes:
46kb, 55kb, 62kb, 87kb, 108kb, 114kb, 137kb, 164kb, 253kb, 364kb, 372kb, 388kb,
406kb, 432kb, 461kb, and 851kb.
Back up files
Assuming that you do not have any program at hand to compress the files and
that you have got a sufficient number of floppy disks to save everything
How should the files be distributed in order to minimize the number of floppy
disks used?
Back up files: Formulation
Sets
FILES: the set of files to backup
DISKS: the set of floppy disks
Constants
: capacity of a disk
: size of file f in kbyte
Decision Variables
Back up files: Formulation
Objective Function
Minimize the number of disks that are used
d
Back up files: Formulation
Constraints:
A file must be stored into a single disk
❑
∀ 𝑓 ∈ 𝐹𝐼𝐿𝐸𝑆: ∑ 𝑠𝑎𝑣𝑒 𝑓𝑑=1
The capacity limits
𝑑∈𝐷𝐼𝑆𝐾𝑆
❑
∀𝑑∈ 𝐷𝐼𝑆𝐾𝑆: ∑ 𝑆𝐼𝑍𝐸 𝑓 .𝑠𝑎𝑣𝑒 𝑓𝑑 ≤𝐶𝐴𝑃 ∗ 𝑑𝑖𝑠𝑘𝑢𝑠𝑒𝑑
𝑓 ∈𝐹𝐼𝐿𝐸𝑆
Binary variables
Back up files: Solution
Used space
Disk File sizes (in kb)
(in Mb)
46; 87; 137; 164; 253; 364;
1 1.439
388
2 55; 62; 108; 372; 406; 432 1.435
3 114; 461; 851 1.426
HOMEWORK (Part 6)