06 lp iv handout
TRANSCRIPT
-
7/26/2019 06 LP IV Handout
1/7
Linear Programming (LP): Formulating Models for LP
Benot Chachuat
McMaster UniversityDepartment of Chemical Engineering
ChE 4G03: Optimization in Chemical Engineering
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 1 / 25
Outline
1 Straightforward Models for LP
2 Approximations and Reformulations as LP Models
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 2 / 25
Straightforward LP Models Formulation
Everything in life is not linear and continuous! But an enormous varietyof applications can be modeled validly as LPs:
Allocation ModelsBlending Models
Operations Planning
Operations Scheduling
For additional examples, see Rardin (1998), Chapter 4
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 3 / 25
Allocation Models
The main issue in allocation models is to divide or allocate a valuableresourceamong competing needs.
The resource may be land, capital, time, fuel, or anything else oflimited availability
Principal decision variables in allocation models specify how much ofthe critical resource is allocated to each use
Example:
The Ontario Forest Service musttrade-offtimber, grazing, recreational,environmental, regional preservation and other demands on forestland.
The optimization seeks the best possible allocation of land to particularprescriptions (e.g., in terms of the net present value), subject to forest-
widerestrictionson land use.
xi,j= number of acres in area imanaged by prescription j
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 4 / 25
-
7/26/2019 06 LP IV Handout
2/7
Blending Models
The main issue in blending models is to decide what mix of ingredientsbest fulfills specified output requirements.
The blend can be from chemicals, diets, metals, animal foods, etc.
Principal decision variablesin blending models specify how much ofthe available ingredients to include in the mix
Composition constraintstypically enforce lower and/or upper limits onthe properties of the blend
Example: Gasoline Blending Process
Maximize: Profit
Subject to: Product Flow =
Octane No. RVP
Rel. Vol.
Component Flows
FC
FC
FC
FC
FC
Reformate
LSR Naphta
nButane
Alkylate
FCC Gas
AT
FT
Final Blend
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 5 / 25
Operations Planning ModelsThe main issue in operations planning models is to help a decision makerdecidewhat to doandwhere to do it.
The decision making can be in manufacturing, distribution,government, volunteer, etc.
Principal decision variablesin operations planning always resolvearound what operations to undertake recall that, to gaintractability, decision variables of relatively large magnitude are bestmodeled as continuous
Balance constraintsassure that in-flows equal or exceed out-flows formaterials and products created by one stage of production andconsumed by others
Example: Which amounts of Feed 1 and Feed 2 should we use?
Feed 1
Feed 2
Product 1
Product 2
Product 3
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 6 / 25
Operations Planning Models
Class Exercise: What is the Optimization Model?
P ro d. 1 Pro d. 2 Pro d. 3 Feed Min. Feed Max. Feed Cost
Feed 1 0.7 0.2 0.1 0 1000 5Feed 2 0.2 0.2 0.6 0 1000 6Prod. Min. 0 0 0Prod. Max. 100 70 90Prod. Value 10 11 12
max [10P1+ 11P2+ 12P3] [5F1+ 6F2]
s.t. P1 = 0.7F1+ 0.2F2
P2 = 0.2F1+ 0.2F2
P2 = 0.1F1+ 0.6F2
0 P1 100
0 P2 70
0 P3 90
0 F1,F2 1000
Are there important issuesnotincluded?
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 7 / 25
Operations Scheduling Models
In operations scheduling models, the work is already fixedand theresources must be planned for meeting varying-time demands.
Principal decision variablesin operations scheduling aretime-phased time is an index and decisions may be repeated in each timeperiod
Number of ball-bearings produced during period t Inventory level at the beginning of period t Number of employees beginning a shift at time t
Scheduling models typically link decisions in successive time periodswithbalance constraintsof the form:
startinglevel in
period t
+
impacts of
period tdecisions
=
startinglevel in
period t+ 1
Covering constraintsassure that the requirements over each timeperiods are met
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 8 / 25
-
7/26/2019 06 LP IV Handout
3/7
Operations Scheduling Models
Example: Raw material deliveries are now periodic: We must decide whenand how much raw materials to purchase in order to maximize profit whilesatisfying the demand
FactoryIntermediate
Storage
DemandWarehouse
Transportation
PeriodicDeliveries
Feed 1Feed 2
Product 1
Product 1
Product 2
Product 2
Product 3
Product 3
The model must consider the inventories in tanks, factory, warehouses
Delays in transportation can be important
What type of balances are needed?
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 9 / 25
Straightforward Models for LP
Fundamental Balances:
Material: ball bearings, fluid, people, etc.
Energy: vehicle travel, processing, etc.
Space: volume, area
Lumped quantity: pollution, economic activity, etc.
Time: utilization of equipment, people work, etc.
Only retain key decisions as variables:
Production rates
Flows
Investment
Inventories
Combine other factors in parameters (constants)
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 10 / 25
Formulating Straightforward Models for LP
Example: Flow Splitting
F1
F2
F3
Feed and product mole fractions 1, . . . , n
Material Balance:
F1 = F2+F3
Feed and product composition (mole fractions) cannot change Why?
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 11 / 25
Formulating Straightforward Models for LP
Example: Perfect Separator
F11, . . . , n
F21, . . . , m
F3m+1, . . . , n
Material Balance:
F1 = F2+F3
Component Balance:
F1
m
k=1
m =F2
Can we make the product mole fractions 1, . . . , n variables? Could we model it differently?
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 12 / 25
-
7/26/2019 06 LP IV Handout
4/7
Formulating Straightforward Models for LP
Example: CSTR Reactor
reactants
products
coolant
Reaction system: A + B C
B + C DFeed flow rate: Ff
Product flow rates: FA, FB, FC, FD
Material Balances:
FA= AFf
FB= BFf
FC= CFf
FD= DFf
Remarks:
The s are forspecificreactions, reactortemperature, level, mixing pattern, etc.
If A, B, C, D are the only components,
A+B+C+ D= 1
The Fs aremassunits!
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 13 / 25
Approximate Models for LP
Besides straightforward LP models, certain classes ofnonlinearormultiobjectiveoptimization problems can be reformulatedorapproximated
as LP models:Base-Delta Models
Separable Programming
Minimax and Maximin (Linear) Objectives
Goal Programming
These approaches are usually reasonable when the uncertainties in the
problem do not justify further model accuracy Otherwise, solve thenonlinear model using NLP!
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 14 / 25
Base-Delta LP Models
Goal: Extend straightforward LP models to include nonlinear,secondary decision variables:
0= f(x, y) f(x, y) + f
y
x,y
(y y)T
Thebasemodel, f(x, y), describes the (linear) effect of the primarydecision variables, while the secondary variables are kept constant attheir nominal value y = y
Thedeltamodel provides small corrections for deviations (deltas) inthe secondary variables y around (x, y)
The accuracy of the solution depends on how well the approximation
applies at (x
, y
) = (x
, y
)To improve the accuracy, the primary and secondary decision variablesshould be limited by upper and lower bounds
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 15 / 25
Formulating Base-Delta LP ModelsClass Exercise: Pyrolysis of n-heptane
1.75
severitynominal
1 Develop a straightforward model that predicts the flow rate of
methane from the reactor2 Enhance this model by adding a delta due to changes in severity.
Recommend the allowable range for the severity variable3 Is the material balance closed in the base-delta approach?
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 16 / 25
-
7/26/2019 06 LP IV Handout
5/7
Separable Programming
Consider the following mathematical program:
minx
z =
nj=1
fj(xj) = f1(x1) + +fn(xn)
s.t.n
j=1
aijxj bi, i= 1, . . . , m
xj 0, j= 1, . . . , n
The objective consists ofn nonlinear,separableterms fj(xj), each afunction of asinglevariable only Examples?
The m constraints are linear
When eachfjis convex on the feasible region, the separable programcan be approximatedwith an LP
An analogous situation exists when the objective is to maximizeaseparableconcavefunction Why?
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 17 / 25
Approximating Separable Programs as LPs
Piecewise affine approximation:
(Nj intervals)
c2 = f
(2)j f
(1)j
x(2)j x
(1)j
fj(xj)
f(0)j
f(1)j
f
(2)
j
f(3)j
xj
x(0)j x
(1)j x
(2)j x
(3)j
0 j2 x(2)j x
(1)j
Define:
c(k)j =
f(k)j f
(k1)j
x(k)j x
(k1)j
0 jk x(k)j x
(k1)j
Substitute each variable xjand function fj by:
xj x(0)j
+
Nj
k=1
jk
fj(xj) f(0)j +
Njk=1
c(k)j jk
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 18 / 25
Approximating Separable Programs as LPs (contd)
Approximate Linear Program (on Nj Intervals):
min
nj=1
f(0)j +
nj=1
Njk=1
c(k)j jk
s.t.
nj=1
Njk=1
aijjk bi
nj=1
aijx(0)j , i= 1, . . . , m
0 jk x(k)j x
(k1)j , j= 1, . . . , n, k= 1, . . . , Nj
Important Remarks:
Convexity guarantees that the pieces in the solutions will be includedin the right order This approach doesnotwork if not allfunctions
are convex!The solution can be made as accurate as desiredby using enoughintervals One pays the price in terms of increased problem size!
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 19 / 25
Minimax and Maximin Problems
Consider the case of multiple, competing linearobjectives:
f1(x) =cT1 x +d1, . . . , fN(x)
=cTNx+dN
Minimax problem: minimize the worst (greatest) objective:
minx
max{cTi x+di :i= 1, . . . , N}
Maximin problem: maximize the worst (least) objective:
maxx
min{cTi x+di :i= 1, . . . , N}
Maximin ProblemMinimax Problem
cT1 x +d1
cT1 x +d1cT2 x +d2
cT2 x +d2
cT3 x +d3 cT3 x +d3
xmin xminxmax xmaxx x
max{cTjx +dj: i= 1, . . . , 3}
min{cTjx +dj :i= 1, . . . , 3}
f(x) f(x)
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 20 / 25
-
7/26/2019 06 LP IV Handout
6/7
Formulating Minimax Problems
Class Exercise: Two groups of employees in a company are asked to workon Sundays, depending on the actual plant production x,
Group 1: f1(x) = 5x Group 2: f2(x) = 3x+ 2
The CEO wants to minimize the maximum number of employees workingon Sundays in all groups. Formulate a model for this optimization problem.
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 21 / 25
Reformulating Minimax and Maximin Problems
Idea: Introduce a slack variable, along with N inequality constraints
Minimax Problem:
minx max{cTi x+di :i= 1, . . . , N}
LP Model:
minx,z
z
s.t. z cT1 x+d1
...
z cTNx+dN
Maximin Problem:
maxx min{cTi x +di :i= 1, . . . , N}
LP Model:
maxx,z
z
s.t. z cT1 x+d1
...
z cTNx+dN
Additional linear constraints can be included in the formulations
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 22 / 25
Goal Programming
Consider the case of multiple, competing linearobjectives:
f1(x) =cT1 x, . . . , fN(x)
=cTNx,
and corresponding target levels 1, . . . , N
Find a compromise between the various goals in such a way thatmost are to some extent satisfied Lower One-Sided Goal: Achieve a value of at least k for the kth goal,
fk(x) =cTkx k
Upper One-Sided Goal: Achieve a value of at most k for the kth goal,
fk(x) =cTkx k
Two-Sided Goal: Achieve a value of exactly k for the kth goal,
fk(x) =cTkx= k
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 23 / 25
Formulating Goal Programming as LP Models
Soft Constraints
Target levels specify requirements that are desirableto satisfy, but whichmay be violated in feasible solutions
Idea: Introducedeficiency variables, d
k, representing the amount bywhich the kth goal is over- or under-achieved
Lower One-Sided Goal: cTkx +d
k =k, d
k 0
Upper One-Sided Goal: cTkx d+k =k, d
+k 0
Two-Sided Goal: cTkx +d
k d+k =k, d
+k , d
k 0
Fundamental balances (such as material and energy balances) shouldneverbe softened! These must always be strictly observed
Softening constraints may helpdebuggingmodels in case infeasibilityis reported
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 24 / 25
-
7/26/2019 06 LP IV Handout
7/7
Formulating Goal Programming as LP Models (contd)
Non-Preemptive LP Model Formulation: All the goals areconsidered simultaneously in the objective function,
minx,d
Td
s.t. cTkx dk =k, k= 1, . . . , N
Ax b
x 0, d 0
Determining the weights is asubjective step... Different weightsoften yield very different solutions!
Preemptive LP Model Formulation: The goals are subdivided into
sets, and each set is given a priority The solution proceeds by solving a sequence of subproblems, from
highest to lowest priority goals Goals of lowerpriority are ignored in a given subproblem Goals ofhigherpriority are enforced as hard equality constraints
Benot Chachuat (McMaster University) LP: Model Formulation 4G03 25 / 25