A New Reactive Scheduling Approach for Short ... - ACS Publications

Nov 12, 2015 - Department of Computer Science, Lamar University, Beaumont, Texas. 77710, United States ... addressed on tank failure handling solution...
11 downloads 7 Views 2MB Size
Article pubs.acs.org/IECR

A New Reactive Scheduling Approach for Short-Term Crude Oil Operations under Tank Malfunction Shujing Zhang,† Sujing Wang,‡ and Qiang Xu*,† †

Dan F. Smith Department of Chemical Engineering and ‡Department of Computer Science, Lamar University, Beaumont, Texas 77710, United States ABSTRACT: A new reactive scheduling model in the form of FRS (full rescheduling strategy) for front-end crude oil operations has been developed. The reactive rescheduling model is triggered off across all the units at the time that tank malfunction is detected. As compared to the previous work (Ind. Eng. Chem. Res.. 2014, 53, 12502−12518) more practical features have been addressed on tank failure handling solutions: (i) failure tank leftover inventory will be first evacuated to a backup tank, and later on directed to downstream units, and (ii) failure tank leftover inventory will be immediately directed to its downstream units. Furthermore, comprehensive strategy analyses have been conducted on partial rescheduling strategy (PRS) and FRS to validate their respective pros and cons. It is found out from case studies that although FRS results in more operational costs than PRS due to an increased number of time events, FRS is more flexible and less susceptible to current scheduling results, which ensures more robust solution identification as compared to the rigid solution space defined by PRS which sometimes leads to operational infeasibility.

1. INTRODUCTION Crude scheduling is an important element in the supply chain management of crude refining, which determines such things as material movements between different units to blend on-spec crude mixes for downstream crude distillation units (CDUs). Historically, linear programming and mixed-integer linear programming (MILP) models have been applied to solve this kind of problems. However, they either cannot precisely capture the semicontinuous features of crude scheduling operations or are unable to illustrate the nonlinear blending process. Therefore, many researchers have put much effort into improving the crude scheduling models in the form of MINLP problems.2−7 Petroleum refineries become more and more susceptible to various uncertainties, which may significantly affect their operability and profitability. Typical uncertainties come from volatile crude market, product demand fluctuations, human operating errors, equipment malfunction, etc. Facing tremendous challenges on multiple fronts, refiners have to carefully examine every aspect of supply chain management (SCM) to improve their bottom lines under uncertainties. Crude oil scheduling is an important element of the refinery SCM, because it helps optimize crude movement at the refinery front end. However, because of the complexity of a refinery process, the handling of uncertainties during crude oil scheduling is a tough and high-risk task. Any unwise or delayed scheduling decisions may lead to dramatic failures such as under/ overinventory, facility upset/shutdown, or even safety accidents in addition to the heavy profit loss. Therefore, how to timely and effectively generate optimal schedules under various uncertainties is of great importance for crude oil scheduling operations. Available literatures generally imply two types of methods for handling uncertainties: proactive scheduling and reactive scheduling methods. Generally, the proactive scheduling method seeks to generate an inherently robust schedule © 2015 American Chemical Society

which can accommodate different uncertainties in the future, while the reactive scheduling method handles uncertainties in a responsive way and makes amendments as necessary. Comparably, reactive scheduling differentiates itself from proactive scheduling in the sense that it requires online generation of reschedule after an uncertainty is actually realized;8 whereas, proactive scheduling largely depends on probabilistic measures to generate a robust schedule assuming that the potential uncertainties have followed some patterns. By definition, an inherently robust schedule comprises both solution and model robustness which can be evaluated by particular performance indicators.9 Different proactive scheduling approaches are explored in the literature.10 To name a few, Li and Ierapetritou11 developed a preventive scheduling model for multiproduct batch plants using a parametric programming method. Cao et al.12 proposed a robust optimization model to address demand uncertainty for crude scheduling operations, but the generated schedules could not avoid composition discrepancies. A two-stage robust optimization model for crude oil scheduling problem was proposed by Wang and Rong13 to manage crude demand and ship delay uncertainties. In their work, two distinct approaches, chance-constrained and fuzzy logic programming, were employed to deal with demand uncertainty, while ship delay was addressed with a scenariobased approach. Similarly, composition discrepancies arose in scheduling results. To solve the Achilles’ heel that the robust schedules from proactive scheduling methods are not feasible under the nominal data, Ben and Nemirovski14−16 brought forth a robust optimization framework to address uncertain parameters in linear and quadratic programming problems. Li Received: Revised: Accepted: Published: 12438

September 3, 2015 October 28, 2015 November 12, 2015 November 12, 2015 DOI: 10.1021/acs.iecr.5b03278 Ind. Eng. Chem. Res. 2015, 54, 12438−12454

Article

Industrial & Engineering Chemistry Research

Figure 1. A schematic scope of the studied process.

et al.17 extended the robust optimization framework proposed by Lin et al.18 and Janak et al.19 for general MILP scheduling problems to crude scheduling and solved the robust optimization model to global optimality using a tailor-made branch-and-bound algorithm from Li et al.7 To increase the operational flexibilities of crude oil blending operations under uncertainty of crude delivery, Zhang et al.20 proactively embedded inventory-based flexibility indices into their multiobjective crude-oil blending and purchase planning model. For reactive scheduling on short-term crude oil operations, contributions are mainly put on heuristic techniques.21,22 The definition of heuristic search space largely affects the completeness and efficiency of solution identification. Sometimes, the defined search space may fail to find a feasible solution even when one exists. Moreover, heuristic-based procedures usually involve complex flowcharts illustrating possible corrective actions against specific uncertainties. Because of the domino effects, a disruption will incur a chain of reactions in the downstream operations. Realizing the aforementioned fact, Adhitya et al.23 developed a model-based rescheduling framework through sequentially searching three different types of graphs. It is claimed that this method inherits the computational efficiency of the heuristic method and meanwhile captures all alternative solutions with more completeness. Also, Vin and Ierapetritou24 proposed a reactive scheduling approach for multiproduct batch plants based on a two-stage methodology. The merit of this method lies in the fact that it systematically incorporates all rescheduling alternatives by excluding usage of any heuristics and fully utilizes the information extracted from the deterministic schedule, which ensures continuity between deterministic and reactive schedules. In reality, the crude-oil scheduling activities are frequently challenged by tank malfunction. When a tank malfunction occurs, the remaining crudes inside the tank should be evacuated to a backup or downstream unit before it can undertake any planned maintenance, which may disrupt the associated tank loading or unloading activities and cause the originally well set schedule operations suboptimal or even infeasible. Only a few references from the refinery scheduling realm have ever touched the uncertainties of tank malfunction, and almost all of them applied heuristics to some extent.25,21,23

Furthermore, the existing literature simply treated the unavailable tank as absent during maintenance time and the remaining crudes were kept intact. Zhang and Xu1 studied a partial-rescheduling strategy through fixing the operations that are scheduled ahead of detection time for the unaffected units and intercepting the ongoing operations for the affected units if any. In this approach, operations associated with good working and malfunctioning tanks are treated on different bases, which lead to a shrunken solution space and a higher chance of infeasibility. Thus, it is better to develop a new rescheduling model, which has a more flexible model structure and a wider solution space. In this paper, a new reactive scheduling model in the form of full rescheduling strategy (FRS) has been developed. The reactive rescheduling model is fully triggered off across all the units at the time that some tank malfunction is detected. More practical features have been modeled compared to previous studies including tank evacuation to a backup tank or downstream unit under malfunction. Furthermore, detailed strategy analyses have been conducted on partial rescheduling strategy (PRS) and FRS, to validate their respective pros and cons in terms of operational costs and robustness. The efficacy of the proposed rescheduling model has been demonstrated by different case studies.

2. PROBLEM STATEMENT As shown in Figure 1, the scope of the studied process consists of berths for vessels to dock and unload crude parcels, vessels shipping various grades of crudes, a tank farm composed of storage tanks (portside tanks), and charging tanks (refinery tanks), and CDUs for processing different crude blends into various intermediate or final products. To help better understand the developed reactive scheduling model, some terminologies are clarified as follows. Malfunctioning Tanks. Tanks that incidentally become unavailable because of mechanical problems during the execution of current schedule. Good Working Tanks. Tanks that perform their function correctly until the detection time point, even when other tank(s) become malfunctioning. Detection Time (Tdetect). The time point that some tank is identified to be malfunctioning, so that rescheduling has to be considered right away. 12439

DOI: 10.1021/acs.iecr.5b03278 Ind. Eng. Chem. Res. 2015, 54, 12438−12454

Article

Industrial & Engineering Chemistry Research Partial Rescheduling Strategy (PRS). Generally, any input or output operations that occur ahead of Tdetect will be considered as “executed tasks”. Their associated independent variables (binaries, volumes, and starting/ending time) during rescheduling will be assigned exactly the same as those of the current schedule solution. The critical scenario is that when Tdetect occurs during an input/output tank operation, PRS treats good working and malfunctioning tanks differently. As shown in Figure 2a, for a good working tank, PRS will let the operation

Given Information (1) shipping information including number of vessels, projected arrival time, and carried crude oil types/ volumes (2) key component fractions for crudes (3) storage and charging tank information including tank quantity, initial inventory/crude compositions, tank capacities, and segregation policies such as property index ranges (4) demands by CDUs for processing different crude mixtures from charging tanks (5) economic data, including demurrage cost (sea waiting cost), unloading cost, CDU changeover cost, and tank setup cost (6) lower/upper bounds on flow rates in crude transfer network Information To Be Determined (1) detailed unloading schedule for each vessel, including information on transfer connections, timings, and volumes (2) detailed transfer schedule of crude oils from storage tanks to charging tanks including transfer connections, timings, and volumes (3) detailed charging schedule of crude blends from charging tanks to CDUs, including transfer connections, timings, and volumes (4) inventory and crude composition profiles at each storage and charging tanks (5) reactive schedule after uncertainties are realized Operating Rules To Be Obeyed (1) parcel can be unloaded to at most one storage tank at a time event; however, it can be unloaded into multiple tanks across consecutive time events; (2) a storage or charging tank cannot simultaneously receive and send out crudes; (3) brine settling time is required for a storage or charging tank after each receipt of new crudes; (4) a charging tank can feed at most one CDU and a CDU can receive at most one feed from the charging tank at a time. Uncertainties (1) detection time point that a tank will soon become malfunctioning (3) duration allowed to evacuate a tank (4) maintenance duration given to fix a malfunctioning tank Assumptions (1) crude holdups in pipelines are negligible; (2) perfect mixing is assumed in any storage and charging tanks; (3) the time expense for CDUs’ operational changeover is negligible.

Figure 2. Illustration of (a) PRS and (b) FRS.

finish according to the current schedule solution even if a part of the scheduled operation is behind Tdetect; while for a malfunctioning tank, PRS will immediately take a new rescheduling solution right after the tank operation passes Tdetect. Full Rescheduling Strategy (FRS). FRS has a similar rescheduling strategy as PRS except that it treats good working and malfunctioning tanks equally when Tdetect occurs during an input/output tank operation. As shown in Figure 2(b), no matter whether it is a good working or malfunctioning tank, FRS will immediately take new rescheduling solution right after the scheduling time passes Tdetect. In summary, FRS will take the rescheduled solution after Tdetect instead of the originally scheduled operation when Tdetect occurs during an input/output operation of a good working tank. Meanwhile, FRS should have a larger solution space than PRS, thus FRS is believed to be more robust than PRS. On the basis of the above explanations, the studied scheduling problem for short-term crude oil operations can be stated as below.

3. REACTIVE SCHEDULING METHODOLOGY Figure 3 gives the methodology framework of the developed reactive scheduling approach. At the starting point, initial process/uncertainty data should be collected, based on which a deterministic scheduling model is set up and solved to obtain the current schedule. The deterministic scheduling model from an earlier publication1 will be adopted, which has been shown in the Appendix from eqs A1 through A61. During the implementation of the current schedule, if any tank becomes 12440

DOI: 10.1021/acs.iecr.5b03278 Ind. Eng. Chem. Res. 2015, 54, 12438−12454

Article

Industrial & Engineering Chemistry Research

Figure 3. General methodology framework.

tank capacities should be able to accommodate the total crude demand imposed by CDUs, and the vessel arrival time should be appropriate so that the tank safety stock is sufficient to provide CDU throughput. Regarding the uncertainty data, if the tank malfunction is detected at a very late point during the scheduling horizon, there is less room to adjust the unit connection and charging rate in order to satisfy the operation continuity and total crude demand of the CDU, which consequently leads to infeasibility. Also, model constraints should be free from logic conflicts. With respect to the solving method, since DICOPT is an extended version of outer approximation algorithm, a good starting point has to be provided through solving the NLP relaxation of the original MINLP problem.

malfunctioning, the rescheduling mechanism will be immediately triggered to generate an FRS model. Here, two types of tank failure handling scenarios will be addressed: (i) the leftover inventory of the accidental tank will be first evacuated to a designated backup tank, and later on it will be directed to a downstream process according to the FRS solution; or (ii) the leftover inventory of the accidental tank will be immediately directed to its downstream units according to the FRS solution. Note that different tank failure handling scenarios will generate different FRS models. As shown in Figure 3, two sets of FRS model equations have been provided. After an appropriate rescheduling model is identified, it will be solved to generate a new schedule which accommodates the tank mechanical malfunction; thus this new schedule will be implemented for the remaining scheduling time horizon. Using this mechanism, the reschedule solutions are seamlessly connected to the current scheduling solutions at Tdetect. Dynamically and iteratively, this approach conducts responsive rescheduling operations whenever there is any tank malfunction detected. If no tank is malfunctioning during the implementation of the current schedule, the current schedule will be executed until the end of the scheduling time horizon. At the end of the scheduling horizon, this mechanism will supposedly originate a new schedule from the very beginning. It should also be noted that each time a rescheduling model has been solved, and there is no feasible solution identified, troubleshooting will be carried out on three major sections: the initial process/uncertainty data, deterministic scheduling/ rescheduling models, and solving methods. For the process data, there should not be any inconsistencies, for example, the

4. SCHEDULING MODELS 4.1. Deterministic Scheduling Model on the First Stage. Since the related deterministic scheduling model has been published already,1 for convenience readers can refer to Appendix A for the summarized model equations. 4.2. Reactive Scheduling Model on the Second Stage. 4.2.1. Indicator Binary Variables. In this section, the FRS models are elaborated. First, three indicator binary variables: u(unt′,unt,n), v(unt′,unt,n), and w(unt′,unt,n) are defined to establish connections between the current schedule and reschedule. They help to determine which operations are regarded as executed based on the current schedule when a tank is detected to be malfunctioning, and thus those operations have to be exactly adopted in the reschedule; also, the binaries are used to identify those unimplemented 12441

DOI: 10.1021/acs.iecr.5b03278 Ind. Eng. Chem. Res. 2015, 54, 12438−12454

Article

Industrial & Engineering Chemistry Research operations in the current schedule, which could be reoptimized via rescheduling models. The first indicator binary variable u(unt′,unt,n) indicates whether or not a crude transfer starts before Tdetect. Note that the variables with suffix “l” represent the level values (i.e., optimal solution values) for variables in the current schedule. As observed in eqs 1 and 2, if u(unt′,unt,n) is equal to 1, due to the insertion of a small number ε (e.g., 1 × 10−5), the level value of starting time variable (Ts.l(unt′,unt,n)) will be smaller than Tdetect; otherwise, Ts.l(unt′,unt,n) will be equal to or larger than Tdetect with u(unt′,unt,n) = 0.

w(unt ′, unt , n) ⎧1, if T detect occurs during the crude transfer ⎪ = ⎨ from unt ′ to unt ⎪ ⎩ 0, otherwise

w(unt ′, unt , n) ≥ u(unt ′, unt , n) − v(unt ′, unt , n) ∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; unt ′ or unt ∈ SCT *; n ∈ N , n ≥ 1

⎧1, if a crude transfer from unt ′ to unt ⎪ starts before T detect u(unt ′, unt , n) = ⎨ ⎪ ⎩ 0, otherwise

w(unt ′, unt , n) ≤ u(unt ′, unt , n) ∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; unt ′ or unt ∈ SCT *; n ∈ N , n ≥ 1

T s. l(unt ′, unt , n) + ε − H(1 − u(unt ′, unt , n)) ≤ T detect ∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; n ∈ N , n ≥ 1

(6)

w(unt ′, unt , n) ≤ 1 − v(unt ′, unt , n) ∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; unt ′ (1)

or unt ∈ SCT *; n ∈ N , n ≥ 1

(7)

4.2.2. FRS Strategy. According to the underlying theory of FRS strategy, at the time that a tank is detected to become malfunctioning, a full rescheduling is triggered off across all units. Equations 8 and 9 define that the assignment variables X(unt′,unt,n) must assume the values from the current scheduling results, provided that the related operations are originally scheduled to happen before Tdetect. Likewise, eqs 10 and 11 imply that the starting time variables will be assigned the same values from the current scheduling results given that the related operations are originally scheduled ahead of Tdetect. Equation 12 establishes a scalar factor which is applied to calculate the volume of the part that is already executed before Tdetect, under the premise that the originally scheduled operation spans across Tdetect. Thus, eqs 13 and 14 define the intercepted transfer volume at Tdetect when Tdetect is in the middle of the operation. Similarly, eqs 15 and 16 achieve the same purpose for individual crude volumes transferred. If the operation has already finished before/at Tdetect, then the total volume and individual crude volume transferred must be fixed to the values from the current scheduling results. Hence, eqs 17 and 18 enforce this idea for total volumes transferred, and eqs 19 and 20 are designed for individual crude volumes transferred. Regarding the ending time variables, there are two possible scenarios. If the operation gets across detection time, then the ending time will be fixed to Tdetect as shown in eqs 21 and 22; otherwise, if the operation has been finished before/at Tdetect, the ending time will be designated the values from current scheduling results as revealed in eqs 23 and 24. Equation 25 constrains that any operations which have not occurred before Tdetect must take place after Tdetect, if it is selected in the reschedule.

T detect ≤ T s. l(unt ′, unt , n) + Hu(unt ′, unt , n) ∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; n ∈ N , n ≥ 1

(5)

(2)

The second indicator binary v(unt′,unt,n) is used to denote whether or not the ending time of an operation associated with the malfunctioning tank is larger than Tdetect. As noted in eqs 3 and 4: if v(unt′,unt,n) is equal to 1, Te.l(unt′,unt,n) will be less than or equal to Tdetect; otherwise, Te.l(unt′,unt,n) will be larger than Tdetect with v(unt′,unt,n) equal to 0. Note that SCT* represents the set of malfunctioning tanks. ⎧1, if a crude transfer from unt ′ to unt ⎪ v(unt ′, unt , n) = ⎨ is finished at/before T detect ⎪ ⎩ 0, otherwise

T e. l(unt ′, unt , n) − H(1 − v(unt ′, unt , n)) ≤ T detect ∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; unt ′oru nt ∈ SCT *; n ∈ N , n ≥1 (3)

T detect ≤ T e. l(unt ′, unt , n) + H ·v(unt ′, unt , n) − ε ∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; unt ′oru nt ∈ SCT *; n ∈ N , n ≥1 (4)

X . l(unt ′, unt , n) − (1 − u(unt ′, unt , n)) ≤ X(unt ′, unt , n)

The third indicator binary w(unt′,unt,n) is specially designed for tanks that become malfunctioning during the execution of a crude input or output operation, whose value is determined by the previous two indicator binaries together. Their logic relation is that only under the circumstance that u(unt′,unt,n) = 1 and v(unt′,unt,n) = 0, w(unt′,unt,n) will be equal to 1; otherwise, w(unt′,unt,n) will be equal to 0. To enforce the corresponding rationale, eqs 5 through 7 are formed.

∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; n ∈ N , n ≥ 1

(8)

X(unt ′, unt , n) ≤ X . l(unt ′, unt , n) + (1 − u(unt ′, unt , n)) ∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; n ∈ N , n ≥ 1 12442

(9)

DOI: 10.1021/acs.iecr.5b03278 Ind. Eng. Chem. Res. 2015, 54, 12438−12454

Article

Industrial & Engineering Chemistry Research

Figure 4. A schematic of rescheduling for tank evacuation to downstream units: (a) operations of SCT* in the current schedule; (b) identification of n*; (c) rescheduling with tank evacuation to downstream units.

V t(unt ′, unt , n) ≤ V t. l(unt ′, unt , n)

T s. l(unt ′, unt , n) − H(1 − u(unt ′, unt , n)) ≤ T s(unt ′, unt , n) ∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; n ∈ N , n ≥ 1

+ V t,up(1 − v(unt ′, unt , n)) (10)

∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; n ∈ N , n ≥ 1 (18)

T s(unt ′, unt , n) ≤ T s. l(unt ′, unt , n)

c

V . l(unt ′, unt , c , n) − V

+ H(1 − u(unt ′, unt , n))

t,up

(1 − v(unt ′, unt , n))

c

≤ V (unt ′, unt , c , n)

∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; n ∈ N , n ≥ 1

∀ unt ′ ∈ IUunt ; unt ∈ CT ∪ DU ; c ∈ C ; n ∈ N , n ≥ 1

(11)

(19)

β(unt ′, unt , n) = (T detect − T s. l(unt ′, unt , n))

V c(unt ′, unt , c , n) ≤ V c. l(unt ′, unt , c , n)

/(T e. l(unt ′, unt , n) − T s. l(unt ′, unt , n))

+ V t,up(1 − v(unt ′, unt , n))

∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; n ∈ N , n ≥ 1

∀ unt ′ ∈ IUunt ; unt ∈ CT ∪ DU ; c ∈ C ; n ∈ N , n ≥ 1

(12)

(20)

β(unt ′, unt , n)V t. l(unt ′, unt , n)w(unt ′, unt , n)

T detect − H(1 − w(unt ′, unt , n)) ≤ T e(unt ′, unt , n)

− V t,up(1 − w(unt ′, unt , n)) ≤ V t(unt ′, unt , n)

∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; n ∈ N , n ≥ 1

∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; n ∈ N , n ≥ 1

(21) (13)

t

T e(unt ′, unt , n) ≤ T detect + H(1 − w(unt ′, unt , n))

t

V (unt ′, unt , n) ≤ β(unt ′, unt , n)V . l(unt ′, unt , n)

∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; n ∈ N , n ≥ 1

w(unt ′, unt , n) + V t,up(1 − w(unt ′, unt , n))

(22)

∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; n ∈ N , n ≥ 1

e

T . l(unt ′, unt , n) − H(1 − v(unt ′, unt , n)) (14)

≤ T e(unt ′, unt , n)

c

β(unt ′, unt , n)V . l(unt ′, unt , c , n)w(unt ′, unt , n)

∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; n ∈ N , n ≥ 1

− V t,up(1 − w(unt ′, unt , n)) ≤ V c(unt ′, unt , c , n)

(23)

T e(unt ′, unt , n) ≤ T e. l(unt ′, unt , n)

∀ unt ′ ∈ IUunt ; unt ∈ CT ∪ DU ; c ∈ C ; n ∈ N , n ≥ 1 (15) c

+ H(1 − v(unt ′, unt , n))

c

V (unt ′, unt , c , n) ≤ β(unt ′, unt , n)V . l(unt ′, unt , c , n)

∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; n ∈ N , n ≥ 1

w(unt ′, unt , n) + V t,up(1 − w(unt ′, unt , n))

(24)

T detect ≤ T s(unt ′, unt , n) + H . u(unt ′, unt , n)

∀ unt ′ ∈ IUunt ; unt ∈ CT ∪ DU ; c ∈ C ; n ∈ N , n ≥ 1 (16) t

V . l(unt ′, unt , n) − V

+ H(1 − X(unt ′, unt , n))

t,up

(1 − v(unt ′, unt , n))

∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; unt ′, unt ∉ SCT *;

t

≤ V (unt ′, unt , n)

n ∈ N, n ≥ 1

∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; n ∈ N , n ≥ 1

(25)

4.2.3. Management Constraints for Tank Malfunction. 4.2.3.1. Evacuating Leftover Crudes to Downstream Units. If

(17) 12443

DOI: 10.1021/acs.iecr.5b03278 Ind. Eng. Chem. Res. 2015, 54, 12438−12454

Article

Industrial & Engineering Chemistry Research

Figure 5. Crude transfer network for case studies.

the leftover crudes are sent directly to downstream units, the initial conditions have to be determined in order to solve the rescheduling model. Since the scheduling model is built on a unit-specific time event, it is essential to identify the critical time event (n*) in which the tank malfunction is detected. Figure 4 shows the schematic of scheduling tank evacuation to downstream units, where three phases with two steps are involved. Equation 26 presents the logical formulation to identify the critical time event (n*). As noticed in this equation, assuming that in current scheduling results, there are some operations associated with the malfunctioning tank whose starting times are scheduled ahead of Tdetect, the operation with the latest starting time will mark the critical time event (n*); however, if there are no operations related to SCT* which start before Tdetect, then n* will be assigned to the initial time event (“0”).

T s(unt ′, unt , n) ≤ T detect + H(1 − X(unt ′, unt , n)) ∀ unt ′ ∈ SCT *; unt ∈ OUunt ; n ∈ N , n = n* + 1 ′ T detect + T evac − H(1 − X(unt ′, unt , n)) ≤ T e(unt ′, unt , n) ∀ unt ′ ∈ SCT *; unt ∈ OUunt ; n ∈ N , n = n* + 1 ′

∀ unt ′ ∈ SCT *; unt ∈ OUunt ; n ∈ N , n = n* + 1 (31) ′ After the tank is completely evacuated, an extra duration for mechanical maintenance is required to recover the tank function. As shown in eqs 32 and 33, the input and output operations related to the malfunctioning tank have to be arranged after the tank has been fixed. Also, eqs 34 and 35 show that the leftover volume inside the malfunctioning tank has to be evacuated completely, if possible; otherwise, a volume slack variable Vslk(unt′,unt,n) has been added to the constraint, which will be minimized in the objective function.

∨ min (T detect − T s. l(unt , unt ″ , n)) ≥ 0) n∈N ,n≥1

⎫ ∧ (X . l(unt ′, unt , n) = 1 ∨ X . l(unt ′, unt ″ , n) = 1)⎬ ⎭

T e(unt ′, unt , n) + T maint ≤ T s(unt ″ , unt ′, n′) + H(1 − X(unt ″ , unt ′, n′)) + H(1 − X (unt ′, unt , n))

(26)

Since the tank evacuation operation is supposed to follow immediately after the critical time event, eq 27 indicates that an evacuation operation has to be scheduled in the time event right behind the critical time event. Equations 28 and 29 enforce that the starting time of tank evacuation operation will be equal to Tdetect. Similarly, eqs 30 and 31 imply that the ending time of tank evacuation operation will be equal to Tdetect + Tevac.

∑ unt ∈ OUunt

∀ unt ′ ∈ SCT *; unt ∈ OUunt ; unt ″ ∈ IUunt ; n , n′ ′ ′ ∈ N , n = n* + 1, n < n′ (32)

T e(unt ′, unt , n) + T maint ≤ T s(unt ′, unt ″ , n′) + H(1 − X(unt ′, unt ″ , n′)) + H(1 − X (unt ′, unt , n)) ∀ unt ′ ∈ SCT *; unt ∈ OUunt ; unt ″ ∈ OUunt ; n , n′ ′ ′ ∈ N , n = n* + 1, n < n′

X(unt ′, unt , n) = 1, ′

∀ unt ′ ∈ SCT *; n ∈ N , n = n* + 1

(33) (27)

Inv sct(unt ′, n*) − V t,up(1 − X(unt ′, unt , n))

T detect − H(1 − X(unt ′, unt , n)) ≤ T s(unt ′, unt , n) ∀ unt ′ ∈ SCT *; unt ∈ OUunt ; n ∈ N , n = n* + 1 ′

(30)

T e(unt ′, unt , n) ≤ T detect + T evac + H(1 − X(unt ′, unt , n))

⎧ n* = ⎨n ( min (T detect − T s. l(unt ′, unt , n)) ≥ 0 ⎩ n∈N ,n≥1

∀ unt ′ ∈ IUunt ; unt ∈ SCT *; unt ″ ∈ OUunt

(29)

− Vslk(unt ′, unt , n) ≤ V t(unt ′, unt , n) ∀ unt ′ ∈ SCT *; unt ∈ OUunt ; n ∈ N , n = n* + 1 ′

(28) 12444

(34)

DOI: 10.1021/acs.iecr.5b03278 Ind. Eng. Chem. Res. 2015, 54, 12438−12454

Article

Industrial & Engineering Chemistry Research

Table 1. Deterministic Problem Data for Case Studies

V t(unt ′, unt , n) ≤ Inv sct(unt ′, n*) + V t,up(1 − X (unt ′, unt , n)) − Vslk(unt ′, unt , n)

scheduling horizon (H): 15 days no. of berths: 1 BST: 0.1 day

∀ unt ′ ∈ SCT *; unt ∈ OUunt ; n ∈ N , n = n* + 1 (35) ′ 4.2.3.2. Evacuating Leftover Crudes to Backup Tanks. If the leftover volume is sent to a backup tank, the malfunctioning tank has to wait until evacuation and maintenance operations have all been finished in order to start working again. Equation 36 enforces this logic.

Vessels vessel 1 vessel 2 vessel 3 Storage Tanks

T detect + T evac + T maint ≤ T s(unt ′, unt , n) + Hu(unt ′, unt , n) + H(1 − X (unt ′, unt , n)) ∀ unt ′ ∈ IUunt ;unt ∈ SCT ∪ DU ; unt ′∨unt ∈ SCT *;n ∈ N , n ≥ 1

(36)

∑ (TV s(v) − T arr(v)) v∈V

+C

uld

+C

cho

∑ (TV e(v) − TV s(v)) ∑





Z(unt ′, unt , n)

+ C set

[100, 900] [100, 1100] [100, 1100] [100, 1100] [100, 900] [100, 900] Capacity (Mbbl)

100% C4 100% C1 100% C2 100% C3 100% C5 100% C5 Initial Composition

CT CT CT CT

1 (for mixture X) 2 (for mixture Y) 3 (for mixture Z) 4 (for mixture W) Crude Mixtures

[0, [0, [0, [0,

100% C6 100% C7 100% C8 100% C5 Demand (Mbbl)

X Y Z W







X(unt ′, unt , n)

unt ′∈ IUunt unt ∈ SCT n ∈ N , n ≥ 1

+P







unt ′∈ SCT * unt ∈ OUunt n ∈ N , n ≥ 1 ′

Crude Types

Vslk(unt ′, unt , n)

C1 C2 C3 C4 C5 C6 C7 C8 unloading flow rate (Mbbl/day)

(37)

5. CASE STUDIES The developed reactive scheduling models have been demonstrated through an industrial-size crude oil scheduling example. All case studies are developed and solved in GAMS v23.9.126 on Intel 3.4 GHz Windows PC with 16.0 GB memory. The optimization solver DICOPT27 is adopted to solve the resulting nonconvex MINLP problems, with CPLEX28 and CONOPT329 employed as the subsolvers for MILP and NLP subproblems, respectively. The studied crude oil scheduling problem consists of three single-parcel vessels carrying their respective crudes, a single docking berth, six storage tanks (st), four charging tanks (ch), and three CDUs (cdu), and the detailed crude transfer network is presented in Figure 5. The specified scheduling time horizon is 15 days, and eight different crudes and one blending quality index (i.e., the key component 1 refers to sulfur content as shown in Table 1. Note that the related problem data are given in Table 1. 5.1. Case 1: Evacuating Leftover Crudes to a Backup Unit vs to Downstream Units. In this case, it is assumed that at Tdetect = day 1.6, ch2 is detected to be malfunctioning, and two different scenarios are considered, which includes either evacuating the leftover crudes to a backup tank or to the downstream CDUs before ch2 goes through any maintenance actions. For the scenario of evacuation to backup tanks, the unavailable duration is 1.5 days, and for evacuation to downstream units, the prespecified evacuation time (T evac) is 0.5 day and required maintenance time (T maint) is 1 day.

100% C1 100% C2 100% C3 Initial Composition

1 2 3 4 5 6 Charging Tanks

v∈V

unt ′∈ IUunt unt ∈ DU n ∈ N , n ≥ 1

Crude Composition

ST ST ST ST ST ST

4.2.4. Objective Function. A new objective function with the penalization of slack variables is constructed as in eq 37. minimizeC sea

Arrival Time (Day) 0 5 10 Capacity (Mbbl)

charging flow rate (Mbbl/day) unloading cost ($/day) storage tank inventory cost [$/day.Mbbl] CDU changeover cost ($)

800] 800] 800] 800] Key Component 1 [0.030, 0.035] [0.035, 0.050] [0.050, 0.065] [0.060, 0.080] Key Component 1 0.03 0.05 0.065 0.031 0.075 0.0317 0.0483 0.0633 [0, 500]

Volume (Mbbl) 600 600 600 Initial Inventory (Mbbl) 600 100 500 400 300 600 Initial Inventory (Mbbl) 50 500 300 300

500 600 600 600

intertank transfer flow rate (Mbbl/day)

[0, 500]

[20, 500] Economic Data 10,000 demurrage cost ($/day) 40 charging tank inventory cost [$/day.Mbbl] 50,000 intertank transfer setup cost ($)

5,000 80

25,000

As observed in Figure 6, at day 1.6, ch2 right finishes the brine settling process due to input transfer from st2 at time event 2. Since the scheduling strategy adopted is FRS, at day 1.6, all ongoing operations are intercepted, and the remaining scheduling horizon starting from day1.6 is reoptimized. In Figure 7a, it is obviously seen that a lot of disruptions are reflected on the charging operations. For CDU1, at day 1.6, the original charging operation from ch1 at time event 2 is broken proportionally into two individual parts at time event 2 and 3. However, the timing and volume variables have retained the same values as before. As with CDU2, at day 1.6, a new charging operation is inserted with different timing and volume 12445

DOI: 10.1021/acs.iecr.5b03278 Ind. Eng. Chem. Res. 2015, 54, 12438−12454

Article

Industrial & Engineering Chemistry Research

Figure 6. Gantt chart for current scheduling results.

$1,086,000. The reason is that one more column changeover has been introduced in the evacuation to downstream CDUs; and also, because the leftover crudes have not been completely emptied, a large penalty has been multiplied. The final computational times for case 1(a) and case 1(b) are 3.39 and 25.26 s, respectively. 5.2. Case 2: FRS vs PRS Regarding Operational Costs. In this case, it is assumed that at day 0.5, ch2 is detected to be malfunctioning, 0.5 day is allowed for evacuation to the downstream CDUs, and also, 1 day is required for maintenance. Reviewing the results from PRS and FRS, it is observed that more deviations from the current schedule are incurred by FRS compared with PRS. As seen in Figure 8a, the whole schedule is cut off at Tdetect and rescheduling is conducted correspondingly. Whether the tanks involved in operations are good working tanks or not, the operations executed before Tdetect are recorded as completed parts, and the associated time events have been used up. If any operations following Tdetect need to be scheduled, new time events will be activated. Figure 8a shows that starting from Tdetect, all CDUs have introduced new charging blocks with totally different timing/volume variables from current scheduling results, which also results in subsequent changes in input transfers to the related charging tanks and furthermore the upstream unloading operations. Whereas in PRS, operations not involving the malfunctioning tank are treated as executed as long as they start before Tdetect, which prevents too many operational modifications with respect to time events; thus, it decreases the deviations between reschedule and current schedule. As revealed in Figure 8b, all charging operations for CDUs except CDU1 at time event 1 are kept the same as the current scheduling results. Also, the parcel unloading from parcel 1 to st2 at time event 1 and the crude transfer from st1 to ch1 at time event 1 are kept the same as the current schedule.

variables from ch3 at time event 2. After this, another new charging operation with different timing and volume variables from ch2 at time event 3 is appended, following which a final charging operation from ch3 at time event 6 is added to occupy the remaining time. With the aforementioned rearrangements on CDU2, the material movements associated with CDU3 have made responsive modifications. As examined, at day 1.6, the charging operation from ch4 is reallocated to a different ending time, after which an input transfer from ch3 with different timing and volume variables is scheduled. Subsequently, a new input transfer from ch4 with different starting time is assigned to the remaining scheduling horizon. As a result of the restructuring of charging operations, the input transfers to charging tanks are also redistributed to different time intervals, as indicated for ch3 and ch4. Especially, ch3 changes input source to st3 instead of st4 in the original schedule. Because of the propagation of effects, parcel unloading operations to st3 and st4 also assume different time events but at the same time intervals. For evacuation to downstream units, as noted in Figure 7b, there is an extra charging operation scheduled from ch2 to CDU1 at time event 3. With this, the input transfer from ch1 at time event 4 is pushed later to a different starting time comparing with the backup scenario. Similarly, CDU2 has incorporated many revisions from current scheduling results, all of which possess different timing and volume variables. As a domino effect, this has led to corresponding modifications of CDU3 with different charging blocks taking up the remaining scheduling horizon after Tdetect. Also, the input transfers with ch3 and ch4 are modified to different time intervals. Similarly, the parcel unloading operations to st3 and st4 have been modified, accordingly. In a nutshell, the evacuation to downstream CDUs has resulted in a total cost of $1,367,000 as compared to the evacuation to backup tanks which has an operating cost of 12446

DOI: 10.1021/acs.iecr.5b03278 Ind. Eng. Chem. Res. 2015, 54, 12438−12454

Article

Industrial & Engineering Chemistry Research

Figure 7. Gantt charts for leftover crudes evacuated to (a) a backup tank and (b) downstream CDUs.

In summary, the operational cost for PRS is estimated to be $1,204,276.46 which represents 4.95% savings compared with FRS ($1,267,000). As with the computational time, FRS needs 2.29 s, and PRS consumes 1.47 s to find the optimal solution. 5.3. Case 3: Solution Space of FRS vs PRS. In this case, different detection times are examined for FRS and PRS assuming that the leftover crudes of ch2 will be sent to downstream units at Tdetect, with Tevac = 0.5 day and Tmaint = 1 day. Figure 9 presents the feasibility study of FRS and PRS under different detection times, where the y-axis denotes the inventory level of ch2 in current scheduling results, and x-axis refers to different detection time points. Note that the green shades depict the region that feasible solutions exist, and the red shades indicate that no feasible solutions are found. Because of the online implementation feature of reactive scheduling, infeasibility is dependent on whether or not the commercial

solver can identify a feasible solution within a reasonable amount of time. As shown in Figure 9a, under the investigated case study, PRS can only find feasible solutions within a small range of Tdetect values (day 0.5−day 1.0), while FRS is able to identify solutions in a much wider range (day 0−day 8.1). The reason lies in the fact that PRS follows all of the operations of goodworking tanks that happen before Tdetect from the current schedule, which loses opportunities for nimble responses and also largely restricts the solution space for rescheduling. In other words, PRS strategy has a lack of robustness, which sometimes leads to the consequence that the rescheduling model fails to find any feasible solution under certain detection times. For instance, when ch2 breaks down at day 1.1, and a downstream evacuation is projected to be scheduled. The Gantt chart for current schedule (Figure 6) shows that with PRS 12447

DOI: 10.1021/acs.iecr.5b03278 Ind. Eng. Chem. Res. 2015, 54, 12438−12454

Article

Industrial & Engineering Chemistry Research

Figure 8. Gantt charts for FRS vs PRS under tank evacuation to downstream units: (a) FRS results; (b) PRS results.

time horizon until the end (day 15), even FRS can no longer achieve solution feasibility. This problem may be resolved by the introduction of rolling forward time horizon, which allows the extension of the overall scheduling horizon forward to a fixed time duration starting from the detection time of tank malfunction. As the next stage of our work, a FRS methodology coupling the rolling forward time horizon will be developed. Regarding the computation time, Table 2 reveals that the maximum time for FRS to identify the optimum solution is around 494 s (∼8 min), and the others are below 100 s.

strategy, it is impossible to schedule an immediate evacuation from ch2 to either cdu1 or cdu2, because ch1 has been feeding cdu1 from day 1.0 which is ahead of the detection time (day 1.1) and ch3 has been feeding cdu2 from day 0 to day 8.12. Comparatively, FRS can utilize the time events more flexibly, which facilitates the optimization of material movements under different detection times of tank malfunction and also produces a larger search space for identification of rescheduling solutions. However, as Tdetect approaches the end of current scheduling horizon, more crude operations have been fixed, which results in less resiliency for schedule adjustments and thus, operational feasibility is difficult to maintain. As shown in the red shaded region of Figure 9b, when Tdetect is shifted toward the period where the charging operation from ch2 occupies the remaining

6. CONCLUDING REMARKS In this paper, a new reactive scheduling model in the form of FRS for front-end crude oil operations has been developed. The 12448

DOI: 10.1021/acs.iecr.5b03278 Ind. Eng. Chem. Res. 2015, 54, 12438−12454

Article

Industrial & Engineering Chemistry Research

case studies that although FRS results in more operational cost than PRS due to more revisions introduced, FRS is more flexible and less susceptible to current scheduling results, which ensures more robust solution identification compared to the rigid solution space defined by PRS which leads to inherent operational infeasibility.



APPENDIX: UNIT-SPECIFIC EVENT-BASED MODEL FOR DETERMINISTIC SCHEDULING

a. Objective Function

The objective of the crude scheduling problem is to minimize the total operational costs as shown in eq A1, where the first item represents vessel demurrage cost, and the second term refers to the vessel unloading cost. The third and fourth term denote CDU changeover and unit setup costs, respectively. minimizeC sea

∑ (TV s(v) − T arr(v)) v∈V

+C

uld

+C

cho

∑ (TV e(v) − TV s(v)) v∈V







Z(unt ′, unt , n)

unt ′∈ IUunt unt ∈ DU n ∈ N , n ≥ 1

+ C set







X(unt ′, unt , n)

unt ′∈ IUunt unt ∈ SCT n ∈ N , n ≥ 1

(A1)

b. Integrality Constraints for Operating Practices Figure 9. Feasibility studies under different T results; (b) FRS results.

detect

The binary variable of X(unt′,unt,n) is used to denote whether or not a unit (unt′) transfers crudes to another unit (unt) during time event n. As shown in eq A2, no simultaneous input and output are allowed for a tank at the same time event n. Equation A3 restricts that a parcel p can be unloaded to no more than one storage tank at the same time event n; and eq A4 enforces that at time event n, a storage tank can receive at most B parcels depending on the number of available berths. Equations A5 and A6 impose that a storage tank can send out crudes to at most one charging tank or a charging tank can receive feed from at most one storage tank at the same time event, respectively. Equations A7 and A8 express that at a time event, one charging tank can send out crudes to at most one CDU, and a CDU can accept at most one charging tank feed.

values: (a) PRS

Table 2. Computational Results for Case 3 under Different Detection Times solution time (s) Tdetect (day)

PRS

FRS

0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5

2.62 8.02 a a a a a a a a a a a a a a a

494.34 50.61 23.06 17.49 14.57 2.06 15.66 9.49 12.20 2.82 2.47 4.24 3.21 21.64 98.61 34.09

X(unt ′, unt , n) + X(unt , unt ″ , n) ≤ 1 ∀ unt ′ ∈ IUunt ; unt ∈ SCT ; unt ″ ∈ OUunt ; n ∈ N , n ≥ 1 (A2)



X(unt , unt ′, n) ≤ 1, ∀ unt ∈ P ; n ∈ N , n ≥ 1

unt ′∈ OUunt

(A3)



a

X(unt ′, unt , n) ≤ B , ∀ unt ∈ ST ; n ∈ N , n ≥ 1

unt ′∈ IUunt

a

The time limit (1800 s) has been exceeded and no feasible integer solution has been found.

(A4)



reactive rescheduling model is fully triggered across all the units at the time that a tank malfunction is detected. As compared to the previous work, more practical features have been incorporated such as tank evacuation to a backup tank or downstream units under mechanical malfunction. Furthermore, detailed strategy analyses have been conducted on PRS and FRS, to validate their respective trade-offs. It is found out from

X(unt , unt ′, n) ≤ 1, ∀ unt ∈ ST ; n ∈ N , n ≥ 1

unt ′∈ OUunt

(A5)



X(unt ′, unt , n) ≤ 1, ∀ unt ∈ CT ; n ∈ N , n ≥ 1

unt ′∈ IUunt

(A6) 12449

DOI: 10.1021/acs.iecr.5b03278 Ind. Eng. Chem. Res. 2015, 54, 12438−12454

Article

Industrial & Engineering Chemistry Research



e. Time Constraints for Parcels Unloaded Across Multiple Time Events

X(unt , unt ′, n) ≤ 1, ∀ unt ∈ CT ; n ∈ N , n ≥ 1

unt ′∈ OUunt

Equation A17 enforces that if parcel p is unloaded during time event n but not n + 1, then it must have been completely uploaded at the end of time event n. Equation A18 constrains that if parcel p is unloaded in two consecutive time events (e.g., n and n + 1), then it must have some leftover volume at the end of time event n. Equation A19 shows that each parcel shall finish uploading during the entire scheduling horizon. Equation A20 denotes the situation that parcel p has to be completely unloaded no later than the last time event “N”. Equation A21 ensures that the starting time of unloading parcels at time event n + 1 should follow right after the ending time of their scheduled unloading operations at preceding time event n.

(A7)



X(unt ′, unt , n) ≤ 1, ∀ unt ∈ DU ; n ∈ N , n ≥ 1

unt ′∈ IUunt

(A8)

c. Transportation Capacity Constraints

The total volume transferred during an operation should be constrained within the lower and upper bounds as shown in eq A9, where “S” is usually a small number to enforce nonzero volume once an operation is selected, and “M” is chosen as an upper bound of the total transferred crude volume. SX (unt ′, unt , n) ≤ V t(unt ′, unt , n) ≤ MX (unt ′, unt , n)



Bpe(unt , n) ≥

∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; n ∈ N , n ≥ 1



(A9)



X(unt , unt ″ , n + 1)

unt ″∈ OUunt

As shown in eqs A10 and A11, if a storage or charging tank is selected for a transportation, the total volume transferred will be constrained by the product of flow rate lower/upper bounds and the transfer time duration; otherwise, the constraints should be relaxed.

∀ unt ∈ P ; n ∈ N , 1 ≤ n < |N |



Bpe(unt , n) ≤ 2 − (

(A17)

X(unt , unt ′, n))

unt ′∈ OUunt

F lo(unt ′, unt )(T e(unt ′, unt , n) − T s(unt ′, unt , n))

+



X(unt , unt ″ , n + 1))

unt ″∈ OUunt

lo

− F (unt ′, unt )H(1 − X(unt ′, unt , n))

∀ unt ∈ P ; n ∈ N , 1 ≤ n < |N |

≤ V t(unt ′, unt , n),



∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; n ∈ N , n ≥ 1 (A10)

(A18)

Bpe(unt , n) = 1, ∀ unt ∈ P (A19)

n ∈ N ,1 < n

V t(unt ′, unt , n) ≤ F up(unt ′, unt )(T e(unt ′, unt , n)

Bpe(unt , n) ≥

− T s(unt ′, unt , n)) + F up(unt ′, unt )H



X(unt , unt ′n),

unt ′∈ OUunt

∀ unt ∈ P ; n = ′N ′

(1 − X(unt ′, unt , n)), ∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; n ∈ N , n ≥ 1

(A20)

T s(unt , unt ′, n + 1) ≥ T e(unt , unt ″ , n)

(A11)

− H(1 − X(unt , unt ″ , n))

d. Time Constraints for Vessel Unloading

∀ unt ∈ P ; unt ′, unt ″ ∈ OUunt ; n ∈ N , 1 ≤ n < |N |

Equations A12 and A13, respectively, calculate the starting/ ending time of parcel unloading. Equation A14 defines the unloading sequence of parcels under the circumstance that only one berth is available, that is, a parcel which arrives later should start unloading after all the other parcels arriving earlier have been completely unloaded. Equations A15 and A16 identify the starting/ending time of vessel unloading, respectively.

(A21)

f. Time Constraints for Storage and Charging Tanks

As shown in eqs A22 through A25, tank operations should follow the way that any input or output operations of a tank at time event n + 1 should start after those operations for the same tank at time event n. Specifically, each output operation from a tank should wait until brine is settled as revealed in eq A23.

TP s(unt ) ≤ T s(unt , unt ′, n) + H(1 − X(unt , unt ′, n)) ∀ unt ∈ P ; unt ′ ∈ OUunt ; n ∈ N , n ≥ 1

T s(unt ′, unt , n + 1) ≥ T e(unt , unt ″ , n)

(A12)

TP e(unt ) ≥ T e(unt , unt ′, n) − H(1 − X(unt , unt ′, n))

− H(1 − X(unt , unt ″ , n)) ∀ unt ′ ∈ IUunt ; unt ∈ SCT ; unt ″ ∈ OUunt ; n ∈ N ,

∀ unt ∈ P ; unt ′ ∈ OUunt ; n ∈ N , n ≥ 1 (A13) s

X(unt , unt ′, n)

unt ′∈ OUunt

1 ≤ n < |N |

(A22)

e

TP (unt ) ≥ TP (unt ′), ∀ unt , unt ′ ∈ P , unt > unt ′; n ∈ N , n ≥ 1 s

s

e

e

TV (v) ≤ TP (unt ), ∀ v ∈ V ; unt ∈ Pv TV (v) ≥ TP (unt ), ∀ v ∈ V ; unt ∈ Pv

T s(unt , unt ′, n + 1) ≥ T e(unt ″ , unt , n) (A14)

− H(1 − X(unt ″ , unt , n)) + BSTX (unt ″ , unt , n)

(A15)

∀ unt ∈ SCT ; unt ′ ∈ OUunt ; unt ″ ∈ IUunt ; n ∈ N ,

(A16)

1 ≤ n < |N | 12450

(A23) DOI: 10.1021/acs.iecr.5b03278 Ind. Eng. Chem. Res. 2015, 54, 12438−12454

Article

Industrial & Engineering Chemistry Research

T e(unt ′, unt , n) − T s(unt ′, unt , n) ≤ HX (unt ′, unt , n)

T s(unt ′, unt , n + 1) ≥ T e(unt ″ , unt , n)

∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; n ∈ N , n ≥ 1

− H(1 − X(unt ″ , unt , n))

(A31)

∀ unt ′, unt ″ ∈ IUunt ; unt ∈ SCT ; n ∈ N , 1 ≤ n < |N |

i. CDU Changeover Constraints

(A24)

s

A 0−1 continuous variable Z(unt′,unt,n) is defined to denote whether or not a CDU switches feeds between charging tanks from time event n to n + 1. As shown, it is applied in eqs A32 and A33 to record the number of CDU changeovers, which is implemented in the objective function to calculate the column changeover cost.

e

T (unt , unt ′, n + 1) ≥ T (unt , unt ″ , n) − H(1 − X(unt , unt ″ , n)) ∀ unt ∈ SCT ; unt ′, unt ″ ∈ OUunt , unt ′ ≠ unt ″ ; n ∈ N,

1 ≤ n < |N |

(A25)

Z(unt ′, unt , n) ≥ X (unt ′, unt , n) − X (unt ′, unt , n + 1)

g. Time Constraints for CDUs

∀ unt ′ ∈ IUunt ; unt ∈ DU ; n ∈ N , 1 ≤ n < |N |

As shown in eqs A26 and A27, for a particular CDU, the starting time of potential feeding operations at time event n + 1 follow immediately after the ending time of scheduled feeding operations at time event n. Also, as shown in eq A28, a CDU must be continuously operated during the entire scheduling time horizon (H). It is possible that a CDU operation may skip certain time events, and have physically continuous operations at non-successive time events as long as the durations of those skipped time events are zeros. If so, eq A29 expresses that the starting time of any feeding operations to a CDU at a later time event (n′) should be arranged behind the ending time of scheduled charging operations at an earlier time event n (n < n′).

(A32)

Z(unt ′, unt , n) ≥ X (unt ′, unt , n + 1) − X (unt ′, unt , n) ∀ unt ′ ∈ IUunt ; unt ∈ DU ; n ∈ N , 1 ≤ n < |N | (A33)

j. Material Balance Constraints for Parcels

Equation A34 constrains that each parcel will be completely unloaded during the scheduling time horizon. Equation A35 indicates that if a parcel is completely unloaded at the end of time event n, its leftover volume at the end of time event n should be zero.



T s(unt ′, unt , n + 1) ≥ T e(unt ″ , unt , n)

Inv p(unt , n) ≤ Inv 0(unt )(1 − Bpe(unt , n)),

(A26)

∀ unt ∈ P ; n ∈ N , n ≥ 1

T s(unt ′, unt , n + 1) ≤ T e(unt ″ , unt , n) ∀ unt ′, unt ″ ∈ IUunt ; unt ∈ DU ; n ∈ N ,



(A27)

(T e(unt ′, unt , n) − T s(unt ′, unt , n))

Inv p , c(unt , c , n) = Inv p , c(unt , c , n − 1)

unt ′∈ IUunt n ∈ N , n ≥ 1

= H,

∀ unt ∈ DU

(A35)

Equation A36 calculates the leftover parcel volume at the end of time event n by subtracting the out-flowing volume of crudes during time event n. Equation A37 establishes the initial inventory of each crude from each parcels, and eq A38 sets that the summation of individual crude inventories is equal to the total parcel inventory.

+ H(1 − X(unt ″ , unt , n))



(A34)

∀ unt ∈ P

∀ unt ′, unt ″ ∈ IUunt ; unt ∈ DU ; n ∈ N ,

1 ≤ n < |N |

V t(unt , unt ′, n) = Inv 0(unt ),

unt ′∈ OUunt n ∈ N , n ≥ 1

− H(1 − X(unt ″ , unt , n))

1 ≤ n < |N |





(A28)



V t(unt , unt ′, n)f vol,p (unt , c)

unt ′∈ OUunt

T s(unt ′, unt , n′) ≥ T e(unt ″ , unt , n)

∀ unt ∈ P ; c ∈ C ; n ∈ N , n ≥ 1

− H(1 − X(unt ″ , unt , n))

Inv p , c(unt , c , n) = Inv 0(unt )f vol,p (unt , c),

∀ unt ′, unt ″ ∈ IUunt ; unt ∈ DU ; n′, n ∈ N , 1 ≤ n < n′

(A36)

∀ unt ∈ P ; c ∈ C ; n = ′0′

(A29)

Inv p(unt , n) =

h. Auxiliary Time Constraints

A straightforward constraint is that the ending time of a transfer should be larger than its corresponding starting time as shown in eq A30. Equation A31 imposes that empty time intervals will be enforced for operations that are not selected.

(A37)

∑ Inv p,c(unt , c , n), ∀ unt ∈ P ; n ∈ N c∈C

(A38)

k. Material Balance Constraints for Tanks

Equation A39 expresses that the inventory of crude c inside a storage/charging tank at the end of time event n is equal to the inventory at time event n − 1 adjusted by inflow/outflow of crude c during time event n. Equation A40 establishes the initial inventories for each storage/charging tanks.

T e(unt ′, unt , n) ≥ T s(unt ′, unt , n), ∀ unt ′ ∈ IUunt ; unt ∈ SCT ∪ DU ; n ∈ N , n ≥ 1 (A30) 12451

DOI: 10.1021/acs.iecr.5b03278 Ind. Eng. Chem. Res. 2015, 54, 12438−12454

Article

Industrial & Engineering Chemistry Research

V c(unt , unt ′, c , n) = V t(unt , unt ′, n)f vol,n (unt , c , n − 1)

Inv sct,c(unt , c , n) = Inv sct,c(unt , c , n − 1)



+

V c(unt ′, unt , c , n)

∀ unt ∈ SCT ; unt ′ ∈ OUunt ; c ∈ C ; n ∈ N , n ≥ 1

unt ′∈ IUunt





(A47) c

V (unt , unt ″ , c , n)

l. Variable Bounds

All continuous variables are assigned their respective lower and upper bounds as shown in eqs A48 through (A61).

unt ″∈ OUunt

∀ unt ∈ SCT ; c ∈ C ; n ∈ N , n ≥ 1 Inv

sct,c

0

(unt , c , n) = Inv (unt )f

vol,0

(A39)

(unt , c),

∀ unt ∈ SCT ; c ∈ C ; n = ′0′

(A40)

Equation A41 gives the total inventory of a storage or charging tank at the end of time event n, which is equal to the summation over individual crude inventories inside the tank. Similarly, as shown in eq A42, the total crude volume transferred by an output operation from a storage or charging tank is equal to the summation over transferred volumes of individual crudes. sct

Inv (unt , n) =

∑ Inv

sct,c

(unt , c , n),

∀ unt ∈ SCT ; n ∈ N V (unt , unt ′, n) =

∑V

(A41) c

(unt , unt ′, c , n),

c∈C

∀ unt ∈ SCT ; unt ′ ∉ OUunt ; n ∈ N , n ≥ 1

(A42)

Equation A43 specifies demands of crude mixes from different charging tanks. Equation A44 calculates inventories of key components (e.g., sulfur content) for charging tanks at the end of time event n, and eq A45 enforces the allowable ranges for key components inside charging tanks.





(A48)

0 ≤ Inv sct(unt , n) ≤ Inv up(unt )

(A49)

0 ≤ Inv p , c(unt , c , n) ≤ Inv 0(unt )

(A50)

0 ≤ Inv sct,c(unt , c , n) ≤ Inv up(unt )

(A51)

0 ≤ V t(unt ′, unt , n) ≤ V t,up

(A52)

0 ≤ V c(unt ′, unt , c , n) ≤ V t,up

(A53)

0 ≤ f vol,n (unt , c , n) ≤ 1

(A54)

arr

s

arr

e

T (v) ≤ TV (v) ≤ H

c∈C

t

0 ≤ Inv p(unt , n) ≤ Inv 0(unt )

T (v) ≤ TV (v) ≤ H

(A56)

0 ≤ TP s(unt ) ≤ H

(A57)

0 ≤ TP e(unt ) ≤ H

(A58)

0 ≤ T s(unt ′unt , n) ≤ H

(A59)

0 ≤ T e(unt ′unt , n) ≤ H

(A60)

0 ≤ Z(unt ′unt , n) ≤ 1

(A61)

In summary, eqs A1 through A61 comprise the deterministic scheduling model based on continuous time formulation with unit-specific time events. The bilinear terms in eqs A46 and A47 render the MINLP scheduling model to be nonconvex in nature.

V t(unt , unt ′, n) = FD(unt ),



unt ′∈ OUunt n ∈ N , n ≥ 1

(A43)

∀ unt ∈ CT

(A55)

AUTHOR INFORMATION

Corresponding Author

Inv ct, k(unt , k , n) =

*Tel.: 409-880-7818. Fax: 409-880-2197. E-mail: Qiang.xu@ lamar.edu.

∑ f com (c , k)Inv sct,c(unt , c , n), c∈C

∀ unt ∈ CT ; k ∈ K ; n ∈ N

(A44)

Notes

(A45)

ACKNOWLEDGMENTS This work was supported in part by Texas Air Research Center (TARC) and Graduate Student Scholarship from Lamar University.

The authors declare no competing financial interest.



f com,lo (unt , k)Inv sct(unt , n) ≤ Inv ct,k(unt , k , n) ≤f

com,up

sct

(unt , k)Inv (unt , n)

∀ unt ∈ CT ; k ∈ K ; n ∈ N



Equation A46 calculates volume fractions of individual crudes inside a storage or charging tank ( f vol,n(unt,c,n)) at the end of time event n. Equation A47 ensures that the outflow volume of an individual crude (Vc(unt,unt′,c,n)) is proportional to the total outflow volume (Vt(unt,unt′,n)) according to the individual crude volume fraction inside the source tank ( f vol,n(unt,c,n − 1)). Note that in these two equations, two continuous variables are multiplied together, which leads to bilinear terms. Inv

sct,c

(unt , c , n) = f

vol,n

Indices:

c∈C k∈K n∈N unt ∈ UNT v∈V

crude types key components time events all the units including parcels, tanks, and CDUs vessels

Sets:

sct

C CT ⊂ UNT DU ⊂ UNT

(unt , c , n)Inv (unt , n),

∀ unt ∈ SCT ; c ∈ C ; n ∈ N

NOMENCLATURE

(A46) 12452

set of crude oil types set of charging tanks set of distillation CDUs DOI: 10.1021/acs.iecr.5b03278 Ind. Eng. Chem. Res. 2015, 54, 12438−12454

Article

Industrial & Engineering Chemistry Research IU ⊂ UNT

f vol,p(unt,c)

set of units as input unit sources: IU = P∪ST∪CT IUct ⊂ IU set of input sources for charging tank IUdu ⊂ IU set of input sources for CDU IUst ⊂ IU set of input sources for storage tank K set of key components (e.g., sulfur concentration) N set of time events OU ∈ UNT set of output units: OU∪ST∪CT∪DU OUct ⊂ OU set of output units for crudes from charging tanks OUp ⊂ OU set of output units for crudes from parcels OUst ⊂ OU set of output units for crudes from storage tanks P ⊂ UNT set of crude parcels Pv set of crude parcels carried by vessel v SCT = ST ∪ CT union of storage and charging tank sets SCT* set of malfunctioning tanks ST ⊂ UNT set of storage tanks UNT = P ∪ ST ∪ CT ∪ DU set of all the units including parcels, tanks, and CDUs V set of vessels

f vol,0(unt,c) ε β(unt′,unt,n)

volume fraction of crude c in a parcel unt ∈ P initial volume fraction of crude c in a tank unt ∈ SCT a small number (e.g., 1× 10−5) ratio of individual crude to total crude volumes already transferred before Tdetect, when a tank fails during its crude transfer operation from unt′ to unt at time event n

0−1 Continuous Variables

Bpe(unt,n)

it is 1 if a parcel (unt∈P) is completely unloaded at the end of time event n; otherwise, it is zero Z(unt′,unt,n) it is 1 if a switchover of charging tanks unt′∈CT occurs on a CDU unt ∈ DU from time event n to n + 1; otherwise, it is zero Continuous Variables:

cost

total operating costs during the scheduling time horizon Invct,k(unt,k,n) inventory of key component k in a charging tank unt ∈ CT at the end of time event n Invp(unt,n) total inventory of a parcel unt ∈ P at the end of time event n Invp,c(unt,c,n) inventory of crude c in a parcel unt ∈ P at the end of time event n Invsct(unt,n) total inventory of a tank unt ∈ SCT at the end of time event n Invsct,c(unt,c,n) inventory of crude c inside a tank unt ∈ SCT at the end of time event n Ts(unt′,unt,n) starting time of a crude transfer from units unt′ to unt at time event n Te(unt′,unt,n) ending time of a crude transfer from units unt′ to unt at time event n TPs(unt) starting time of unloading a parcel unt ∈ P during the scheduling horizon TPe(unt) ending time of unloading a parcel unt ∈ P during the scheduling horizon TVs(v) starting time of unloading a vessel v during the scheduling horizon TVe(v) ending time of unloading a vessel v during the scheduling horizon Vc(unt′,unt,c,n) volume of crude c transferred from units unt′ to untat time event n Vt(unt′,unt,n) total volume transferred from units unt′ to unt at time event n Vslk(unt′,unt,n) slack variable for total volume evacuated from the malfunctioning tank (unt′ ∈ SCT*) to the downstream units at time event n f vol,n(unt,c,n) volume fraction of crude c in a tank unt ∈ SCT at the end of time event n

Parameters:

BST Ccho

brine settling and removal time changeover cost for a CDU switching different feeds Cinv(unt) inventory management cost for storage and charging tanks Csea sea waiting cost Cset setup costs for crude transfers from vessels to storage tanks or from storage to charging tanks Culd parcel unloading cost FD(unt) total demand for crude mixture from unt∈CT throughout the scheduling horizon Flo(unt′,unt)/Fup(unt′,unt) lower/upper bounds of flow rate from units unt′ to unt H scheduling time horizon Inv0(unt) initial inventory of a parcel or tank unt∈P∪SCT Invlo(unt)/Invup(unt) minimum/maximum allowable inventories of tank unt∈SCT Tarr(v) arrival time of vessel v Tdetect the detection time when a tank becomes malfunctioning Tevac(unt) the evacuation duration enforced for an malfunctioning tank Tmaint maintenance time required for fixing a malfunctioning tank Vt,up upper bound of the total transferred crude volume for an operation fcom(c,k) fraction of key component k in crude c fcom,lo(unt,k)/fcom,up(unt,k) minimum/maximum allowable fractions of key component k in charging tank unt ∈ CT

Binary Variables:

X(unt′,unt,n) it is 1 if a unit unt′ transfers crudes to another unit unt during time event n; otherwise, it is zero u(unt′,unt,n) it is 1 if the crude transfer from unt′ to unt at time event n in current deterministic schedule starts before Tdetect; otherwise, it is zero v(unt′,unt,n) it is 1 if the crude transfer from unt′ to unt (unt′or unt ∈ SCT*) at time event n in current schedule is finished at/before Tdetect; otherwise, it is zero 12453

DOI: 10.1021/acs.iecr.5b03278 Ind. Eng. Chem. Res. 2015, 54, 12438−12454

Article

Industrial & Engineering Chemistry Research w(unt′,unt,n) it is 1 if Tdetect occurs during the crude transfer from unt′ to unt (unt′or unt ∈ SCT*) at time event n in current deterministic schedule; otherwise, it is zero



(22) Janak, S. L.; Floudas, C. A.; Kallrath, J.; Vormbrock, N. Production scheduling of a large-scale industrial batch plant. II. Reactive scheduling. Ind. Eng. Chem. Res. 2006, 45 (25), 8253−8269. (23) Adhitya, A.; Srinivasan, R.; Karimi, I. A. A model-based rescheduling framework for managing abnormal supply chain events. Comput. Chem. Eng. 2007, 31 (5), 496−518. (24) Vin, J. P.; Ierapetritou, M. G. A new approach for efficient rescheduling of multiproduct batch plants. Ind. Eng. Chem. Res. 2000, 39 (11), 4228−4238. (25) Adhitya, A.; Srinivasan, R.; Karimi, I. In A heuristic reactive scheduling strategy for recovering from refinery supply chain disruptions, AIChE Annual Meeting, Austin, TX, 2004. (26) Rosenthal, R. E. GAMSa User’s Guide; GAMS Development Operation: Washington, DC, 2004. (27) Grossmann, I.; Viswanathan, J.; Vecchiette, A. DICOPT User’S Manual; GAMS Development Corporation: 2008. (28) Cplex I. 11.0 User’s Manual; ILOG SA: Gentilly, France, 2007, 32. (29) Drud, A. CONOPT Solver Manual; ARKI Consulting and Development: Bagsvaerd, Denmark, 1996.

REFERENCES

(1) Zhang, S.; Xu, Q. Reactive Scheduling of Short-Term Crude Oil Operations under Uncertainties. Ind. Eng. Chem. Res. 2014, 53 (31), 12502−12518. (2) Furman, K. C.; Jia, Z.; Ierapetritou, M. G. A robust event-based continuous time formulation for tank transfer scheduling. Ind. Eng. Chem. Res. 2007, 46 (26), 9126−9136. (3) Karuppiah, R.; Furman, K. C.; Grossmann, I. E. Global optimization for scheduling refinery crude oil operations. Comput. Chem. Eng. 2008, 32 (11), 2745−2766. (4) Mouret, S.; Grossmann, I. E.; Pestiaux, P. A novel priority-slot based continuous-time formulation for crude-oil scheduling problems. Ind. Eng. Chem. Res. 2009, 48 (18), 8515−8528. (5) Pan, M.; Li, X.; Qian, Y. New approach for scheduling crude oil operations. Chem. Eng. Sci. 2009, 64 (5), 965−983. (6) Zhang, S.; Xu, Q. Refinery continuous-time crude scheduling with consideration of long-distance pipeline transportation. Comput. Chem. Eng. 2015, 75, 74−94. (7) Li, J.; Misener, R.; Floudas, C. A. Continuous-time modeling and global optimization approach for scheduling of crude oil operations. AIChE J. 2012, 58 (1), 205−226. (8) Zhao, C.; Fu, J.; Xu, Q. Real-time dynamic hoist scheduling for multistage material handling process under uncertainties. AIChE J. 2013, 59 (2), 465−482. (9) Karri, B.; Srinivasan, R.; Karimi, I. Robustness measures for operation schedules subject to disruptions. Ind. Eng. Chem. Res. 2009, 48 (20), 9204−9214. (10) Verderame, P. M.; Elia, J. A.; Li, J.; Floudas, C. A. Planning and scheduling under uncertainty: a review across multiple sectors. Ind. Eng. Chem. Res. 2010, 49 (9), 3993−4017. (11) Li, Z.; Ierapetritou, M. G. Reactive scheduling using parametric programming. AIChE J. 2008, 54 (10), 2610−2623. (12) Cao, C.; Gu, X.; Xin, Z. Stochastic chance constrained mixedinteger nonlinear programming models and the solution approaches for refinery short-term crude oil scheduling problem. Applied Mathematical Modelling 2010, 34 (11), 3231−3243. (13) Wang, J.; Rong, G. Robust optimization model for crude oil scheduling under uncertainty. Ind. Eng. Chem. Res. 2009, 49 (4), 1737−1748. (14) Ben-Tal, A.; Nemirovski, A. Robust convex optimization. Mathematics of Operations Research 1998, 23 (4), 769−805. (15) Ben-Tal, A.; Nemirovski, A. Robust solutions of uncertain linear programs. Operations research letters 1999, 25 (1), 1−13. (16) Ben-Tal, A.; Nemirovski, A. Robust solutions of linear programming problems contaminated with uncertain data. Mathematical programming 2000, 88 (3), 411−424. (17) Li, J.; Misener, R.; Floudas, C. A. Scheduling of crude oil operations under demand uncertainty: A robust optimization framework coupled with global optimization. AIChE J. 2012, 58 (8), 2373− 2396. (18) Lin, X.; Janak, S. L.; Floudas, C. A. A new robust optimization approach for scheduling under uncertainty:: I. Bounded uncertainty. Comput. Chem. Eng. 2004, 28 (6), 1069−1085. (19) Janak, S. L.; Lin, X.; Floudas, C. A. A new robust optimization approach for scheduling under uncertainty: II. Uncertainty with known probability distribution. Comput. Chem. Eng. 2007, 31 (3), 171−195. (20) Zhang, J.; Wen, Y.; Xu, Q. Simultaneous optimization of crude oil blending and purchase planning with delivery uncertainty consideration. Ind. Eng. Chem. Res. 2012, 51 (25), 8453−8464. (21) Adhitya, A.; Srinivasan, R.; Karimi, I. Heuristic rescheduling of crude oil operations to manage abnormal supply chain events. AIChE J. 2007, 53 (2), 397−422. 12454

DOI: 10.1021/acs.iecr.5b03278 Ind. Eng. Chem. Res. 2015, 54, 12438−12454