# An optimization model for site-wide scheduling of coupled production plants with an application to the ammonia network of a petrochemical site

- 405 Downloads

## Abstract

This contribution presents the modeling and optimization of the operation of production plants that are coupled via distribution networks and applies it to a part of the petrochemical production site of INEOS in Köln in Germany. The problem is formulated as a mixed-integer linear problem and solved to generate an optimal monthly plan for a set of plants, tanks, and loading/unloading facilities, while respecting various constraints arising from technical limitations, physical couplings between the plants, production targets, and the schedule for import and export across the company borders via ships and trains. The optimization problem takes into account varying energy prices, the influence of the ambient temperature on the processes, and the inventory management for different types of storages. We solve the optimization problem for the particular case and compare the results for a 1 month scenario to recorded data and show that a significant energy saving potential exists. We discuss the current limitations and outline potential improvements in the context of the application of the optimization model to optimal site planning that leads to an improved coordination of the production in the process industries.

## Keywords

MILP scheduling Site-wide optimization Network optimization Demand-side management Shared resource allocation## 1 Introduction

The scope of optimization in the process industries is often limited to specific issues and domains, but recently there has been an increased interest and research activity in expanding the scope (Castro et al. 2018). Figure 1 illustrates different domains which the scope of optimization can potentially embrace. Looking at the system from a bottom-up perspective leads to the natural choice of starting with the optimization on the plant level. If the focus is widened to the scope of a complete production site and vertically across the different layers of the organization (Harjunkoski et al. 2014), the optimal shared resource allocation within chemical production processes by means of distributed market-based coordination schemes is a way to drive the operation of the individual processing plants to a site-wide optimum (Wenzel et al. 2016). Looking at the upstream connections one can optimize the logistic (pipeline) network with the assumption that the processing plants are consumers with fixed inflow rates as Liu et al. (2016) propose. If one is concerned with the on-site storage and buffer capacities and their management coupled with the production, an optimization of the inventory can be done as in (Rodriguez et al. 2018). Considering the external influences such as varying availability of energy from the grid leads to an optimization of the electric power procurement of the site, known as demand side management (Zhang and Grossmann 2016; Hadera et al. 2016; Leo and Engell 2018).

Optimizing the system as a whole, even if the modeling depth is limited, is a step further towards smart factories in the petrochemical industry (Li 2016), which are able to adjust their operation to the situation outside of the site such as low or even negative power prices due to the availability of electric power from renewable resources (Paraschiv et al. 2014).

New or improved solvers, more powerful computers, and efficient modeling frameworks enable formulating and solving more and more complex optimization problems and combining the scopes of the different optimization fields shown in Fig. 1. In this contribution we develop a generic MILP optimization model that is suited to generate an optimal schedule for the operation of physically coupled processing plants under the consideration of external influences such as energy prices and logistic constraints. We motivate the development with a case study of a part of the petrochemical production site of INEOS in Köln in Germany, where an optimal schedule for the operation of the plants within the ammonia distribution network is aimed at.

The rest of the paper is organized as follows. First, the scope of the site-wide optimization and shared resource allocation is laid out and possible choices of optimization models are discussed. Afterwards, the ammonia distribution network at INEOS in Köln is presented as a motivating example. Then a generic model for the purpose of site-wide scheduling of connected processing plants is formulated as an MILP. The model is parametrized for the INEOS in Köln ammonia distribution network and the results are compared to historic production data that were recorded. A summary and an outlook on further developments conclude the paper.

## 2 MI(N)LP for site-wide optimization and shared resource allocation

Site-wide optimization (Cheung and Hui 2004) or even enterprise-wide optimization (Grossmann 2005; Varma et al. 2007; Wassick 2009; Quaglia et al. 2013) is a field of research and application that is highly relevant to the process industries and although the idea is not new, recent advances in mathematical programing and solution strategies have enabled the application to real world problems, though the remaining challenges are non-trivial (Grossmann 2012).

One of the challenges is the complexity of the underlying physical and chemical principles which govern the behavior of the individual processing units. Reaction kinetics and thermodynamics lead to significant non-linearities and the presence of different pieces of equipment, redundant production lines, or different operating windows lead to discrete decisions. Consequently, one ends up with the dilemma of either formulating the overall optimization problem as a mixed-integer non-linear program (MINLP) for which often only approximate solutions can be found (Belotti et al. 2013), or one decides to set up and solve a mixed-integer linear program that results from a (piece-wise) linear approximation of the non-linearities (Grossmann 2012).

Applications of MI(N)LPs in the process industries are numerous and diverse, since the benefits that a system-wide optimization offers are significant. In the crude oil sector, refineries can for instance be modeled as large storage units and the distillation processes as constant level consumers (Más and Pinto 2003) and the resulting MILP can be solved by a decomposition strategy to handle its complexity. Production planning for petroleum refineries was done with a multi-period optimization model by Neiro and Pinto (2005). Liu et al. (2016) propose a MILP model for the optimal operation of different gas oil separation plants that are operated in a joint distribution network for which the routing is optimized. In Zhao et al. (2017), an enterprise-wide optimization is proposed that incorporates the refinery and an ethylene plant in an integrated topology for a joint optimization. Further, a site-wide optimization is also of interest for a combined optimization of utility consumption such as in heat-exchanger networks [see Kermani et al. (2017) and the references therein]. In this contribution, a generic formulation of an optimization model is proposed for the generation of an optimal operation schedule for processing plants that are physically coupled by shared resource networks and storage tanks. These shared resources can be different streams of material and energy. An application of enterprise-wide optimization to shared resource networks is presented by Lv et al. (2018) who optimize an interplant fresh water network. In Khor et al. (2014) an extensive review on the optimization of water networks can be found. Martí et al. (2013) investigate the optimal sharing of oxygen in a reactor network. The optimal management of hydrogen networks in a petrol refinery is described by Sarabia et al. (2012). In Wenzel et al. (2016) price-based coordination is used to optimally allocate steam on different pressure levels at a petrochemical production site and in Wenzel et al. (2017) the work is extended to incorporate the intermediate products ethylene and propylene. The optimization of a utility network combined with the optimization of the hydrogen production is done based upon a MILP formulation by Hwangbo et al. (2017).

Extending the optimization of shared resource networks, the scope of the model in this contribution is chosen according to Fig. 1 to incorporate decisions from different operational levels (Castro et al. 2018). The level of detail and the choice of the model equations are motivated by the application to the ammonia distribution network of INEOS in Köln, which is explained in more detail in Sect. 3. Since the current planning practice at INEOS in Köln is constraint driven rather than dominated by non-linearities, we propose to use a large-scale MILP formulation to optimize the network including the tanks and the operation of the individual plants on the site, which are modeled by linear and affine functions as done similarly, e.g., by Gao et al. (2015).

## 3 The ammonia distribution network at INEOS in Köln

The purpose of the optimization of this network is to operate the plants at the overall optimum, which might not be identical to the optimum for each individual plant, as external influence factors (ambient temperature, prices for electric power and gas) have to be taken into account as well as the operating points of the connected plants. In addition, the logistics within and outside of the ammonia distribution grid play a major role, as they impose important constraints on the operation of the plants. The presence of numerous discrete decisions renders this problem a challenge both from the modeling perspective as well as from the optimization perspective. The integration of external influences into the site-wide ammonia distribution optimization offers a large potential to adjust the operation of the complex in order to achieve an overall energy and resource efficient operation with an increased responsiveness to external influences.

## 4 Formulation of a generic MILP for site-wide scheduling

In the following, a generic model that is suited to determine an optimal schedule for the operation of processing plants at a production site where the plants are coupled by several networks is formulated. The model considers the scope illustrated in Fig. 1 and is motivated by the case study shown in Fig. 2.

### 4.1 Nomenclature

*j*are denoted by \(\dot{m}^{(j)}_{r,s,s^{\prime }}\) with resource \(r \in R\) going from system

*s*to \(s^{\prime }\). In every pipe only one resource is transported. A resource can be a pure raw material, a mixture with a fixed composition, or a carrier of energy as, e.g., steam at a certain pressure level. The amount of generation or consumption of electric power in system

*s*in time interval

*j*is denoted by \(P_{{\text{el.}},s}^{(j)}\).

Sets used for modeling

Symbol | Meaning |
---|---|

\(E_{R,p}\) | (Index |

\(E_{U,p}\) | (Index |

| (Index |

\(M_s\) | (Index |

\(N \subset S\) | (Index |

\(P \subset S\) | (Index |

\(P_{mR} \subset P\) | Set of plants with multiple independent reactors |

\(P_{mU} \subset P\) | Set of plants with multiple independent units |

| (Index |

| (Index |

\(T \subset S\) | (Index |

\(T_{\text {c}} \subset T\) | Set of deep-cooled storage tanks |

\(T_{\text {b}} \subset T\) | Set of spherical buffer tanks |

| (Index ( |

\(\varGamma _{{\text{in}},s}\), \(\varGamma _{{\text {out}},s}\) | Set of pipes leading to and leaving system |

\(\varPi (r,s,s^{\prime })\) | Set of pipes for resource |

\(\varPi _b \subset \varPi\) | Subset of pipes with restricted mass flows |

\(\varOmega _i(s,m,m^{\prime })\) | Set of impossible transitions |

\(\varOmega _p(s,m,m^{\prime })\) | Set of transitions that are associated with additional costs |

\(\varOmega _f(s,m,m^{\prime })\) | Set of transitions that require a fixed stay time |

Binary variables used for modeling

Symbol | Meaning |
---|---|

\({y}^{(j)}_{s,m}\) | Binary variable for system |

\({z}^{(j)}_{s,m,m^{\prime }}\) | Binary variable for the transition from mode |

Continuous variables used for modeling

Symbol | Meaning |
---|---|

\({m}^{(j)}_{r,s}\) | The stored mass of resource |

\(\dot{m}^{(j)}_{r,s,s^{\prime }}\) | The mass flow of resource |

\(\dot{m}^{(j)}_{{\text{prod}},p}\) | The production of the main product of plant |

\(P_{{\text{el.}},s}^{(j)}\) | The electric power production or consumption of system |

Parameters used for modeling

Symbol | Meaning |
---|---|

\(a_{r,s}\), \(b_{r,s}\), \(c_{r,s}\), \(d_{r,s}\) | Affine model parameters for resources |

\(a_{{\text{el.}},s}\), \(b_{{\text{el.}},s}\), \(c_{{\text{el.}},s}\), \(d_{{\text{el.}},s}\) | Affine model parameters for electric power |

\({\text {lb}}_{r,s,s^{\prime }}^{(j)}, {\text{ub}}_{r,s,s^{\prime }}^{(j)}\) | Lower and upper bounds on the mass streams in interval |

\({\text {lb}}_{c,t}^{(j)}, {\text{ub}}_{c,t}^{(j)}\) | Lower and upper bounds on the mass in the tanks in interval |

\(K_{s,m,m^{\prime }}^{\text {fix},j}\) | Fixed time for system |

\(\alpha _{r,s,s^{\prime }}^{(j)}\) | Price of resource |

\(\beta _{s,m,m^{\prime }}\) | Price of a transition of system |

\(\gamma ^{(j)}\) | Price of electric power in time interval |

\(\delta _{{\text{prod.}},p}\) | Penalty on the load changes |

\(\varDelta t\) | Time step in hours |

\(\varDelta \dot{m}_{\text {max},s}\) | Maximum allowed mass flow change for system |

\(\epsilon\) | Small number |

\(\vartheta _a\), \((\hat{\vartheta }_a)\) | Ambient (estimated) temperature in \(^\circ\)C |

\(\underline{\vartheta _a}\), \(\overline{\vartheta _a}\) | Lower and upper ambient temperatures for the estimation of the shut down or start up times |

\(\underline{\tau }\), \(\overline{\tau }\) | Lower and upper times required for a shut down or start up |

\(\tau _{f}\) | Temperature independent time required for a shut down or start up |

\(\tau _{v}(\vartheta _a)\) | Temperature dependent time required for a shut down or start up |

### 4.2 Nodes

*N*. The mass balance of the incoming streams \(\varGamma _{{\text{in}},n}\) and the outgoing streams \(\varGamma _{{\text {out}},n}\) has to hold for every time interval \(j \in J\) and for all nodes \(n \in N\). It can be expressed by

### 4.3 Operating modes

*j*. Obviously, the accuracy of the estimation depends on the length of the horizon, since there is no accurate weather forecast for more than a few days. One possibility is to use seasonal average temperature patterns for night and day times to optimize the schedule. Based on experience, the minimum and maximum times for starting up and shutting down are known for the specific units. At low ambient temperature \(\underline{\vartheta _a}\) the variable part of the time \(\tau _v\) is \(\overline{\tau }\) and at high ambient temperature \(\overline{\vartheta _a}\) the variable is \(\tau _v=\underline{\tau }\). The variable estimated time \(\tau _v({\hat{\vartheta }}_a)\) is then computed by simple interpolation for temperatures \({\hat{\vartheta }}_a^{(j)}\in [\underline{\hat{\vartheta }}, \overline{\hat{\vartheta }}]\). Outside of this temperature range the required time \(\tau _v({\hat{\vartheta }}_a^{(j)})\) is bounded according to

### 4.4 Plant models

Since the derived models are intended to be used for medium to long term scheduling, the plants are modeled as stationary input output mappings and the dynamics of ramping up or ramping down the production rate are modeled by the above constraints. Plants can either be operated as a whole or they can have multiple parallel units, such as reactors with different operating modes. Details will be provided in the following subsections.

#### 4.4.1 General plant model

*p*at time

*j*is a continuous model input. Further, the ambient temperature \(\vartheta _a^{(j)}\) is considered as a non-influenceable input parameter. It is assumed that within the operating range, the remaining streams of material and energy can be determined from \(\dot{m}^{(j)}_{{\text{prod.}},p}\) by affine equations. The following equations describe a plant that can only be operated as a whole:

*on*. With this approach, a static consumption or production of resources of a plant can be accounted for, even if no product is being produced, which is relevant, e.g., if cooling water is continuously consumed independent of the load of the plant.

#### 4.4.2 Plants with multiple parallel units

*p*with multiple parallel units is illustrated. In a plant with multiple parallel units, the planned overall product stream \(\dot{m}^{(j)}_{{\text{prod.}},p}\) is split in an internal node into single streams \(\dot{m}^{(j)}_{{\text{prod.}},p, e_u}\) that enter the individual units \(e_u \in E_{U,p}\). The mass balance is ensured by

*load independent*block (li) that accounts for the fraction of consumption or production of the plant that is independent of the amount of product \(\dot{m}^{(j)}_{{\text{prod.}},p}\) and of the number of running units. The load independent block is modeled as

*p*is formulated accordingly

#### 4.4.3 Operating modes of plants and units

In general, all plants and units can be in the modes *on* and *off* (see Sect. 4.3). Further modes can be defined, if needed. Typical additional modes are the modes *shutting down* and *starting up* (Mitra et al. 2013). These modes are required if the time required for a shutdown or a start up are modeled with minimum or fixed stay times as in (7). If the modes *shutting down* and *starting up* are used, the direct transitions from *on* to *off* and vice versa are modeled as forbidden transitions.

*on*if at least one unit is in mode

*on*, i.e., if all units are switched

*off*, than the plant is switched

*off*, too. Constraint (21) guarantees that the plant must be in mode

*on*as soon as one of the units is in mode

*on*.

#### 4.4.4 Constraints on the load changes

*on*is performed, the change of the mass flow from or to the maximum or minimum value is not restricted. Note that with this modeling approach a plant can switch from the modes

*off*or

*starting up*to the mode of operating at full load (

*on*) instantaneously.

### 4.5 Tanks

*fill*for filling,

*disc*for discharging and

*idle*, if neither is done. A mode-dependent reformulation of (2f.) for the inflows and outflows of the tanks is

### 4.6 Logistics of external sinks and sources

Usually, there are several incoming and outgoing streams of material and energy across the boundaries of the system under consideration such as the streams that are depicted in Fig. 2. In our model, there are two types of incoming and outgoing streams. For one type it is assumed that the streams are available at sufficient quantity at all times, i.e., there is no shortage in supply within the predefined operating ranges of the plants. They are provided by adjacent processes and have lower and upper bounds on the quantity per hour that can be acquired. For the second type, discrete imports and exports of resources across the boundaries of the system are considered. These imports and exports can be realized by, e.g., trains, ships, or trucks. Technical limitations for the import and export can either be realized as bounds on the incoming and outgoing streams or, in addition, handled using discrete modes of the arrival nodes. One example is the restriction to only load or unload one type of delivery. Then the receiving node has a unique operating mode from of a set of modes, e.g., \(\{\)*ship*, *train*, *truck*\(\}\) [see (4)] and the bounds are modeled according to (26f.).

### 4.7 External influence factors

## 5 Optimization of the ammonia network of INEOS in Köln

In the following, the scope of the model is defined and the model is parametrized for the ammonia network of INEOS in Köln. The objective function and its degrees of freedom are stated. Afterwards, the model is solved to generate a schedule for one month and its results are compared with historic data of INEOS in Köln to investigate the quality of the solution of the model.

### 5.1 Definition of the scope of the optimization

The aim of the optimization is to generate an optimal production schedule for the processing plants in the ammonia distribution network at INEOS in Köln, which is illustrated in Fig. 2 and described in Sect. 3. The scope of the optimization includes all areas of optimization that are shown in Fig. 1.

### 5.2 Parametrization the optimization model

The model is parametrized by the topology given in Fig. 2 and by the technical, operational, and managerial constraints provided by INEOS in Köln, which will be discussed in the following sections.

#### 5.2.1 The processing plants

*on*or

*off*. Both acrylonitrile plants have individual reactors that additionally have the transition states

*shutting down*and

*starting up*. The transition states have fixed stay times that depend on the ambient temperature as modeled by (7).

Systems considered in the ammonia distribution network

System | Symbol | Modes | Comment |
---|---|---|---|

Ammonia plant | P1 |
| \(\hbox {NH}_{3}\) producer |

Nitric acid plant | P3 |
| \(\hbox {NH}_{3}\) consumer |

Acrylonitrile plant | P4a |
| \(\hbox {NH}_{3}\) consumer |

Reactor 1 | P4aReac1 |
| \(\hbox {NH}_{3}\) consumer |

Reactor 2 | P4aReac2 |
| \(\hbox {NH}_{3}\) consumer |

Acrylonitrile plant | P4b |
| \(\hbox {NH}_{3}\) consumer |

Reactor 1 | P4bReac1 |
| \(\hbox {NH}_{3}\) consumer |

Reactor 2 | P4bReac2 |
| \(\hbox {NH}_{3}\) consumer |

Reactor 3 | P4bReac3 |
| \(\hbox {NH}_{3}\) consumer |

Reactor 4 | P4bReac4 |
| \(\hbox {NH}_{3}\) consumer |

Deep-cooled tank | Tc1 |
| \(\hbox {NH}_{3}\) deep-cooled storage |

Deep-cooled tank | Tc2 |
| \(\hbox {NH}_{3}\) deep-cooled storage |

Buffer tank | Tb1a |
| \(\hbox {NH}_{3}\) warm storage |

Buffer tank | Tb1b |
| \(\hbox {NH}_{3}\) warm storage |

Buffer tank | Tb3 |
| \(\hbox {NH}_{3}\) warm storage, handles import / export |

Compressor | C1 |
| State change |

Compressor | C2 |
| State change |

Heater | H1 | | Energy consumption linear with processed amount |

#### 5.2.2 The buffer tanks and storage tanks

As described in Sect. 3, there are two different types of ammonia storages. One type are the two deep-cooled storage tanks Tc1 and Tc2. The second are the spherical buffer tanks. All buffer tanks and storage tanks are listed in Table 5. In the following, details for the two storage types are given.

*Deep-cooled storage tanks for ammonia*\(T_{\text {c}} \subset T\) cannot be filled and discharged at the same time (4). There are no restrictions on changing between the three modes and thus switching can be done after every time step \(\varDelta t\). The tanks are only used for long term storage to keep a certain level of inventory for the situation of an unforeseen shutdown or to build up an amount of ammonia for sale. Before the ammonia is stored in these tanks, it has to be cooled down by the compressors C1 and C2. When discharging the tank, the ammonia has to be heated up on the way to the warm buffer tanks. This operation requires energy that could be reduced by employing an optimal schedule of the overall network. During one time interval ammonia is only sent to one of the two tanks or only discharged from one of the two tanks. This constraint is based on a heuristic of the plant personnel to minimize the pressure loss due to operating two pipes at the same time. It can be formulated as

*Ammonia buffer tanks*\(T_{\text {b}} \subset T\) can be filled and discharged at all times. However, they have outlets to different nodes. They can discharge towards either of following processes (

*discp*), ships (

*discs*) or train vessels (

*disct*) or stay idle (

*idle*). However, there is no restriction to only one mode being active in each interval, e.g., it is possible to send ammonia to processes and a train vessel simultaneously. As in (27), the mass flows are set to zero if the corresponding discharge mode is inactive. There are no forbidden transitions between the available modes. In this contribution the imported amounts of ammonia via ships and trains are implemented as hard constraints. Thus, the discharging modes for trains and ships are fixed throughout the horizon (see Sect. 5.5). In theory, it is possible to import and export to and from ships and trains via all three ammonia buffer tanks. However, the current practice at INEOS in Köln is to only use Tb3 for import and export. Export suppression from Tb1a and Tb1b is enforced by

*ext*denotes external sources.

### 5.3 The optimization problem

*m*, \(\dot{m}\), \(P_{{\text{el.}}}\),

*y*, and

*z*are the decision variables with

*y*and

*z*as binaries. The optimization is formulated for 31 days, with a resolution of \(\varDelta t =\,1\hbox {h}\), which results in a horizon \(J = \{1,2,\ldots ,744\}\). The number of variables

^{1}for the tank levels is \(n_{m} ={7450}\). The number of variables for the pipes is \(n_{\dot{m}} ={93{,}744}\), the number of variables for the power \(n_{P_{{\text{el.}}}}= {2232}\), the number of the binary mode variables \(n_y={40176}\), and the number of the binary transition variables \(n_z= {138{,}384}\). With this, the total number of variables is 281,986. The choice of the resolution of \(\varDelta t =1\,{\hbox {h}}\), results in a large-scale problem which could in principle be avoided by choosing a more coarse resolution. However, the fine resolution is needed in this case study to account for the fixed stay times. In addition, we observed infeasibilities for the buffer tanks, ships, and trains which are caused, e.g., if a discharging mode of a tank is active for too long, which causes the tank to run empty.

### 5.4 Objective function

#### 5.4.1 System profit

*r*for a specific stream and \(\gamma ^{(j)}\) is the time-variant price of electric power. It is important to note that the prices \(\alpha _{r,s,s^{\prime }}^{(j)}\) are also time-variant for natural gas and they can be in principle time-variant for other streams, too. When summing up the profit terms for all tanks and plants the internal sales cancel out and only accumulation in tanks and transfers across the site boundary appear in the total balance.

#### 5.4.2 Transition costs

### 5.5 Formulation of the optimization scenario

To determine the quality of the solution of the site-wide optimization model, a problem instance of an example scenario provided by INEOS in Köln is formulated and solved. Past recorded production data from one sample month^{2} has been taken as a reference. The optimization problem takes the monthly production target and initial conditions for all modes and tanks levels into account. The following sections provide a detailed description of the scenario.

#### 5.5.1 Background

#### 5.5.2 Logistic constraints

#### 5.5.3 Energy prices and ambient temperature

The energy prices for power and natural gas as well as the ambient temperature vary over time during the scheduling horizon. The time varying prices influence the objective function (33) and need to be estimated for the length of the scheduling horizon *J*. An extensive review of electric power price forecasting can be found in Weron (2014) and more general for forecasting methods in energy planning models in Debnath and Mourshed (2018). Since in this contribution we simulate the optimization model against a set of historic data of INEOS in Köln, the optimizer knows the prices in advance. In practice, of course only predictions which are subject to uncertainty are given. The prices for power and gas for the considered scenario are shown in Fig. 4 for the scheduling horizon in €/MWh.

The ambient temperature varies on different time scales. There are daily and seasonal variations. In the model, the ambient temperature influences the model equations of the resource consumption and production of the plants (10ff.) and it influences the fixed transitions times for shutting down and starting up the reactors listed in Table 5 (see 8). As for the energy prices, in this contribution the ambient temperature is known to the optimizer for the complete scheduling horizon.

#### 5.5.4 Initial conditions and target amounts

For all the systems listed in Table 5, the modes at the beginning of the horizon \(j=1\) are fixed to the modes that were recorded by INEOS in Köln. Also, the initial levels of all tanks within the network were fixed.

*p*(except for the ammonia plant) receives from the buffer tank

*t*during the scheduling horizon (see Fig. 2). The fixed consumption target \(m_{{\hbox {NH}_{3}},p,\circledcirc }\) is taken from the actual production capacities in the scenario.

### 5.6 Implementation

The optimization problem was implemented with the help of the mathematical modeling package JuMP (Dunning et al. 2017), which is a package written in Julia (Bezanson et al. 2017). This implementation is independent of the chosen solver, since JuMP enables the use of many open-source and proprietary solvers. For this contribution the commercial solvers CPLEX 12.8.0.0 and Gurobi 8.0.1 as well as the two open source solvers Cbc (Coin-OR 2018) and GPLK (GLPK (GNU Linear Programming Kit) 2018) were tested with different settings for the relative MIP gap (see Table 6).

## 6 Results and discussion

*Operation of the plants and their reactors.* Figure 7 shows the optimized hourly production rates of the plants with respect to the ammonia usage, i. e, the ammonia plant P1 produces ammonia and the others consume it. The dashed lines represent the recorded operation at INEOS in Köln. The optimized schedule for the ammonia plant assigns full load towards the end of the month, while at the beginning the load is set to the lower bound, which is about 80% of the \(\hbox {NH}_{3}\) production capacity. In between, the optimized production trajectory of the plant is ramped up and down twice between the lower and upper bound without a complete shut down of the plant. The ramping is determined by the constraints (22f.). The reasons for the particular pattern can be explained by the pattern of the gas price (see Fig. 4), which is slightly lower at the end of the month. In addition, the ammonia plant reduces its load to not exceed the amount that is taken from the proceeding processes plus what is required at the end of the month as defined in (37) and (38). The ammonia production does not exceed the minimum required amount of ammonia on site, because additional ammonia has to be stored in the deep-cooled storage tanks Tc1 and Tc2, which requires an additional consumption of electric power without the possibility of sales within the horizon.

The schedule that is computed for the nitric acid plant P3 has the largest number of set point changes among the plants. The plant is not shut down completely, since for this action a high transition cost is assigned by (34). It is more efficient to reduce its load, which is done by ramping up and down between the upper and the lower bounds of the ammonia takeup capacity. It is visible that there exists a coupling between the operation of plants P1 and P3. At the beginning of the horizon the load of P1 is reduced and the load of P3 is reduced, too. However, the coupling is not straightforward, since the plants are connected via the ammonia storages. The intermediate reduction of the load of P3 is either caused by a shortage in the buffer tanks or by a propagation of the load reduction of P1 during an earlier time interval. Similar to the operation of P1, P3 does not operate at maximum load throughout the horizon in order to not exceed the monthly target. The required operational load is shifted according to the needs of the site.

In the optimized schedule for the AN plant P4a all the reactors are operated either at full load, or switched off completely, which is done in the last quarter of the horizon (see Figs. 7, 12). For this plant it is more beneficial to shut down individual equipment and pay the one time transition cost (34) instead of reducing the load of the reactors. A similar situation can be observed for the other AN plant P4b, which switches off one of the four reactors in the first third of the horizon (see Fig. 7, 12). For these reactors it is more economical to operate them at their maximum load or to switch them off, which is related to large constant terms in the affine model equations (13f.). The assignment of the timings for the shut downs is done either because of the prices for gas and electric power or according to the availability of ammonia in the buffer tanks, which is affected by the purchase and sale schedule and which is coupled to the operation of the remaining plants.

When the optimized schedule is compared to the recorded operation one can see that the optimizer makes use of the possibility to switch off reactors or even complete plants. The recorded operation at INEOS in Köln changes the load of the plants slowly rather than performing sudden changes, which is typical for the operation of large continuous processes. In contrast, the optimizer evaluates the tradeoff between shutting down and operating at a less efficient operating point such as the lower bound.

*Optimized tank levels.*Figures 8, 9, 10, and 11 give insight into the optimization results for the tank levels. Figure 8 shows the optimized tank levels of all individual ammonia tanks within the network. It is visible that the optimizer strives to fill all tanks towards the end of the month, which is in line with the required value defined in the scenario (37). The difference between the two different tank types, namely the deep-cooled storage tanks Tc1 and Tc2 (denoted as TcX) and the buffer tanks Tb1a, Tb1a, and Tb3 (denoted as TbX) becomes visible in Fig. 9 where the levels of the grouped tank types are compared to the recorded data. The integrated amount of ammonia on site matches exactly the amount that was recorded. However, the distribution is different. Although, the optimizer and INEOS in Köln use the tanks TbX to buffer the imported and exported amount (wavy pattern of TbX), the final amount in the buffer tanks is larger compared to the recorded data and the amount in the deep-cooled storage tanks is smaller. This results from minimization of the costs on site, where the optimizer strives at spending as little money as possible for storing ammonia. Sending ammonia towards the deep-cooled storage tanks via the compressors requires liquefaction, which adds extra costs and reduces the resource efficiency on site.

Figure 10 gives further details on the filling of the individual deep-cooled storage tanks Tc1 and Tc2. Starting from the initial values, both tank levels increase. The optimizer chooses to first fill Tc1 at a higher rate, then Tc2 is preferred from 400 h on. In contrast to the recorded data, the optimizer decided to alternate between the filling of the two tanks. This is possible because switching between the two tanks can be done after every time interval \(\varDelta t\) without any further cost. Overall it can be seen that especially Tc1 has still some capacity left at the end of the planning horizon in the optimized schedule, which is caused by the minimization of the storage cost on site and thus by a minimization of the amount that is stored in the deep-cooled tanks.

Figure 11 shows the trajectory of the buffer tank Tb3. This buffer tank processes the flows of ammonia that enter or leave the site via ships and trains (see Sect. 5.5.2). It is clearly visible that the pattern of the ship arrivals is reflected in both the recorded data and the optimized schedule (cf. Fig. 6). The optimized schedule generally has a higher filling level, which is especially of importance at the end of the horizon, where more ammonia is stored in comparison with the recorded data. The optimizer uses this free capacity to store ammonia on site without the necessity to cool it down. Further differences can be found in the emptying procedure. The tank needs to be nearly empty to receive the load of a ship when it arrives. While in the recorded operation the tank is emptied earlier than required, which might be due to experience and implicit uncertainty handling of the site management, the optimizer empties the tanks just before the ship arrives, since there is no safety margin included in the formulation.

*Optimized operating modes.*Figure 12 illustrates the operating modes of the major equipment and plants on site. Most of the plants stay switched on throughout the horizon, which is plausible for the operation of large petrochemical processes. Reactors are switched off only in the plants P4a and P4b. Plant P4a is completely shut down (both of its reactors are switched off) and in plant P4b one reactor is switched off. It is also visible that the shut down and start up times differ from reactor to reactor and in addition they are temperature dependent [cf. the shut down time of the reactors P4aReac1 and P4bReac1, see (8)].

It is interesting to analyze the switching of the compressors C1 and C2, which is predominantly determined by the need to liquefy ammonia to reach the target capacity at the end of the month in the deep-cooled storage tanks. In addition to these needs, the optimizer considers the price of electric power to run the power consuming devices during times of low prices of electric power as illustrated for the compressors in Fig. 13. In the figure, a selection of regimes of low and high prices for electric power are highlighted. It can be seen that the optimizer chooses to switch the compressors on during times of low prices and decides to turn them off if the price of electric power is elevated.

*Energy savings for deep-cooled ammonia storage.*There are many aspects that can be considered to evaluate the quality of the optimized schedule. One aspect is to look at the electric power required for the storage of deep-cooled ammonia. There are two factors that lead to savings. First, the alignment of the liquefaction of ammonia with the power price leads to savings. Second, the minimization of the amount of liquefied ammonia reduces the power consumption. As an example, the relative power expenses integrated over the horizon are shown in Fig. 14. At the beginning, both the recorded and the optimized trajectories start at zero expenses. Since the power price is negative at the beginning (see Fig. 4), the relative expenses become negative. The data is scaled such that at the end of the horizon the recorded operation reaches 100% of the expenses. It can be seen that the optimized schedule leads to less expenses than the recorded data. At the end of the horizon, the optimized schedule saved \(\approx\) 25% of the costs for the liquefaction, which is caused by less liquefied ammonia and the adjustment of the compressors to the power prices.

*Solution times.*The solution times required to solve the optimization model significantly depend on the scenario and how many logistic constraints and operating modes are prefixed. In addition, we tested the performance of different solvers, two commercial ones and two open source solvers. The results are shown in Table 6 for varying tolerances of the MIP gap of the solvers. Both open source solvers were not able to find a solution to the problem instance within the allowed time of 60 min. In terms of the objective values, CPLEX and Gurobi perform similarly if the allowed time is 60 min and the tolerance for the relative MIP gap is set to \(10^{-4}\). For the most coarse termination tolerance of \(10^{-2}\), Gurobi finds a solution within the tolerance much faster than CPLEX. For a termination tolerance of \(10^{-3}\) both solvers require comparable solutions times with similar relative MIP gaps.

Details on the solution time with different solvers

Solver | Max. relative MIP gap | Solution time | Objective value | Relative MIP gap (%) |
---|---|---|---|---|

CPLEX | \(\hbox {EPGAP}= 10^{-2}\) | 458 | \({-1.37810 \times 10^{-7} }\) | 0.59 |

CPLEX | \(\hbox {EPGAP}= 10^{-3}\) | 812 | \({-1.38466 \times 10^{-7}}\) | 0.10 |

CPLEX | \(\hbox {EPGAP}= 10^{-4}\) | | \(-\mathbf{1.38518 } \times \,{10}^\mathbf{7}\) | 0.05 |

Gurobi | \(\hbox {MIPGap}= 10^{-2}\) | 183 | \({-1.37574\times 10^{-7}}\) | 0.79 |

Gurobi | \(\hbox {MIPGap}= 10^{-3}\) | 804 | \({ -1.38517\times 10^{-7}}\) | 0.09 |

Gurobi | \(\hbox {MIPGap}= 10^{-4}\) | | \({-\mathbf{1.38518} \times \,10^7}\) | |

Cbc | \(\hbox {Ratiogap}= 10^{-2}\) | No solution found | ||

GLPK | \(\hbox {MIPRelativeGap}= 10^{-2}\) | No solution found |

## 7 Conclusion

From the generic model proposed in Sect. 4 it is possible to generate an optimal schedule for the operation of processing plants coupled by resource networks. The results for the provided scenario of INEOS in Köln could be obtained within a reasonable time if the termination tolerance is not chosen too tight. The results are plausible and they are in good agreement with the recorded data. The optimizer reduces the production cost by shifting the operation periods and loads of the processes and the operation of energy consuming equipment. In the perspective of demand side management the benefits are limited because of the inflexibility of the processes, which is not uncommon in the petrochemical industry. The large production plants are slow in changing their operating point and are directly coupled to the operation of the adjacent processes. Since between the ammonia plant and the compressors there is no intermediate storage, the operation of the compressors is strongly linked to the operation of the plant, which is limited by ramping constraints. In addition, the overall system is heavily driven by logistic constraints, which significantly reduces the degrees of freedom for an optimizer to improve the operation. The logistic constraints of the arrivals of ships and trains are fixed in this contribution. However, with the generic modeling approach presented in Sect. 4 it is possible to vary the arrival times of the ships and trains as well.

One issue that we noted is that the contributions of the individual terms in the objective function vary by orders of magnitude. The predominant terms are the production loads of the plants, since these terms determine the profit of the site and are the main driving force. The “minor” decisions such as when to shut down one reactor do not have a large impact on the objective. Hence, the solution for these “minor” decision can vary depending of the chosen tolerance and solver. If one is not satisfied with the pattern of the solution and the respective setting of the operation modes, one can implement further constraints that are inspired by daily operation such as minimum stay time constraints. This will avoid that equipment like the compressors switch their modes too frequently.

Towards a practical implementation, the efficiency of the optimization model can be further improved if more discrete variables are fixed by experience or external references. In this situation, however, the optimization model might represent more the reality of the current operation than revealing the potential improvements of the overall system, i.e., there is the risk of modeling the site-wide operation with all the constraints that are in practice regarded as constraints, but which potentially prevent the system to operate at an even better operating point.

An important point that needs to be addressed is the prediction of the prices of gas and electric power, as well as of the ambient temperature. If it is intended to take these into account, then precise predictions are necessary to adjust the operations in time. The fact that the optimizer in this contribution is aware of the exogenous influences over the complete horizon has to be kept in mind when interpreting and evaluating the results and potential savings.

## 8 Summary and future work

We first presented a generic MILP model for the optimization of the operations of coupled production plants that can have multiple units. The optimization model takes into account the storage tanks and the logistics of the site as well as demand side management. The model was parametrized for the petrochemical production site of INEOS in Köln, where four processing plants are physically coupled by a joint distribution network. For a scenario based on historic data, an optimization problem was formulated to generate a one month schedule for the operation. The solution of the optimization problem is in good agreement with the recorded operation of INEOS in Köln, since the relevant constraints for the operation of the network are captured in the model. We showed that there is a significant saving potential with respect to the power consumption for the deep-cooled storage tanks on site. The optimization model was solved by the two commercial solvers CPLEX and Gurobi, while the two open source alternatives failed. Gurobi found a solution with a slightly smaller MIP gap within an allowed time of one hour.

Future work includes the incorporation of educated guesses or estimations for the energy prices as well as the ambient temperature, since the required planning horizon is supposed to be longer than a reasonable prediction horizon of the energy market or the weather. In addition, to cope with the inherent uncertainty of train and ship schedules as well as unforeseen failures in the production, a moving horizon formulation and daily rescheduling is proposed. This can be extended by stochastic formulations (Sand and Engell 2004; Cui and Engell 2010). Another interesting aspect to study is the extension of the described network by more plants and possibly by connecting it to more shared resource networks such as steam or other base chemicals shared on site. Further, it can be interesting to apply distributed optimization algorithms such as market-based coordination in order to perform the optimization of coupled production plants that belong to different business units or companies that operate at large chemical sites or in industrial clusters as done by Wenzel et al. (2016) for coupled continuous plants.

## Footnotes

- 1.
For the sake of legibility of the implemented code we introduced a few redundant variables such as \(m^{(j)}_{r,TcX} =m^{(j)}_{r,Tc1} + m^{(j)}_{r,Tc2}\), which adds a few variables more to the problem. However, these redundancies are eliminated in the preprocessing of commercial solvers and do not influence the solution time significantly.

- 2.
Note that due to confidentiality considerations the authors are not allowed to share detailed sensitive data about the production schedule.

## Notes

### Acknowledgements

The project leading to this publication has received funding from the European Union’s Horizon 2020 research and innovation programme under Grant Agreement No. 723575 (CoPro) in the framework of the SPIRE PPP.

## References

- Baños R, Manzano-Agugliaro F, Montoya F, Gil C, Alcayde A, Gómez J (2011) Optimization methods applied to renewable and sustainable energy: a review. Renew Sustain Energy Rev 15(4):1753–1766CrossRefGoogle Scholar
- Belotti P, Kirches C, Leyffer S, Linderoth J, Luedtke J, Mahajan A (2013) Mixed-integer nonlinear optimization. Acta Numer 22(2013):1–131MathSciNetCrossRefzbMATHGoogle Scholar
- Bezanson J, Edelman A, Karpinski S, Shah VB (2017) Julia: a fresh approach to numerical computing. SIAM Rev 59(1):65–98MathSciNetCrossRefzbMATHGoogle Scholar
- Castro PM, Grossmann IE, Zhang Q (2018) Expanding scope and computational challenges in process scheduling. Comput Chem Eng 114:14–42CrossRefGoogle Scholar
- Cheung K-Y, Hui C-W (2004) Total-site scheduling for better energy utilization. J Clean Prod 12(2):171–184CrossRefGoogle Scholar
- Coin-OR (2018) Cbc.jl—interface to the coin-or cbc solver for mixed-integer programming. Github repository. https://github.com/JuliaOpt/GLPKMathProgInterface.jl, version 0.3.2. Accessed 20 July 2018
- Cui J, Engell S (2010) Medium-term planning of a multiproduct batch plant under evolving multi-period multi-uncertainty by means of a moving horizon strategy. Comput Chem Eng 34(5):598–619CrossRefGoogle Scholar
- Debnath KB, Mourshed M (2018) Forecasting methods in energy planning models. Renew Sustain Energy Rev 88:297–325CrossRefGoogle Scholar
- Deutscher Wetterdienst (2018) Temperaturaufzeichnung Station Köln-Stammheim. Data for a sample month retrieved in 2018Google Scholar
- Dunning I, Huchette J, Lubin M (2017) JuMP: a modeling language for mathematical optimization. SIAM Rev 59(2):295–320MathSciNetCrossRefzbMATHGoogle Scholar
- Engell S, Sonntag C (eds) (2016) Proposal of a European research and innovation agenda on cyber-physical systems of systems, 2016–2025. CPSoS EU Project. www.cpsos.eu/roadmap. Accessed 15 June 2018
- Gao X, Jiang Y, Chen T, Huang D (2015) Optimizing scheduling of refinery operations based on piecewise linear models. Comput Chem Eng 75:105–119CrossRefGoogle Scholar
- GLPK (GNU Linear Programming Kit) (2018) GLPKMathProgInterface.jl—interface between the GLPK.jl wrapper and MathProgBase.jl. Github repository. https://github.com/JuliaOpt/Cbc.jl, version 0.4.0. Accessed 20 July 2018
- Grossmann I (2005) Enterprise-wide optimization: a new frontier in process systems engineering. AIChE J 51(7):1846–1857CrossRefGoogle Scholar
- Grossmann IE (2012) Advances in mathematical programming models for enterprise-wide optimization. Comput Chem Eng 47:2–18CrossRefGoogle Scholar
- Hadera H, Labrik R, Mäntysaari J, Sand G, Harjunkoski I, Engell S (2016) Integration of energy-cost optimization and production scheduling using multiparametric programming. In: Eden MR, Ierapetritou MG, Towler GP (eds) Computer aided chemical engineering, vol 38. Elsevier, Amsterdam, pp 559–564Google Scholar
- Harjunkoski I, Maravelias CT, Bongers P, Castro PM, Engell S, Grossmann IE, Hooker J, Méndez C, Sand G, Wassick J (2014) Scope for industrial applications of production scheduling models and solution methods. Comput Chem Eng 62:161–193CrossRefGoogle Scholar
- Hulshof D, van der Maat J-P, Mulder M (2016) Market fundamentals, competition and natural-gas prices. Energy Policy 94:480–491CrossRefGoogle Scholar
- Hwangbo S, Lee S, Yoo C (2017) Optimal network design of hydrogen production by integrated utility and biogas supply networks. Appl Energy 208:195–209CrossRefGoogle Scholar
- Kermani M, Périn-Levasseur Z, Benali M, Savulescu L, Maréchal F (2017) A novel MILP approach for simultaneous optimization of water and energy: application to a Canadian softwood Kraft pulping mill. Comput Chem Eng 102:238–257CrossRefGoogle Scholar
- Khor CS, Chachuat B, Shah N (2014) Optimization of water network synthesis for single-site and continuous processes: milestones, challenges, and future directions. Ind Eng Chem Res 53(25):10257–10275CrossRefGoogle Scholar
- Leo E, Engell S (2018) Integrated day-ahead energy procurement and production scheduling. at-Automatisierungstechnik 66(11):950–963CrossRefGoogle Scholar
- Li D (2016) Perspective for smart factory in petrochemical industry. Comput Chem Eng 91:136–148CrossRefGoogle Scholar
- Liu S, Alhasan I, Papageorgiou LG (2016) A mixed integer linear programming model for the optimal operation of a network of gas oil separation plants. Chem Eng Res Des 111:147–160CrossRefGoogle Scholar
- Lund PD, Lindgren J, Mikkola J, Salpakari J (2015) Review of energy system flexibility measures to enable high levels of variable renewable electricity. Renew Sustain Energy Rev 45:785–807CrossRefGoogle Scholar
- Lv Z, Song Y, Chen C, Jiang B, Sun H, Lyu Z (2018) A novel step-by-step optimization method for interplant water networks. J Environ Manag 213:255–270CrossRefGoogle Scholar
- Margot F (2010) Symmetry in integer linear programming. Springer, Berlin, pp 647–686zbMATHGoogle Scholar
- Martí R, Sarabia D, Navia D, de Prada C (2013) A method to coordinate decentralized NMPC controllers in oxygen distribution networks. Comput Chem Eng 59:122–137CrossRefGoogle Scholar
- Más R, Pinto JM (2003) A mixed-integer optimization strategy for oil supply in distribution complexes. Optim Eng 4(1/2):23–64MathSciNetCrossRefzbMATHGoogle Scholar
- Mitra S, Sun L, Grossmann IE (2013) Optimal scheduling of industrial combined heat and power plants under time-sensitive electricity prices. Energy 54:194–211CrossRefGoogle Scholar
- Mitsos A, Asprion N, Floudas CA, Bortz M, Baldea M, Bonvin D, Caspari A, Schäfer P (2018) Challenges in process optimization for new feedstocks and energy sources. Comput Chem Eng 113:209–221CrossRefGoogle Scholar
- Neiro SM, Pinto JM (2005) Multiperiod optimization for production planning of petroleum refineries. Chem Eng Commun 192(1–3):62–88CrossRefGoogle Scholar
- Paraschiv F, Erni D, Pietsch R (2014) The impact of renewable energies on EEX day-ahead electricity prices. Energy Policy 73:196–210CrossRefGoogle Scholar
- Quaglia A, Sarup B, Sin G, Gani R (2013) A systematic framework for enterprise-wide optimization: synthesis and design of processing networks under uncertainty. Comput Chem Eng 59:47–62CrossRefGoogle Scholar
- Rodriguez MA, Corsano G, Vecchietti A, Montagna JM (2018) Simultaneous optimization of production planning and inventory management of polyurethane foam plant. Optim Eng 19(1):97–123MathSciNetCrossRefzbMATHGoogle Scholar
- Sand G, Engell S (2004) Modeling and solving real-time scheduling problems by stochastic integer programming. Comput Chem Eng 28(6–7):1087–1103CrossRefGoogle Scholar
- Sarabia D, de Prada C, Gómez E, Gutierrez G, Cristea S, Sola J, Gonzalez R (2012) Data reconciliation and optimal management of hydrogen networks in a petrol refinery. Control Eng Pract 20(4):343–354CrossRefGoogle Scholar
- Siano P (2014) Demand response and smart grids: a survey. Renew Sustain Energy Rev 30:461–478CrossRefGoogle Scholar
- Varma V, Reklaitis G, Blau G, Pekny J (2007) Enterprise-wide modeling & optimization: an overview of emerging research challenges and opportunities. Comput Chem Eng 31(5–6):692–711CrossRefGoogle Scholar
- Wassick JM (2009) Enterprise-wide optimization in an integrated chemical complex. Comput Chem Eng 33(12):1950–1963CrossRefGoogle Scholar
- Wenzel S, Paulen R, Stojanovski G, Krämer S, Beisheim B, Engell S (2016) Optimal resource allocation in industrial complexes by distributed optimization and dynamic pricing. at-Automatisierungstechnik 64(6):428–442CrossRefGoogle Scholar
- Wenzel S, Paulen R, Beisheim B, Krämer S, Engell S (2017) Market-based coordination of shared resources in cyber-physical production sites. Chemie Ingenieur Technik 89(5):636–644CrossRefGoogle Scholar
- Weron R (2014) Electricity price forecasting: a review of the state-of-the-art with a look into the future. Int J Forecast 30(4):1030–1081CrossRefGoogle Scholar
- Zhang Q, Grossmann IE (2016) Planning and scheduling for industrial demand side management: advances and challenges. In: Martín M (ed) Alternative energy sources and technologies: process design and operation, 1st edn. Springer, Basel, pp 383–414CrossRefGoogle Scholar
- Zhao H, Ierapetritou MG, Shah NK, Rong G (2017) Integrated model of refining and petrochemical plant for enterprise-wide optimization. Comput Chem Eng 97:194–207CrossRefGoogle Scholar

## Copyright information

**Open Access**This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.