carnegie mellon expanding scope and computational...
TRANSCRIPT
Expanding Scope and Computational Challenges in Process Scheduling
Ignacio E. GrossmannCenter for Advanced Process Decision-making
Department of Chemical EngineeringCarnegie Mellon UniversityPittsburgh, PA 15213, USA
January 10, 2017
Pedro CastroCentro de Investigação Operacional
Faculdade de CiênciasUniversidade de Lisboa
1749-016 Lisboa, Portugal
Qi ZhangCenter for Advanced Process Decision-making
Department of Chemical EngineeringCarnegie Mellon UniversityPittsburgh, PA 15213, USA
Currently at BASF, SE, Ludwigshafen, Germany
FOCAPO / CPC 2017
Carnegie Mellon
Tucson, Arizona
2
FOCAPO 2017/CPC IX January 8-12, 2017, Tucson, Arizona- FOCAPO: Christos Maravelias (Wisconsin) and John Wassick (Dow) - CPC: Erik Ydstie (Carnegie Mellon University) and Larry Megan (Praxair)
FOCAPO Speakers:Chrysanthos GounarisIgnacio GrossmannNick Sahinidis
CPC Speaker:Larry Biegler
Workshops:FOCAPO -Introduction to Chemical Process Operations and OptimizationCPC -Introduction to Theory and Practice of MPCJoint - Introduction to Machine Learning
Slides talks: http://focapo-cpc.org/?page=schedule
3
EWO Seminars: http://egon.cheme.cmu.edu/ewo/seminars.html
March 10: Julia and Pyomo: Software for the 21st Century Qi Chen, Braulio Brunaud
March 31: Expanding Scope and Computational Challenges in Process SchedulingPedro Castro, Ignacio Grossmann
April 7: Supply Chain Optimization at Amazon Russell Allgor
April 21: Flexible Regression Methods for Big Data Simon Sheather
Spring 2017
2
EWO involves optimizing the operations of R&D,material supply, manufacturing, distribution of a company to reduce costs and inventories, and to maximize profits, asset utilization, responsiveness .
Key in Enterprise-wide Optimization (EWO)Scheduling
Carnegie Mellon
Carnegie Mellon
Integration of planning, scheduling and control
Key issues:
Planning
Scheduling
Control
LP/MILP
MI(N)LP
RTO, MPC
Multiple models
Planning
Scheduling
Control
Economics
Feasibility Delivery
Dynamic Performance
months, years
days, weeks
secs, mins
Multiple time scales
3
References
Shah, N., “Single- and multisite planning and scheduling: Current status and future challenges,”Proceedings of FOCAPO-98 75 – 90 (1998).
Mauderli. A. M.: Rippin. D. W. T. Production Planning and Scheduling for Mu1tipurpose Batch Chemical Plants. Comp. Chem. Eng. 3, 199 (1979).
Reklaitis, G. V. Review of Scheduling of Process Operation. AIChE Symp. Ser. 78, 119-133 (1978).
Harjunkoski, I., Maravelias, C.T., Bongers, P., Castro, P., Engell, S., Grossmann, I.E., Hooker, J., Mendez, C., Sand, G. and Wassick, J., “Scope for Industrial Applications of Production Scheduling Models and Solution Methods,” Comp. Chem. Eng., 62, 161-193 (2014).
Kallrath, J. “Planning and scheduling in the process industry,” OR Spectrum, 24, 219-250 (2002).
Maravelias C., C. Sung, “Integration of production planning and scheduling: Overview, challenges and opportunities,” Comp. Chem. Eng., 33, 1919–1930(2009).
Grossmann, I.E., “Advances in Mathematical Programming Models for Enterprise-Wide Optimization,” Comp. Chem. Eng., 47, 2-18 (2012).
Wassick, J. (2009), “Enterprise-wide optimization in an integrated chemical complex,” Comp. Chem. Eng., 33, 1950–1963.
Baldea, M., I. Harjunkoski., “Integrated production scheduling and process control: A systematicreview” Comp. Chem. Eng., 71, 377-390 (2014).
Dias, L.S., M. Ierapetritou., “Integration of scheduling and control under uncertainties: Review and challenges,” Chem. Eng. Res. Design, 116, 98-113 (2016).
Floudas, C.A.; Lin, X. “Continuous-time versus discrete-time approaches for scheduling of chemical processes: a review.” Comp. and Chem. Eng., 28, 2109 – 2129 (2004).
Carnegie Mellon
Outline presentation
1. Scheduling: Basics and new applicationsa) Brief review state-art-schedulingb) Beyond conventional scheduling problems
Heat integration, pipeline scheduling, blending
2. Demand side management: New area for schedulinga) Multiscale design/scheduling modelsb) Application robust optimization – cryogenic energy storage
3. Integration of Planning and Scheduling: Largely unsolved problema) Discussion of approachesb) Use of TSP constraints for changeoversc) Decomposition schemes: Bi-level and Lagrangean
5
Carnegie Mellon
Basic concepts• Production recipe
– Sequence of tasks with known duration/processing rate
• Need to consider multiple materials?– No: Identity is preserved ⟹ sequential facility– Yes: Material-based ⟹ network facility
• Production environment
8January 10, 2017 Planning & Scheduling
FillingDuration=40min
Heating (C1)Duration=20minK1 K2
NeutralizationDuration=180min
Heating (C2)Duration=40minK3
EvaporationDuration=65minK4 K5
Cooling (H1)Duration=25min K6
WashingDuration=85min
K7 Heating (C3)Duration=30min
K8 K9 K10 K11 K12FiltrationDuration=25min
Heating (C4)Duration=20min
Cooling (H2)Duration=30min
DischargeDuration=120min
Product
I1
48 oC 95 oC 110 oC
94 oC 97 oC 107 oC
94 oC 113 oC 93 oC
99 oC 65 oC
Cp=43.9 MJ/K 45.9 MJ/K 45.8 MJ/K
45.8 MJ/K45.5 MJ/K 44.8 MJ/K
Illustrated for sequentialbut also applies to
network facility
Time representation• Discrete time
• Continuous time
– Single time grid for all resources– Multiple time grids
• Precedence– General
– Immediate
9January 10, 2017 Planning & Scheduling
12 |T|-2 |T|-1
slot 1
3
time slot 2 slot |T|-2 slot |T|-1
event points t=|T|
T1 T2 T3 T|T|-2 T|T|-1 T|T|
timing variables to be determined by optimization
12 |T|-1
t=|T|3 4 |T|-2|T|-3
time pointsft1 ft2 ft3 ft4 ... ft|T|ft|T|-1ft|T|-2
time of each time point is known a priori
δ
...
uniform slot size (time units)
´́ ∀ ´
, ´ , ´
´́
, ´
´
, ´
´ ´∀ ´
starting time of order duration of order
´́ ´´´´ ∀
, ´ , ´´
∨´
, ´
´ ´ ´∀ ´ ∀
GDP facilitates modeling ofequipment availability constraint
0 H
Discrete vs. continuous-time (Castro ‘08)
• Multistage, multiproduct batch plant, earliness minimization– Discrete-time
• Reducing data accuracy (↑ ) makes model easier to solve– One way to reduce complexity while generating good solutions
– Continuous-time• More complex models, can handle just a few event points (| | 10)
10January 10, 2017 Planning & Scheduling
|T| Binary variables
Total variables
Constraints RMIP MIP CPUs Nodes
29 710 2103 1433 Infeasible Infeasible 0.27 -
57 1535 4272 2777 207 207 0.47 0
142 3978 10795 6857 192 192 20.0 0
283 8034 21619 13625 184 184 54.7 0
|T| Binary variables
Total variables
Constraints RMIP MIP CPUs Nodes
5 440 511 873 154.17 184 1748 328357
Was 45,520 s with CPLEX 10.2, Pentium 4 @3.4 GHz
CPLEX 11.1, Intel Core2 Duo T9300 @2.5 GHz
State-Task Network (STN) (Kondili, Pantelides & Sargent ‘93)
• Process representation model– Complex recipes, multiple processing routes, shared intermediates, recycles– Different treatment of material states and equipment units
• One of most important papers in PSE– 622 citations (ISI)– #4 of all time Comp. Chem. Eng.
11January 10, 2017 Planning & Scheduling
, , ̅ , , , , , , , , , , ∀ ,Material balances (multiperiod)
´, , ´´´
1 1 , , ∀ , ,
Equipment allocation constraints
Consumption Batchsize Raw‐materialsupply&productdemand
Materialstateavailability Production
Assignsstartoftask tounit timeProcessingtime
, , ´´
1∀ ,Fewer & tighter
constraints (Shah, Pantelides & Sargent ‘93)
Resource-Task Network (RTN) (Pantelides ‘94)
• Generalization of STN– Tasks
• Rectangles– Resources (states, units, etc.)
• Circles– Structural parameters
• Link tasks & resources• May be difficult to find
• RTN mathematical model– Very simple & tight (discrete-time)
• Few sets of constraints– Magic is in excess
resource balances!
12January 10, 2017 Planning & Scheduling
Hh_C1Cast_Gg_CC1
Duration=154 min
Hh
PW ENCC1
Hh´_C1 Hh´
1
0
t=
+1
10 11 12 13θ= 0 1 2 3
δCasting task
Hour= 15:30 16:30 17:30 18:30
+1
‐1
‐1
+1
1
0
1
0
7
0
+7
‐7
+7
‐7
7
0
+7 ‐7 ‐6.3+6.3
RTN similar to UOPSS (Kelly, 2005)
• Example: fruit juice processing plant (Zyngier, 2016)
– Continuous multiproduct plant• 3 juice types (water + grape, grape pear, grape pear apple)• 2 package types (bottle, carton)
– Process flow diagram does not provide all information
– UOPSS shows operating modes for blender & packaging lines• RTN equivalent: tasks consuming same equipment resource
13January 10, 2017 Planning & Scheduling
Scheduling roadmap(adapted from Harjunkoski et al. ‘14)
14
Gather InfoPlant topology & Production recipe
+? Production
EnvironmentMathematical Model
Key Aspect: Time Representation
Sequ
entia
l
Standard Network
?
Use GDP to Derive Difficult Constraints
E.g. time‐dependent pricing & availability of resources
Describe Process as STN/RTN
Network
?
STN/RTN
‐based
Mod
els
Continuous‐time
Unit‐specific
Discrete‐time
1 2 3 4 5 6 7
Continuous‐time
Single time grid1 2 3 54
1 2 3 4
1 2 3 4
Precedence
i i’ i’ i
Continuo
us‐tim
e Mod
els
Multiple time grids
1 2 3 4
1 2 3 4
Beyond conventional scheduling problems:
1) Heat integration2) Pipeline Scheduling3) Blending
15
Integrating scheduling & heat integration
• Timing, temperature driving force & bounds on energy transfer
16January 10, 2017 Planning & Scheduling
Linking timing constraints
, ∀ , ∀
Heat integration model derived
from GDP
Classical general precedence model
hot task h
cold task c
Heat integration
hot task h
cold task c
Heat integration
hot task h
cold task c
Heat integration
hot task h
cold task c
Heat integration
h
cNo overlap
,
∗ ∗ ∆, ,
, , , , , 0
,
∗ ∆, ,
, , , , , 0
,
∗ ∆, ,
, , , , , 0
,
∆, ,
, , , , , 0
,00
, , , , , , , 0
∀ ,
Tradeoff makespan vs. utility consumption
17January 10, 2017 Planning & Scheduling
• Vegetable oil refinery(Castro et al. ‘15)
Energy savings
15.5% 37.7%
890min,26.2%
Problem/Stages 2 318 streams 29 s 927 s26 streams 463 s 202,652 s33 streams 171,971 s -
26streams
RTN vs. GDP for pipeline scheduling
18January 10, 2017 Planning & Scheduling
• RTN pipeline segment model– Product centric, FIFO policy
• GDP modular approach– Batch centric, fewer time slots
• Exclusive disjunctions
• Inclusive disjunctionsP1_bV
P1_lSs‐1
F_P1Switch Fill A_P1_P?Dur.=Instantaneous M_P1
P1_iP
P1_aV
Switch Empty A_P?_P1Dur.=Instantaneous E_P1
Pipeline Volume
FE_P1Switch Empty B_P?_P1
Dur.=InstantaneousSwitch Fill B_P1_P?Dur.=Instantaneous
Pipeline Volume
Do Nothing_P1Rate=Whatever
Switch Empty A/B_P1_P?Dur.=Instantaneous
Switch Fill A/B_P?_P1Dur.=Instantaneous N_P1
G
Fill & Empty_P1Rate=Whatever
Inside Pipeline Segment Ss
P2_bV
PP_bV
...
P1_lSs
Fill_P1Rate=Whatever
Empty_P1Rate=Whatever
Move_P1Rate=Whatever
Minimum Volume
Continuous interaction
Discrete interaction
Valve_Ss
, ,,
, , ,
, ,,
, ,,∈
,,
, , 0∀ ∀ ,
, ,,
, , 0,
, ,, ,
, ,,
,, ,,
,
∈
,,
, ,
, ,, 0∀
∀ ,
(Castro ‘10) (Mostafaei & Castro ‘17)
P6
Input node (Refinery R1)
Output node (Depot D1)
Dual purpose node DP1Input R2, Output D2 Depot D3
I1I2I4I5
Empty batch I3
Segment S1 Segment S2 Segment S3
P1 P2 P3 P4 P5
Integrated batching & scheduling• GDP model can be extended to other configurations
19January 10, 2017 Planning & Scheduling
Blending in petroleum refineries• Crude oil
– Lee, Pinto, Grossmann & Park (‘96)
• Refined products– Li, Karimi & Srinivasan (‘10)– Kolodziej, Grossmann, Furman & Sawaya (‘13)
20January 10, 2017 Planning & Scheduling
Supply tanks Blending tanks Product tanks
Material from upstream processes
Tank
contents used to fu
lfillprod
uct orders
Con
tinuo
us b
lend
ing
(MIL
P)
Batch blending (MINLP)
Alternative formulations
21January 10, 2017 Planning & Scheduling
• Process networks– Tank volumes, compositions,
stream flows
• Source based– Disaggregated volume & flow
variables, split fractions,
, ,
,
, ´,
1
2
3
4
1
2
1 2 34 5
1 2 34 6
1 2
3 4
5 6
, ,,
, , ´,
, ´,
, , , , , , , ´, ´, , , , , ´,´
∀ , , , , , , , ´, , , , ´,´
∀ , ,
, , ´, , ´, , , ∀ , ´, ,
Bilinear terms (non-convex)
Total flows and compositions
Problem Variables Equations Bilinearterms
DICOPTFeasible?
BARONCPUs
6T-3P-2Q-029 103 202 64 No 3.138T-3P-2Q-146 223 617 256 No 12278T-4P-2Q-480 313 879 376 No 3028T-4P-2Q-531 273 732 358 No 97.48T-3P-2Q-718 223 603 244 Yes 3.568T-3P-2Q-721 223 623 256 No 2658T-4P-2Q-852 305 859 376 No 231
Individual flows and split fractionsBARONCPUs Variables Equations Bilinear
termsDICOPTFeasible?
0.33 219 294 64 No91.3 689 965 480 Yes453 941 1383 720 No43.3 878 1218 684 No3.97 672 939 456 Yes21.4 689 971 480 Yes134 933 1363 720 Yes
Smaller size, fewer bilinear terms but worse performance!
Global optimization of bilinear MINLPs
22January 10, 2017 Planning & Scheduling
• 2-stage MILP-NLP strategy– MILP relaxation
• Bilinear envelopes (McCormick ‘76)– Integration with spatial B&B
• Piecewise McCormick (Bergamini et al. ‘05)– Recommended for 2,… , 9
• Multiparametric disaggregation (Kolodziej, Castro & Grossmann ‘13)– 10, 100, 1000,…– Standalone procedures,
guarantee global optimality as → ∞
– Local solution of reduced NLP• Fix binary variables
– Using values from MILP relaxation• The tighter the relaxation (↑ ),
the most likely to get feasibleor global optimal solution
• Bilinear term
∨
,
⋅ , ⋅ ⋅ ,
⋅ , ⋅ ⋅ ,
⋅ , ⋅ ⋅ ,
⋅ , ⋅ ⋅ ,
, ,
∀ ,
, ⋅ 1 /, ⋅ /
Partitiondependentboundsfor
Domainof dividedinto partitions
Singleactivepartition
. . ., , ,
,,,1
, ,∨ ∨. . .
Insights from crude oil blending (Castro ‘16)
23January 10, 2017 Planning & Scheduling
• Advantages of discrete-time– Simpler model– Tighter MILP-LP relaxation– Easier to account for time-varying
inventory costs• Better for cost minimization
• Advantages of continuous-time– More accurate model– Fewer slots to represent schedule– ↓ nonlinear blending constraints
• Better for gross maximization
Discrete-time Continuous-timeSlots | | Solution (k$) Solution (k$) Slots | |
97 7983 7985 481 10240 10246 749 8542 8574 8121 13258 13258 7
Discrete-time Continuous-timeProblem Slots | | Solution (k$) Solution (k$) Slots | |
P1 97 209.585 210.537 8P2 81 319.140 320.496 8P3 97 284.781 287.000 8P4 121 319.875 333.331 7
Approach Cost [$] Gap CPUs Cost [$] Gap CPUsMcCormick P1 209585 0.0000% 72.6 P3 284781 0.0000% 346GloMIQO 209585 0.0001% 1557 284781 11.1% 3600BARON 209585 0.0001% 305 397208 112% 3600
McCormick P2 319140 0.0000% 662 P4 322300 7.6% 3600GloMIQO 319252 10.9% 3600 No sol. 17.6% 3600BARON 319140 38.5% 3600 324746 37.9% 3600
• Major surprise!– Zero MINLP-MILP gap from bilinear envelopes!
• Better than BARON & GloMIQO
Carnegie Mellon
Time-sensitive pricing motivates the active management of electricity demand → demand side management (DSM)
Electricity prices change on an hourly basis (more frequently in the real-time market)
Challenge, but also opportunity for electricity consumers
Hourly electricity prices in 2013
Time [h]
Pric
e [$
/MW
h]
Source: PJM Interconnection LLC
Chemical plants are large electricity consumers → high potential cost savings
24
Carnegie Mellon
Strategic planning models have to incorporate long-termand short-term decisions for demand side management
LN2
LAr
LO2
Air feed
Off-site customers
GN2
GO2 On-site customers
Air separation plant
Electricity
Storage
Power-intensive plant Product demands for each season Seasonal electricity prices on an hourly
basis Upgrade options for existing equipment New equipment options Additional storage tanks
Given:
Production / inventory levels Mode of operation Product purchases Upgrades for equipment Purchase of new equipment Purchase of new tanks
Determine:
for each season on an hourly basis
Industrial Case Study:Uncertain demand
25
Mitra, Grossmann, Pinto, Arora (2014)
Carnegie MellonThe operational model is based on a surrogate representation in the product space1
Disjunction of feasible regions, reformulated with convex hull:
Demand satisfaction
Inventory balance
+ Inventory and transition cost
Feasible region: projection in product spaceModes: different ways of operating a plant
Mass balances: differences for products with and without inventory
Energy consumption: requires correlation with production levels for each mode
1. Zhang et al. (2016). Optimization & Engineering, 17, 289-332.
26
Carnegie Mellon
Transient plant behavior is captured with logic constraints1,2
State diagram for transitions:
nodes: states (modes) = different ways of operating a plant
arcs = allowed transitions (including constraints, e.g. min. up-/downtime)
Forbidden transitions
Link between state and transitional variables
Enforce minimum stay in a mode
Coupling between transitions
Rate of change constraint
Off Ramp‐uptransition
Productionmode
Minimum down‐time: 24 hours After 6 hrs
Minimum uptime: 48 hours
/
/
1. Mitra et al. (2012). Computers & ChemE, 38, 171-184.2. Zhang et al. (2016). Computers & ChemE, 84, 382-393.
27
Carnegie MellonA multiscale time representation based on theseasonal behavior of electricity prices is applied1
Horizon: 10 years, each year has 4 seasons (spring, summer, fall, winter)
Each season is represented by one week on an hourly basis
Each representative week is repeated in a cyclic manner (13 weeks reduced to 1)
Connection between periods: Only through investment (design) decisions
Year 1, spring: Investment decisions
Mo Tu We Th Fr Sa Su Mo Tu Su… Mo Tu Su… Mo Tu Su…
Year 2, spring: Investment decisions
…
0.00
50.00
100.00
150.00
200.00
250.00
1 25 49 73 97 121 145
Spring
0.00
50.00
100.00
150.00
200.00
250.00
1 25 49 73 97 121 145
Summer
0.00
50.00
100.00
150.00
200.00
250.00
1 25 49 73 97 121 145
Fall
0.00
50.00
100.00
150.00
200.00
250.00
1 25 49 73 97 121 145
Winter
Spring Summer Fall Winter
1. Mitra et al. (2014). Computers & ChemE, 65, 89-101.
28
Carnegie Mellon
Air Separation Plant
Retrofitting an air separation plant
LIN1.Tank
LIN2.Tank?
LOX1.Tank
LOX2.Tank?
LAR1.Tank
LAR2.Tank?
Liquid Oxygen
Liquid Nitrogen
Liquid Argon
Gaseous Oxygen
Gaseous Nitrogen
Existing equipment
Option A
Option B ?(upgrade)
Additional Equipment
Spring - Investment decisions: (yes/no)- Option B for existing equipment? - Additional equipment? - Additional Tanks?
Spring Summer Fall Winter
Fall - Investment decisions: (yes/no)- Option B for existing equipment? - Additional equipment? - Additional Tanks?
Superstructure
Time
Pipelines
• The resulting MILP has 191,861 constraints and 161,293 variables (18,826 binary.)• Solution time: 38.5 minutes (GAMS 23.6.2, GUROBI 4.0.0, Intel i7 (2.93GHz) with GB RAM)
Carnegie MellonInvestments increase flexibility help realizing savings.
0
50
100
150
200
1 25 49 73 97 121 145
Price in $/MWh
Power con
sumption
Hour of a typical week in the summer seasonPower consumption w/ investment Power consumption w/o investmentSummer prices in $/MWh
1 25 49 73 97 121 145
Inventory level
Hour of a typical week in the summer seasonoutage level LN2‐w/ investment 2‐tanks capacity
1‐tank capacity LN2‐w/o investment
Remarks on case study
• Annualized costs:$5,700k/yr
• Annualized savings:$400k/yr
• Buy new liquefier in the first time period (annualized investment costs: $300k/a)
• Buy additional LN2 storage tank ($25k/a)
• Don’t upgrade existing equipment ($200k/a)equipment: 97%.
Power consumption
LN2 inventory profile
Source: CAPD analysis; Mitra, S., I.E. Grossmann, J.M. Pinto and Nikhil Arora, "Integration of strategic and operational decision- making for continuous power-intensive processes”, submitted to ESCAPE, London, Juni 2012
30
Carnegie Mellon
Comparison of seasonal schedules
0
50
100
150
200
1 25 49 73 97 121 145
Price in $/MWh
Power
con
sump
on
Hour of a typical week in the summer season Power consump on w/ investment: summer Power consump on w/o investment: summer Summer
0
50
100
150
200
1 25 49 73 97 121 145
Price in $/MWh
Power
con
sump
on
Hour of a typical week in the spring season Power consump on w/ investment: spring Power consump on w/o investment: spring Spring
0
50
100
150
200
1 25 49 73 97 121 145
Price in $/MWh
Power
con
sump
on
Hour of a typical week in the winter season Power consump on w/ investment: winter Power consump on w/o investment: winter Winter
0
50
100
150
200
1 25 49 73 97 121 145
Price in $/MWh
Power
con
sump
on
Hour of a typical week in the fall season Power consump on w/ investment: fall Power consump on w/o investment: fall Fall
Spring
Fall
Summer
Winter
31
32
Carnegie MellonIndustrial case study: Integrated Air Separation Unit -Cryogenic Energy Storage (CES) participates in two electricity markets
Liquid inventory
Driox
Gas demand
Liquid demand
CES inventory
Electricity generation
Electricenergy market
ASU
Operating reserve market
LO2, LN2, LAr
LO2, LN2
GO2, GN2Vented gas
Sold electricity
Provided reserve
Purchased electricity
For internal use
Air
Purchasedliquid
LO2, LN2
Uncertainty in reserve demand
Zhang, Heuberger, Grossmann, Pinto, Sundramoorthy (2015)
33
Carnegie MellonAdjustable Affine Robust Optimization ensures
feasible schedule for provision of operating reserve capacity
• Multistage formulation: first stage: base plant operation, reserve capacity• recourse: liquid produced (linear with reserve demand)• Large-scale MILP: 53,000 constraints, 55,000 continuous variables, 2,500 binaries
CPLEX 12.5 , 10 min CPU-time (1% gap)
-0.1
-0.05
0
0.05
0.1
0
0.2
0.4
0.6
0.8
0 12 24 36 48 60 72 84 96 108 120 132 144 156 168
In a
nd O
ut F
low
s
CE
S In
vent
ory
Time [h] Liquid Flow into CES Tank Converted to Power for Internal Use Converted to Power to be Sold Committed Reserve Capacity CES Inventory Spinning Reserve Price Electricity Price
-0.1
-0.05
0
0.05
0.1
0
0.2
0.4
0.6
0.8
0 12 24 36 48 60 72 84 96 108 120 132 144 156 168
In a
nd O
ut F
low
s
CE
S In
vent
ory
Time [h]
-0.1
-0.05
0
0.05
0.1
0
0.2
0.4
0.6
0.8
0 12 24 36 48 60 72 84 96 108 120 132 144 156 168
In a
nd O
ut F
low
s
CE
S In
vent
ory
Time [h]
-0.1
-0.05
0
0.05
0.1
0
0.2
0.4
0.6
0.8
0 12 24 36 48 60 72 84 96 108 120 132 144 156 168
In a
nd O
ut F
low
s
CE
S In
vent
ory
Time [h]
-0.1
-0.05
0
0.05
0.1
0
0.2
0.4
0.6
0.8
0 12 24 36 48 60 72 84 96 108 120 132 144 156 168
In a
nd O
ut F
low
s
CE
S In
vent
ory
Time [h]
34
Carnegie Mellon
• Different models / different time scales
• Mismatches between the levels
Decomposition
Challenges:
Planning months, years
Schedulingdays, weeks
Sequential Hierarchical ApproachSimultaneous Planning and Scheduling
Challenges:
• Very Large Scale Problem• Solution times quickly
intractable
Planning
Scheduling
Detailed scheduling over the entire horizon
Approaches to Planning and Scheduling
Goal: Planning model that integrates major aspects of scheduling
35
Carnegie Mellon
Approaches to Integrating Schedulingat Planning Level
- Relaxation/Aggregation of detailed scheduling modelErdirik, Wassick, Grossmann (2006, 2007, 2008)
Single stage multiproduct batch/continuous with sequence dependent changeovers
- Projection of scheduling model onto Planning level decisionsSung, Maravelias (2007, 2009)
General MILP STN model for multiproduct batch scheduling
- Iterative decomposition of Planning and Scheduling Models- Bilevel decomposition- Lagrangean decomposition
Extensive review: Maravelias, Sung (2009)
36
Carnegie Mellon
Relaxation/Aggregation of detailed scheduling model
Replace the detailed timing constraints by:
Model A. (Relaxed Planning Model) Constraints that underestimate the sequence dependent changeover times Weak upper bounds (Optimistic Profit)
Model B. (Detailed Planning Model) Sequencing constraints for accounting for transitions rigorously
(Traveling salesman constraints) Tight upper bounds (Realistic estimate Profit)
II.
Scheduling model•Continuous time domain representation•Based on time slots•Sequence dependent change-over times handled rigorously•Incorporates mass balances and intermediate storage
I
MILP Planning Models Multiple Stage Batch/ContinuousErdirik, Grossmann (2006)
37
Carnegie Mellon
Sequence dependent changeovers: Sequence dependent changeovers within each time period:
1. Generate a cyclic schedule where total transition time is minimized.KEY VARIABLE:
mtiiZP ' :becomes 1 if product i is after product i’ on unit m at time period t, zero otherwise
P1, P2, P3, P4, P5 P1
P2
P3
ZP P1, P2, M, T = 1
ZP P2, P3, M, T = 1
mtiiZZP ' :becomes 1 if the link between products i and i’ is to be broken, zero otherwise KEY VARIABLE:
2. Break the cycle at the pair with the maximum transition time to obtain the sequence.
P1
P2
P3P4
P4
?ZZP P4, P3, M, T
P4
P4P5
Proposed Model B (Detailed Planning)
38
Carnegie Mellon
P1
P2
P3P4
P4
P2, P3, P4, P5, P1 ZZP P1, P2, M, T = 1
P3, P4, P5, P1, P2 ZZP P2, P3, M, T = 1
P4, P5, P1, P2, P3 ZZP P3, P4, M, T = 1
P5, P1, P2, P3, P4 ZZP P4, P5, M, T = 1
P1, P2, P3, P4, P5 ZZP P5, P1, M, T = 1
P1
P2
P3P4
P4
P2, P3, P4, P5, P1 ZZP P1, P2, M, T = 1
P3, P4, P5, P1, P2 ZZP P2, P3, M, T = 1
P4, P5, P1, P2, P3 ZZP P3, P4, M, T = 1
P5, P1, P2, P3, P4 ZZP P4, P5, M, T = 1
P1, P2, P3, P4, P5 ZZP P5, P1, M, T = 1
According to the location of the link to be broken:
The sequence with the minimum total transition time is the optimal sequence within time period t.
''
, ,imt ii mti
YP ZP i m t ' ' ', ,i mt ii mt
iYP ZP i m t
''
1 ,ii mti i
ZZP m t ' ' , ', ,ii mt ii mtZZP ZP i i m t
Generate the cycle and break the cycle to find theoptimum sequence where transition times are minimized.
Having determining the sequence, we can determine the total transition time within each week.
' ' , ,[ ]i iimt i mt iimtYP YP ZP i m t
, , , , ,imt i i m tYP ZP i m t
, , , ', , 1 , ' , ,i i m t i m tZP YP i i i m t
, , , , , ', ,'
, ,i i m t i m t i m ti i
ZP YP YP i m t
' ' , ,[ ]i iimt i mt iimtYP YP ZP i m t
, , , , ,imt i i m tYP ZP i m t
, , , ', , 1 , ' , ,i i m t i m tZP YP i i i m t
, , , , , ', ,'
, ,i i m t i m t i m ti i
ZP YP YP i m t
Changeovers within each period
39
Carnegie Mellon
, , ' , ', , , ' , ', ,' '
,m t i i i i m t i i i i m ti i i i
TRNP ZP ZZP m t
P4 P5 P1 P2 P3
4, 5P P5, 1P P 1, 2P P 2, 3P P
3, 4P P
P1
P2
P3P4
P5
ZZP P4, P3, M, T =1
1) generate the cycle
2) break the cycle to obtain the sequence
Total transition time within period t on unit m
, 4, 5 5, 1 1, 2 2, 3 3, 4 3, 4m t P P P P P P P P P P P PTRNP
Transition time required to change the operation from P1 to P2
Changeovers within each period
40
Carnegie Mellon
40
Multiperiod Refinery Planning ProblemFractionation index model for CDU
• Time horizon with N time periods• Inventories and changeovers of M crudes
• Given: refinery configuration
Determine• What crude oil to process and in which time period?• The quantities of these crude oils to process? • The sequence of processing the crudes?
Alattas, Palou, Grossmann (2012)
41
Carnegie Mellon
41
Multiperiod MINLP ModelMax Profit= Product sales minus the costs of product inventory, crude oil, unit operation and net transition times.s.t. Performance CDU (FI Model) each crude, each time period
Mass balances, inventories each crude, each time period
Sequencing constraints (Traveling Salesman, Erdirik, Grossmann (2008))
0-1 variables to assign crude in period t0-1 variables to indicate position of crude in sequence0-1 variables to indicate where cycle is brokenContinuous variables flows, inventories, cut temperatures
42
Carnegie Mellon
42
Example: 5 crudes, 4 weeksProduce fuel gas, regular gasoline, premium gasoline, distillate, fuel oil and treated residue
Optimal solution ($1000’s) Profit 2369.0Sales 22327.9Crude oil cost 16267.5Other feedstock 44.6Inventory cost 126.3Operating cost 3246.5Transition cost 274.0
MINLP model: 13,680 variables (900 0-1), 15,047 constraintsNonlinear variables: 28%
GAMS/DICOPT 23.3.3 (CONOPT/CPLEX): 37 seconds (94% NLP, 6% MIP)
Carnegie Mellon
43
Raw Materials Plants Final
Products Customers
Month 1 Month 2 Month 3 Month 4
Demand Demand Demand Demand
TimeProduction Production Production Production
• Multi-period integrated planning and scheduling of a network of multiproduct batch plants located in multiple sites
Multisite Planning and SchedulingMulti-Scale Optimization Challenge (Spatial, Temporal)
Calfa, Agrawal, Grossmann, Wassick (2013)
Carnegie Mellon
Bilevel Decomposition Algorithm
44
Integer cuts are added to ULP to generate new schedules and avoid infeasible ones to be passed to the LLS problem
Includes TSP constraints
Carnegie Mellon
Lagrangean Decomposition
• ULP problem can become expensive to solve for large industrial cases
• Temporal Lagrangean Decomposition (TLD) can be applied to ULP problem: each time period becomes a subproblem
45
: Inventory levels, assignments (changeovers across periods)
Carnegie Mellon
Hybrid BD-LD Decomposition
• Multipliers are updated using the Subgradient Method
• Lagrangean subproblems are solved in parallel using GAMS grid computing capabilities*
• Maximum 30 LD iterations allowed
46* http: //interfaces.gams-software.com/doku.php?id=the_gams_grid_computing_facility
Carnegie Mellon
Computational Results: Problem Sizes
47
Ex. Problem Disc. Vars.
Cont. Vars. Const. NZ Elems. Nodes Time [s]
1ULP 528 925 1,412 4,537 5,015 0.992
LLS 507 1,039 1,726 5,049 29 0.180
FS 936 1,201 2,924 9,113 94,929 44.981
2
ULP 6,328 52,783 43,169 145,009 57 2.343
LLS 4,412 53,047 45,378 145,831 0 1.623
FS 128,400 95,563 437,649 3,998,885 57,536 12,228.943
3
ULP 119,397 834,195 590,810 2,206,546 0 4,070.48
LLS 228,701 898,119 1,140,007 6,836,510 0 452.53
FS 6,726,779 3,138,985 22,895,121 648,785,966 ‐ ‐
• Not enough RAM to solve problem FS in Example 3
4 w
eeks
6 w
eeks
12 w
eeks
Carnegie Mellon
Concluding remarks
1. Scheduling: Variety of powerful approaches availablea) STN & RTN discrete/continuous-time models have reached maturityb) GDP facilitates formulation of complex constraints, widening the scopec) Increased emphasis on nonlinear models (MINLP)
2. Demand side management: Link with electric power: new application area for schedulinga) Large-scale MILP models can yield significant $ savingsb) Application robust optimization – cryogenic energy storage
3. Integration of Planning and Scheduling: Remains major unsolved problema) Not a single approach has emerged as winnerb) Showed effectiveness of TSP constraints for changeoversc) Showed need for decomposition schemes: Bi-level and Lagrangean
Carnegie Mellon
49
-The modeling challenge: Integration of planning, scheduling, control models for the various components of the supply chain, including nonlinear process models.
Research Challenges
- The multi-scale optimization challenge: Coordinated optimization of models over geographically distributed sites, and over the long-term (years), medium-term (months) and short-term (days, min) decisions.
- The uncertainty challenge:Anticipating impact of uncertainties in a meaningful way.
- Algorithmic and computational challenges: Effectively solving large scale MIP models including nonconvex problems in terms of efficient algorithms, and modern computer architectures.