Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References...

47
Expanding Scope and Computational Challenges in Process Scheduling Ignacio E. Grossmann Center for Advanced Process Decision-making Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213, USA January 10, 2017 Pedro Castro Centro de Investigação Operacional Faculdade de Ciências Universidade de Lisboa 1749-016 Lisboa, Portugal Qi Zhang Center for Advanced Process Decision-making Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213, USA Currently at BASF, SE, Ludwigshafen, Germany FOCAPO / CPC 2017 Carnegie Mellon Tucson, Arizona

Transcript of Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References...

Page 1: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

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

Page 2: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

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

Page 3: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

Carnegie Mellon

Integration of planning, scheduling and control

Key issues:

Planning

Scheduling

Control

LP/MILP

MI(N)LP

RTO, MPC

Multiple models

Multiple time scales

3

Page 4: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

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

Page 5: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

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

Page 6: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

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

6January 10, 2017 Planning & Scheduling

FillingDuration=40 min

Heating (C1)Duration=20 minK1 K2

NeutralizationDuration=180 min

Heating (C2)Duration=40 minK3

EvaporationDuration=65 minK4 K5

Cooling (H1)Duration=25 min K6

WashingDuration=85 min

K7 Heating (C3)Duration=30 min

K8 K9 K10 K11 K12FiltrationDuration=25 min

Heating (C4)Duration=20 min

Cooling (H2)Duration=30 min

DischargeDuration=120 min

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

Make BA

E

B

Make DC D

Make E

0.4

0.6

Page 7: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

Time representation• Discrete time

• Continuous time

– Single time grid for all resources– Multiple time grids

• Precedence– General

– Immediate

7January 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

Page 8: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

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)

8January 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

Page 9: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

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.

9January 10, 2017 Planning & Scheduling

𝑆𝑆𝑙𝑙,𝑙𝑙 = 𝑆𝑆𝑙𝑙,𝑙𝑙−1 + �𝑖𝑖

�𝑗𝑗

�𝜃𝜃=0

𝜏𝜏𝑖𝑖

(�̅�𝜌𝑖𝑖,𝑙𝑙,𝜃𝜃𝐵𝐵𝑖𝑖,𝑗𝑗,𝑙𝑙−𝜃𝜃 − 𝜌𝜌𝑖𝑖,𝑙𝑙,𝜃𝜃𝐵𝐵𝑖𝑖,𝑗𝑗,𝑙𝑙−𝜃𝜃) + 𝑅𝑅𝑙𝑙,𝑙𝑙 − 𝐷𝐷𝑙𝑙,𝑙𝑙 ∀𝐹𝐹, 𝑡𝑡Material balances (multiperiod)

�𝑖𝑖𝑖

�𝑙𝑙𝑖=𝑙𝑙

𝑙𝑙+𝜏𝜏𝑖𝑖−1

𝑊𝑊𝑖𝑖𝑖,𝑗𝑗,𝑙𝑙𝑖 − 1 ≤ 𝑀𝑀 1 −𝑊𝑊𝑖𝑖,𝑗𝑗,𝑙𝑙 ∀𝑖𝑖, 𝑗𝑗, 𝑡𝑡

Equipment allocation constraints

Consumption Batch size Raw-material supply & product demand

Material state availability Production

Assigns start of task 𝑖𝑖 to unit 𝑗𝑗 time 𝑡𝑡Processing time

�𝑖𝑖

�𝑙𝑙𝑖=𝑙𝑙

𝑙𝑙−𝜏𝜏𝑖𝑖+1

𝑊𝑊𝑖𝑖,𝑗𝑗,𝑙𝑙𝑖 ≤ 1 ∀𝑗𝑗, 𝑡𝑡Fewer & tighter

constraints (Shah, Pantelides & Sargent ‘93)

Page 10: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

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!

10January 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

Page 11: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

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

11January 10, 2017 Planning & Scheduling

Page 12: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

Scheduling roadmap(adapted from Harjunkoski et al. ‘14)

12

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

Net

wor

k

?

STN

/RTN

-bas

ed M

odel

s

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∨

Cont

inuo

us-t

ime

Mod

els

Multiple time grids

1 2 3 4

1 2 3 4

Page 13: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

Beyond conventional scheduling problems:

1) Heat integration2) Pipeline Scheduling3) Blending

13

Page 14: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

Integrating scheduling & heat integration

• Timing, temperature driving force & bounds on energy transfer

14January 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

over

lap

𝑌𝑌ℎ,𝑐𝑐𝑙𝑙𝑙𝑙

𝑇𝑇𝐹𝐹ℎ = 𝑇𝑇𝐹𝐹𝑐𝑐𝑇𝑇𝑇𝑇ℎ = 𝑇𝑇𝑇𝑇𝑐𝑐𝑇𝑇ℎ∗ ≥ 𝑇𝑇𝑐𝑐∗ + ∆𝑡𝑡𝑄𝑄ℎ,𝑐𝑐𝑙𝑙𝑙𝑙 ≤ 𝑞𝑞ℎ,𝑐𝑐

𝑄𝑄ℎ,𝑐𝑐𝑙𝑙𝑠𝑠 ,𝑄𝑄ℎ,𝑐𝑐

𝑠𝑠𝑙𝑙 ,𝑄𝑄ℎ,𝑐𝑐𝑠𝑠𝑠𝑠 = 0

�−

𝑌𝑌ℎ,𝑐𝑐𝑙𝑙𝑠𝑠

𝑇𝑇𝐹𝐹ℎ = 𝑇𝑇𝑇𝑇𝑐𝑐𝑇𝑇𝑇𝑇ℎ = 𝑇𝑇𝑇𝑇𝑐𝑐

𝑇𝑇ℎ∗ ≥ 𝑡𝑡𝑐𝑐𝑜𝑜𝑜𝑜𝑙𝑙 + ∆𝑡𝑡𝑄𝑄ℎ,𝑐𝑐𝑙𝑙𝑠𝑠 ≤ 𝑞𝑞ℎ,𝑐𝑐

𝑄𝑄ℎ,𝑐𝑐𝑙𝑙𝑙𝑙 ,𝑄𝑄ℎ,𝑐𝑐

𝑠𝑠𝑙𝑙 ,𝑄𝑄ℎ,𝑐𝑐𝑠𝑠𝑠𝑠 = 0

�−

𝑌𝑌ℎ,𝑐𝑐𝑠𝑠𝑙𝑙

𝑇𝑇𝑇𝑇ℎ = 𝑇𝑇𝐹𝐹𝑐𝑐𝑇𝑇𝑇𝑇ℎ = 𝑇𝑇𝑇𝑇𝑐𝑐

𝑡𝑡ℎ𝑜𝑜𝑜𝑜𝑙𝑙 ≥ 𝑇𝑇𝑐𝑐∗ + ∆𝑡𝑡𝑄𝑄ℎ,𝑐𝑐𝑠𝑠𝑙𝑙 ≤ 𝑞𝑞ℎ,𝑐𝑐

𝑄𝑄ℎ,𝑐𝑐𝑙𝑙𝑙𝑙 ,𝑄𝑄ℎ,𝑐𝑐

𝑙𝑙𝑠𝑠 ,𝑄𝑄ℎ,𝑐𝑐𝑠𝑠𝑠𝑠 = 0

�−

𝑌𝑌ℎ,𝑐𝑐𝑠𝑠𝑠𝑠

𝑇𝑇𝑇𝑇ℎ = 𝑇𝑇𝑇𝑇𝑐𝑐𝑇𝑇𝑇𝑇ℎ = 𝑇𝑇𝑇𝑇𝑐𝑐

𝑡𝑡ℎ𝑜𝑜𝑜𝑜𝑙𝑙 ≥ 𝑡𝑡𝑐𝑐𝑜𝑜𝑜𝑜𝑙𝑙 + ∆𝑡𝑡𝑄𝑄ℎ,𝑐𝑐𝑠𝑠𝑠𝑠 ≤ 𝑞𝑞ℎ,𝑐𝑐

𝑄𝑄ℎ,𝑐𝑐𝑙𝑙𝑙𝑙 ,𝑄𝑄ℎ,𝑐𝑐

𝑙𝑙𝑠𝑠 ,𝑄𝑄ℎ,𝑐𝑐𝑠𝑠𝑙𝑙 = 0

�−

𝑌𝑌ℎ,𝑐𝑐𝑛𝑛𝑜𝑜

𝑇𝑇𝐹𝐹ℎ ≥ 0𝑇𝑇𝐹𝐹𝑐𝑐 ≥ 0

𝑄𝑄ℎ,𝑐𝑐𝑙𝑙𝑙𝑙 ,𝑄𝑄ℎ,𝑐𝑐

𝑙𝑙𝑠𝑠 ,𝑄𝑄ℎ,𝑐𝑐𝑠𝑠𝑙𝑙 ,𝑄𝑄ℎ,𝑐𝑐

𝑠𝑠𝑠𝑠 = 0

∀ ℎ, 𝑐𝑐

Page 15: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

Tradeoff makespan vs. utility consumption

15January 10, 2017 Planning & Scheduling

• Vegetable oil refinery(Castro et al. ‘15)

Energy savings

15.5 % 37.7 %

0 100 200 300 400 500 600 700 800

I1

I2

I3

I4

I5

I6

Time (min)

Optimal schedule featuring heat integration (11849.321 MJ, 890 min)

Hot

ColdC1 C2 H1 C3 C4 H2

C8 C9 H4C10

C7C5 C6 H3

C11 C12 H5C13

C14 H6C15 C16

C17 C18 H7C19

391.411 MJ

1020.917 MJ

131.373 MJ

105 oC

36.8 MJ/K

11.6 MJ/K

92.742 oC 65 oC

49 oC 82.742 oC 94.068 oC

695 min

695 min

710 min

710 min

730 min

714.2 min

59.672 MJ

10.816 MJ

715 min

95 oC

107 oC

44.8 MJ/K

104.068 oC 65 oC

710 min 714.2 min 740 min

1750.227 MJ

320.824 MJ 115.776 MJ

1193.575 MJ

104 oC

11.8 MJ/K

43.9 MJ/K

76.812 oC 67 oC

48 oC 66.812 oC 94 oC

220 min

220 min

234.1 min

234.1min

250 min

240 min

505.001 MJ

433.011 MJ 679.989 MJ

123.789 MJ

106 oC

37.1 MJ/K

11.6 MJ/K

94.329 oC 76 oC

47 oC 84.329 oC 95 oC

345 min

345 min

358.9 min

358.9 min

370 min

370 min

463.963 MJ

36.1 MJ/K

50 oC 61.250 oC 88.585 oC

515 min

525min

533.6 min

99.325 MJ

306.800 MJ 115.050 MJ

105 oC

11.8 MJ/K

75.750 oC 66 oC

510 min 525 min 540 min

38.350 MJ

515 min

101.750 oC

231.592 MJ95 oC

535 min

45.8 MJ/K 525 min 533.6 min 550 min

255.780 MJ110 oC 93 oC98.585 oC

522.820 MJ

(890 min, 26.2%)

Problem/Stages 2 318 streams 29 s 927 s26 streams 463 s 202,652 s33 streams 171,971 s -

84.5%

62.3%

60%

65%

70%

75%

80%

85%

805 905 1005 1105 1205 1305

Utili

ty C

onsu

mpt

ion

vs. N

o In

tegr

atio

n

Makespan (min)

2-Stages 3-stages

26 streams

Page 16: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

RTN vs. GDP for pipeline scheduling

16January 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

�−𝑖𝑖∈𝐼𝐼𝑟𝑟

𝑋𝑋𝑟𝑟,𝑖𝑖,𝑙𝑙𝑅𝑅

𝑓𝑓𝑟𝑟𝑅𝑅,min ≤ 𝐹𝐹𝑟𝑟,𝑖𝑖,𝑙𝑙

𝑅𝑅 ≤ 𝑓𝑓𝑟𝑟𝑅𝑅,max

𝐹𝐹𝑟𝑟,𝑖𝑖,𝑙𝑙𝑅𝑅

𝜌𝜌𝑟𝑟𝑅𝑅,max ≤ 𝐿𝐿𝑙𝑙 ≤

𝐹𝐹𝑟𝑟,𝑖𝑖,𝑙𝑙𝑅𝑅

𝜌𝜌𝑟𝑟𝑅𝑅,min

�𝑋𝑋𝑟𝑟,𝑙𝑙𝑅𝑅,𝑛𝑛𝑜𝑜

𝐹𝐹𝑟𝑟,𝑖𝑖,𝑙𝑙𝑅𝑅 = 0 ∀𝑖𝑖𝐿𝐿𝑙𝑙 ≤ ℎ

∀𝑇𝑇, 𝑡𝑡

�𝑖𝑖∈𝐼𝐼𝑠𝑠

𝑋𝑋𝑙𝑙,𝑖𝑖,𝑙𝑙𝑆𝑆,𝑖𝑖𝑛𝑛

𝐿𝐿𝐿𝐿𝑙𝑙,𝑖𝑖,𝑙𝑙 = 0𝑓𝑓𝑙𝑙𝑆𝑆,min ≤ 𝐹𝐹𝑙𝑙,𝑖𝑖,𝑙𝑙

𝑆𝑆,𝑖𝑖𝑛𝑛 ≤ 𝑓𝑓𝑙𝑙𝑆𝑆,max

𝐹𝐹𝑙𝑙,𝑖𝑖,𝑙𝑙𝑆𝑆,𝑖𝑖𝑛𝑛

𝜌𝜌𝑙𝑙𝑆𝑆,max ≤ 𝐿𝐿𝑙𝑙 ≤

𝐹𝐹𝑙𝑙,𝑖𝑖,𝑙𝑙𝑆𝑆,𝑖𝑖𝑛𝑛

𝜌𝜌𝑙𝑙𝑆𝑆,min

𝑋𝑋𝑙𝑙,𝑙𝑙𝑆𝑆,𝑛𝑛𝑜𝑜 𝑖𝑖

𝐿𝐿𝐿𝐿𝑙𝑙,𝑖𝑖,𝑙𝑙 ≤ 𝑣𝑣𝑙𝑙𝑆𝑆

𝐹𝐹𝑙𝑙,𝑖𝑖,𝑙𝑙𝑆𝑆,𝑖𝑖𝑛𝑛 = 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

Page 17: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

Integrated batching & scheduling• GDP model can be extended to other configurations

17January 10, 2017 Planning & Scheduling

Page 18: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

Blending in petroleum refineries• Crude oil

– Lee, Pinto, Grossmann & Park (‘96)

• Refined products– Li, Karimi & Srinivasan (‘10)– Kolodziej, Grossmann, Furman & Sawaya (‘13)

18January 10, 2017 Planning & Scheduling

CR1

CR2

CR1-2,4

CR1-3,5

CR3 CR2-3,6

CR1

CR2

CR3

Marine vessels (MV) Dedicated storage tanks (ST)

Charging tanks (CT) Distillationunits (CDU)

Supply tanks Blending tanks Product tanks

Mat

eria

l fro

m u

pstr

eam

pro

cess

es

Tank

cont

ents

use

d to

fulfi

llpr

oduc

t ord

ers

Con

tinuo

us b

lend

ing

(MIL

P)

Batch blending (MINLP)

Page 19: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

Alternative formulations

19January 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

𝑉𝑉𝑙𝑙,𝑖𝑖,𝑙𝑙𝑐𝑐𝑞𝑞 ,𝑙𝑙

𝐹𝐹𝑙𝑙,𝑖𝑖,𝑖𝑖𝑖,𝑙𝑙

𝑋𝑋𝑖𝑖,𝑖𝑖𝑖,𝑙𝑙

𝐿𝐿𝑞𝑞,𝑖𝑖,𝑙𝑙𝑉𝑉𝑖𝑖,𝑙𝑙 = 𝐿𝐿𝑞𝑞,𝑖𝑖,𝑙𝑙−1𝑉𝑉𝑖𝑖,𝑙𝑙−1 + �𝑖𝑖𝑖

(𝐿𝐿𝑞𝑞,𝑖𝑖𝑖,𝑙𝑙−1𝐹𝐹𝑖𝑖𝑖,𝑖𝑖,𝑙𝑙 − 𝐿𝐿𝑞𝑞,𝑖𝑖,𝑙𝑙−1𝐹𝐹𝑖𝑖,𝑖𝑖𝑖,𝑙𝑙) ∀ 𝑞𝑞, 𝑖𝑖, 𝑡𝑡 𝑉𝑉𝑙𝑙,𝑖𝑖,𝑙𝑙 = 𝑉𝑉𝑙𝑙,𝑖𝑖,𝑙𝑙−1 + �𝑖𝑖𝑖

(𝐹𝐹𝑙𝑙,𝑖𝑖𝑖,𝑖𝑖,𝑙𝑙 − 𝐹𝐹𝑙𝑙,𝑖𝑖,𝑖𝑖𝑖,𝑙𝑙) ∀ 𝐹𝐹, 𝑖𝑖, 𝑡𝑡

𝐹𝐹𝑙𝑙,𝑖𝑖,𝑖𝑖𝑖,𝑙𝑙 = 𝑋𝑋𝑖𝑖,𝑖𝑖𝑖,𝑙𝑙𝑉𝑉𝑙𝑙,𝑖𝑖,𝑙𝑙−1 ∀ 𝐹𝐹, 𝑖𝑖𝑖, 𝑖𝑖, 𝑡𝑡

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!

Page 20: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

Global optimization of bilinear MINLPs

20January 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)/𝑁𝑁𝑥𝑥𝑗𝑗,𝑛𝑛𝑈𝑈 = 𝑥𝑥𝑗𝑗𝐿𝐿 + (𝑥𝑥𝑗𝑗𝑈𝑈 − 𝑥𝑥𝑗𝑗𝐿𝐿) ⋅ 𝑛𝑛/𝑁𝑁

Partition dependent bounds for 𝑥𝑥𝑗𝑗

Domain of 𝑥𝑥𝑗𝑗 divided into 𝑁𝑁 partitions

Single active partition

. . .𝑥𝑥𝑗𝑗𝐿𝐿

𝑥𝑥𝑗𝑗𝑈𝑈𝑥𝑥𝑗𝑗,1𝐿𝐿 𝑥𝑥𝑗𝑗,2

𝐿𝐿 𝑥𝑥𝑗𝑗,𝑁𝑁𝐿𝐿

𝑥𝑥𝑗𝑗,𝑁𝑁𝑈𝑈𝑥𝑥𝑗𝑗,𝑁𝑁−1

𝑈𝑈𝑥𝑥𝑗𝑗,1𝑈𝑈𝑛𝑛 = 1 𝑛𝑛 = 𝑁𝑁

𝑦𝑦𝑗𝑗,1 = 𝑡𝑡𝑇𝑇𝑇𝑇𝑇𝑇 𝑦𝑦𝑗𝑗,𝑁𝑁 = 𝑡𝑡𝑇𝑇𝑇𝑇𝑇𝑇∨ ∨. . .

Page 21: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

Insights from crude oil blending (Castro ‘16)

21January 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

Page 22: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

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

22

Page 23: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

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

23

Page 24: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

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.

24

Page 25: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

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.

25

Page 26: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

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

Spring Summer Fall Winter

1. Mitra et al. (2014). Computers & ChemE, 65, 89-101.

26

Page 27: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

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)

Page 28: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

Carnegie MellonInvestments increase flexibility help realizing savings.

0

50

100

150

200

1 25 49 73 97 121 145

Price in $/MWh

Pow

er c

onsu

mpt

ion

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

Inve

ntor

y le

vel

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

28

Page 29: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

Carnegie MellonComparison of seasonal schedules

Spring

Fall

Summer

Winter

29

Page 30: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

30

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)

Page 31: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

31

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]

Page 32: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

32

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

Page 33: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

33

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)

Page 34: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

34

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)

Page 35: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

35

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)

Page 36: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

36

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

Page 37: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

37

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 Pτ5, 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

Page 38: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

38

Carnegie Mellon

38

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)

Page 39: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

39

Carnegie Mellon

39

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

Page 40: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

40

Carnegie Mellon

40

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)

Page 41: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

Carnegie Mellon

41

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)

Page 42: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

Carnegie Mellon

Bilevel Decomposition Algorithm

42

Integer cuts are added to ULP to generate new schedules and avoid infeasible ones to be passed to the LLS problem

Includes TSP constraints

Page 43: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

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

43

: Inventory levels, assignments (changeovers across periods)

Page 44: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

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

44* http: //interfaces.gams-software.com/doku.php?id=the_gams_grid_computing_facility

Page 45: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

Carnegie Mellon

Computational Results: Problem Sizes

45

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

Page 46: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

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

Page 47: Carnegie Mellon Expanding Scope and Computational ...focapo-cpc.org/pdf/Grossmann.pdf · References Shah, N., “Single - and multisite planning and scheduling: Current status and

Carnegie Mellon

47

-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.