lp: example of formulations - dist.unige.it didattico 2017-18...transportation problem: formulation...
TRANSCRIPT
Operations Research – Massimo Paolucci – DIBRIS University of Genova
• Three classical decision problems in OR:
– Transportation problem– Product-mix problem– Production planning problem
LP: example of formulations
Operations Research – Massimo Paolucci – DIBRIS University of Genova
Transportation problem• The decision problem: considering a certain time period (e.g., an year),
determine the most convenient way to transport some available items (products) for satisfying a given demand in the same period– m suppliers producing s1,...,sm quantities of a product– n customers requiring r1,...,rn quantities of that product– Assume in general that the product can be transported from any supplier
to any customers– For each unit of product transported from supplier i to customer j the cost
is cij
– Problem: determine the quantities of product transported between each pair (i,j) supplier-customer such that the demand are satisfied, the availabilities are respected and the total transportation cost is minimized
Operations Research – Massimo Paolucci – DIBRIS University of Genova
• Graph representation
s1
si
sm
r1
r j
rn
c i j
Transportation problem
Operations Research – Massimo Paolucci – DIBRIS University of Genova
• Data feasibility condition
• Formulate TP as LP:– Define the decision variables– Define the objective as a function of decision variables– Define the set of constraints that impose that the variables must assume
only feasible values (satisfaction of operational conditions and compliancy with variables meaning)
≥==
n
jj
m
ii rs
11
Transportation problem
Operations Research – Massimo Paolucci – DIBRIS University of Genova
• Variables:– Product quantity transported on each arc (continuous variables)
• Objective function: – Total transportation cost
• Constraints: – Total quantity supplied by suppliers cannot exceed availability
– Total quantity received by customers must be equal to the demand
– Only positive quantities can be supplied
njmixij ,...,1;,...,1 ==∈ R
==
n
jijij
m
ixc
11
Transportation problem: formulation
)1(,...,11
misx i
n
jij =≤
=
)2(,...,11
njrx jm
iij ==
=
)3(,...,1;,..,10 njmixij ==≥
Operations Research – Massimo Paolucci – DIBRIS University of Genova
• TP formulated as LP problem
njmixnjmix
njrx
misx
ts
xc
ij
ij
j
m
iij
i
n
jij
n
jijij
m
i
,...,1;,...,1)3(,...,1;,...,10
)2(,...,1
)1(,...,1
..
min
1
1
11
==∈
==≥
==
=≤
=
=
==
R
Transportation problem: formulation
Operations Research – Massimo Paolucci – DIBRIS University of Genova
Transportation problem: variations
• Some possible variations of TP– Maximum transportation capacity for arcs in the considered period– Each customer can be served by a subset of suppliers– Transportation through intermediate distribution centers
s1
si
sm
r1
r j
rn
Distribution
centers
example
Operations Research – Massimo Paolucci – DIBRIS University of Genova
Product mix problem• The decision problem: determine the optimal level of production in a
reference time period for a set of products (activities) taking into account the limited availability of a set of resources in the same period– n different product types can be produced– m different production resources (i.e., materials) with maximum
availability b1,...,bm
– Each product need a certain quantity of a set of resources: specifically, each unit of product i need aij units of resource j
– For each product i the profit for unit produced is ci
– Problem: determine the quantities to produce (the mix of products) in order to maximize the total profit without exceeding the resources availability
Operations Research – Massimo Paolucci – DIBRIS University of Genova
Product mix problem: formulation• Variables:
– The quantities of products to produce (continuous variables)
• Objective function – Total profit from production
• Constraints: – For each resource, the total used quantity cannot exceed the maximum
availability
– Only positive quantities can be produced
nixi ,...,1=∈ R
=
n
iii xc
1
)1(,...,11
mjbxa j
n
iiij =≤
=
)2(,..,10 nixi =≥
Operations Research – Massimo Paolucci – DIBRIS University of Genova
• Product mix formulated as a LP problem
nixnix
mjbxa
ts
xc
i
i
j
n
iiij
n
iii
,...,1)2(,...,10
)1(,...,1
..
max
1
1
=∈=≥
=≤
=
=
R
Product mix problem: formulation
Operations Research – Massimo Paolucci – DIBRIS University of Genova
Production planning problem• The decision problem: plan the level of production for a single product
type over a time horizon(e.g., a year) determining the production for each time period (e.g., month) in which the horizon has been divided– The product demand is known for each period– Inventory is allowed at the end of a period to store product for next
periods– A horizon of N periods (months) is assumed– For each period are known:
• the production capacity m1,...,mN• the production costs c1,...,cN• the inventory costs r1,...,rN• the product demand d1,...,dN
– The initial inventory is given M0– Problem: determine the product quantity to be produced in the
considered periods to satisfy the demand, minimizing the overall production and inventory cost
Operations Research – Massimo Paolucci – DIBRIS University of Genova
• Variables: – The quantities of product planned to be produced in each period (cont. vars)
– The quantities of product stored at the end of each period (cont. vars)
• Objective function – The total cost for production and inventory in the N periods
Nixi ,...,1=∈ R
Nisi ,...,1=∈R
Production planning problem: formulation
( ) +=
N
iiiii srxc
1
Operations Research – Massimo Paolucci – DIBRIS University of Genova
• Constraints: – Product flow conservation for each period
– Production in each period cannot exceed production capacity
– Starting inventory level
– Production and inventory levels cannot be negative
Production planning problem: formulation
)1(,...,11 Nisdsx iiii =+=+ −
)2(,...,1 Nimx ii =≤
)3(00 Ms =
)4(,..,100 Nisx ii =≥≥
Operations Research – Massimo Paolucci – DIBRIS University of Genova
• Planning problem (Single Item capacitated lot-sizing problem) formulated as LP
( )
NisxNisx
MsNimx
Nidssxts
srxc
ii
ii
ii
iiii
N
iiiii
,...,1)4(,...,100)3()2(,...,1)1(,...,1
..
min
00
1
1
=∈∈=≥≥
==≤
==−+
+
−
=
RR
Production planning problem: formulation
Operations Research – Massimo Paolucci – DIBRIS University of Genova
• Possible variations:– n different products (multi-item production)– Backlogging is allowed – Inventory capacities – Multi-stage production (semi-finished products and raw
material – Bill of material - Material Requirement Planning -MRP)
Production planning problem: formulation
Operations Research – Massimo Paolucci – DIBRIS University of Genova
LP – theory and solution methods• Main assumptions for formulating a problem as LP
– Proportionality (variables multiplied by constants)– Additivity (sum of variables by constants)– Divisibility (variables assume real values)– Certainty (all coefficients are assumed deterministic)
• Next concepts:– Fundamental definitions– Geometrical aspects– Simplex method (George Dantzig, 1947)
Operations Research – Massimo Paolucci – DIBRIS University of Genova
LP: standard and canonical forms
• Two canonical forms for LP problems– Canonical form of maximization
– Canonical form of minimization
n
T
Rx
xbxA
xcx
∈
≥≤=
0
max 0
n
T
Rx
xbxA
xcx
∈
≥≥=
0
min 0
Operations Research – Massimo Paolucci – DIBRIS University of Genova
Any LP problem can be expressed in standard form
Where:– x n×1 decision variables vector– c n×1 objective function coefficients vector– b m×1 right hand side (rhs) constraint coefficients vector– A m×n matrix of constraints coefficients A=[aij], i=1,...,n j=1,...,mAssumptions:1. b ≥ 0 bj ≥0 ∀j=1,...,m2. m<n3. m=rank(A)
n
T
Rx
xbxA
xcx
∈
≥==
)2(0)1(
max 0
LP: standard and canonical forms
Operations Research – Massimo Paolucci – DIBRIS University of Genova
Definitions:– Constraints (1) define x as solution of the LP problem– Constraints (1) and (2) define x as feasible solution of LP problem– A LP problem can be:
– Feasible with bounded optimal solutions• The feasibility region is a non empty polyhedron
• A sufficient condition: if X is closed (Polytope)
LP: types of solutions
{ } ∅≠≤∈= bxAxX n :R
X
Operations Research – Massimo Paolucci – DIBRIS University of Genova
Definitions:– A LP problem can be:
– Feasible without bounded optimal solutions (unbounded problem)• The feasibility region is a non closed non empty polyhedron (not
sufficient condition)
– Not feasible• The feasibility region is an empty polyhedron
LP: types of solutions
∅≠X Xand open
XxxX n ∈∈∃∅= such thatR
X1
X2
∅=∩= 21 XXXexample
Operations Research – Massimo Paolucci – DIBRIS University of Genova
LP: polyhedra
Definitions:• A halfspace in Rn the set
where
• A polyhedron is defined by the intersection of a set of halfspaces
• A polytope is a bounded polyhedron (for M>0, )• A set X is a convex set ⇔ given two points
any point y generated as
is (is a convex combination of )
}:{ bxax Tn ≤∈RRR ∈∈ ba n
}:{ bxAxP n ≤∈= R
Xxx ba ∈,
10)1( ≤≤−+= λλλ ba xxy
Xy∈ Xxx ba ∈,
XxMx ∈∀<||||
Operations Research – Massimo Paolucci – DIBRIS University of Genova
Graphic representation of a convex combination of two points
Definitions:• A halfspace is a convex set • The intersection of convex set is a convex set• A polyhedron is a convex set
10)1( ≤≤−+= λλλ ba xxy
Xax
bxy
LP: polyhedra
Operations Research – Massimo Paolucci – DIBRIS University of Genova
Definition:• A point of a convex set (polyhedron) X is an extreme point
(vertex) ⇔ do not exist such that for some
Vertices of X
X
LP: polyhedra
baba xxXxx ≠∈ ,,Xy∈
ba xxy )1( λλ −+= 10 << λ
Operations Research – Massimo Paolucci – DIBRIS University of Genova
Definitions:• Given a set of points the convex hull
is the smallest convex set including such points
Theorem (property of extreme points of closed polyhedra)
Any point where X is a closed polyhedron (polytope) with
extreme points (vertices) can be expressed as
convex combination of such points
LP: polyhedra
nkxx R∈,....,1
}0,1,:{),....,(11
1 ixxxxxconv i
k
ii
k
i
ii
nk ∀≥==∈= ==
λλλR
Xx∈
Eixie ,...,1, =
ixx i
E
ii
E
iei i
∀≥== ==
01 11
λλλ
Operations Research – Massimo Paolucci – DIBRIS University of Genova
Example: convex combination of 1ex2ex
3ex
X
xe1xe2
xe3
X’X
LP: polyhedra