generalized capital investment planning of oil-refineries using cplex-milp and sequence-dependent...

77
Generalized Capital Investment Planning of Oil-Refineries using MILP and Sequence-Dependent Setups Brenno C. Menezes, a,b Jeffrey D. Kelly, c,* Ignacio E. Grossmann, d Alkis Vazacopoulos e a Refining Optimization, PETROBRAS Headquarters, Rio de Janeiro, Brazil. b Center for Information, Automation and Mobility, Technological Research Institute, São Paulo, Brazil. c Industrial Algorithms LLC., 15 St. Andrews Road, Toronto, Canada. d Chemical Engineering Department, Carnegie Mellon University, Pittsburgh, United States. e Industrial Algorithms LLC., 202 Parkway, Harrington Park, United States. 1

Upload: alkis-vazacopoulos

Post on 06-May-2015

321 views

Category:

Data & Analytics


1 download

DESCRIPTION

Performing capital investment planning (CIP) is traditionally done using linear (LP) or nonlinear (NLP) models whereby a gamut of scenarios are generated and manually searched to make expand and/or install decisions. Though mixed-integer nonlinear (MINLP) solvers have made significant advancements, they are often slow for industrial expenditure optimizations. We propose a more tractable approach using mixed-integer linear (MILP) model and input-output (Leontief) models whereby the nonlinearities are approximated to linearized operations, activities, or modes in large-scaled flowsheet problems. To model the different types of CIP's known as revamping, retrofitting, and repairing, we unify the modeling by combining planning balances with the scheduling concepts of sequence-dependent changeovers to represent the construction, commission, and correction stages explicitly. Similar applications can be applied to process design synthesis, asset allocation and utilization, and turnaround and inspection scheduling. Two motivating examples illustrate the modeling, and a retrofit example and an oil-refinery investment planning are highlighted.

TRANSCRIPT

Page 1: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Generalized Capital Investment Planning of Oil-

Refineries using MILP and Sequence-Dependent

Setups

Brenno C. Menezes,a,b Jeffrey D. Kelly,c,* Ignacio E. Grossmann,d Alkis Vazacopoulose

aRefining Optimization, PETROBRAS Headquarters, Rio de Janeiro, Brazil.

bCenter for Information, Automation and Mobility, Technological Research Institute, São Paulo,

Brazil.

cIndustrial Algorithms LLC., 15 St. Andrews Road, Toronto, Canada.

dChemical Engineering Department, Carnegie Mellon University, Pittsburgh, United States.

eIndustrial Algorithms LLC., 202 Parkway, Harrington Park, United States.

Oil-refinery production, Investment planning, Process design synthesis, Sequence-dependent

changeovers

Abstract

Due to quantity times quality nonlinear terms inherent in the oil-refining industry, performing

industrial-sized capital investment planning (CIP) in this field is traditionally done using linear

1

Page 2: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

(LP) or nonlinear (NLP) models whereby a gamut of scenarios are generated and manually

searched to make expand and/or install decisions. Though mixed-integer nonlinear (MINLP)

solvers have made significant advancements, they are often slow for large industrial applications

in optimization; hence, we propose a more tractable approach to solve the CIP problem using a

mixed-integer linear programming (MILP) model and input-output (Leontief) models, where the

nonlinearities are approximated to linearized operations, activities, or modes in large-scaled

flowsheet problems. To model the different types of CIP's known as revamping, retrofitting, and

repairing, we unify the modeling by combining planning balances with scheduling concepts of

sequence-dependent changeovers to represent the construction, commission, and correction

stages explicitly in similar applications such as process design synthesis, asset allocation and

utilization, and turnaround and inspection scheduling. Two motivating examples illustrate the

modeling, and a retrofit example and an oil-refinery investment planning problem are also

highlighted.

1. Introduction

In the oil-refining industry, physical and chemical processes separate and convert a mix of

hydrocarbon molecules known as crude-oil resulting in derivatives or intermediate fuels to be

treated and blended into final products such as gasoline, kerosene and diesel. As a result of this

complexity that varies in a three-dimensional quantity-logic-quality relationship, industrial-sized

models integrating phenomenological (blending, processing, separating) and procedural

(sequences, setups, startups) optimization in planning and scheduling problems can be very

difficult to solve in a full space MINLP. Therefore, solution strategies such as MILP + NLP

phenomenological decompositions (Mouret, Grossmann, and Pestiaux, 2009; Menezes, Kelly, and

2

Page 3: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Grossmann, 2015) and MILP approximations, as stated in this paper, can be proposed to handle

such complicated models with reasonable accuracy. However, in the strategic investment

planning optimization to construct oil-refineries or oil and gas facilities, most methodologies are

still based on simulation of numerous scenarios, reducing the models to LP and NLP problems

where the set of material flows and operating conditions are optimized considering the selected

process design and logistics frameworks.

These trial-and-error or try-and-test methodologies are also true in industrial scheduling

problems commonly performed among the oil-refineries worldwide. Either commercial or home-

grown scheduling solutions rely on simulation of events or situations to test feasibility, where the

user is responsible for trying different decisions manually as well as keeping track of convoluted

decision-trees that did not work or prove feasible. A normal outcome is that the schedulers

abandon these solutions, and return to their simpler spreadsheets because of the exhausting

efforts to model, memorize and manage the numerous scenarios and update the modeling

premises and situations that are constantly changing. Unfortunately, this translates into inferior

scheduling decisions that are made, which results in reduced operating capacity and capability as

well as increasing the variability of the whole system. This will ultimately feedback into the

planning bounds or limits, which will further result in inferior planning decision-making (Kelly

and Mann, 2003; and Kelly and Zyngier, 2008a).

To optimize process design in oil-refineries, we propose an input-output or Leontief (Leontief,

1986) modeling, also found in generalized network-flow and convergent and divergent problems,

to allow all of the units, facilities, and equipment to be modeled both with multiple operations or

activities and with multiple inputs and outputs interconnected both upstream and downstream

forming a complex network, chain, or more appropriately an arbitrary superstructure. These can

3

Page 4: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

be easily represented in large-scale and sophisticated optimization problems using a new

modeling and solving platform called IMPL (Industrial Modeling and Programming Language)

from Industrial Algorithms, LLC. that is a flowsheet, fundamentals, and formula-based

environment. This platform has built-in facilities for network and equation constructions using

the unit-operation-port-state superstructure (UOPSS) formulation that is the cross-product of the

physical (units) and the procedural (operations) models or substructures (Kelly, 2004b; Kelly,

2005; Zyngier and Kelly, 2012). Additional details on UOPSS and IMPL’s configuration can be

found in section 4 with the aid of the supplementary material.

In contrast to the use of MINLP models to optimize nonlinear continuous and discrete variables

in a full range space, MILP input-output models vary in a set of modes defined by parameters

such as yields, rates, and sizes and circumvent some of the drawbacks of the MINLP models at

the expense of the linearization. These include providing good initial-values of the continuous

variables to avoid infeasibilities in the nonlinear programming sub-problems, and the difficulty

of even solving the root relaxation NLP node when the binary or discrete variables are treated as

continuous variables. Furthermore given the inherent non-convexities, solving an MINLP to

global optimality may become intractable for medium and large scale problems especially when

minimizing or maximizing a weak and degenerate objective function. MILP input-output

approaches do not suffer from these problems, although they can vary only for the points or

regions set in the modes, i.e., within a reduced space. Therefore, in general they provide only an

approximation to the original MINLP, albeit with much greater robustness and reliability, of at

least attaining good quantity and logic feasible solutions in a reasonable amount of time.

The proposed MILP formulation represents the selection of projects and their intrinsic stages to

improve or extend/enhance assets by capacity, capability, or overall facilities expansion in which

4

Page 5: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

admissible project schedules must obey certain constraints such as stage dependencies, product

demands, and other resource restrictions. We address the modeling of stages, activities, or tasks

explicitly in order to better predict the different types of capital investment planning activities

known as revamping, retrofitting (Madron, 1992), and repairing especially found in the

petroleum, petrochemicals, and oil and gas industries. We generalize or unify the modeling by

combining supply-chain production and inventory planning balances with the scheduling

concepts of sequence-dependent setups, switchovers or changeovers to represent the

construction, commission, and correction stages, in which required capital resources can be

defined by product demands to be matched or limit the number of projects to be approved. The

importance of the stages is that during their executions, e.g., the existing assets are totally or

partially shutdown, so that the plant production can be modified within its project execution time

windows. This to our knowledge, has not been addressed in the conventional capital investment

planning found in the process industry literature (Sahinidis, Grossmann, Fornari, and Chathrathi,

1989; Liu and Sahinidis, 1996; Iyer and Grosmann, 1998; Van den Heever and Grossmann,

1999; Jackson and Grossmann, 2002; Al-Qahtani and Elkamel, 2008, 2009; Menezes et al.,

2014a; Menezes, Kelly and Grossmann, 2015).

The proposed approach can be employed in similar applications to what is known as production

and process design synthesis, asset allocation and utilization, and turnaround and inspection

scheduling, where binary unit-operation-time decisions to invest (revamp), operate (retrofit),

maintain (repair), etc. over these different problems are similarly modeled considering stages,

sequencing, and selection of states or modes by configuring them in IMPL’s embedded

semantics that uses the discrete-time sequence-dependent setup modeling of Kelly and Zyngier

(2007). Two motivating examples describe the modeling including the IMPL configuration and

5

Page 6: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

model formulation of the motivating example 1 (see the supplementary material). A retrofit case

reproduced from Jackson and Grossmann (2002) and an investment planning of an oil-refinery

plant are given as examples.

2. Conventional Capital Investment Planning (CCIP) Model

Capital investment planning (CIP) involves anticipating the investment of future assets for long-

term or strategic financial studies. The result is a list of new and/or enhanced equipment to be

invested in and a plan for financing the projects into a timetable or timeline for their completion.

Financial accounting objectives for rate of return, payback period, net present value, profitability

index, breakeven analysis, among others, and along with economic details on project plans and

their in- and out-capital flows, the CIP’s managerial or technical outcomes are its design capacity

and capability.

The aforementioned process industry literature solving the CIP problem disregard the operational

or production yields alongside the stages of completion of the projects. We name these type of

problems as conventional capital investment planning. They in general consider overall mass or

volume balances of chemicals (raw material and final products) in a single production site with a

network of processes interconnected by material streams to determine capacity expansion of

existing units over time respecting expected market demand (Shah, Li and Ierapetritou, 2011).

The conventional capital investment (CCIP) model is given in Eqs. (1)-(7) (Sahinidis,

Grossmann, Fornari, and Chathrathi, 1989), where its variables are not included in the

nomenclature section, instead we detailed the variables of the generalized capital investment

planning (GCIP) approach given in further sections. The CCIP model in Eqs. (1)-(7) and its

6

Page 7: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

related variables are presented here only for the sake of comparison with the proposed GCIP

modeling.

yu , tQEuL ≤ QEu , t ≤ yu ,t QEu

U ∀u , t (1 )

QCu , t+ 1=QCu ,t+QEu ,t ∀u ,t (2)

QFu , t ≤QCu ,t ∀u ,t (3 )

Ps , t+ ∑u∈U SO

W u , s ,t=Ss , t+ ∑u∈U SI

W u , s ,t ∀ s ,t (4)

W u , s ,t=f u , s ,t QFu , t∀u∈U SO , s ,t (5 )

∑u

(α u ,t QEu ,t +βu ,t yu ,t)≤ CI t ∀ t (6)

max NPV =∑s∑

t

( prs ,t Ss ,t−prs , t P s ,t)−∑u∑

t

cu ,t QF u ,t−∑u∑

t

(αu , t QEu ,t+βu ,t yu ,t)(7)

In the CCIP modeling, the capacity expansion QEu,t of a given unit u in a certain time t is

limited, or lower (QEuL ¿ and upper (QEu

U ¿ bounded, by the semi-continuous constraint in Eq (1).

Over the time, the next capacity size QCu,t+1 of u is the sum of its current capacity QCu,t plus the

capacity expansion QEu,t permitted at t as shown in Eq. (2). The connection between the design

and the operational layers are given by Eq. (3), in which operational unit throughputs QFu,t are

upper bounded by their current capacity QCu,t. Eq. (4) represents the volume/mass balance of all

type of stream s considering production of some in units or sources of s (u USO) giving by

product yields fu,s,t and throughputs QFu,t as in Eq.(5). The overall quantity balance of stream s in

7

Page 8: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Eq. (4) is completed by its purchases Ps,t and sales Ss,t, where Wu,s,t represents on the left hand,

sources or producers of s (u USO) and, on the right hand, its sinks or consumers (u USI).

The capital resource constraint to invest in capacity expansion is the sum of the investment cost

of the units given by fixed and varying terms as shown in Eq. (6). The discrete decision to invest

in the unit u, the binary variable yu,t, represents the fixed term considering the parameter βu,t as

fixed cost in $. The variable term is related to the size of the unit capacity expansion QEu,t with

parameter αu,t as cost per unit of volume/mass added in the capacity expansion. Eqs. (1)-(2) and

(6) represent the design level formulation. Eqs. (4) and (5) are the operational level constraints.

Eq. (3) is the linking constraint between the levels. The CCIP problem maximizes the net present

value (NPV) of the profit (revenue minus feed costs and capital costs) over time as seen in Eq.

(7), where prs,t and cu,t are stream prices and operational costs, respectively. These coefficients

have simple discounts in the NPV objective function according to an inflation or deflation rate

parameter, which can also be time-varying or time-dependent. The time-horizon is usually

modeled over several years, where the time-periods are in years or sub-years such as quarters.

These time-periods can also be non-uniform in the sense that their durations can be variable, but

exogenously defined (known a priori). These types of problems may have different aggregated or

disaggregated formulations such as lot-sizing reformulations (Liu and Sahinidis, 1996) which are

not applied explicitly in this model.

MILP planning models based on NPV maximization for investments in chemical plants solved

the CCIP problem using a combination of integer cuts and branch and bound (Sahinidis,

Grossmann, Fornari, and Chathrathi, 1989), polyhedral projection and strong cutting planes (Liu

and Sahinidis, 1996), both considering only the design model, and bi-level decomposition

approach (Iyer and Grosmann, 1998), where binary decisions for design (capacity expansion or

8

Page 9: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

installation) and operation (setup or shutdown) of a process network are made separately. For

large problems, solutions with 10% higher NPV are obtained in the decomposed method when

compared to the suboptimal solution of the full space model.

Van den Heever and Grossmann (1999) propose both outer-approximation (Duran and

Grossmann, 1986) and bi-level decomposition (Iyer and Grosmann, 1998) strategies for the

design and operational planning of simple process industry networks, incorporating design,

operational, and capacity planning for design and operational cost minimization models. They

use disjunctive programming techniques (Raman and Grossmann, 1994) to extend the

methodology to the case of multi-period design and planning of nonlinear chemical process

systems. Their work addresses the problem of the computational expense in solving the MILP

step, which is often the bottleneck in the computations of multi-period optimization problems in

MINLP’s that involve discrete decisions for topology selection, capacity expansion, and

operation at each time period.

Jackson and Grossmann (2002) propose a high-level MILP model to address the retrofit design

of process networks using an economic objective function to allow multiple types of

modifications of capacity and capability improvements considering them as simple coefficients

based on the discrete decision of the project approval. Capacity is related to process unit

throughputs increase and capability to chemical conversion such as catalyst bed activity in

cracking, reforming and hydrotreating units. When compared to big-M constraints, the examples

illustrate the robustness of the generalized disjunctive programming approach with convex hull

formulation (Balas, 1985), which gives a tight LP relaxation and leads to faster solution times.

9

Page 10: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

For CCIP problems including supply chain management, You and Grossmann (2008) use a

quantitative approach for designing responsive supply chains under demand uncertainty, in

which strategic, tactical, and operational decisions (e.g. installation of plants, selection of

suppliers, manufacturing sites, distribution centers, and transportation links) are integrated with

the scheduling decisions (e.g. product transitions and changeovers) for the multi-site and multi-

echelon process supply chain network. The expected lead time was proposed as a measure of

process supply chain responsiveness. A multi-period MINLP model was developed for the bi-

criterion optimization of economics and responsiveness, while considering customer demand

uncertainty. Multi-period and multi-site planning models predicting plant’s optimal capacity,

production levels and sale profiles inside supply chains (You, Grossmann and Wassick, 2011;

Corsano et al., 2014) showed that the bi-level decomposition (Iyer and Grossmann, 1998)

requires smaller computational times leading to solutions that are much closer to the global

optimum when compared to the full space solution and to Lagrangean decomposition (Guignard

and Kim, 1987).

Within the oil-refining industry, design and coordination of multi-site facility network considers

capacity expansion of existing process units using MILP with an overall objective of minimizing

total annualized cost (Al-Qahtani and Elkamel, 2008; 2009). Recently, Menezes et al. (2014a,

2014b) addressed approaches with aggregation in process unit capacity considering all current

and future refineries in Brazil in one hypothetical large refinery to approximate the current and

future fuel production and import scenarios in the country. Menezes et al. (2014a) proposed a

multi-period process design MINLP model for predicting overall capacity expansion of existing

oil-refinery units considering scenarios for different future fuel markets. The authors also

proposed a scenario-based approach where a single-period NLP model in an operational planning

10

Page 11: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

fashion simulates future process design (with respect to market scenarios) to avoid mixed-integer

models (Menezes et al., 2014b). In this case, unit throughput upper bounds of the existing units

in the hypothetical large refinery are considered a large number enough to fulfill market

demands. The differences between unit throughputs in the current and future market scenarios

are the required capacity expansions, so that this NLP approach disregards both binary variables

for project approving and variables of unit capacity (QCu,t) and expansions (QEu,t) as seen in the

CCIP formulation in Eqs. (1)-(7). Both aggregated approaches yield better results in terms of

fulfilling market demands with lower capital investment and higher NPV, when compared with

national plans on unit capacity additions proposed for the new refinery sites. For the national

strategic planning level, the aggregated model is satisfactory for predicting overall capacity

expansion per type of oil-refinery unit needed to match future fuel demands in the country, and

to prevent the solution of very large models that includes all the refineries.

Menezes, Kelly and Grossmann (2015) proposed a phenomenological decomposition heuristic

(PDH) by solving the CCIP problem for integrated multi-refineries with intermediate stream

transfers between them. The work handles oil-refinery optimization including mixing of crude-

oils, processing units, and blending of product streams for expansion of existing units and

installation of new units considering time of execution for the projects as the duration of the

intervals, so that when the project is approved its full implementation is accounted in the

following time intervals. The PDH is a decomposition formulation solving MILP (quantity-logic)

and NLP (quantity-quality) sub-problems iteratively, where nonlinearities from quantity and

quality balances are linearized or neglected in the MILP master problem, and the found design

solution (project schedules and their sizes, etc.) are fixed in the NLP sub-problem where yields

11

Page 12: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

and rates are updated and sent back to the MILP problem until the MILP and NLP sub-problems

convergence on key variables.

Two recent papers reviewed strategic planning problems in the process industry. Martínez-Costa,

Mas-Machuca, Benedito, and Corominas (2014) describe and analyze strategic capacity planning

problems and their proposed mathematical programming modeling in manufacturing. In Sahebi,

Nickel and Ashayeri (2014) a very detailed taxonomy lists strategic and tactical planning types

of problems within the crude oil supply chain (COSC). They survey fifty-four (54) papers related

to COSC planning problems between 1988 and 2013, considering oil reserve and production

until fuel deliveries to clients. Ongoing and emerging challenges surrounding strategic and

tactical decisions of COSC problems are investigated and gaps in the literature are analyzed to

recommend possible research directions. The 54 papers reviewed in the COSC field do not

address the issues introduced here as installations of units, project staging, regards to the

different yields as well as project execution, sequence-dependency between stages, etc.

Further to these approaches, is the novel model presented in this paper in which the capital

investment planning problem is reformulated using sequence-dependent setups (Kelly and

Zyngier, 2007) to include stages of project execution. In addition, capital and capacity are

regarded as flows or amounts in a scheduling context. We include expansion and installation of

units or equipment modeled in a non-aggregated framework, i.e., in an actual or real plant model.

In this case, considering a multi-period formulation, the model gives rise to large-scale MINLP

problems in which the input-output approximations using sequence-dependent setups modeling

is proposed for solving industrial-sized problems in a MILP model instead.

3. Sequence-Dependent Setup Modeling of Stages

12

Page 13: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

At this point we describe the sequence-dependent setups, changeover, or switchover discrete-

time modeling (Kelly and Zyngier, 2007) to optimize the selection of projects considering their

stages in the capital investment planning problem. Unlike conventional approaches such as the

full space (Sahinidis, Grossmann, Fornari, and Chathrathi, 1989; Liu and Sahinidis, 1996;

Menezes et al., 2014a), the bi-level decomposition (Iyer and Grosmann, 1998; You, Grossmann,

and Wassick, 2011; Corsano et al., 2014), the generalized disjunctive programming formulation

(Van den Heever and Grossmann, 1999; Jackson and Grossmann, 2002), and the

phenomenological decomposition heuristic (Menezes, Kelly, and Grosmann, 2015), we address

explicitly project setup and its stages over time by modeling it essentially as a scheduling

problem. When complex process frameworks are modeled, like those found in the oil-refining

industry, project lifetime must be included to better assess capital resource predictions and

production discounts in the NPV function. In this sense, the conventional capital investment

planning approaches are more suitable for repair or retrofit problems, where disregarding project

execution timetable and related changes in the production has little influence in the decisions

because of the lower capital investment involved and lower project impacts in the production. In

the end, any kind of improvement in the representation of project scheduling and staging within

the oil-refining industry can potentially save millions, if not billions of U.S. dollars, from the

shorter term repair types of projects to the longer term revamps and installations of process units.

3.1. Types of Capital Investment Planning

Considering shorter to longer term projects with stages in a capital investment planning (CIP),

the types of projects can be classified as revamping (facilities planning), retrofitting

(capacity/capability planning), and repairing (maintenance/turnaround planning). We denote the

proposed model as the generalized capital investment planning (GCIP) problem extending the

13

Page 14: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

conventional capital investment planning (CCIP), and specifically for the NPV-based capacity

planning of existing units or retrofit problem as discussed in Sahinidis, Grossmann, Fornari, and

Chathrathi (1989) and Liu and Sahinidis (1996). CCIP is the optimization problem where it is

desired to expand the capacity and/or extend the capability (conversion) of either the expansion

of an existing unit (Jackson and Grossmann, 2002) or the installation of a new unit (Menezes,

Kelly, and Grosmann, 2015) without considering impacts of inherent stages of projects.

Fig. 1 shows the three types of CIP problems with its typical capital investment cost and time

scales.

Fig. 1. Three types of capital investment planning problems.

The short-term CIP problem is the repair problem, which is typically referred to as maintenance

planning or turnaround and inspection (T & I) planning, and has a correction stage that is placed

in between the existing unit before the correction and the improved unit after the correction. For

repair problems, the correction stage is in-series, and is the stage that implements the turnaround

14

Page 15: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

and inspection activities such as de-fouling or cleaning heat exchangers, etc. In this case, the

existing process can be totally or partially shutdown during the corrections.

The medium term CIP problem is the retrofit problem (i.e., replacing or refitting new or

enhanced equipment after it has already been constructed and in production), and is often

referred to as capacity planning or production design synthesis, and has a commission stage that

is placed in between the existing unit before the commission and the expanded/extended unit

after the commission. For retrofit problems, there can be a construction stage in-parallel to the

existing stage and the commission stage is in-series similar to a cleaning/purging (or repetitive-

maintenance) operation, activity, or task in sequence-dependent setup, changeover, or switchover

problems. The existing process can be partially or totally shutdown during the commission stage.

The long-term CIP problem is the revamp problem, which is sometimes referred to as facilities

planning and process design synthesis, and has a construction stage that is placed in between the

existing unit before the construction and the expanded/extended unit after the construction. If the

unit does not previously exist, then this is an installation versus an expansion/extension. For

revamp problems, the construction stage is in-series, and is the stage that installs the expanded or

extended equipment. The existing process is totally shutdown during the construction or revamp

stage. For an installed new unit, a commission phase can be placed between the construction and

installed stages, in which, as an example, parts of the new process unit are started up before its

full implementation. To accommodate multiple stages within the same planning horizon,

multiple pre-preparation, commission and expansion operations need to be configured where

sequence-dependent setups or switchovers can only occur from a previously expanded operation

through a commission operation to the next expanded operation as a phasing sequence.

15

Page 16: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

To the best of our knowledge, this is the first time a connection between the different types of

CIP problems has been made, i.e., repair/correction (operational), retrofit/commission

(tactical/debottlenecking) and revamp/construction (strategic). There are two other salient

aspects of our general CIP formulation that sets our formulation apart from all other formulations

found in the literature. The first is the modeling of sequence-dependent setups, switchovers, or

changeovers to manage the realistic situation that a correction, commission, or construction

stage, activity or task must be planned or scheduled in between the existing and

expanded/extended units. This is handled using the appropriate variables and constraints found in

Kelly and Zyngier (2007), which albeit intended for discrete-time scheduling problems with

repetitive-maintenance, can be easily applied to CIP problems that are also modeled in discrete-

time given the longer term decision-making framework. The second aspect is the modeling of

capacity/capability and capital as flows or quantities. This is the notion that the correction,

commission and construction stages actually produce or create capacity and/or capability, which

can then be used or consumed by the unit in subsequent time-periods, yet there is of course a

charge for the capacity/capability known as the capital cost expenditure.

3.2. Sequence-Dependent Setup Formulation

The sequence-dependent formulation addressed in Kelly and Zyngier (2007), embedded in

IMPL’s semantic modeling, considers transitioning variables as continuous variables that rely on

the independent binary variable unit-operation-time setup yu,m,t of a unit u in mode m at time t.

This setup variable can be configured for initial, intermediate, or final states of a unit with

regards to the use of modes to manage the project staging with temporal details of the unit-

operation (u,m) where its transitioning setup variable of an operation suu,m,t, its shutdown sdu,m,t,

and switchover-to-itself swu,m,m,t are relaxed within the interval [0,1], so we do not need to

16

Page 17: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

explicitly declare them as binary variables in the branch-and-bound search of the MILP. Hence,

they will not be part of the search-tree because their integrality is implied by the tight constraints

Eqs. (8)-(10) and reduces the size of the search-tree where Fig. 2 illustrates their values for a

batch-process with fixed batch-size and variable batch-time (FSVT) and is similar to continuous-

process temporal transitioning.

yu , m,t− yu ,m, t−1−suu , m,t+sdu , m,t=0 ∀u , m, t (8 )

yu , m,t+ yu , m,t−1−suu ,m ,t−sdu , m,t−2 swu ,m, m,t=0 ∀u ,m, t (9 )

suu , m,t+sdu , m,t+swu ,m, m,t ≤ 1∀u ,m, t (10 )

In Eq. (8), the setup of a unit-operation-time binary variable yu,m,t is selected between its startup

suu,m,t and its shutdown sdu,m,t, because the past unit-operation-time binary variable yu,m,t-1

guarantees if the setup variable is still selected within the next time period (when the startup

returns to zero), its shutdown is zero (sdu,m,2 = 0). Instead, if the setup is zero (yu,m,t = 0), its

shutdown should be one (sdu,m,2 = 1). Eq. (9) introduces the switchover-to-itself swu,m,m,t

continuous variable meaning that if the unit-operation-time setup variable is still true (the past

and current setups are selected then), the swu,m,m,t = 1 and the startup and shutdown should be

zero. Eq. (10) preserves the integrality of the continuous variables suu,m,t and sdu,m,t preventing the

solution from setting both suu,m,t and sdu,m,t to 0.5 in the LP nodes of the MILP branch-and-bound

search.

17

Page 18: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Fig. 2. Scheduling stages for a batch process taken from Kelly and Zyngier (2007).

To model the sequence-dependent transitioning of project stages in the proposed capital

investment planning problem, we use the concept of “memory” variables first described in Kelly

and Zyngier (2007). This is also a continuous variable that tracks the temporal unit-operation

(u,m) events or activities occurring for each unit within the time horizon and the memory yyu,m,t

of the last operation performed, thus allowing us to know the last production operation or state

that was active for the unit. Equations (11)-(14) demonstrate the relations of the memory variable

in the sequence-dependent formulation.

∑m

yyu ,m, t=1 ∀u ,t (11)

yu , m,t− yyu ,m ,t ≤ 0∀u , m ,t (12)

yu , m,t− yyu ,m ,t−1−suu ,m,t ≤ 1∀u , m , t(13)

18

Page 19: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

yu , m,t−1− yyu ,m, t−sdu , m,t ≤ 1∀u ,m, t (14)

By Eq. (11), if even any operation m is not being performed in the unit u (yu,m,t = 0), the

information on the past productive operation is preserved by the memory variables yyu,m,t. This is

a single-use or unary-resource or commitment constraint that states that one and only one

production operation must be active or setup on the unit in any given time-period. In Eq. (12),

when a unit is performing a particular production operation, the appropriate memory variables

yyu,m,t are activated. Eqs. (13)-(14) propagate the memory of the productive operation when the

unit is completely shutdown or inactive during the productive to the non-productive transitions

and vice-and-versa. Eq. (13) is when the unit goes from the non-productive to the productive

state, so it is a startup suu,m,t. Eq. (14) is when the unit goes from the productive to the non-

productive state, so it is a shutdown sdu,m,t. Eqs. (11)-(14) are applied even for units that always

have an operation active throughout the horizon such as a storage unit (tank), given that

sequence-dependent switchovers from one operation to another must be properly tracked; in this

case, the unit-operation is in a switchover-to-itself, sw u,m,m,t. Fig. 2 shows the stages of two

batches and the profiles of the independent variable (yu,m,t) and the four dependent variables

(suu,m,t, sdu,m,t, swu,m,m,t, and yyu,m,t) extracted from Kelly and Zyngier (2007).

In order to activate a specific maintenance, non-productive, intermediate operation on a unit

before a spatial switchover occurs from operation m in some time-period in the past to m’, then

Eq. (15) must be used, where m is the from/previous operation or operation-group; m’ is the

to/next operation or operation-group and r is the repetitive-maintenance-intermediate, which

represents in the generalized capital investment planning (GCIP) problem the project stage

(correction, commission, and construction). In this equation we expect that the startup of m’ and

the shutdown of m take place in the same time-period i.e., they are temporally coincident.

19

Page 20: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

( yyu , m' ,t+ yyu , m,t−1−1 )+suu , m' , t−sdu , r ,t ≤ 1∀u , m ,m' ,r , t (15)

This equation allows us to know when the existing or non-existing operation occurs on the unit,

and then we can insert the commission or construction stage for example before the expanded or

installed operations or stages; this is the core idea in GCIP with the explicit commission and

construction stages activated in between the existing/non-existing and the expanded/installed

operations or stages.

The sequence-dependent setup, changeover, or switchover relationship between different

operations i.e., “phasing”, “purging”, “prohibiting” and “postponing” on the same unit can be

derived from these dependent variables, whereby intermediate operations can be activated and

placed in between the mode operations such as the project execution phases proposed in this

work, i.e., the correction, commission or construction stages. The mode or operation setup

variable yu,m,t, in the proposed GCIP model are defined as (“Existing”, ”Non-Existing”) and

(“Expanded”, ”Extended”, ”Installed”) stages of a capacity investment planning problem in

which the input-output yields, rates, etc. for each operation on the same unit can have different

values. Increasing the number of project stages between the initial and final project state can

improve the accuracy of the problem.

We introduce staging or phasing as variation of the sequence-dependent changeover problem

(Kelly and Zyngier, 2007, Balas et. al., 2008), except that the sequencing, cycling, or phasing is

assumed to be fixed as opposed to being variable or free. Phasing allows for the implementation

of what is known in the specialty chemicals and consumer goods industries as a product-wheel,

and also known as blocking in other industries where the cost of sequence-dependent

changeovers is significant such as in the paper and bottling industries. A product-wheel forces

20

Page 21: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

product A to be followed by product B then followed by product C and so on with a rigid

sequencing. In this way, the sequence-dependency is fixed or forced, i.e., it is essentially pre-

defined, as opposed to variable or free sequence-dependent switchovers, requiring more

variables and constraints to be modeled, and more CPU time when solving or searching for

solutions. Hence, the advantage of phasing is that it can be used to find solutions quicker at the

expense of being less flexible in terms of handling more disruptions or disturbances with respect

to supply, demand, investment, maintenance, and other production-order scenarios.

The other three sequence-dependent changeover modeling types are what we call purging,

prohibiting, and postponing. Purging requires a repetitive-maintenance task to be configured

between two production or process operations involving cleaning activities that may or may not

require the consumption and/or production of resources, which in the capital investment planning

case, can be considered the configuration or re-configuration task (correction, commission, and

construction). Prohibiting disallows certain sequences of operations from ever being scheduled

or occurring like as in a multi-product pipeline or blender in which certain sequence of products

are strictly not allowed or forbidden to avoid or decrease product contamination. Postponing

implements sequence-dependent and sequence-independent down-times between certain

operations, modes or stages of a unit.

Other project scheduling types of problems in both discrete and continuous time can be found in

Kopanos et al. (2014) to address the resource-constrained project scheduling problem (RCPSP)

in which renewable resources fully retrieve the occupied resource amount after the completion of

each activity, while the total duration of the project (i.e., the makespan) is minimized satisfying

precedence and resource constraints. The problem consists of finding a schedule of minimal

duration by assigning a start time to each activity in which the precedence relations and the

21

Page 22: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

resource availabilities are respected. Several planning and process level decision problems can

be reduced to the RCPSP (Varma et al., 2004) such as in high scale projects management in

software development, plant building, and military industry (Pinedo and Chao, 1999), and in

highly regulated industries where a large number of possible new products are subject to a series

of tests for certification (Shah, 2004) such as in pharmaceutical and agrochemical industries.

4. Generalized Capital Investment Planning (GCIP) Model

The network of the generalized approach for capital investment planning is represented in the

flowsheet-based superstructure shown in Fig. 3, where capacity and capital are treated as flows

in a scheduling environment. The same idea could be used for capability (as conversion) as well,

although in this case a simple coefficient is able to represent the ratio of conversion. The

generalized CIP formulation can be applied to any CIP problem found in the process industries,

which may require more scheduling details to be considered. It can be easily modeled using the

modeling and solving platform IMPL that is based on the unit-operation-port-state superstructure

(UOPSS) formulation as seen in the following sub-section. This new modeling platform allows

the modeler or user the ability to configure the problem using semantic variables such as flows,

holdups, yields and setups, startups, etc. that is more intuitive and natural without having to

explicitly code the sets, parameters, variables and constraints required in algebraic modeling

languages such as AIMMS, AMPL, GAMS, LINGO, MPL, MOSEL, OPL, etc.

22

Page 23: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Fig. 3. Motivating example 1: small GCIP flowsheet for expansion.

In the GCIP model shown in Fig. 3, the diamond shapes ( ) or objects are the perimeter unit-

operations where they consume material A (source) and produce material B (sink), i.e., in and

out-bound resources. We have just one process unit with three operations of Existing,

Commission, and Expanded as shown by the square boxes with an “x” (cross-hairs) through it

indicating it is a continuous-process type ( ). The first dotted line box highlights that only one

unit-operation can be active or setup at a time, i.e. a unary resource or the unit commitment

constraint. The small circles are the in-ports ( ) and out-ports ( ) where these ports have the

attributed lower and upper yields available similar to the modeling of generalized network-flow

problems, i.e. having the previously mentioned Leontief input-output models with intensities,

bill-of-materials, or transfer coefficients. The port-states allow flow into and out of a unit and

can be considered as flow-interfaces similar to ports on a computer, i.e., nozzles, spouts, spigots.

Port-states also provide an unambiguous description of the flowsheet or superstructure in terms

of specifically what type of materials or resources are being consumed and produced by the unit-

23

Page 24: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

operation. Port-states can also represent utilities (steam, power), utensils (operators, tools) as

well as signals such as data, time, tasks, etc.

Each of the two perimeters, A and B, can have tanks ( ) available for storage, and is a

requirement when balancing the production-side and transportation-side supply and demand of

the value-chain for example. Finally, the lines or arcs ( ) between the unit-operations and port-

states and across an upstream unit-operation-port-state to a downstream unit-operation-port-state

correspond to flows (external streams) as one would except given that the superstructure is

ultimately composed of a network, graph or diagram of nodes/vertices and arcs/edges (directed).

Each unit-operation and external stream have both a quantity and a logic variable assigned or

available, and represent either a flow or holdup if quantity and either a setup or startup if logic.

Batch-processes have holdups and startups, continuous-processes have flows and setups, pools

have holdups and setups, and perimeters only have a logic setup variable. The internal streams

(lines with no arrow-head) have neither explicit/independent flow and setup variables given that

their flows are uniquely determined by the aggregation of the appropriate external streams, and

their setups are taken from the setup variables on the unit-operation they are attached to. The

network material balance is given by the flowsheet connectivity between the elements or shapes

(units, tank, in-ports, out-ports, etc.).

The case in Fig. 3 shows the expansion of an existing process unit (Process), which is initially in

the Existing mode. For a completely grass-roots or green-field installation, the operations or

states are the Construction and the Installed modes, which are equivalent to the Commission and

Expanded modes depicted in Fig 3. However, to control the sequence of stages, a NonExisting

mode should be included for installations that is equivalent or symmetrical to the Existing mode

for the expansions. Each of the expansion or installation unit-operations represented by the

24

Page 25: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Commission/Construction stage, have a capacity port-state cpt connected to the unit-operation

named Charge to transfer this capacity to the Capacity tank where the Expanded or Installed unit

can have an increase in capacity by the new additional charge-size from the tank. In the Charge

unit, the capital port-state cpl carries the NPV cash-flow to the perimeter named Capital

(diamond shaped). This is the non-material or non-stock flow of a financial resource.

The Existing or Non-Existing unit-operation selection is based on the economic viability with

respect to its expected Expanded or Installed cost and projected revenue of the products, which

in the example in Fig. 3 is the perimeter B. The inlet port-state of this unit-operation will have a

time-varying NPV cash-flow lower, and upper bound to constrain the expansions and/or

installations according to the expected cash-flow profiles in the future. An additional restriction

required, sometimes referred to as a side-constraint, is the fact that if an expansion/installation

unit-operation is selected in some future time-period, then it must be setup for the rest of the

time-horizon. This can be modeled using the uptime logic constraint, where a lower or minimum

uptime is configured as the time-horizon length of the problem (Wolsey, 1998, Kelly and

Zyngier, 2007 and Zyngier and Kelly, 2009). Uptime is also known as a run- or campaign-

length, and essentially restricts a shutdown of the unit-operation for a specified number of time-

periods in the future.

4.1. Unit-Operation-Port-State Superstructure (UOPSS) Formulation

Fig. 4 shows the UOPSS scheme described in Kelly (2004), Kelly (2005) and Zyngier and Kelly

(2012), where unit-operations ( ) and streams/links ( ) between in-ports ( ) and out-ports (

) have a binary variable to turn on or off the shapes or structures (units-operation, ports, and

streams) over time. This idea permits to solve industrial-sized optimization problems in both

25

Page 26: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

planning and scheduling environments in which the UOPSS structures and procedures are

integrated over space and time, considering renewable (units) and/or non-renewable resources

(states).

Fig.4. UOPSS scheme.

The IMPL built-in technique to construct equations based on the network connectivity using the

UOPSS scheme (constraint generation) considers as main variables flow f and setup su of unit-

operations and streams as seen in Fig. 4. Flows are continuous variables represented as x in

v2r_xmfm,t and v3r_xjifj,i,t and setups are binary variables represented as y in v2r_ymsum,t and

v3r_yjisuj,i,t. In IMPL’s constraint generation, lower and upper bound constraints are built

considering the configured lower and upper bounds of both continuous and binary variables. As

IMPL uses numbers instead of names to construct the problem faster and using less memory, the

unit-operation setup can be reduced only to the operation m, as each m for each unit u has a

unique number to represent its setup in the formulation (see the shape-number check in the

supplementary material, page 4). So, the overall formulation is shown in equations (16)-(29).

v2 r xmfm, t ≥ LBf m v 2 r ymsum,t ∀m ,t (16)

26

Page 27: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

v2 r xmf m, t ≤UBf m v2 r ymsum ,t ∀m, t (17)

∑j∈( j ,i )

v 3 r xjif j ,i ,t ≥ LBf m v 2r ymsum,t ∀(i , m) , t (18)

∑j∈( j ,i )

v 3 r xjif j ,i ,t ≤ UBf m v2 r ymsum, t∀ (i ,m) ,t (19)

∑i∈( j ,i)

v3 r xjif j , i ,t ≥ LBf m v2 r ymsum, t∀ (m , j) , t (20)

∑i∈( j ,i)

v3 r xjif j , i ,t ≤ UBf m v 2 r ymsum,t ∀(m, j) ,t (21)

v3 r xjif j ,i , t ≥ LBf j ,i v3 r yjisuj , i ,t ∀( j ,i), t (22)

v3 r xjif j ,i , t ≤UBf j , i v3 r yjisu j ,i , t∀ ( j , i) , t (23)

∑j∈( j ,i )

v 3 r xjif j ,i ,t ≥ LBy i ,m v 2 rxmf m,t ∀(i , m) , t (24)

∑j∈( j ,i )

v 3 r xjif j ,i ,t ≤ UByi , m v2 r xmf m ,t ∀(i , m) ,t (25)

∑i∈( j ,i)

v3 r xjif j , i ,t ≥ LBym, j v 2 rxmf m,t ∀( j ,m) ,t (26)

∑i∈( j ,i)

v3 r xjif j , i ,t ≤ UBym, j v2 r xmf m ,t ∀( j , m), t (27)

∑m (m∈u )

v 2 r ymsum,t ≤ 1∀u , t (28)

v2 r ymsum' ,t+v 2r ymsum,t ≥ 2 v 3 r yjisu j ,i ,t ∀ (m' , j ) ,(i ,m) (29)

27

Page 28: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Eqs. (16)-(21) are related to the setup variable of the unit-operation m represented by

v2r_ymsum,t. Eqs. (16) and (17) means that if the unit-operation m is active by its setup, the unit-

operation flow v2r_xmfm,t should be between the lower (LBfm) and upper (UBfm) bounds of the

flows also known as semi-continuous constraints. It is similar to minimum and maximum

throughputs of process units or expansion/installation sizes. Eqs. (18)-(21) interconnect unit-

operations to ports so the flow of the streams arriving or leaving unit-operations are also between

their bounds. Eqs. (22) and (23) considers stream setups v3r_xjisuj,i,t to turn-on or turn-off the

lower (LBfj,i) and upper (LBfj,i) bounds of the streams v3r_xjifj,i,t flowing from out-ports j to in-

port i of unit-operations m forming the subset j,i determined by the UOPSS connectivity

network. In the supplementary material lines 24-66, the section “Construction Data (Pointers)”

presents the list of connections for motivating example 1 in Fig. 3.

Eqs. (24) and (25) consider bounds on yields since unit-operations m can have more than one

feed stream given by i,m subsets and each one of the in-ports i can still have a number of

interconnected out-ports j giving by j,i subsets. It is the same for the products leaving the unit-

operations as in Eqs. (26) and (27). In Eq. (28) the unit-operations procedures, modes or tasks

permitted in the physical unit u is at most one. Eq. (29) is the structural transition constraint

similar to the sequence-dependency constraints found in William (1999) which is a core idea of

the UOPSS scheme to manage the up to downstream flows. It says that only if the setup of unit-

operations of different units interconnected by streams within out-ports j and in-ports i are

turned-on, the setup of the stream v3r_xjisuj,i,t may be turned-on if required. If one unit-operation

is turned-off, the stream setup is off by implication. The remaining constraints of the GCIP

model using sequence-dependent setups will be given using the motivating example 1 in the

following.

28

Page 29: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

4.2. Motivating Example 1

We explore further the solution to the small retrofit generalized CIP problem fully defined in Fig.

3. In the supplementary material example’s IMPL configuration (lines 1 to 151) and formulation

(lines 153 to 487) is given. In the motivating example 1 the future planning time-horizon is

arbitrarily configured as three months and with one month time-periods. The existing or old

capacity of the process is 1.0 quantity-units per month and the new capacity can be 1.5. The

capital cost is computed with α = 0.5 ($ per quantity-units) and β = 0.5 ($ per setup-units). All of

these data are declared in the “Calculation Data (Parameters)” section in the supplementary

material (lines 4 to 17). The network in Fig. 3 using the UOPSS configuration creates the

“Construction Data (Pointers)” section (lines 24 to 66). By simplification, the cost for material A

is $0.0 per quantity-unit and the price for B is $1.0 per quantity-unit, and we do not apply any

NPV given the relatively short horizon. The costs are defined in the “Cost Data (Pricing)”

section in the supplementary material (lines 121 to 128).

The operations of Commission and Expanded each have a special out-port and in-port labeled as

cpt, which stands for the outflow and inflow of capacity, respectively. There is a Charge unit-

operation, which will only be setup if the Commission unit-operation is active, and its purpose is

to convert the variable capacity to a variable and fixed capital cost. It is represented as

“Charge,,cpl,,alpha,alpha,beta-alpha*oldcapacity” in the “Capacity Data (Prototypes)” section

(see supplementary material, line 97), where the α (alpha) coefficient or parameter is applied to

the incremental or delta capacity change, and the β (beta) is applied to the setup variable if the

Charge unit-operation is on or open. The out-port on the Charge unit-operation labeled cpt is the

flow of capacity charged or dispatched to the Capacity pool unit-operation (triangle shape).

During the one time-period when the Charge unit-operation is active, the flow of capacity to the

29

Page 30: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Capacity pool must have enough capacity to operate the Expand operation for as many time-

periods left in the planning time-horizon. For example, if we have a three time-period future

horizon and the Commission operation starts in time-period one, then enough capacity must be

fed or sent to the Capacity pool unit-operation for time-periods two and three (END). In this

way, the capacity to be expanded or installed, an extensive amount, proxies as an intensive value.

As example, for the first period, it is represented as “Charge,,cpt,,1.0*(END-1.0),1.0*(END-

1.0),,0.0,1.0” in the “Command Data (Future Provisos)” section (see supplementary material,

lines 138 to 151).

The cpt in-port on the Expanded operation will draw only up to the maximum allowable or upper

limit of the expanded capacity allowed from the Capacity pool, and this will control the capacity

charge-size, throughput or flow through the unit-operation for the Expanded operation. In order

to do this, the lower yield bound on the cpt in-port is configured as one and the upper yield

bound as infinity or some large number. This will regulate the capacity of the Expanded unit-

operation as in “Process,Expanded,cpt,,1.0,large” in the “Capacity Data (Prototypes)” section

(see supplementary material, lines 67 to 100).

The problem is solved using MILP with an optimal objective function of $3.25. If we apply no

expansion, then the profit would be $3.0 since the existing capacity is 1.0 for three time-periods.

Since the profit is $0.25 more than $3.0, then there has been an expansion where the

Commission operation is setup or started in time-period one. To perform an expansion of 1.5 –

1.0 = 0.5 quantity-units then, the capital cost required is 0.5 * 0.5 + 0.5 = $0.75. Given the timing

of the Commission stage, this implies that the Expanded stage occurs in time-periods two and

three, which is enforced by the sequence-dependent setup modeling, i.e., after the Commission

stage only the Expanded stage can be setup for the rest of the horizon. With an expansion capital

30

Page 31: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

cost of $0.75 and a revenue for the sale of material B of 1.0 + 1.5 + 1.5 = $4.0 for the three

planning periods, this yields a profit of $4.0 - $0.75 = $3.25, which is the same value found by

the MILP. The Gantt chart for this example is found in Fig. 5. In this case, we are considering

the commission mode with the same capacity as in the existing to permit production during this

stage, since an interruption of this production in the first time period would impede the

expansion. The required data to control the expansion is defined in the three frames from line

101 to 120. In the “Constriction Data (Practices/Policies)” section the uptime for the

Commission (with duration of one time-period since the lower and upper uptime are set to 1) and

for the Expansion with maximum uptime set to END that is equal three time-period. In the

“Consolidation Data (Partitioning)” section, the initial and final operations of the unit are

grouped, respectively, in the ExistingGroup and ExpandGroup. And finally, the “Compatibility

Data (Phasing, Prohibiting, Purging, Postponing)” section is where the relationship of the

Commission stage or mode treated as a Purging is configured.

Fig. 5. Gantt chart for expansion of a generalized CIP example.

31

Page 32: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

From the Gantt chart in Fig. 5 we can verify the timing for the Commission and Expanded unit-

operation on the Process unit. The black horizon bar means that the binary variable of the shape

is active. The interesting detail is the capacity pool holdup or inventory trend of capacity

(Capacity). We can see a charge of capacity (Charge) in time-period one, and a continuous draw

or dispatch out in time-periods two and three. These values can be seen in Fig. 6.

Fig. 6. Amounts of capacity-flow in the GCIP formulation of the motivating example 1.

32

Page 33: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

It should be noted in the constraint instances (supplementary material, lines 183-365) that when

lower or upper bounds of the streams, units or their selection are zero, Eqs (16)-(27) for these

bounds are not constructed. When the bounds are the same, these inequality constraints are

reduced to equality constraints (see lines 234-245 and lines 255-265 in the supplementary

material). Other equality constraints are related to the flow balance in the tanks (lines 269-271)

and to some sequence-dependent constraints (lines 308-323 and lines 340-342). In lines 275-277,

330-335 and 343-345 there are the SOS1 (special order set) integrality condition used

the branch-and-bound search of the MILP and provides more intelligent way to solve the

optimization problem by helping to speed up the search which is well known (Williams, 1999).

They are in the list of constraints reported in IMPL’s results, although they are not considered as

constraints by themselves.

4.3. Motivating Example 2

An installation structure similar to the expansion in Fig. 3 is added to the motivating example 2.

The Existing, Commission and Expanded modes or stages case is modified to NonExisting,

Construction and Installed modes for the installation as shown in Fig. 7.

33

Page 34: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Fig. 7. Motivating example 2: small GCIP flowsheet for expansion and installation.

The problem is solved as an MILP using with an optimal objective function of $5.00. If we apply

no expansion or installation then the profit would be $3.0 since the existing capacity is 1.0 for

three time-periods. To perform an expansion, we have the same as the in motivating example 1.

To perform an installation of the same 1.5 quantity-units, the capital cost required is 1.5 * 0.5 +

0.5 = $1.25. Given the timing of the Construction stage, this implies that the Installed stage

occurs in time-periods two and three, which is enforced by the sequence-dependent setup

modeling, i.e., after the Construction stage only the Installed can be setup for the rest of the

horizon. Different from the expansion cost evaluation, there is no existing capacity for an

34

Page 35: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

installation (NonExisting mode), so the term “alpha*oldcapacity” is not discounted in the beta

cost (see line 97 in the supplementary material).

In the example, the production from the Construction stage was disregarded by considering the

out-port linked to the product perimeter B with zero yield. With an expansion capital cost of

$0.75 and an installation capital cost of $1.25, a revenue for the sale of material B of 1.0 + 1.5 +

1.5 = $4.0 from the expanded existing unit and 0.0 + 1.5 + 1.5 = $3.0 from the installed non-

existing unit for the three planning periods. This leaves a profit of $4.0 + $3.0 - $0.75 - $1.25 =

$5.0, which is the same value found by the MILP. The Gantt chart for this example is found in

Fig. 8. To permit production during all time-periods, the Commission stage in Process1 during

the first time-period has the same process capacity as in the Existing mode that is in fact a flow

xmfm,t internally in the IMPL modeling of the example. Similarly to Fig. 6 in the motivating

example 1, the amounts of capacity-flow in motivating example 2 considering the GCIP

formulation proposed in the work has the same profiles for charge-size (Charge1 and Charge2)

of the giving capacity-flow with value of 1.5 quantity-units to be filled in the capacity-flow tanks

(Capacity1 and Capacity2) with holdups of 3 quantity-units enough to maintain 1.5 quantity-

units in the second and third time-periods in the Expanded and Installed modes of operation.

35

Page 36: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Fig. 8. Gantt chart for expansion and installation of a generalized CIP example.

5. Examples

Two capital investment planning examples include (i) a retrofit problem for expansion and

extension of 3 process units where investment costs are considered coefficients as the

modifications are pre-defined as fixed values, and (ii) an expansion and installation problem for

an oil-refinery with variable investment costs since the size of the revamped (expanded or

installed) capacity can vary. The examples were modeled using Industrial Algorithm’s IMPL and

solved using IBM’s CPLEX 12.6.

5.1. Retrofit Planning of a Small Process Network

36

Page 37: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Our illustrative retrofit example is taken from Jackson and Grossmann (2002) where there are 3

feeds (A, B, C) and 2 product materials (D, E) with 3 processes (Fig. 9) that can be either

expanded (capacity increase) or extended (conversion increase) or both considering these

modifications as fixed values.

Fig. 9. Retrofit example (Jackson and Grossmann, 2002) for capacity (expansion) and capability

(extension) projects.

In the example, three time-periods are considered. Fig. 10 is equivalent to Fig.9 in our new

flowsheet representation with the Existing, Commission and Expanded (or Extended) stages

shown explicitly where M denotes the flow of money (investment costs). Each process unit (1, 2,

3) has 3 types of modifications (increased capacity, increased capability, both) considering

commission stages (Commission1, Commission2, Commission 3) and their respective final

stages (Expanded1, Expanded2 and Expanded3). Expanded1 represents increase in capacity.

Expanded2 is increase in conversion (capability) and Expanded3 are both. These types of

modifications are only coefficients in the problems in both material balances and costs

evaluation. In the case, for capacity increase, Process 1 can increase from 50 to 75 tons/day,

Process 2 from 85 to 105 tons/day and Process 3 is from 65 to 80 tons/day. For conversion,

37

Page 38: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Process 1 increase from 0.9 to 0.95. Process 2 from 0.85 to 0.90 and Process 3 is from 0.80 to

0.85.

Fig. 10. UOPSS flowsheet for Jackson and Grossmann (2002) example.

38

Page 39: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

The associated MILP model using our approach in IMPL includes 929 constraints, 442

continuous variables, and 251 binary variables, and was solved with CPLEX to optimality in less

than 0.25-seconds. The convex-hull MILP formulation proposed in Jackson and Grossmann

(2002) has 394 constraints, 244 continuous variables, and 36 discrete variables, and was solved

in less than 0.3-seconds. Although the larger number of variables and constraints found in our

proposed model when compared with the Jackson and Grossmann (2002) model, the GCIP

formulation using the UOPSS modeling and sequence-dependent setups is solved in smaller CPU

time.

The two Gantt charts shown in Figs. 11 and 12 have the same solution with an NPV = M$

11.841 (M$ in millions of U.S. dollars) over three one-year time-periods where Process 1 has its

capacity expanded, Process 2 continues unchanged and Process 3 has its capability (conversion)

extended. Fig. 11 shows the typical project chart without considering stages of the projects. In

Fig. 12, as proposed in the GCIP modeling, an initial stage of one time-period is regarded for the

3 types of modifications depicted in Fig. 11. To compare both CCIP (Fig. 11) and GCIP (Fig. 12)

NPV, the throughputs and yields of the Commission and Expanded modes in the GCIP modeling

are considered the same.

Fig. 11. Gantt chart of the Jackson and Grossmann (2002) example (CCIP modeling).

39

Page 40: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Fig. 12. Gantt chart of the Jackson and Grossmann (2002) example reformulated as a GCIP.

It should be noted that the results of this retrofit example are different than the ones reported in

Jackson and Grossmann (2002), since these authors reported incorrect numbers in their Figure 3,

although their original GAMS file was correct, and is in fact the one we have used in this paper

to represent in Fig. 11.

5.2. Oil-Refinery Process Design Synthesis

The oil-refinery example in Fig. 13 represents a complete plant with expansions and installations

allowed only for the crude-oil (atmospheric) and vacuum distillation units (CDU and VDU) and

diesel hydrotreating (DHT) over three time periods. The capacity upper bound of the remaining

units are considered a large number to avoid bottlenecks. The Commission/Expanded and the

Construction/Installed structures or shapes for DHT (expansion) and DHT2 (installation) are

40

Page 41: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

depicted in Fig. 14. They are constructed similarly to CDU and VDU (expansions) and CDU2

and VD2 (installations). The resulting MILP model involves 2005 constraints, 729 continuous

variables, and 684 binary variables, and was solved with CPLEX in 0.5-seconds, and solved to

optimality yielding a NPV = 4,285 M$. In the example, the total time period is 15 years with 3

periods of 5 years each. A similar study considering expansions and installation of oil-refinery

units can be found in Menezes, Kelly and Grossmann (2015) where nonlinearities to determine

yields and rate of conversions are considered in an iterative decomposition involving MILP and

NLP problems until convergence is achieved. They modeled crude-oil as pseudo-components,

micro-cuts or hypotheticals as found in Menezes, Kelly and Grossmann (2013) and Kelly,

Menezes and Grossmann (2014) to meet an optimal crude-oil slate or diet. A future work

involving the proposed GCIP formulation by using project stages with the MILP + NLP

decomposition and crude-oil as pseudo-components will be proposed in a near future.

41

Page 42: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

.

Fig. 13. Oil-refinery example network.

42

Page 43: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Fig. 14. Gantt chart for DHT expansion and DHT2 installation.

Figs. 15-17 show the capacity-flow profiles of the results, where only the installations CDU2,

VDU2, and DHT2 the installations are turned-on or approved. In the example, we consider the

Commission stage of CDU, VDU, and DHT with zero yield, so we expect only installation

project setups. The capacity-flow charge of these projects occurs with their constructions, and at

the same time the capacity-tank is filled to maintain capacity-flow continuously for the Installed

mode as seen in Figs. 15-17. The capacities of CDU, VDU, and DHT in 103 m3/h are 1.375, 0.7,

and 0.4, respectively. These values in the IMPL configuration of the problem are the upper

bounds of the flow in the units xmfm,t. The allowed capacity expansions or unit flow upper

bounds are 20% of the existing capacities, and the allowed installations or unit flow upper

bounds at the Installation modes are 2.0, 1.0, and 0.6 in 103 m3/h for CDU2, VDU2, and DHT2,

respectively.

43

Page 44: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Fig. 15. Amounts of capacity-flow in the GCIP formulation of the installation CDU2.

44

Page 45: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Fig. 16. Amounts of capacity-flow in the GCIP formulation of the installation VDU2.

45

Page 46: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Fig. 17. Amounts of capacity-flow in the GCIP formulation of the installation DHT2.

6. Conclusion

In summary, we have proposed a generalized network-flow MILP model using a sequence-

dependent setups approach to model and solve capital investment planning problems considering

intermediate stages between the existing state (existing unit or new unit) and the final state after

the repair, retrofit or revamp (expansion, extension and installation) projects. We have applied

46

Page 47: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

the concepts of sequence-dependent setups to manage the project scheduling by considering

phasing (from one state or stage to another) and the project execution, similar to the repetitive-

maintenance or purging stage as normally found in scheduling sequence-dependent changeover

or repetitive-maintenance problems. A unique and novel way is used to formulate the CIP

problem using capacity/capability and capital as flows in a scheduling environment. Finally, our

generalized CIP formulation can be straightforwardly applied to any CIP problem found in many

process industries, including specific applications such as shale-gas well startup and ore-mining

and extraction planning, which require more scheduling details to be considered.

Author information

Corresponding Author

*E-mail: [email protected]

Index Names:

u: units

m: unit-operations

i: unit-operation-port-states (in)

j: unit-operation-port-states (out)

sg: unit-operation sequence-groups

t: time-periods (ntpf: in both the past and future time-horizons. ntf: time-periods in future time-horizon)

Paramaters Names:

LBfm: lower bound for flow f of the unit-operation m

LBfj,i: lower bound for flow f of the stream between j and i

LByi,m: lower bound for yield of the in-port i of m

LBym,j: lower bound for yield of the out-port j of m

UBfm: upper bound for flow f of the unit-operation m

UBfj,i: upper bound for flow f of the stream between j and i

47

Page 48: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

UByi,m: upper bound for yield of the in-port i of m

UBym,j: upper bound for yield of the out-port j of m

Variable Names:

v2r_ymsum,ntpf: unit-operation m setup variable (binary).

v3r_yjisuj,i,ntpf: unit-operation-port-state-unit-operation-port-state ji setup variable (binary).

v2r_xmfm,ntpf: unit-operation m flow variable.

v2r_xmhm,ntpf: unit-operation m holdup variable.

v3r_xjifj,i,ntpf: unit-operation-port-state-unit-operation-port-state ji flow variable.

v2r_zmsum,ntpf: unit-operation m startup variable.

v2r_zmsvm,ntpf: unit-operation m switchover-to-itself variable.

v2r_zmsdm,ntpf: unit-operation m shutdown variable.

v2r_zysgsusg,ntf: unit-operation sequence-group sg memory setup variable.

References

Al-Qahtani K, Elkamel A. Multisite facility network integration design and coordination: an

application to the refining industry. Comput Chem Eng 2008]; 32(10): 2189–202.

Al-Qahtani K, Elkamel A. Multisite refinery and petrochemical network design: optimal

integration and coordination. Ind Eng Chem Res 2009]; 48(2): 814–26.

Balas E. Disjunctive programming and a hierarchy of relaxations for discrete optimization

problems. SIAM J. Alg Disc Math 1985]; 6: 466-86.

Corsano G, Guillén-Gosálbez G, Montagna J. Computational methods for the simultaneous

strategic planning of supply chain and batch chemical manufacturing sites. Comput Chem Eng

2014]; 60: 154-71.

Duran MA, Grossmann, IE. An outer approximation algorithm for a class of mixed-integer

nonlinear programs. Math Programming 1986]; 36: 307–39.

48

Page 49: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Guignard M, Kim S. Lagrangean decomposition: a model yielding stronger Lagrangean bounds.

Math Programming 1987]; 39: 215–28.

Iyer RR, Grossmann IE. A bilevel decomposition algorithm for long-range planning of process

networks. Ind Eng Chem Res 1998]; 37(2): 474–81

Jackson RJ, Grossmann IE. High-level optimization model for the retrofit planning of process

networks. Ind Eng Chem Res 2002]; 41: 3762–770.

Kelly JD. Formulating production planning models. Chemical Engineering Progress 2004a,

January 43-50.

Kelly JD. Production modeling for multimodal operations. Chemical Engineering Progress

2004b, February, 44-46.

Kelly JD. Formulating large-scale quantity-quality bilinear data reconciliation problems. Comput

Chem Eng 2004c; 28(3): 357-66.

Kelly JD, Mann JL. Crude-oil blend scheduling optimization: an application with multi-million

dollar benefits. Hydrocarbon Processing 2003, 47-53.

Kelly JD, The unit-operation-stock superstructure (UOSS) and the quantity-logic-quality

paradigm (QLQP) for production scheduling in the process industries. MISTA 2005 Conference,

New York City, 2005, July.

Kelly JD, Zyngier D. An improved MILP modeling of sequence-dependent switchovers for

discrete-time scheduling problems. Industrial and Engineering Chemistry Research 2007]; 46:

4964-973.

49

Page 50: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Kelly JD, Zyngier D. Continuously improve planning and scheduling models with parameter

feedback. FOCAPO Boston, 2008a], July.

Kelly JD, Zyngier D. Hierarchical decomposition heuristic for scheduling: coordinated reasoning

for decentralized and distributed decision-making problems. Comput Chem Eng 2008b]; 32:

2684–705.

Kopanos GM, Kyriakidis TS, Georgiadis MC. New continuous-time and discrete-time

mathematical formulations for resource-constrained project scheduling problems. Comput Chem

Eng 2014; 68: 96-106.

Leontief WW. Input-Output Economics. 2nd ed., New York: Oxford University Press, 1986.

Liu M, Sahinidis NV. Long range planning in the process industries: a projection approach.

Comput Oper Res 1996; 23(3): 237–53.

Madron F. Process plant performance: measurement and data processing for optimization and

retrofits. Ellis Harwood: West Sussex, England; First Edition, 1992.

Martínez-Costa C, Mas-Machuca M, Benedito E, Corominas A. A review of mathematical

programming models for strategic capacity planning in manufacturing. Int J Prod Eco 2014];

153: 66-85.

Menezes BC, Kelly JD, Grossmann, IE. Improved swing-cut modeling for planning and

scheduling of oil-refinery distillation units. Ind Eng Chem Res 2013]; 52: 18324-333.

Menezes BC, Kelly JD, Grossmann, IE. Distillation blending and cutpoint temperature

optimization using monotonic interpolation. Ind Eng Chem Res 2014]; 53: 15146-156.

50

Page 51: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Menezes BC, Moro LFL, Grossmann IE, Kelly JD, Medronho RA, Pessoa FP. Production

planning of oil-refinery units for the future fuel market in Brazil. In: COBEQ, Florianopolis,

2014a].

Menezes BC, Moro LFL, Lin WO, Medronho RA, Pessoa FP. Nonlinear Production planning of

oil-refinery units for the future fuel market in Brazil: process design scenario-based model. Ind

Eng Chem Res 2014b]; 53: 4352-65.

Menezes BC, Kelly JD, Grossmann IE. Phenomenological decomposition heuristic for process

design synthesis of oil-refinery Units. Computer Aided Chemical Engineering 2015]; 37: 1877-

1882.

Pinedo M, Chao, X. Operations scheduling and applications in manufacturing, algorithms and

systems. Prentice Hall: New York ; Second Edition, 1999].

Raman R, Grossmann IE. Modeling and Computational Techniques for Logic Based Integer

Programming. Comput Chem Eng 1994]; 18: 563-78.

Sahebi H, Mickel S, Asheyeri J. Strategic and tactical mathematical programming models within

the crude oil supply chain context—a review. Comput Chem Eng 2014]; 13(9): 1049-63.

Sahinidis NV, Grossmann IE, Fornari RE, Chathrathi M. Optimization Model for Long Range

Planning in the Chemical Industry. Comput Chem Eng 1989]; 13(9): 1049-63.

Shah N. Pharmaceutical supply chains: key issues and strategies for optimization. Comput Chem

Eng 2004]; 28: 929–41.

51

Page 52: Generalized capital investment planning of oil-refineries using CPLEX-MILP and sequence-dependent setups

Varma VA, Reklaitis GV, Blau GE, Pekny JF. Enterprise-wide modeling and optimization: an

overview of emerging research challenges and opportunities. Comput Chem Eng 2004]; 31: 692–

711.

Van den Heever S., Grossmann IE. Disjunctive multi-period optimization methods for design

and planning of chemical process systems. Comput Chem Eng 1999]; 23: 1075-95.

Williams HP. Model building in mathematical programming, John Wiley and Sons, 4th Edition,

West Sussex, England, (1999).

Wolsey LA. Integer programming, Wiley-Interscience, New York, (1998).

You F, Grossmann IE. Design of Responsive Supply Chains under Demand Uncertainty.

Comput. Chem. Eng. 2008]; 32 (12): 2839–3274.

You F, Grossmann IE, Wassick JM. Multisite capacity, production, and distribution planning

with reactor modifications: MILP model, bi-level decomposition algorithm versus Lagrangean

decomposition scheme. Ind Eng Chem Res 2011]; 50: 4831–49.

Zyngier D, Kelly JD. Multi-product inventory logistics modeling in the process industries. In

Optim. and Logistics Challenges in the Enterprise. Springer Optimization and Its Applications,

30, Part 1, p. 61-95, DOI: 10.1007/978-0-387-88617-6_2; 2009.

52