Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
18 views12 pages

PDFFT

Uploaded by

m.reza.fatehi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views12 pages

PDFFT

Uploaded by

m.reza.fatehi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Computers and Chemical Engineering 151 (2021) 107361

Contents lists available at ScienceDirect

Computers and Chemical Engineering


journal homepage: www.elsevier.com/locate/compchemeng

Refinery production planning optimization under crude oil quality


uncertainty
Fupei Li a,b, Feng Qian a,∗, Wenli Du a, Minglei Yang a, Jian Long a, Vladimir Mahalec b,∗
a
Key Laboratory of Smart Manufacturing in Energy Chemical Process, Ministry of Education, East China University of Science and Technology, Shanghai
200237, China
b
Department of Chemical Engineering, McMaster University, Hamilton, Ontario L8S 4L8, Canada

a r t i c l e i n f o a b s t r a c t

Article history: Current practice in refinery planning is to assume that the qualities of the crude oil feedstocks are known,
Received 17 December 2020 even though they often vary. The uncertainty of the quality properties can significantly impact the profit
Revised 25 March 2021
of the refinery and needs to be considered in purchasing decisions. This work employs the product tri-
Accepted 3 May 2021
section CDU model (Li et al. 2020) to build an accurate refinery model and determines the optimal crude
Available online 11 May 2021
selection by two-stage stochastic programming. The uncertainty of the crude oil quality properties is
Keywords: defined via the uncertainty of the TBP curves, which is described by the uncertain parameters of the
Two-stage stochastic programming beta functions approximating the TBP curves. The probabilistic scenarios are generated via random vector
Refinery production planning sampling method, leading to a relatively small number of scenarios required for the two-stage-stochastic
Quality uncertainty programming model convergence. This enables us to determine the best crude oil choice, while requiring
Random vector sampling acceptable computational times, as illustrated by computational experiments.
Product tri-section CDU model
© 2021 Elsevier Ltd. All rights reserved.

1. Introduction ies need to make the best possible use of their existing capabilities
(Qian et al., 2017). Consequently, the crude oil selection is the most
Crude oil purchasing plays a pivotal role in refinery production important step in the decision-making processes from purchasing
planning. A plan of crude oil purchasing considers the available to the final product delivery.
crude feedstocks, the expected production slates, and the refinery In the past decade, the refinery production planning problem
structure, i.e., capabilities to process given crude. Crude oil pur- has been studied by many researchers, focusing on improving the
chasing decision is typically made about a couple of weeks to a planning models and process models, as well as the optimization
month prior to the crude oil arriving at the refinery. The crude oils algorithms. As for the optimization under uncertainties, the stud-
from different fields have distinct quality properties described by ies in production planning have dealt almost exclusively with the
the true boiling point (TBP) curves and bulk properties of the oils, uncertainty of the price or demand in the market. The two-stage
which leads to variability in the price on the market. Generally, stochastic programming model is commonly used to address the
light and sweet crudes are more valuable and have higher prices optimization under uncertainty. Two-stage stochastic programming
than the heavy and sour crudes since the former crudes contain requires the determination of the distribution of the uncertainties
more of the valuable components (e.g., gasoline) and have a lower and then optimizes a number of scenarios that represent potential
cost of sulfur removal. Refineries built in the mid to second half realizations of the uncertainties. The continuous random variables
of the 20th century were typically designed for a specific type of are commonly described by the probability density function (PDF)
crude (e.g., light and sweet or heavy and sour). In recent years, the or the cumulative distribution function (CDF). The discrete random
crude oil qualities are becoming poorer (e.g., heavier and sourer), variables are commonly described by the probable values associ-
requiring the refineries to revamp and expand their units in order ated with the probabilities. Statistic characterizations of the ran-
to operate successfully in a volatile crude oil market. Since restruc- dom variables are all acquired via the selected samples. The statis-
turing a refinery requires significant capital and time, the refiner- tical analysis of the samples is used to estimate the characteriza-
tion of the population, which makes the statistic characterizations
(e.g., mean, variance et al.) relevant in stochastic programming.
∗ After the characterization of the random variables, the scenario-
Corresponding authors.
E-mail addresses: [email protected] (F. Qian), [email protected] (V. Ma-
halec).

https://doi.org/10.1016/j.compchemeng.2021.107361
0098-1354/© 2021 Elsevier Ltd. All rights reserved.
F. Li, F. Qian, W. Du et al. Computers and Chemical Engineering 151 (2021) 107361

Nomenclature Qmin max minimum and maximum quality specifications of


p,q , Q p,q
quality properties q in products p
Sets and indices Vtmin , Vtmax minimum and maximum final inventories in
M={m} raw materials m tanks t
P={ p} final products m Rtmin , Rtmax minimum and maximum withdrawal rates of
U={u} all units u tanks t
T={t } storage tanks m i
Qt,q initial quality properties q in tanks t
S={s} probabilistic scenarios s Yfix fixed yields of outlet streams uo out of units u
uo,u
Q ={ q } quality properties q (’sg’ for specific gravity)
Rmin max
u , Ru minimum and maximum processing rates of
BC={c} blending components c
units u
B={b} blenders b
Qfix fixed quality properties q of outlet streams uo
TI={ti} inlet streams of tanks ti uo,q
Yfix fixed yields of outlet streams uo of operating
TO={to} outlet streams of tanks to uo,op
modes op
UI={ui} inlet streams of units ui
Rmin max
op , Rop minimum and maximum processing rates of op-
UO={uo} outlet streams of units uo
erating modes op
Subsets and indices Nu maximum numbers of operating modes in pro-
PU={u} processing units u cessing units u
profile
CDU={u} crude oil distillation units u Qq profiles of quality properties q
HTU={u} hydrotreating units u Binary decision variables
CO={m} crude oils m b p,s products p blended or not
VQ={q} quality properties q blended linearly on the volu- bop,s operating modes op executed or not
metric basis
WQ={q} quality properties q blended linearly on the weight Continuous decision variables
basis Vm volume flows of materials m
MIX={u} mixers u Vu,s volume throughputs of units u
SPL={u} splitters u Vt,s volume inventories of tanks t
OP={op} operating modes of processing units op T BPm,s TBP temperatures of crude oils m
Qm,q,s quality properties q of materials m
Correlation tuples Vc,p,s volume flows of blend components c to
(c, p) blending components c in products p blend product p
( p, b) products p blended in blenders b Vc,s volume flows of blend components c
(c, p, q) quality properties q calculated in the compo- Vp,s volume flows of product p
nents c and products p Qc,q,s quality properties q of blend components
(ti, t ) inlet streams ti into tanks t c
(t, to) outlet streams to out of tanks t Q Vc,p,q,s , Q Mc,p,q,s auxiliary variables representing the qual-
(t i, t , to, q) quality properties q calculated in the inlet ity properties q times volume flows and
streams ti and outlet streams to of tanks t weight flows of blend components c to
(ui, u ) inlet streams ui into units u blend product p
(u, uo) outlet streams uo out of units u Vti,s , Vto,s volume flows of inlet streams ti and out-
(ui, u, uo, q) quality properties q calculated in the inlet let streams to
streams ui and outlet streams uo of units u Qti,q,s , Qto,q,s quality properties q of inlet streams ti and
(op, u ) processing units u associated operating modes outlet streams to
op Vui,s , Vuo,s volume flows of inlet streams ui and out-
(ui, op) inlet streams ui into operating modes op let streams uo
(op, uo) outlet streams uo out of operating modes op Qui,q,s , Quo,q,s quality properties q of inlet streams ui
(ui, u, uo) inlet streams ui and outlet streams uo of units u and outlet streams uo
Vop,s volume throughputs of operating modes
Parameters op
L length of the planning horizon T BPui,s , T BPuo,s TBP temperatures of inlet streams ui and
Price p price values of products p outlet streams uo
Costm cost values of materials m ccwuo,s cumulative cut width of outlet streams uo
Costu cost values of units u ovu,s cut point temperatures of outlet streams
Costt cost values of inventory in tanks t Vt i initial in- uo
ventory in tanks t
Amin max
m , Am minimum and maximum available amounts of
based (two-stage) stochastic programming approach requires the
materials m
generation of probabilistic scenarios.
Qfix
m,q fixed quality properties q of materials m
In two-stage stochastic programming, scenario generation for
Dmin max
p , Dp minimum and maximum demands of products p the uncertain parameters aims to accurately represent the uncer-
min max
Rb , Rb minimum and maximum blend rates of blenders tain parameter space and to make the best first- and second-
b stage decisions (Mavromatidis et al., 2018). Monte Carlo sampling
Rmin max
c,p , Rc,p minimum and maximum recipes (volume frac- method, adopted by the majority of the stochastic programming
tion) allowed of blend components c in blending researches, randomly takes N samples from the distribution func-
products p tion constructing the set of probabilistic scenarios. The probabil-
ity of each sample is 1/N, so-called Sample Average Approximation

2
F. Li, F. Qian, W. Du et al. Computers and Chemical Engineering 151 (2021) 107361

(SAA). There is a drawback in using SAA in stochastic program- ing with fluctuating product demand and uncertain ship arrival
ming that the number of samples could be very large to mirror times. Evazabadian et al. (Evazabadian et al., 2019) proposed a
the statistic characterizations of the random variables, such as the short-term crude oil scheduling model using fuzzy programming
mean and variance. The scale of the scenario-based stochastic pro- and the chance-constrained method to address the uncertainty in
gramming depends on the number of samples, which may cause demand, cost, and time parameters. The uncertainties in the prices,
failure or long computational time in solving these problems. costs, product yields were considered in the refinery operations
In a refinery, the uncertainty of the crude oil quality can be planning via robust optimization methodology (Leiras et al., 2010).
addressed via different approaches. Since the operations of pro- Two-stage adjustable robust optimization was proposed by Lima
cess units depend on the quality of the feed stream, such as crude et al. to address the uncertainty on price and demand for crude oil
oil as the feed to CDUs and distillation cuts as the feed to FCC, in the downstream oil supply chain (Lima et al., 2019).
the process unit models are improved to handle the uncertainties A refinery model which is used to make decisions on crude se-
of the crude oil. Franzoi et al. (Franzoi et al., 2020) built a cut- lection under uncertainties in crude qualities must be more accu-
point temperature surrogate model of CDU to handle the plant- rate than the errors which are introduced by disregarding the un-
model mismatches and uncertainties in the process, which uses certainty in the crude qualities. Arguably, the accuracy of the CDU
new data to improve the accuracy of the prediction. Durrani et al. model is the most important issue in a refinery model since an in-
(Durrani et al., 2018) used a hybrid framework of the Taguchi accurate CDU model will predict inaccurate yields of the interme-
method and genetic algorithm to derive a dataset comprised of diate streams, and the entire downstream processing will be erro-
variations of crude compositions and optimized cut point tem- neous. In the previous studies on the refinery planning problem,
peratures, which was used to train an ANN model of CDU. Minh the simplified CDU models were commonly used considering the
et al. (Minh et al., 2018) proposed a surrogate model of CDU based convergence and efficiency of the refinery planning models, espe-
on Gaussian process regression with a large number of uncertain- cially in optimization under uncertainty. The swing-cut CDU model
ties in crude oils and operations to get a global sensitivity anal- developed by Zhang et al. (Zhang et al., 2001) has been studied
ysis of the economic revenue and the operating cost. Chen et al. in plenty of refinery planning optimization for both determinis-
(Chen et al., 2020a) proposed a machine-learning-based FCC model tic problems and stochastic problems. If the swing-cut model is
to overcome the uncertainties in crude oil quality. In the refin- used to deal with uncertainty, the yields (cut points) of the swing-
ery planning and scheduling problem, the data-driven method has cut model should be calculated for each crude in every probabilis-
been used to address the uncertainty of the crude oil quality. Gao tic scenario, which is computationally expensive. In addition, the
et al. (Gao et al., 2014) proposed a multimodel approach for refin- swing-cut model does not have enough accuracy in predicting the
ery scheduling with various crudes and blend recipes using a deep product yields and bulk properties, which is a critical issue in re-
learning method to classify the mixed crude oil types, which refers finery production planning. In the recent study of the CDU model
to a specific scheduling model. Dai et al. (Dai et al., 2019) built the for planning and scheduling, Fu et al. (Fu et al., 2015) proposed a
data-driven uncertainty set of the crude oil property to get the ro- hybrid CDU model based on both the first principal and the empir-
bust optimization of the crude oil scheduling problem. If the un- ical models of CDU, which is better in predicting the product yields
certainty of the crude oil is considered when the purchase of the and bulk properties than the swing-cut model. Li et al. (Li et al.,
crude oil is made, there comes the crude oil selection and refinery 2020) derived a simpler version of the hybrid CDU model (prod-
planning problem. Yang and Barton (Yang and Barton, 2015) rep- uct tri-section CDU model) which also has accuracy on par with
resented the uncertainties in crude oil qualities by using the un- the rigorous tray-to-tray CDU models, but it has significantly better
certain yield of residue and uncertain sulfur content of gas oil as a computational times than Fu et al. hybrid CDU model in an MINLP
surrogate for the feedstock uncertainty. They employed 120 scenar- model of a crude oil selection optimization problem. Product tri-
ios generated by the SAA method. The solution time of the plan- section CDU model is used in this study.
ning model using nonconvex generalized Bender’s decomposition Uncertainty in crude qualities manifests itself as variations in
(NGBD) was above 5 hours even for a simplified refinery model. It crude distillation curves, which in turn results in variability in
is not clear how their method would perform if a more inclusive CDU product yields. Uncertainties in other crude properties (sulfur,
refinery model was employed. gravity, etc.) are of secondary importance, since downstream units
Recent studies on refinery planning and scheduling under usually have sufficient capacities to accommodate such variations.
uncertainty rely on stochastic programming, chance-constrained This work describes variations in crude qualities as deviations from
programming, and robust optimization methods. Gutierrez et al. its crude assay TBP distillation curve, which deals with the impact
(Gutierrez et al., 2018) studied the effect of the crude changes on of uncertainty in the crude distillation curve on the yield of CDU
the operation of the hydrogen network. The physical risk related product streams. It is assumed that the uncertainty in other prop-
to crude oil import and transportation planning was studied using erties (e.g., sulfur) results in CDU product streams which can be
two-stage stochastic programming, also using conditional value-at- still be processed by the downstream units. For example, if a yield
risk (CVaR) constraints on the total cost (Wang et al., 2020). The of a stream that is routed to a hydrotreater changes, then the to-
market and operational uncertainties were considered in the opti- tal amount of sulfur in that stream also changes; the assumption
mal design problem of the refinery hydrogen network using two- is that the hydrotreater can process that amount of sulfur. The re-
stage stochastic programming with flexible constraints modeling finery model with the tri-section CDU model is employed as a ba-
framework proposed by Chen et al. (Chen et al., 2020b). Monte sis of the two-stage stochastic programming formulation of the re-
Carlo sampling (simulation) regularly accompanies the two-stage finery production planning problem. Scenario generation employs
stochastic programming for scenario generation. Due to a large a random vector sampling (RVS) method, which utilizes the dis-
number of the scenarios, the stochastic programming model is in- cretization of uncertain parameters (Afzali et al., 2020) to minimize
variably large scale which leads to challenges in finding the global the number of scenarios. The stochastic programming models are
optimum. Shin and Lee (Shin and Lee, 2018) proposed a multi-time solved via a commercial global optimization solver (ANTIGONE).
scale stochastic model to solve the price uncertainty in a refinery The remainder of this paper is structured as follows:
procurement and production planning problem via mathematical Section 2 describes the methodology used in this work including
programming and reinforcement learning. Wang et al. (Wang et al., (i) the two-stage stochastic programming approach, which formu-
2009) used the chance-constrained programming model to im- lates the refinery production planning problem under uncertainty;
prove the feasibility and robustness of crude oil operation schedul- (ii) the crude oil quality uncertainty, which is defined by the un-

3
F. Li, F. Qian, W. Du et al. Computers and Chemical Engineering 151 (2021) 107361

certain parameters of the beta function approximating the crude


oil TBP curve; (iii) the scenarios generation for the uncertain crude
oil TBP curve, which uses the discretization of continuous vari-
ables and random vector sampling method. Section 3 describes
the refinery planning model under uncertainty of crude oil qual-
ity properties with the product tri-section CDU model embedded.
Section 4 presents case studies of refinery production optimization
under quality uncertainty of the crude oil. Section 5 presents the
conclusions of this work.

2. Methodology

2.1. Two-stage stochastic programming approach

The decision variables in the two-stage stochastic programming


are separated into two sets: the first-stage variables are decided
before the realization of the uncertainty parameters (here-and-
Fig. 1. TBP curve and Beta Function approximation.
now decisions) and the second-stage variables are optimized after
the observation of the uncertainty parameters (wait-and-see deci-
sions). The expected objective value is optimized covering all the 2.2. Crude oil quality uncertainty
uncertainty realizations.
A general formulation of two-stage stochastic programming is Crude oil is a mixture of many organic compounds (mostly hy-
given as follows: drocarbons) having a wide range of boiling point temperatures.
min f1 (x1 , d1 ) + Eω [ f2 (x1 , d1 , ω )] Pseudocomponent method is a widely used procedure to character-
x1 ,d1 ize such complex mixtures, e.g., crude oils and petrochemical prod-
s.t. h1 (x1 , d1 ) = 0 (1) ucts. It is applied to calculate the bulk property of the crude oils
g1 ( x1 , d1 ) ≤ 0 and the product cuts. Pseudocomponents describing the crude oil
x 1 ∈ R , d 1 ∈ {0 , 1 } are determined from the true boiling point (TBP) distillation curve.
A point on the TBP curve is the temperature at which this com-
f 2 ( x1 , d1 , ω ) = min f2 [x1 , d1 , x2 (ω ), d2 (ω ), ω] ponent and all components with lower boiling points evaporate,
x2 ∈X,d2 ∈D
i.e., the temperature at which the entire oil fraction lighter than
s.t. h2 [x1 , d1 , x2 (ω ), d2 (ω ), ω] = 0 (2) this temperature is vaporized. An example crude oil TBP curve is
g2 [x1 , d1 , x2 (ω ), d2 (ω ), ω] ≤ 0
drawn as the blue line in Fig. 1. The TBP curve can be fitted by
x2 ∈ R, d2 ∈ {0, 1}
some probability density functions, which have been studied by
where x and d are the continuous and binary variables with sub- Sánchez and co-workers (Sánchez et al., 2007). Their comparison
script 1 and 2 representing the first-stage and second-stage deci- of various distribution functions leads to the recommendation that
sions, ω represents the uncertainty parameters, and every second- the four-parameter distribution functions, including the beta func-
stage variable is referring to a realization of the uncertainty pa- tion, offer the best fitting capability. The four-parameter beta dis-
rameters. The objective of the two-stage stochastic programming tribution function is defined by Eq. (3).
model consists of the first-stage objective value and the expecta-   1  (α + β  x − A α−1
x≤B
)
tion of the second-stage objective value. The equality and inequal- f (x, α , β , A, B ) =
ity constraints h(· ) and g(· ) are associated with the first-stage de- A B − A (α )(β ) B − A
cisions and second-stage via subscripts 1 and 2.  B − x β −1
In the crude oil selection production planning problem, the dx (3)
B−A
first-stage decision variables are the amount of crude oil to pur-
chase. Second-stage decision variables are the amount of the fi- where α and β are the positive parameters controlling the shape
nal products to produce and the other operational variables such of the distribution function, A and B are lower and upper bounds
as the volume of the material processed by the downstream units on the distribution function, x represents the normalized tempera-
and the blending recipes. In this work, the uncertainty parameters ture recovery x = (T − Tl )/(Tu − Tl ), and  is the standard gamma
for the refinery planning model are the TBP temperatures of the function. The value of the function is the liquid volume fraction be-
crude oil supply, which means the crude oil qualities (TBP curve, tween 0 to 1. The four parameters are estimated via least-squares
specific gravity, surfer content) are unknown and uncertainty for fitting the crude oil TBP curve. For crude oil CO1 TBP curve in
production when the crude oils were bought on the market. Since Fig. 1, the optimal parameters of the beta distribution function
the crude oil TBP curves are nonlinear and each realization of are α = 0.4554, β = 0.3688, A = −0.0313, B = 0.9782. The upper
uncertain TBP curves is different, the crude oil selection produc- and lower bound for the normalized temperature recovery are Tu =
tion planning problem finding the optimum crude oil recipe is a 1800◦ F and Tl = −300◦ F. It should be noted that the beta function
large-scale mixed-integer nonlinear programming problem and ex- approximation still has some errors, especially at the front-end and
tremely hard to solve. The stochastic programming could address back-end points of the TBP curve. As explained by Sánchez et al.
these uncertainties before making the crude oil purchase decisions (Sánchez et al., 2007), the discrepancies are likely caused by the
so that the profit in the refinery production could be optimized. low accuracy of the experimental measurements of the front-end
The second-stage decisions, e.g., the operational variables of the re- and back-end of the TBP curve. Therefore, in this work, the initial
finery production (unit capacity, blending recipe), are determined boiling point (IBP) at the front-end and final boiling point (FBP)
after the realization of the quality uncertainties. In the following at the back-end are set to be constant, which means whatever the
section, the crude oil quality uncertainty is described via crude oil fitted beta functions are like, the IBP and FBP are deterministic as
TBP curves and the pseudocomponent method. the known values from the crude oil TBP data.

4
F. Li, F. Qian, W. Du et al. Computers and Chemical Engineering 151 (2021) 107361

Fig. 2. Histogram of α . Fig. 3. Histogram of β .

Using probability density functions is an appropriate way of ap-


proximating the TBP curves so that the uncertainty could be quan-
tifiable. The bulk property will have the same probability distribu-
tion as the parameters of the probability functions. In this paper,
the uncertainty of the crude quality properties is assumed to have
a normal distribution. After the crude oil TBP curve described as
a beta function, the uncertainty in the crude oil TBP curve can be
described by the uncertainty of the parameters. Since the param-
eters A and B determine the lower and upper bounds on the dis-
tribution function, these two parameters are fixed to the optimal
value fitting the target crude oil TBP curve. The positive parame-
ters α and β control the shape of the distribution function; they
describe the uncertainty qualities of the crude oil. Since crude oil
characterization using the pseudocomponent method is based on
the TBP curve, changing the shape of the curve will change (i) the
distribution of the pseudocomponents, (ii) the yield of the distil-
lation products, and (iii) the bulk properties (e.g., specific gravity
and sulfur content) of the crude oil and of the CDU products.
The uncertainty parameters α and β are assumed to have
normal distribution N (μ, σ ), and consequently, the bulk prop-
erties (e.g., specific gravity sg and sulfur content sul) also have Fig. 4. Fitted and random curves of the crude oil 1.
an approximately normal distribution. In order to limit the vari-
ance of the uncertainty in the crude oil, it is assumed that
the crude oil with uncertainty qualities have the probability is based on the pseudocomponents method assuming a constant
Pr(μ − 3σ ≤ sg and sul ≤ μ + 3σ ) ≈ 0.9973 maintaining its type, property value of individual pseudocomponent.
which is the so-called three-sigma rule of thumb. The types of The histograms of the calculated bulk property (specific gravity
crude oil are defined by the specific gravity (light sg < 0.8762, and sulfur content) of the samples are shown in Fig. 5 and Fig. 6.
medium 0.8762 ≤ sg < 0.9218, heavy sg ≥ 0, 9218) and sulfur con- The mean of the specific gravity is 0.8648, and the standard devi-
tent (sweet sul < 0.5%, sour sul ≥ 0.5%). Therefore, in this work, μ ation is 0.0010. The mean of the sulfur content is 2.2110, and the
is set to be the optimal parameter fitting the target TBP curve for standard deviation is 0.0131. It is pointed out that the bulk prop-
both uncertainty parameters α and β ; σ = 0.002 is a propitiate erties have an approximatively normal distribution. Since the type
value for α and β following the assumption, which will not change of the crude oil is light and sour, the samples in [μ − 3σ , μ + 3σ ]
the type of the crude oil. belongs to the same type as the target crude oil.
The crude oil in Fig. 1 is taken as an example using the In the remainder of this paper, the uncertainty in the parame-
Mote-Carlo sampling method. The uncertainty parameters α ∼ ters α and β is used as a surrogate to describe the uncertainty in
N (0.4554, 0.002) and β ∼ N (0.3688, 0.002) are employed to gen- the crude oil TBP curve, since each set of the uncertainty param-
erate 10 0 0 0 samples which have been used as a basis for different eters corresponds to a different TBP curve. The same approach is
scenarios for the crude oil uncertainty as shown in Figs. 2 and 3. used for crude oil 1 (CO1) and crude oil 2 (CO2); details are pro-
Two of the sampled random TBP curves and the determinis- vided in the Supporting Information.
tic fitted TBP curve are plotted in Fig. 4. It shows that the uncer-
tainties in the parameters change the crude oil TBP curve. Conse- 2.3. Scenario generation for the uncertain crude oil TBP curve
quently, at the same cut temperature, the yield of a product varies.
This also leads to a different distribution of the pseudocomponents, The uncertainty of a continuous variable can be described by
which causes uncertainty in the bulk properties of the crude oil. its probability distribution. In the probabilistic scenarios based
The calculation of the bulk properties of the sampled crude oil stochastic programming approach, the scenarios are discrete re-

5
F. Li, F. Qian, W. Du et al. Computers and Chemical Engineering 151 (2021) 107361

Fig. 5. Histogram of specific gravity.

Fig. 7. Discrete approximation of the normal distribution.

point so that a large number of scenarios is needed to ensure that


the points with lower probability are also selected. With the dis-
cretization of the uncertain parameters, there are only three candi-
date points in the probabilistic sets, and all of them are expected
to be selected in the scenarios with a relatively small number of
scenarios. The random vector sampling (RVS) guarantees that the
uncertain parameter can take on the values of all discrete points
in consecutive scenarios (Afzali et al., 2020). For the three dis-
crete points, RVS approach builds three scenarios at each time. For
each of the three scenarios, one of the three points is assigned
to the uncertain parameter as a realization. All probable permu-
tations (3-permutation of 3, P33 = 6) for assigning three discrete
Fig. 6. Histogram of sulfur content.
points (v1 , v2 , v3 ) to tree scenarios (s1 , s2 , s3 ) are P3 :
3

(s1 , s2 , s3 ) = {(v1 , v2 , v3 ), (v1 , v3 , v2 ), (v2 , v1 , v3 ), (v2 , v3 , v1 ),


alizations of the probability distribution. The simplest method to (v3 , v1 , v2 ), (v3 , v2 , v1 )} (4)
generate discrete scenarios is a sample average approximation The number of scenarios S to be generated should be the mul-
method (S scenarios corresponding to the uniform probability 1/S) tiple of three S = 3K. For each K, one of the probable permutations
via the Monte-Carlo sampling method. Although it is a simple way  is randomly selected by the same probability π = 1/P33 , which is
of generating the scenarios, care must be taken to ensure that a applied for all uncertain parameters P .
sufficient number of the scenarios is generated, which impacts the After all scenarios S are generated, the probability for each sce-
scale of the stochastic programming model. nario is computed by the following probability normalization. The
p
Moment matching is another way of discretization of the con- probability for a parameter p realized at the value vi (i = 1, 2, 3)
tinuous random variables. It enables an accurate representation of
for a scenario s in the kth set of all the scenarios is denoted as ωs
p,k
representing the probability distribution using a relatively small
and the associated normalized probability is denoted as ωs
p,k,Nr
cal-
number of scenarios. Gaussian Quadrature based moment match-
culated via
ing ensures the discrete approximation of a continuous distribution
with N points exactly matching its first (2N − 1 ) statistical mo- ω p,k
ments. N = 3 is a common value that has been used in the study
ωsp,k,Nr =  s p,k ∀k ∈ K, s = {3k − 2, 3k − 1, 3k} (5)
s ωs
of the design of energy systems under uncertainty (Afzali et al.,
2020; Mavromatidis et al., 2018) and is also employed in this work The probability for a scenario s in the kth set of all the scenarios
so that the important statistical moments (mean, variance, skew- is denoted as ψsk . The probability of the three scenarios in each K
ness, and kurtosis) can be matched accurately. The uncertainty of is calculated via

each parameter α and β is approximated via three valued points ψsk = ωsp,k,Nr ∀k ∈ K, ∀s ∈ S (6)
and their associated probability, as shown in Fig. 7. p∈P
The uncertain parameters can take on realizations correspond-
Then, the three scenarios s = k, k + 1, k + 2 in the kth set are
ing to one of the three discrete points in an arbitrary scenario.
normalized by
In order to generate the probabilistic scenarios, Monte Carlo sam-
pling randomly selects a point from the probabilistic distribution ψk
ψsk,Nr =  s k ∀k ∈ K, s = {3k − 2, 3k − 1, 3k} (7)
s ψs
of the uncertain parameters according to the probability of each

6
F. Li, F. Qian, W. Du et al. Computers and Chemical Engineering 151 (2021) 107361

Fig. 8. Simplified flowsheet of the refinery model (Li et al., 2020).

Finally, the normalized probability of a scenario s is max profit =


s∈S
ψsNr p∈P
Price p × Vp,s
3
ψsNr = ψsk,Nr ∀s ∈ S, k = INT (3/s ) (8) − Costm × Vm
S m∈M

3. Refinery planning model



s∈S
ψsNr u∈PU,CDU,HTU
Costu × Vu,s


s∈S
ψsNr t∈T
Costt × Vt,s − Vti (9)
The refinery model in this work is based on the deterministic
production planning optimization studied by our previous work of The objective function of the refinery planning under uncer-
the tri-section CDU model (Li et al., 2020). The configuration of the tainty is maximizing the expected profit as shown in Eq. (9). The
refinery flowsheet is the same as our previous work. The simplified total cost of the materials constitutes f1 (· ) in Eq. (1); the revenue
flowsheet of the refinery model is shown in Fig. 8. of the final products, the total cost of the units, and the inventory
The refinery planning problem under crude quality uncertainty constitute f2 (· ) in Eq. (1) and Eq. (2). First-stage variables are the
is described as follows: amount of materials (M) including the crude oils and blend com-
Given ponents (e.g., alkylate and n-butane). Second-stage variable are the
amount of final products (P), the other operational variables, the
A planning horizon of a specific length. capacity of the main units (e.g., processing units PU, crude oil dis-
A set of crude oils, the probabilistic scenarios of the crude oil tillation units CDU, and hydrotreating units HTU), the final inven-
TBP curves the pseudocomponent profiles, and supply pro- tory of the tanks (T). Price p , Costm , Costu , and Costt are the deter-
files (e.g., costs and available amounts). ministic parameters of the price and cost values. It should be noted
A set of final products (e.g., LPG, gasoline, kerosene, diesel, fuel that the following constraints Eqs. (11)-((46)) on the second-stage
oil, coke), their quality specifications, prices and demand in variables are indexed with scenario subscript s.
the planning horizon. Supply constraints
A set of storage tanks and their initial, minimum, and maxi- The supply materials are constrained between the minimum
mum initial inventories. and maximum available amounts from the market, as shown in
A set of blenders and their minimum and maximum blending Eq. (10). TBP temperatures T BPm,s of the crude oil (CO ⊆ M) are un-
rates. certain variables described before. The probabilistic scenarios S of
Processing units (i.e., CDU, hydrotreaters, catalytic reformer, the TBP temperatures TBPm,s are generated via the RVS method,
fluid catalytic cracker, etc.) with minimum and maximum and the probability ψsNr of each scenario have been calculated via
throughput rates and their operating modes. the normalization approach. The other qualities Q are fixed to de-
The topology of all the processing units and storage tanks. terministic values Qfix m,q .

m ≤ Vm ≤ Am
Amin m∈M
Determine max (10)
First-stage

The amount of each crude oil feedstock to be used. T BPm,s = (TBPm,s , ψsNr ) m ∈ CO, s ∈ S (11)

Second-stage
m,q m ∈ M, q ∈ Q , s ∈ S
Qm,q,s = Qfix (12)
The amount of each final product to be produced. Demand constraints
The production volumes in each processing unit, each operating The product demands are constrained between minimum and
mode. maximum required amounts in the planning horizon, as shown in
The final inventories of the storage tanks. Eq. (13).
The components blended in each blender.
Dmin
p ≤ Vp,s ≤ Dmax
p p ∈ P, s ∈ S (13)
While
Blender costraints
Maximizing the expected profit. The material balances of the blenders are described by
Eqs. (15) and (16). The blending components (BC) are blended into
Objective Function the products. The recipes of the blend products are defined by the

7
F. Li, F. Qian, W. Du et al. Computers and Chemical Engineering 151 (2021) 107361

tuples (c, p) which state that a component c is in the recipe for Vti,s × Qti,q,s + Vti × Qt,q
i
= Vt,s × Qt,q,s +
the product p. The blenders (B) have multiple blend products de- ti∈TI|(ti,t ) to∈TO|(t,to )
fined by the tuples ( p, b) which means a product p is blended in
Vto,s × Qto,q,s (ti ∈ TI, t ∈ T, to ∈ TO, q ∈ VQ ), s ∈ S (26)
the blender b. Binary variable b p is equal to 1 or 0 representing
a product is blended or not in Eq.(17). The minimum and max-
imum blend rates of a blender during the planning horizon L are
Vti,s × Qti,q,s × Qti,’sg’,s + Vti × Qt,q
i i
× Qt,
denoted as Rmin
b
and Rmax
b
in Eq. (16) and (17). The specifications of ’sg’
ti∈TI|(ti,t )
the blend product are constrained by Eqs. (18)-(22), where Rmin c,p
and Rmax
c,p are the minimum and maximum fractions of the blend
= Vt,s × Qt,q,s × Qt,’sg’,s + Vto,s × Qto,q,s
recipe from a component c to a product p. The quality properties to∈TO|(t,to )
Q blended on a volumetric basis (VQ ⊂ Q) and on a weight basis ×Qto,’sg’,s (ti ∈ TI, t ∈ T, to ∈ TO, q ∈ WQ ), s ∈ S (27)
(WQ ⊂ Q) are assumed to be linear in Eqs. (19)-(22), where Qmin p,q
and Qmax Unit constraints with a single operating mode
p,q are the bounds of the quality q specification on a prod-
uct p, the correlation of the component, the product and the qual- The mixers (MIX), splitters (SPL), and hydrotreating units (HTU)
ity are defined by tuples (c, p, q ). in the refinery model are the units with a single operating model.
The constraints consist of the material balance in Eq. (28)-(30),
Vp,s = Vc,p,s p ∈ P, s ∈ S (14) the capacity in Eq. (31), and quality balance in Eq. (32) and (33).
c∈BC|(c,p)
Each hydrotreating unit has a fixed yield Yfix uo,u operating mode in
Eq. (30) and fixed quality Qfixuo,q of the outlet streams in Eq. (34).
Vc,p,s = Vc,s c ∈ BC, s ∈ S (15)
p∈P|(c,p) Vu,s = Vui,s u ∈ MIX, SPL, HTU, s ∈ S (28)
ui∈UI|(ui,u )

Rmin
b × b p,s ≤ Vp,s ≤ Rmax
b × L × b p,s ( p ∈ P, b ∈ B), s ∈ S (16)
Vuo,s = Vu,s u ∈ MIX, SPL, s ∈ S (29)
uo∈UO|(uo,u )
Vp,s ≤ Rmax
b × L b∈B (17)
p∈P|( p,b)

uo,u × Vu,s (uo ∈ UO, u ∈ HTU ), s ∈ S


Vuo,s = Yfix (30)
Rmin
c,p × Vp,s ≤ Vc,p,s ≤ Rmax
c,p × Vp,s (c ∈ BC, p ∈ P ), s ∈ S (18)
Rmin
u × L ≤ Vu,s ≤ Rmax
u × L u ∈ MIX, SPL, HTU, s ∈ S (31)
QVc,p,q,s = Vc,p,s × Qc,q,s (c ∈ BC, p ∈ P, q ∈ VQ ), s ∈ S (19)
Vui,s × Qui,q,s = Vuo,s × Quo,q,s
ui∈UI|(ui,u ) uo∈UO|(u,uo )
Q Mc,p,q,s = Q Vc,p,’sg’,s × Qc,q,s (c ∈ BC, p ∈ P, q ∈ WQ ), s ∈ S (20)
(ui ∈ UI, u ∈ MIX, SPL, uo ∈ UO, q ∈ VQ ), s ∈ S (32)

Qmin
p,q × Vp,s ≤ QVc,p,q,s ≤ Qmax
p,q × Vp,s
Vui,s × Qui,q,s × Qui,’sg’,s = Vuo,s × Quo,q,s ×
c∈BC|(c,p)
ui∈UI|(ui,u ) uo∈UO|(u,uo )
(c ∈ BC, p ∈ P, q ∈ VQ ), s ∈ S (21)
Quo,’sg’,s (ui ∈ UI, u ∈ MIX, SPL, uo ∈ UO, q ∈ WQ ), s ∈ S
(33)
Qmin
p,q × Q Vc,p,’sg’,s ≤ QMc,p,q,s ≤ Qmax
p,q
c∈BC|(c,p) c∈BC|(c,p)
uo,q (u ∈ HTU, uo ∈ UO ), q ∈ Q, s ∈ S
Quo,q,s = Qfix (34)
× QVc,p,’sg’,s (c ∈ BC, p ∈ P, q ∈ WQ ), s ∈ S (22)
c∈BC|(c,p)
Units constraints with multiple operating modes
The processing units (PU) have more than one operating mode.
Storage tank constraints The operating modes of processing units are denoted as op ∈ OP.
The blend products and blend components are stored in indi- The associations between processing units and operating modes
vidual tanks. Each tank has its initial inventory Vti and initial qual- are described by tuples (op, u ). The constraints of material balance
i
ity Qt,q in Eq. (23), and is constrained between the minimum Vtmin in Eqs. (35) and (36), capacity in Eq. (37), and quality balance in
and maximum Vtmax inventory levels in Eq.(24). The minimum and Eq. (38) for the operating modes are almost the same as those for
maximum total withdrawal rates are Rtmin and Rtmax in Eq.(25). The the hydrotreating units, except for extra binary variables bop which
blending rules are the same as blenders assuming to be linear in equal to 1 or 0 specifying whether a mode is operated or not in
Eqs. (26) and (27). Eq. (37). The total number of the operating modes and the total
throughput of processing units are constrained by Eqs. (39) and
Vti,s + Vti = Vt,s + Vto,s t ∈ T, s ∈ S (23)
(40).
ti∈TI|(ti,t ) to∈TO|(t,to )
Vop,s = Vui,s op ∈ OP, s ∈ S (35)
ui∈UI|(ui,op )
Vtmin ≤ Vt,s ≤ Vtmax t ∈ T, s ∈ S (24)

uo,op × Vop,s (op ∈ OP, uo ∈ UO ), s ∈ S


Vuo,s = Yfix (36)
Rtmin × L≤ Vto,s ≤ Rtmax × L t ∈ T, s ∈ S (25)
to∈TO|(t,to )
Rmin max
op × L × bop,s ≤ Vop,s ≤ Rop × L × bop,s op ∈ OP, s ∈ S (37)

8
F. Li, F. Qian, W. Du et al. Computers and Chemical Engineering 151 (2021) 107361

the mixture of two crude oils (CO1 and CO2); five hydrotreaters
with a single operating mode for naphtha, diesel, gasoil to FCC,
Quo,q,s = Qfix
uo,q (op ∈ OP, uo ∈ UO ), q ∈ Q, s ∈ S (38)
gasoil to hydrocracker, and residue (nht, dht, goth_fcc, goth_hc, and
rht); one catalytic reforming unit with two operating modes for
maximum n-butane and maximum reformate (reformerA and re-
bop,s ≤ Nu u ∈ PU, s ∈ S (39)
formerB); one hydrocracking unit with three operating modes for
op∈OP|(op,u )
gasoline, kerosene, and diesel (hc_gm, hc_km, and hc_dm); one
fluid catalytic cracking unit with two operating modes for regu-
Rmin
u × L≤ Vop,s ≤ Rmax
u × L u ∈ PU, s ∈ S (40) lar gasoline and premium gasoline (fccA and fccB); three blenders
op∈OP|(op,u ) for gasoline, kerosene and diesel products. The products have two
Crude oil distillation unit constraints grades of gasoline (PG and RG), one grade of kerosene (K1), and
Product tri-section CDU model developed by Li et al. (Li et al., two grades of diesel (D1 and D2). The total crude oil throughput
2020) is employed in this work, since it has accuracy compara- is 10 0 0 0 0 bbl during the planning horizon. It is assumed that the
ble to a rigorous tray to tray CDU model, and its computational crude oil assay data is known when the decisions of purchase are
efficiency has been shown in the studies of the deterministic re- made. But the quality is still uncertain until the crude arrives at
finery planning problem. Since the CDU model determines how the plant. The refinery planning problem under crude oil quality
crude oil is processed via downstream units, we will describe it uncertainty is to find the optimum crude oil purchase that has the
briefly. Tri-section CDU model describes the TBP curves of the dis- maximum expected profit.
tillation products (e.g., outlet streams of the unit uo) via three sec- The two-stage stochastic refinery planning model has been first
tions, namely the front-section (1% − 30%LV), the middle-section studied by using a different number of scenarios. Between 3 to 30
(30% − 70%LV), and the back-section (70% − 99%LV). In the middle- scenarios, in increments of 3 (10 cases in total), have been used
section, the TBP curve is approximated by a straight line, and the to test the computational time of different numbers of scenarios.
TBP temperatures at (30%, 50%, 70%LV). are calculated from that Crude oil TBP curves vary ±15°F to ±20°F from the deterministic
line function, which is computed via partial least squares (PLS) TBP curves. The statistics of the models are listed in Table 1. All
models. In the front-section and in the back-section, the TBP tem- models have been built in GAMS 26.1.0 and have been solved by
peratures at (1%, 5%, 10%; 90%, 95%, 99%LV) are calculated by adding ANTIGONE 1.1. The MILP solver and NLP solver used by ANTIGONE
deviations to the extrapolation of the straight line through the are CPLEX and CONOPT. The computing platform was Windows 10
middle-section. The deviations, which have also been computed PC with i7-8700 3.2GHz CPU and 16 GB memory. An optimality
via PLS models, correspond to the cumulative cut width (ccwuo), gap of 0.01% and a maximum solving time of 360 0 0s have been
cut point temperatures (ctuo), the TBP temperatures of the mix- set to be the termination criteria for the solver.
ture inlet stream (T BPui ), and operating variables (ovu ). The gen- The size of the model increases linearly with the number of
eral formulation of the tri-section CDU model is shown in Eq. (41), scenarios. Since the models are fairly large, the solver was not able
where Fu is a series of linear functions corresponding to different to solve most of them from a cold start. We have adopted a two-
TBP points and different distillation products. step approach to be able to solve these models. The first step is
to solve the deterministic models corresponding to each scenario
T BPuo,s = Fu (ccwuo,s , ctuo,s , T BPui,s , ovu,s ) (crude TBP curve) simultaneously, since the deterministic refinery
(ui ∈ UI, u ∈ CDU, uo ∈ UO), s ∈ S (41) model needs relatively short computational times (about 200s as
reported by Li et al.) (Li et al., 2020). The crude oil recipes of all
The TBP temperatures of the distillation products and quality
profile deterministic models are fixed at CO1:CO2=0.5:0.5, and all results
profiles Qq are used to compute the quality of the products via
of the deterministic models are collected and saved via GAMS grid
Eq. (42).
  feature. Then, the second step is to solve the stochastic model us-
Quo,q,s = gq T BPuo,s , Qprofile q ∈ Q, s ∈ S (42) ing the results from the first step as a starting point, where the
q
crude oil recipe and operational conditions are optimized. This ap-
The constraints of material balance and capacity for the CDU proach makes the large-scale stochastic models solvable in modest
are shown in Eq.(43)-(46): times. The times required to find the start points and to optimize
the stochastic models are listed in Table 1. The total times of the
Vu,s = Vui,s u ∈ CDU, s ∈ S (43) two-step approach are also shown in Table 1. The profit, expected
ui∈UI|(ui,u ) revenue, expected total cost, and crude oil recipes of all models are
listed in Table 2.
Vuo,s = Yuo,u × Vu,s (uo ∈ UO, u ∈ CDU ), s ∈ S (44) The difference between the deterministic optimization and
stochastic optimization of the crude oil selection is illustrated for
the 30-scenario model. The optimum recipes of the determinis-
Yuo,u = h(ccwuo,s ) (uo ∈ UO, u ∈ CDU), s ∈ S (45)
tic models are plotted in Fig. 9 as two color bars, while the blue
dashed line at 0.7012 fraction of CO2 shows the optimum recipe
for the 30-scenarios stochastic model. Crude oil 2 is more prof-
Rmin
u × L ≤ Vu,s ≤ Rmax
u × L u ∈ CDU, s ∈ S (46)
itable than crude oil 1. In deterministic cases, the fraction of CO2
The entire refinery planning model is a mixed-integer nonlinear varies between 0.8162 and 1.0 0 0. When the uncertain quality of
programming (MINLP) problem formulated as a two-stage stochas- crude oils is considered, the fraction of crude oil 2 decreases to
tic programming model. 0.7012 to attain the optimum expected profit of the entire refin-
ery.
4. Case studies Additional crude oils can be included, as long as their distilla-
tion curves are between the lightest and the heaviest crude oils
The refinery planning model used in the case studies is based which have been used to develop the product tri-section CDU
on the flowsheet shown in Fig. 8. The detailed flowsheets of the model. Product tri-section CDU model development needs to be
refinery are shown in the Supporting Information. In this refin- based on a set of distillation curves which cover the span between
ery model, there is one crude distillation unit (cdu) dealing with the lightest and the heaviest crude oil. Increased number of crude

9
F. Li, F. Qian, W. Du et al. Computers and Chemical Engineering 151 (2021) 107361

Table 1
Model statistics for different number of scenarios.

No. of No. of No. of integer No. of No. of Solution Optimization Find start Total solving
scenarios variables variables equations nonlinear terms status time (s) point (s) time (s)

3 6110 1272 6289 2743 Optimum 5267.68 234.32 5502.00


6 12197 2544 12547 5485 Optimum 2988.10 297.41 3285.51
9 18284 3816 18805 8227 Optimum 3689.23 363.54 4052.77
12 24371 5088 25063 10969 Optimum 154.51 405.01 559.52
15 30458 6360 31321 13711 Optimum 5434.67 493.61 5928.28
18 36545 7632 37579 16453 Optimum 14106.01 768.15 14874.16
21 42632 8904 43837 19195 Optimum 964.94 691.93 1656.87
24 48719 10176 50095 21937 Optimum 4633.02 1039.34 5672.36
27 54806 11448 56353 24679 Optimum 382.80 1112.44 1495.24
30 60893 12720 62611 27421 Optimum 1704.55 1104.26 2808.81

Table 2
Objective values and crude oil recipes results.

No. of scenarios Profit (M$) Expected revenue (M$) Expected total cost (M$) Fraction of CO1 Fraction of CO2

3 2.9231 9.0930 6.1698 0.2942 0.7058


6 2.9000 9.0734 6.1734 0.2985 0.7015
9 2.8990 9.0526 6.1536 0.2826 0.7174
12 2.9615 9.0354 6.0739 0.2060 0.7940
15 2.6650 8.8495 6.1845 0.3325 0.6675
18 2.6969 8.8457 6.1487 0.2988 0.7012
21 2.6680 8.8529 6.1850 0.3326 0.6674
24 2.7230 8.8481 6.1251 0.2717 0.7283
27 2.6832 8.8335 6.1503 0.2987 0.7013
30 2.6912 8.8395 6.1483 0.2988 0.7012

Fig. 9. Crude oil recipes of the deterministic models. Fig. 10. Hydrocracker throughput of the deterministic models.

oils will require a larger number of scenarios and longer execution The comparison between the proposed two-stage stochastic
times. programming method with the uncertainty of crude oil TBP curves
If the probability scenarios of the crude oil quality (TBP curve) and the deterministic approach with crude oil assay data are car-
are taken into account in individual deterministic planning mod- ried by two scenes to address the crude oil selection and produc-
els, the resulting crude oil selection and mixed recipe fluctuate tion planning problem. Both scenes consider the planning (decision
significantly, as shown in Fig. 9. Meanwhile, the variability of the making) before and after the realization of the crude quality un-
crude oil quality impacts the throughput and operating modes of certainty. (i) Before the realization, select the crude oil recipe con-
the downstream secondary process units. For instance, the hydro- sidering the uncertainty by stochastic programming. (ii) Before the
cracking unit, as shown in Fig. 10, has different throughput (to- realization, select the crude oil recipe using the qualities in crude
tal height of a bar) and different throughput distributions of diesel assay data, which means the uncertainty is not considered. After
mode, gasoline mode, and kerosene mode for each scenario, which the realization, since the crude recipe has been decided, the op-
means the operation conditions need to change according to the eration planning is optimized. The profits of the decisions made
uncertainty of the crude oil quality. before the realization are treated as the benchmark profits to cal-

10
F. Li, F. Qian, W. Du et al. Computers and Chemical Engineering 151 (2021) 107361

determined as the second-stage decisions after the realization of


the uncertainty of crude oil qualities while minimizing the ex-
pected cost.
The uncertainty in the crude oil quality is described by the un-
certain parameters that define the beta function approximating the
crude oil TBP curve. The uncertain TBP curve simultaneously de-
scribes the uncertainty of the product yields and of the crude oil
bulk properties. Amount of each pseudo-component is calculated
to represent a given instantiation of the TBP crude oil curve. Each
pseudo-component has associated values of other qualities (sulfur,
gravity, etc.). By using the product-tri section CDU model, we pre-
dict the TBP curves of each product and calculate associated yields
and qualities.
The two-stage stochastic refinery planning model stems from
a deterministic model with the product tri-section CDU model. In
order to consider a wide range of probabilistic scenarios for the
two-stage stochastic programming, the discretization of the con-
tinuous random variables and the random vector sampling method
Fig. 11. Results from stochastic programming method crude selection.
have been used, which improves the approximation of the popu-
lation using a relatively small number of scenarios. The scale of
the stochastic linearly with the number of scenarios resulting in a
large-scale mixed-integer nonlinear programming model.
The solution times of the models show that the two-step
methodology (calculating initial starting point from deterministic
cases, followed by the optimization of the stochastic model) com-
bined with the product tri-section CDU model is an effective way
to solve crude selection under uncertainty, while including a real-
istic, detailed refinery representation in the model.
The case studies on the production planning under uncertainty
of crude oil qualities show that the proposed approach of using
the uncertain TBP curve is appropriate to address the uncertainty
in crude oil purchasing and production planning. The methodol-
ogy provides an optimal crude oil selection and recipe support-
ing the decision-making on the purchases of crude oils. This is the
first study that considers uncertainties in crude oils TBP curves and
successfully solves the associated entire refinery and crude oil se-
lection stochastic optimization problem.
Fig. 12. Results from deterministic approach to crude selection
Declaration of Competing Interest

culate the profit increment or loss after the realization, as shown The authors declare that they have no known competing finan-
in Fig. 11 for the stochastic programming method and Fig. 12 for cial interests or personal relationships that could have appeared to
the deterministic approach. In Fig. 11 and Fig. 12, the scenarios influence the work reported in this paper.
with high probabilities are marked as blue points, which totally
contain 99% probability. The decision made by the stochastic pro-
gramming method has an expected incremental profit of 5463.8$ CRediT authorship contribution statement
after the realization of the uncertainty. On the other hand, the de-
terministic approach has expected incremental 11033.1$ loss and Fupei Li: Conceptualization, Methodology, Software, Valida-
even has two infeasible scenarios. tion, Formal analysis, Data curation, Writing – original draft,
Writing – review & editing, Visualization. Feng Qian: Supervi-
5. Conclusions sion, Funding acquisition. Wenli Du: Conceptualization, Resources,
Project administration. Minglei Yang: Resources, Investigation. Jian
We have proposed a novel approach to address the refinery Long: Resources, Investigation. Vladimir Mahalec: Conceptualiza-
production planning problem under uncertainty of crude oil quali- tion, Writing – review & editing, Resources, Supervision.
ties in this work. Unlike Yang and Barton (Yang and Barton, 2015),
who described crude oil quality uncertainty indirectly via an un- Acknowledgements
certainty in the yield of one of the products (which implies that
the yields of other products are scaled proportionally), we employ This work has been supported by National Natural Sci-
variations in crude oil TBP curves to describe crude oil quality un- ence Foundation of China (Basic Science Center Program:
certainty. This approach enables us to consider the actual crude (61988101), International (Regional) Cooperation and Exchange
oil quality variations, which in turn enables us to predict realistic Project (61720106008) and National Natural Science Fund for Dis-
CDU yields via the product tri-section CDU model. The selection tinguished Young Scholars (61925305). and by McMaster Univer-
and purchase of crude oils with uncertain qualities are solved via sity WBooth School of Engineering Practice and Technology. We
a two-stage stochastic model. The amount of crude oils are deter- thank Sayyed Faridoddin Afzali for proposing the random vector
mined as the first-stage decision while maximizing the expected sampling method to minimize the number of scenarios used in the
profit. Other operating conditions and the amount of products are two-stage stochastic programming problem.

11
F. Li, F. Qian, W. Du et al. Computers and Chemical Engineering 151 (2021) 107361

Supplementary materials Leiras, A., Hamacher, S., Elkamel, A., 2010. Petroleum refinery operational plan-
ning using robust optimization. Eng. Optimiz. 42, 1119–1131. doi:10.1080/
03052151003686724.
Supplementary material associated with this article can be Li, F., Qian, F., Yang, M., Du, W., Mahalec, V., 2020. Product tri-section based crude
found, in the online version, at doi:10.1016/j.compchemeng.2021. distillation unit model for refinery production planning and refinery optimiza-
107361. tion. Aiche J. 67. doi:10.1002/aic.17115.
Lima, C., Relvas, S., Barbosa-Póvoa, A., Morales, J.M., 2019. Adjustable robust opti-
mization for planning logistics operations in downstream oil networks. Process
References 7, 507. doi:10.3390/pr7080507.
Mavromatidis, G., Orehounig, K., Carmeliet, J., 2018. Design of distributed energy
Afzali, S.F., Cotton, J.S., Mahalec, V., 2020. Urban community energy systems design systems under uncertainty: a two-stage stochastic programming approach. Appl.
under uncertainty for specified levels of carbon dioxide emissions. Appl. Energy Energ. 222, 932–950. doi:10.1016/j.apenergy.2018.04.019.
259, 114084. doi:10.1016/j.apenergy.2019.114084. Minh, L.Q., Duong, P.L.T., Lee, M., 2018. Global sensitivity analysis and uncertainty
Chen, C., Zhou, L., Ji, X., He, G., Dai, Y., Dang, Y., 2020a. Adaptive modeling strat- quantification of crude distillation unit using surrogate model based on gaus-
egy integrating feature selection and random forest for fluid catalytic cracking sian process regression. Ind. Eng. Chem. Res. 57, 5035–5044. doi:10.1021/acs.
processes. Ind. Eng. Chem. Res. 59, 11265–11274. doi:10.1021/acs.iecr.0c01409. iecr.7b05173.
Chen, Y., Lin, M., Jiang, H., Yuan, Z., Chen, B., 2020b. Optimal design and operation Qian, F., Zhong, W., Du, W., 2017. Fundamental theories and key technologies for
of refinery hydrogen systems under multi-scale uncertainties. Comput. Chem. smart and optimal manufacturing in the process industry. Engineering 3, 154–
Eng. 138, 106822. doi:10.1016/j.compchemeng.2020.106822. 160. doi:10.1016/j.eng.2017.02.011.
Dai, X., Wang, X., He, R., Du, W., Zhong, W., Zhao, L., Qian, F., 2019. Data-driven Sánchez, S., Ancheyta, J., McCaffrey, W.C., 2007. Comparison of probability distribu-
robust optimization for crude oil blending under uncertainty. Comput. Chem. tion functions for fitting distillation curves of petroleum. Energy Fuels 21, 2955–
Eng. 106595. doi:10.1016/j.compchemeng.2019.106595. 2963. doi:10.1021/ef070 0 03y.
Durrani, M., Ahmad, I., Kano, M., Hasebe, S., 2018. An artificial intelligence method Shin, J., Lee, J.H., 2018. Multi-timescale, multi-period decision-making model devel-
for energy efficient operation of crude distillation units under uncertain feed opment by combining reinforcement learning and mathematical programming.
composition. Energies 11. doi:10.3390/en11112993, 2993–2912. Comput. Chem. Eng. 121, 556–573. doi:10.1016/j.compchemeng.2018.11.020.
Evazabadian, F., Arvan, M., Ghodsi, R., 2019. Short-term crude oil scheduling with Wang, J., Feng, Y., Rong, G., 2009. Optimizing crude oil operations under uncertainty.
preventive maintenance operations: a fuzzy stochastic programming approach. Ifac Proc. Volumes 42, 1020–1025. doi:10.3182/20090603- 3- ru- 2001.0061.
Int. T Oper. Res. 26, 2450–2475. doi:10.1111/itor.12408. Wang, S., Wallace, S.W., Lu, J., Gu, Y., 2020. Handling financial risks in crude oil im-
Franzoi, R.E., Menezes, B.C., Kelly, J.D., Gut, J.A.W., Grossmann, I.E., 2020. Cutpoint ports: Taking into account crude oil prices as well as country and transportation
temperature surrogate modeling for distillation yields and properties. Ind. Eng. risks. Transp. Res. Part E Logist. Transp. Rev. 133, 101824. doi:10.1016/j.tre.2019.
Chem. Res. 59, 18616–18628. doi:10.1021/acs.iecr.0c02868. 101824.
Fu, G., Sanchez, Y., Mahalec, V., 2015. Hybrid model for optimization of crude oil Yang, Y., Barton, P.I., 2015. Integrated crude selection and refinery optimization un-
distillation units. AIChE J. 62, 1065–1078. doi:10.1002/aic.15086. der uncertainty. AIChE J. 62, 1038–1053. doi:10.1002/aic.15075.
Gao, X., Shang, C., Jiang, Y., Huang, D., Chen, T., 2014. Refinery scheduling with vary- Zhang, J., Zhu, X.X., Towler, G.P., 2001. A level-by-level debottlenecking approach in
ing crude: a deep belief network classification and multimodel approach. AIChE refinery operation. Ind. Eng. Chem. Res. 40, 1528–1540. doi:10.1021/ie990854w.
J. 60, 2525–2532. doi:10.1002/aic.14455.
Gutierrez, G., Galan, A., Sarabia, D., Prada, C.de, 2018. Two-stage stochastic optimiza-
tion of a hydrogen network. Ifac-Papersonline 51, 263–268. doi:10.1016/j.ifacol.
2018.09.310.

12

You might also like