Vous êtes sur la page 1sur 49

Indr 460

Operations Research
Applications

Building Linear
Programming Models

Koc University – Spring 2018


1
Linear Programming (LP) Problem
p A mathematical programming problem
seeks to maximize or minimize an objective
function subject to constraints.

p If both the objective function and the


constraints are linear, the problem is
referred to as a linear programming
problem.

2
Linear Programming (LP) Problem
p Linear functions are functions in which each
variable appears in a separate term raised
to the first power and is multiplied by a
constant (which could be 0).

p Linear constraints are linear functions that


are restricted to be "less than or equal to",
"equal to", or "greater than or equal to" a
constant.

3
Importance of Linearity
p LP models can be solved more easily than
non-linear ones.
n There will always be an optimal solution that lies at
a vertex (extreme point)
n A local optimum is a global optimum

4
Possible Solutions to a LP
Any linear program falls in one of the
following three categories:
1. has an optimal solution
(unique optimal solution or alternate optimal solutions
may exist)

2. is infeasible

3. is unbounded
(it has an objective function that can be improved
without bound)

5
Defining Objectives
p Given a set of constraints, different objectives
will possibly lead to different optimal solutions

p It is critical to define a suitable objective


n Maximize profit, utility, return on investment,
net present value, customer satisfaction
n Minimize cost, resources, deviation from goals

p Single objective vs. multiple conflicting


objectives

6
Single Objectives
p Minimizing cost
n In LPs typically variable cost is minimized
p Marginal cost, i.e. extra cost incurred for each extra
unit produced
n Fixed costs are included in some IPs when the
model decides whether a fixed cost should be
incurred or not
p For ex: if produce, then overhead costs
p Maximizing profit
n Profit contribution = unit income – variable cost
p In multi-period models, future costs or profits are
discounted at some rate of interest
7
Multiple and Conflicting Objectives
p As a starting point, solve the model with
each objective separately
p Pick one objective and define constraints
on the others
n Infeasibility is an issue
p Define a single objective by taking a linear
combination of all the objectives
n changing the weights yields a set of solutions

8
MiniMax Objectives
p Minimax
Minimize ( Maximum å aij xij )
i
j

convert to an LP by introducing a variable z to


represent the objective value

Minimize z
subject to åa x
j
ij ij -z£0 for all i

… similarly for Maximin


9
Defining Constraints
p Most common constraints in LPs
n Capacity constraints
n Raw material availability
n Marketing demands and limitations
n Material flow and balance
n Quality requirements

p Hard and soft constraints

10
Defining Constraints
p Chance constraints
é ù
P êå a j x j £ b ú ³ b
ë j û
If β does not appear in the objective, a
deterministic equivalent may be used

åa x
j
j j £ b'
where b’ is larger than b s.t. the original
constraint is implied

11
Detecting Redundancy
p Example to problem reduction
Maximize 2x1 + 3x2 – x3 – x4
subject to x1 + x2 + x3 – 2x4 ≤ 4
-x1 – x2 + x3 – x4 ≤ 1
x1 + x4 ≤ 3
x1 , x2 , x3 , x4 ≥ 0
n Can eliminate x3 and then the 2nd constraint

p Other methods use bounds on variables


p For row elimination one can consider the dual
model 12
Structured LP models
p Multiple plant, product and period models
p Most large LP models arise by combining
submodels
p When centralized decision making occurs and
some resources are shared, optimizing an
integrated model outperforms optimization of
each submodel separately

13
xj 0 ( j = 1, 2, . . . , n).

Observe that the variables x1 , x2 , . . . , xr , the variables xr +1 , xr +2 , . . . , xs , and the variables xs+1 , xs
ot appear in common constraints. Consequently, these variables are independent, and the problem c
Multi-plant Models
oached by solving one problem in the variables x1 , x2 , . . . , xr , another in the variables xr +1 , xr +2 , .
a third in the variables xs+1 , xs+2 , . . . , xn . This separation into smaller and independent subpro
several important implications.
When
First, itpprovides resources
significant computational are allocated
savings, between
since the computations n
for linear programs are
itive to m, the number of constraints, in practice growing proportionally to m 3 . If each subproblem
plants and other decisions are made within
ains 13 of the constraints, then the solution to each subproblem requires on the order of (m/3)3 = m
putations.the plants
All three subproblems then require about 3(m 3 /27) = m 3 /9 computations, or approxim
e amount for an m-constraint problem without structure. If the number of subsystems were
p The coefficient matrix has a block angular
ulations would be only 1/k 2 times those required for an unstructured problem of comparable size.
structure

14
Example: A Multi-plant Model
p A company operates two factories, A and B.
p Each factory makes two products, standard
and deluxe, with unit profit contributions $10
and $15, respectively

15
Example: A Multi-plant Model
p Each factory uses two processes, grinding
and polishing, for producing the two products
n In factory A
p Standard product requires
§ 4 minutes of grinding
§ 2 minutes of polishing
p Deluxe product requires
§ 2 minutes of grinding
§ 5 minutes of polishing
n In factory B
p Standard product requires
§ 5 minutes of grinding
§ 5 minutes of polishing
p Deluxe product requires
§ 3 minutes of grinding 16
§ 6 minutes of polishing
Example: A Multi-plant Model
p Each unit of standard and deluxe uses 4 kgs
of a raw material that the company has 120
kgs available per week
p Company allocates 75 kgs of the raw material
to factory A and 45 kgs to factory B

Factory A Factory B
Standard Deluxe Capacity Standard Deluxe Capacity
Grinding 4 2 80 5 3 60
Polishing 2 5 60 5 6 75
hours/unit hrs/week hours/unit hrs/week

17
Example: A Multi-plant Model
Factory A’s Model:
Max: !" #$ + !& '$
st: ( #$ + ) '$ ≤ +"
) #$ + & '$ ≤ ,"
( #$ + ( '$ ≤ -&
#$ , '$ ≥ "

18
Example: A Multi-plant Model
Factory B’s Model:
Max: !" #$ + !& '$
st: & #$ + ( '$ ≤ *"
& #$ + * '$ ≤ +&
, #$ + , '$ ≤ ,&
#$, '$ ≥ "

19
Example: A Multi-plant Model

p Optimal solution to factory A’s model:


n Produce 11.25 standard units, 7.5 deluxe units
per week
n Profit is $225
n Surplus grinding capacity of 20 hrs
p Optimal solution to factory B’s model:
n Produce 11.25 deluxe units per week
n Profit is $168.75
n Surplus grinding capacity of 26.25 hrs, surplus
polishing capacity of 7.5 hrs
20
Example: A Multi-plant Model
p Let the model decide the allocation of the raw
material
p Company’s model to maximize total profit:

Max: !" #$ + !& '$ + !" #( + !& '(


st: ) #$ + * '$ ≤ ,"
* #$ + & '$ ≤ -"
& #( + . '( ≤ -"
& #( + - '( ≤ /&
) #$ + ) '$ + ) #( + ) '( ≤ !*"
#$ , #( , '$ , '( ≥ "

21
Example: A Multi-plant Model
p Optimal solution to the company’s model:
n Produce 9.17 units of standard in A
8.33 units of deluxe in A
12.5 units of deluxe in B
n Profit is $404.17
n Surplus grinding capacity of 26.67 hrs in A, 22.5 in B
n Factory A uses 70 kgs of raw material and B uses 50

p Recall that the total profit from factory A and


B’s models was $393.75

22
Decomposing a Large Model with
Structure
p Decomposition could provide an efficient
solution procedure
p Decomposition corresponds to decentralized
planning
p Decomposition by allocation
n Recall the multi-plant example
n The optimal allocation of the raw material between
the two plants was 70:50. Once this is known,
problem decomposes for each plant
p Decomposition by pricing (Dantzig-Wolfe
reformulation)
n Set prices on the common resources
n Reformulate the problem considering the vertexes 23
of the optimal solution
Decomposition by Pricing
p Consider the multi-plant example
p Submodels without the raw material
constraint:

Model-A Model-B
Max: !" #$ + !& '$ Max: !" #/ + !& '/
st: ( #$ + ) '$ ≤ +" st: & #/ + 0 '/ ≤ ,"
) #$ + & '$ ≤ ," & #/ + , '/ ≤ 1&
#$ , '$ ≥ " #/, '/ ≥ "

24
Decomposition by Pricing -
Example
p Suppose the raw material has a price of $p
per kg
p Profits for plants A and B:
Max: ("# − %&)() +("+ − %&) ,) Max: ("# − %&) (3 +("+ − %&) ,3
st: % () + - ,) ≤ /# st: + (3 + 4 ,3 ≤ 0#
- () + + ,) ≤ 0# + (3 + 0 ,3 ≤ 5+
() , ,) ≥ # (3, ,3 ≥ #

p What if p is set too low? too high?

25
Decomposition by Pricing -
Example
p Factory A’s optimal solution with p=0
n Profit is $250, produce 17.5 standard, 5 deluxe

p Factory B’s optimal solution with p=0


n Profit is $187.5, produce 12.5 deluxe
p Is this an acceptable solution?
p What is the total raw material usage?

26
Decomposition by Pricing -
Example
p When the price is p, A and B will have
solutions that are the extreme points of their
feasible regions

p For each subproblem, express the solution as


a convex linear combination of the vertices of
the feasible region

p The weights of the vertices are the new


variables, substitute for the original variables

p Obtain a master model for the company with


the new variables
27
Decomposition by Pricing - Example
p Let !" , !$ be the set of extreme points in Model-A and
Model-B.
p For a vertex % = (%( , %) ), we define the profit +, = 10 %( + 15%)
p For a vertex % = (%( , %) ), we define the raw material
requirement 1, = 4(%( + %) )
p Then we can write the Dantzig-Wolfe reformulation (DW) as
follows:
Max:
3 :4 4
4∈67∪69

st:
3 ;4 4 ≤ =>?
4∈67∪69

3 4 ≤=
4∈67

3 4 ≤=
4∈69
28
4 ≥? ∀ 4 ∈ 67 ∪ 69
Decomposition by Pricing -
Example
p The master model finds the optimum mix of
the vertex solutions of each submodel
n It has fewer constraints but too many variables
n Resort to column generation
p Add columns (vertex solutions) in the course of
optimization

n Operate with a restricted master problem


p When the restricted master is solved, the shadow
price of the raw material constraint is set as the price
p Solve individual models with this price, add the
optimal solutions as new columns to the master
29
Decomposition by Pricing - Example
Max: Reduced cost of a vertex v:
J L< <
p Let 2, 34 and 3: be the dual
<∈HE∪HI
variables associated with the
st: constraints (1)-(3)
J M< < ≤ =O> @
<∈HE∪HI p Then for a vertex & we can
calculate its reduced cost /"
J < ≤= DE as follows:
<∈HE ! − +" 2 − 34 , 67 & ∈ 94
/" = 0 "
DI !" − +" 2 − 3: , 67 & ∈ 9:
J < ≤=
<∈HI

p Recall that we have !" = 10 &' + 15&* and +" = 4(&' + &* )
p Then we can rewrite /" as:

10&' + 15 &* − 42 &' + &* − 34 , 67 & ∈ 94


/" = 0
(10&' + 15 &* ) − 42(&' + &* ) − 3: , 67 & ∈ 9:
Which can be simplified as:
(=> − ?@)<A + (=B − ?@) <C − DE, FG < ∈ HE
;< = 0 30
(=> − ?@)<A + (=B − ?@) <C − DI, FG < ∈ HI
Decomposition by Pricing - Example
(&' − )*)", + (&. − )*) "/ − 01, 34 " ∈ 61
!" = $
(&' − )*)", + (&. − )*) "/ − 07, 34 " ∈ 67

p If a vertex 8 has a positive reduced cost, i.e., we have


10 − 4< 8= + 15 − 4< 8? ≥ AB , CDE 8 ∈ FB
10 − 4< 8= + 15 − 4< 8? ≥ AG , CDE 8 ∈ FG
we should add it to the model.
p How we can find such a vertex?
p We should solve the pricing problem.

Pricing Problem-A Pricing Problem-B


Max: (&' − )*),1 +(&. − )*) /1 Max: (&' − )*) ,7 +(&. − )*) /7
st: ) ,1 + H /1 ≤ J' st: . ,7 + L /7 ≤ K'
H ,1 + . /1 ≤ K' . ,7 + K /7 ≤ M.
,1 , /1 ≥ ' ,7, /7 ≥ ' 31
Multi-period Models
p Multi-period models arise frequently when
inventory is kept
n you decide how much to produce/buy and how
much to carry inventory in each period

p Common constraints
n Inventory balance equations
p Subproblems
n Operational decisions in each period

32
Example: Multi-period Production
Planning
p Products are scheduled to be produced at
different periods
p Demand for every product in each period is
specified
p There are limitations on: production
capacity, labor, storage, etc.
p Products may be stored from one period to
the next at a known cost/unit.
p Assumption: no shortages

33
Example
p The Silver Star Bicycle Company will be
manufacturing men’s and women’s models for
its 10 speed bicycles during the next 2
months.
p Management wants to develop a production
schedule indicating how many bicycles of
each model should be produced in each
month.

34
Example
p Demand forecasts call for 150 men’s and
125 women’s models to be shipped during
the first month and 200 men’s and 150
women’s during the second month.

Production Labor Requirements (hrs) Current


Model Costs Manuf. Assembly Inventory
Men’s $120 2.0 1.5 20
Women’s $ 90 1.6 1.0 30

35
Example
p Last month the company used a total of
1000 hours of labor. Company’s policy will
not allow the total hours of labor to
increase or decrease by more than 100
hours from month to month.
p The company charges 2% of the production
cost for inventory holding. The company
would like to have at least 25 units of each
model at the end of the 2 months.
What is the minimum cost production
schedule?
36
Multi-period Planning Example
p Decision variables:
n ! " : number of women’s bicycle to produce in time
period $ ∈ & = {1,2}
n -" : number of men’s bicycle to produce in time
period $ ∈ & = {1,2}
"
n ./ : number of women’s bicycle to have in the
inventory at the end of the time period $ ∈ {0, 1, 2}
n " : number of men’s bicycle to have in the
.1
inventory at the end of the time period $ ∈ 0, 1, 2
n ℓ" : labor used at time period $ ∈ 0, 1, 2

37
Multi-period Planning Example
p Objective function:
n !"# ∶ ∑&∈((90 , & + 120 0& ) + ∑&∈( 1.8 45
& &
+ 2.4 47

38
Multi-period Planning Example
p Constraints
Inventory Balance:
n Women’s bicycles
# = ! #%& + ( # − * # ,
!" ∀- ∈ /
" "
0 = 0,
!"
2
!" ≥ 25,
n Men’s bicycles
# = ! #%& + 7# − * # ,
!6 ∀- ∈ /
6 6
0 = 0,
!6
2
!6 ≥ 25, 39
Multi-period Planning Example
p Constraints
Labor Hours:
ℓ" ≤ ℓ"$% + 100 , ∀+ ∈ -
ℓ" ≥ ℓ"$% − 100 , ∀+ ∈ -
ℓ" = 2.6 4 " + 3.5 7" , ∀+ ∈ -

40
Example: Kellog Company’s
Planning System
p Kellog Company
n produces breakfast cereal and other foods
p Kellog Planning System (KPS)
n Based on a large-scale multi-period linear program
p At operational (weekly) level
n Production, inventory and distribution decisions
p At tactical level
n Budgeting, capacity expansion, capacity
reassignment decisions
p US and Canada operations
n Used for more than a decade
41
Kellog Planning System
p KPS
n complements the ERP system by optimization
n suited to evaluate alternate scenarios
n took one year to develop the prototype, several
years to develop it further
p Kellog produces hundreds of products and
sells them as thousands of SKUs
p Geographically dispersed production facilities
p Systematic global coordination and
optimization was needed

42
Kellog’s Operations
p Operates five plants in US and Canada
p Has seven core DCs, 15 contracted co-
packers
p In cereal business alone,
n Production of 80 products
n Packaging, storing and distribution of over 600
SKUs
n A given product and package combination may be
packed into several different case sizes, yielding a
different SKU

43
Basic Operational LP
p Single product inventory balance equation is
extended to
n Multiple products and SKUs
n Multiple stages of production
n Multiple plants and DCs
n Shipping lanes between the plants and DCs
n Various capacity constraints

44
Basic Operational LP
p Each Kellog plant or co-packer is modeled as
a processing line
p Each packaging line packs finished SKUs
p Finished SKUs are kept in inventory or are
used to meet demand assigned to the plant
or are shipped to another plant or DC
p All demand is aggregated by SKU and
location
p Production of a product on a processing line
and other facilities form a production process
45
Discussion
p Decision variables associated with a plant
n MAKE, PACK, HOLD, SHIP
p Decision variables associated with a DC
n HOLD, SHIP

p Constraints within a plant


n Processing and packaging line capacities
n Flow balance between processing and packaging
n Inventory balance
n Safety stock
n Coordinate processing and packaging lines
46
Discussion
p Which are soft constraints and how are they
handled?
p How is demand uncertainty managed?
p Assembly and packaging of intermediate
products
p Data requirements
p What is a rolling horizon? When and how does
KPS run?
p What-if questions

47
Typical Linear Programming
Applications
p Petroleum industry
n where to buy crude oil, how to ship it, which
products to produce out of it, refinery
optimization
p Chemical industry
n blending, resource allocation
p Manufacturing
n Product mix, aggregate production planning,
scheduling, blending

48
Typical Linear Programming
Applications

p Transportation and p Manpower planning


distribution p Food
p Finance
p Energy
p Agriculture
p Advertising
p Health
p Mining p Defense

49

Vous aimerez peut-être aussi