Adjustable Robust Optimization for Planning Logistics Operations in Downstream Oil Networks

: The oil industry operates in a very uncertain marketplace, where uncertain conditions can engender oil production ﬂuctuations, order cancellation, transportation delays, etc. Uncertainty may arise from several sources and inexorably a ﬀ ect its management by interfering in the associated decision-making, increasing costs and decreasing margins. In this context, companies often must make fast and precise decisions based on inaccurate information about their operations. The development of mathematical programming techniques in order to manage oil networks under uncertainty is thus a very relevant and timely issue. This paper proposes an adjustable robust optimization approach for the optimization of the reﬁned products distribution in a downstream oil network under uncertainty in market demands. Alternative optimization techniques are studied and employed to tackle this planning problem under uncertainty, which is also cast as a non-adjustable robust optimization problem and a stochastic programing problem. The proposed models are then employed to solve a real case study based on the Portuguese oil industry. The results show minor discrepancies in terms of network proﬁtability and material ﬂows between the three approaches, while the major di ﬀ erences are related to problem sizes and computational e ﬀ ort. Also, the adjustable model shows to be the most adequate one to handle the uncertain distribution problem, because it balances more satisfactorily solution quality, feasibility and computational performance.


Introduction
In the oil industry, companies develop a set of activities and processes so that crude oil can be duly transformed into oil products demanded by final consumers such as petrochemical industries, airports and individual users [1]. The associated decision-making process is framed within a deeply complex context and addresses the oil exploration, production and transportation at upstream, oil refining at midstream, and oil product distribution and marketing at the downstream segments [2]. Most of these activities are difficult tasks and need to be properly accomplished. Decision-support tools based on mathematical programming techniques are often applied to assist such activities and processes across the oil supply chain [3]. These optimization tools are tailored to cover the underlying reality under study, and hence they are often stochastic large-scale programs, which normally increases the problem complexity [4].
In management sciences and engineering, the most widely-used modeling framework to cope with uncertainty has been two-stage stochastic programming [2], where the first-stage variables must be decided before the uncertainty realizations and the second-stage variables are decided in accordance with the uncertainty outcomes [5]. When either the information is missing or even the probability distribution of the uncertainty is not available, fuzzy programming could be an alternative framework to handle uncertainty in optimization problems by considering random parameters as fuzzy numbers

Two-Stage ARO Formulation
In the two-stage ARO modeling framework, the first-stage variables comprise the set of decisions that shall be made before the uncertainty is revealed and the second-stage variables include the set of decisions that must be made after the uncertainty is disclosed. The second-stage decision variables have fully adaptability to any realization of the uncertainty [25]. Considering a linear formulation and let x and y be the corresponding first-stage and second-stage decision variables, while U is either a polyhedral or a discrete uncertainty set, according to Zeng and Zhao [28], the general form of a two-stage ARO formulation can be defined as follows: s.t.Ax ≤ d, x ∈ S x (2) where F(x, u) = y ∈ S y : Gy ≤ h − Ex − Mu with S x ∈ R n + and S y ∈ R m + . If the uncertainty set U is continuous, the optimization problem (Equations (1) and (2)) will have an infinite number of constraints in the second-stage problem [27]. However, when U is a polyhedral uncertainty set, only its extreme points, i.e., its vertices, might belong to an optimal solution of that second-stage problem [25]. In accordance with Zeng and Zhao [28], when considering only a finite and discrete set of extreme points U = {u 1 , . . . , u r }, as well as the set of the respective recourse decision variables y 1 , . . . , y r , the prior optimization problem can be recast as presented below: s.t.Ax ≤ d (4) η ≤ b T y v , v = 1, . . . ,

Robust Objective Function
The notation used to formulate the two-stage ARO model is outlined in Table A1 of Appendix A. As shown in Equation (8), the objective function aims at maximizing the worst-case network profit (WCP), which can be stated as follows: where XCO i,t represents the crude oil purchase at oil refinery i in time point t and refers to the first-stage decisions. Q U (·) is defined as a function of the first-stage (here-and-now) decisions and denotes the worst-case recourse profit, which must be determined for the worst-case scenario of the uncertain product demands in the second-stage problem. Here, uncertainty is modeled through a polyhedral uncertainty set U, where the uncertain parameters can take values in, because such fact guides to define a robust counterpart that corresponds to a linear programming problem [27]. Equation (9) limits the amount of crude oil purchased by each oil refinery i at time point t by the corresponding oil demand. The worst-case recourse profit Q U (·) is equal to the objective function value of the next robust formulation, Equation (10), which can be formulated as follows: where U represents the polyhedral uncertainty set that is used to describe the stochastic parameters, R ∈ R + denotes the set of recourse decisions, i.e., R = {XR,XOP,XCO,XP,XS,XRP,XU,XE,XI,IO,IR,ID,IM}, H ∈ R + depicts the set of here-and-now decisions, H = {XCO}, and F is a set defined as a function of the set of here-and-now decisions H and the worst-case realization of the deviations ∆DP k,p,t from the nominal values DP k,p,t . Notice that the set of recourse decisions R is made after the outer minimization problem selects the worst-case realization of the deviations of the product demands ∆DP k,p,t . In other words, the min-max problem picks the worst realization of the demand that minimizes the network profit. Therefore, the robust modeling framework concerns with the maximization of the recourse profit in the worst-case scenario of the random parameter within the uncertainty set U. In summary, the two-stage RO model addresses the volumes of exported and imported products, refined oil, product yield fractions, primary and secondary product distributions, inventories of oil and products, and met and unmet demand as the second-stage decisions, which are adjusted to the volumes of purchased oil, i.e., the first-stage decisions, after uncertainty is disclosed.
The worst-case recourse profit Q U (·), i.e., Equation (10), includes the revenues from the sales of refined products by the oil refineries, margins from buying and selling refined products by the storage depots and local markets, and costs for exporting, importing, transporting, and storing refined products throughout the network. Before presenting the equations of the recourse optimization problem Q U (·), the associated revenues, margins and costs are now discussed, being outlined by the set of Equations (11)-(22) below: ∀k ∈ K, p ∈ P, t ∈ T, a 1 = r = retail, a 2 = re f inery, a 3 = depot (13) CE i,p,t = XE i,p,t × TN r,p ∀i ∈ I, p ∈ P, t ∈ T, r = export (14) CI h,p,t = XI h,p,t × PP a,p + TN r,p ∀h ∈ H, p ∈ P, t ∈ T, a = r = import (15) CPD i,p,t = (l,m)∈Route i,l,m XP i,l,m,p,t × CT m,p × Dist i,l,m ∀i ∈ I, p ∈ P, t ∈ T CSD j,p,t = (k,m)∈Route j,k,m XS j,k,m,p,t × CT m,p × Dist j,k,m ∀j ∈ J, p ∈ P, t ∈ T (17) CIM k,p,t = CKI × IM k,p,t × PP a,p,t ∀k ∈ K, p ∈ P, t ∈ T, a = retail CUD k,p,t = XU k,p,t × TN r,p ∀k ∈ K, p ∈ P, t ∈ T, r = unmet Equation (11) defines the refinery revenues obtained from the sales of refined products. Equations (12) and (13) determine the storage depot margins and the local market margins, respectively, being the difference between the revenues from selling refined products and the costs for buying these ones. Equations (14) and (15) specify, respectively, the costs of exporting and importing refined products. Equations (16) and (17) determine the costs for dispatching refined products through the primary and secondary distributions, in that order. Equation (18) defines the crude oil inventory costs at oil refineries, whereas Equations (19)-(21) define, respectively, the refined product inventory costs at oil Processes 2019, 7, 507 6 of 31 refineries, storage depots and local markets. Equation (22) represents the costs for not supplying the required product demand.

Equations of the Recourse Problem Q U (·)
Equations (23)-(45) of the second-stage problem Q U (·) depend on the worst-case realization of the stochastic parameters and are used to model the refinery operation, network flow allocation, inventory policy, and so on: ID j,p,t = ID j,p,t−1 + XI j,p,t + (i,m)∈Route i,j,m XP i,j,m,p,t − (k,m)∈Route j,k,m XS j,k,m,p,t ∀j ∈ J, p ∈ P, t ∈ T, t > t 1 (30) IM k,p,t = ISP k,p + (i,m)∈Route i,k,m XP i,k,m,p,t + ( j,m)∈Route j,k,m XS j,k,m,p,t + XU k,p,t − XRP k,p,t + ∆DP k,p,t ∀k ∈ K, p ∈ P, t ∈ T, t = t 1 (31) IM k,p,t = IM k,p,t−1 + (i,m)∈Route i,k,m XP i,k,m,p,t + ( j,m)∈Route j,k,m XS j,k,m,p,t + XU k,p,t − XRP k,p,t + ∆DP k,p,t ∀k ∈ K, p ∈ P, t ∈ T, t > t 1 (32) XRP k,p,t ≤ DP k,p,t + ∆DP k,p,t ∀k ∈ K, p ∈ P, t ∈ T (33) k∈Route j,k,m XS j,k,m,p,t ≤ ASSD j,m,p ∀j ∈ J, m ∈ M, p ∈ P, t ∈ T (39) p∈P XP i,l,m,p,t ≤ ACPD i,l,m ∀(i, l, m) ∈ Route i,l,m , t ∈ T (40) p∈P XS j,k,m,p,t ≤ ACSD j,k,m ∀( j, k, m) ∈ Route j,k,m , t ∈ T (41) Equation (23) limits the oil processed at oil refineries. Equation (24) defines the fractions obtained through the crude oil distillation process. Equations (25) and (26) control the crude oil balance, as well as Equations (27) and (28) handle the refined product balance, at oil refineries. Likewise, Equations (29) and (30) control the refined product balance at storage depots, as well as Equations (31) and (32) do it at local markets. Equation (33) limits the product supply at local markets by the nominal product demand plus the associated deviation. Equations (34)-(37) determine the storage capacities for the facilities in the network. Equation (38) limits the capacity of supplying refined products in the primary distribution, as well as Equation (39)

Definition of Uncertainty Set U
The uncertainty set is the key building block of the robust modeling framework [7]. It is assumed that the deviation of the product demand ∆DP k,p,t takes values within a convex and budget uncertainty set (Equations (46)-(48)) as follows-see [31]: ∆DP k,p,t = DP k,p,t − DP k,p,t ∀k ∈ K, p ∈ P, t ∈ T (46) Equation (46) defines the demand deviation ∆DP k,p,t as the difference between the uncertain value of the product demand DP k,p,t and the nominal value of the demand DP k,p,t . Equation (47) models the symmetrical and bounded range for the deviations of the product demand ∆DP k,p,t . Equation (48) ensures that the sum of the normalized absolute values of the demand deviations for each pair of location and product, across all time points t, must not exceed the user-defined budget of uncertainty Γ k,p . Notice that the normalized absolute value corresponds to the quotient between the absolute and maximum values of the demand deviation, while the uncertain value of the product demand refers to the unknown realization of the product demand. Appendix E includes an example showing how to define the vertices of a polyhedral budget uncertainty set.

The Adaptive Robust Formulation
In this section, the above robust formulation, that is, the set of Equations (8)-(48), is reformulated to be fully adaptive to the realizations of the uncertain deviations of the product demands ∆DP k,p,t . In order to transform the prior robust formulation into a single-level approach, the worst-case recourse profit Q U (·) may be denoted by an auxiliary variable α, which must be lower or equal to the difference among the financial items-see Equation (49). Moreover, the set of recourse decisions of the second-stage problem Q U (·) is reformulated as a function of the uncertain deviations of the product demands ∆DP k,p,t , which are defined by the uncertainty set U (Equations (46)-(48)). Because this uncertainty set U defines a polyhedron with infinite number of points, this reformulation would result in a recourse problem with an infinite number of variables and equations. For this reason, the uncertainty set U must be partitioned into K parts in order to make the resulting formulation tractable. According to Bertsimas et al. [25], only an extreme point (i.e., a vertex) of the defined polyhedron can be part of the optimal solution of the recourse problem Q U (·). Hence, only the set of vertices v ∈ V of the polyhedron defined through the uncertainty set U is considered in this adjustable robust formulation. Therefore, the adjustable robust formulation is defined in the following set of Equations (49)-(86): ∀j ∈ J, p ∈ P, t ∈ T, v ∈ V, a = r = depot, a 2 = re f inery (53) ∀k ∈ K, p ∈ P, t ∈ T, v ∈ V, a 1 = r = retail, a 2 = re f inery, a 3 = depot (54) CID j,p,t,v = CKI × ID j,p,t,v × PP a,p,t ∀j ∈ J, p ∈ P, t ∈ T, v ∈ V, a = depot (61) CIM k,p,t,v = CKI × IM k,p,t,v × PP a,p,t ∀k ∈ K, p ∈ P, t ∈ T, v ∈ V, a = retail (62) CUD k,p,t,v = XU k,p,t,v × TN r,p ∀k ∈ K, p ∈ P, t ∈ T, v ∈ V, r = unmet (63) XRP k,p,t,v ≤ DP k,p,t,v + ∆DP k,p,t,v ∀k ∈ K, p ∈ P, t ∈ T, v ∈ V (74) (i,m)∈Route i,k,m XP i,k,m,p,t,v + ( j,m)∈Route j,k,m XS j,k,m,p,t,v ≤ SC k,p × TCM k,p ∀k ∈ K, p ∈ P, t ∈ T, v ∈ V (84) XP i,l,m,p,t,v = 0 ∀i ∈ I, l ∈ L, p ∈ P, t ∈ T, v ∈ V, m = road, µ i,j,m > MTD (85) XS j,k,m,p,t,v = 0 ∀j ∈ J, k ∈ K, p ∈ P, t ∈ T, v ∈ V, m = road, µ j,k,m > MTD (86)

Case Study
The ARO model is applied to a real case study on a refined products network distribution in the Portuguese oil industry, which was originally characterized by Lima et al. [1]. Figure 1 represents the network under study. The network comprises two oil refineries (Sines and Matosinhos), three distribution centers (Boa nova, CLC and Mitrena), 278 local markets (Portuguese cities) and four transportation modes (pipeline transport, railway, roadway and waterway). In this network, the oil refineries import the same type of crude oil and produce eight refined products, namely, jet fuel, diesel, propane, butane, fuel oil, gas oil, gasoline 95 and gasoline 98. These refined products are then transported using pipelines, tanker ships, tank wagons and tank trucks from the oil refineries, and using only tank trucks from the distribution centers. Roadway is only considered for distances less than or equal to 250 km. The planning horizon considered is 6 months, which is discretized into monthly cycles. For the sake of comparison, the same database employed by Lima et al. [1] is used in the case study.

Results and Discussion
The proposed two-stage ARO model is implemented in GAMS 24.5.6 and solved using CPLEX 12.6 on an Intel(R) Xeon(R) processor CPU E5-2660 v3 @ with 2.60 GHz (two processors) and 64 GB RAM memory.

Setup of the ARO Model
In the practical application, the ARO model was run under a specific configuration of the budget uncertainty set (Equations (46)-(48)). In other words, the ARO model was solved after specifying the parameters of the polyhedral uncertainty set, namely, the nominal value , , and the maximum deviation in absolute value Δ , , of the uncertain product demand , , , besides the budget of uncertainty Γ , . The values of these parameters were estimated from the dataset described by Lima et al. [1]. Therefore, the maximum deviation Δ , , was estimated as 10% of the nominal value , , , while the budget of uncertainty Γ , was set to the average of the total relative deviations over the time horizon for the pairs of local market and product. To be more precise, for each pair of The network comprises two oil refineries (Sines and Matosinhos), three distribution centers (Boa nova, CLC and Mitrena), 278 local markets (Portuguese cities) and four transportation modes (pipeline transport, railway, roadway and waterway). In this network, the oil refineries import the same type of crude oil and produce eight refined products, namely, jet fuel, diesel, propane, butane, fuel oil, gas oil, gasoline 95 and gasoline 98. These refined products are then transported using pipelines, tanker ships, tank wagons and tank trucks from the oil refineries, and using only tank trucks from the distribution centers. Roadway is only considered for distances less than or equal to 250 km. The planning horizon considered is 6 months, which is discretized into monthly cycles. For the sake of comparison, the same database employed by Lima et al. [1] is used in the case study.

Results and Discussion
The proposed two-stage ARO model is implemented in GAMS 24.5.6 and solved using CPLEX 12.6 on an Intel(R) Xeon(R) processor CPU E5-2660 v3 @ with 2.60 GHz (two processors) and 64 GB RAM memory.

Setup of the ARO Model
In the practical application, the ARO model was run under a specific configuration of the budget uncertainty set (Equations (46)-(48)). In other words, the ARO model was solved after specifying the parameters of the polyhedral uncertainty set, namely, the nominal value DP k,p,t and the maximum deviation in absolute value ∆DP max k,p,t of the uncertain product demand DP k,p,t , besides the budget of uncertainty Γ k,p . The values of these parameters were estimated from the dataset described by Lima et al. [1]. Therefore, the maximum deviation ∆DP max k,p,t was estimated as 10% of the nominal value DP k,p,t , while the budget of uncertainty Γ k,p was set to the average of the total relative deviations over the time horizon for the pairs of local market and product. To be more precise, for each pair of location and product (k, p), the absolute value of the product demand deviation ∆DP k,p,t is normalized to the associated maximum deviation ∆DP max k,p,t at each time point. We then sum of all the so normalized deviations over the time horizon. Finally, we average these normalized values over all pairs of products and locations, and the result (let's denote it by Γ k,p ) is considered as the value of the budget of uncertainty, that is, Γ k,p for all (k, p). This results in Γ k,p = 0.895, for all (k, p), which leads to uncertainty sets (i.e., Equations (46)-(48)) consisting in polyhedrons of 12 vertices.

Comparison with the Developed Approaches
In this section, we compare the results given by the proposed adjustable robust optimization (ARO) model with those obtained using the equivalent non-adjustable robust optimization (NARO), stochastic programming (SP) and the deterministic (DM) models. The mathematical formulations, the model notations and the specific settings for the DM, NARO and SP models can be found in Appendix B, Appendix C, Appendix D, respectively. Table 1 presents the problem size, economic performance and solving time for all the optimization models. From Table 1, we can conclude that the economic performance (i.e., the profit) declines when uncertainty in demand for refined products is taken into consideration by the optimization model. On the other hand, a model in which all the parameters are considered as deterministic (DM) is not realistic, and it should consider random parameters to provide robustness and consistency to the decision maker.

Computational Performance
In this way, the SP model aims at maximizing the expected profit for a set of scenarios, while the robust approaches maximize the total profit of the worst-case scenario. Compared to the ARO approach, the profit is higher about 0.16% for the SP approach. When comparing both robust approaches, the ARO model shows a better economic performance, providing a profit that is almost 0.80% higher than the one returned by the NARO model, which is the most conservative approach.
The problem size is also different for all the considered formulations. That is, the size of the deterministic model is smaller than the other methods, and thus it requires less computational time (1.484 CPU seconds). The NARO model does not increase too much the problem size and the computational time, because its size raises as more dual variables and robust constraints are incorporated into the problem, and such an increase is at the same scale as the number of the added random parameters, which in this case is only the demand for refined products. Nevertheless, much more computational burden is demanded to solve the much bigger ARO and SP models (95.3 and 236.8 CPU seconds, respectively). The size of the ARO model relies on the size of the polyhedral uncertainty set (Equations (46)-(48)), which in turn is determined by the budget of uncertainty Γ k,p in Equation (48). The size of the scenario-based SP model depends on the number of the considered scenarios, which in this case amounts to 243, in order to model the uncertainty in the stochastic parameter. All in all, the ARO approach does not increase the problem size as much as the SP approach when compared with the nominal problem (i.e., DM), having better solution performance, while it approximates better the economic result of the SP when comparing to the NARO approach.

Insights about the Network Profitability
The contribution of the different activities to the network profitability is illustrated in Figure 2 for all the optimization models. The oil procurement costs and the refinery revenues are all included into the margins of the refinery sector, so that the comparisons can be possible with the margins of the distribution and market sectors. In general, the profit breakdown is not too affected when the case study is solved by the different models. As the only difference in these approaches is how uncertainty is modeled, the reason comes from that. Firstly, the same uncertainty set U is considered by both robust optimization approaches. Secondly, the stochastic approach provides an average result of the considered scenarios, which are properly defined in accordance with the level of uncertainty considered by the robust approaches. Lastly, the product demand uncertainty does not actually interfere too much in the profit breakdown. The contribution of the different activities to the network profitability is illustrated in Figure 2 for all the optimization models. The oil procurement costs and the refinery revenues are all included into the margins of the refinery sector, so that the comparisons can be possible with the margins of the distribution and market sectors. In general, the profit breakdown is not too affected when the case study is solved by the different models. As the only difference in these approaches is how uncertainty is modeled, the reason comes from that. Firstly, the same uncertainty set is considered by both robust optimization approaches. Secondly, the stochastic approach provides an average result of the considered scenarios, which are properly defined in accordance with the level of uncertainty considered by the robust approaches. Lastly, the product demand uncertainty does not actually interfere too much in the profit breakdown. As it can be seen in Figure 2, the market sector delivers the largest contribution to the network profitability, followed by the refining and distribution sectors, respectively. When comparing both robust approaches, the profit breakdown differs. The NARO model increases the shares of the refining and market sectors and decreases the contribution of the distribution sector when compared with the ARO model. The SP and DM models result in the same profit breakdown, which is slightly different from the one determined by the ARO model, where the market contribution rises 1% and the distribution sector diminishes 1%, whereas the share of the refining sector remains unaltered. Figure 3 compares the effective profitability contribution of the network sectors among the different optimization models. All the optimization approaches provide quite similar results for the refining sector. The same fact is not observed in the distribution and market sectors, where the NARO model returns the lowest economic performance. These facts corroborate that the NARO model is the most conservative approach to handle uncertainty in this case study. As it can be seen in Figure 2, the market sector delivers the largest contribution to the network profitability, followed by the refining and distribution sectors, respectively. When comparing both robust approaches, the profit breakdown differs. The NARO model increases the shares of the refining and market sectors and decreases the contribution of the distribution sector when compared with the ARO model. The SP and DM models result in the same profit breakdown, which is slightly different from the one determined by the ARO model, where the market contribution rises 1% and the distribution sector diminishes 1%, whereas the share of the refining sector remains unaltered. Figure 3 compares the effective profitability contribution of the network sectors among the different optimization models. All the optimization approaches provide quite similar results for the refining In order to get more insights about the network profitability, the cost breakdown information is also investigated. As abovementioned, refinery margins comprise the revenues for selling oil products and the cost for acquiring crude oil. The oil procurement cost is the major cost item, and accounts for at least 78.53% of the overall cost in all the developed approaches, while the other costs together account for at most 21.47% of the same total. The oil procurement cost amounts to 78.53%, 80.92%, 78.94% and 78.54% of the total network cost in the ARO, NARO, SP and DM approaches, respectively. The cost breakdown information of the studied models is illustrated in Figure 4. Even though the exportation and lost demand costs are included in the estimation of the cost breakdown, their slices of the overall cost are quite small, i.e., almost 0%, and hence they have been omitted to enhance the readability of the charts without loss of generality.
As shown in Figure 4, the total network cost is divided into the same proportions for both ARO and DM approaches, while the proportions are much different for the other approaches. For instance, the SP and NARO approaches have increased the oil procurement cost by 1% and 3%, respectively, and have decreased the total of the other costs by 1% and 3%, respectively, when compared with the previous approaches. In most cases, the importation cost is the second most relevant cost item, followed by the secondary and primary transportation costs, respectively. The inventory cost aggregates the costs for keeping inventories of oil and refined products at the network facilities and amounts to 1% of the overall cost. Figure 5 compares the absolute values of the cost items among the optimization methods. Notice that the oil procurement cost is not displayed, because it is much larger than the other cost items, and assumes quite similar values in all the methods, i.e., €2,408,811,163 on average. As it can be seen in Figure 5, the ARO and DM methods have much similar network costs, which are usually higher than the cost items for the NARO and SP models. Notice that the export and unmet demand costs are much smaller than the other cost items, and hence they are displayed in a different scale. Even though the NARO presents the best performance with regards to the network costs, its poorer performance in the network margins makes it as the most conservative approach. In turn, the SP model is the less conservative model, but it is not so efficient as the others in order to fulfill the required demand, and thus the lost demand is larger. In order to get more insights about the network profitability, the cost breakdown information is also investigated. As abovementioned, refinery margins comprise the revenues for selling oil products and the cost for acquiring crude oil. The oil procurement cost is the major cost item, and accounts for at least 78.53% of the overall cost in all the developed approaches, while the other costs together account for at most 21.47% of the same total. The oil procurement cost amounts to 78.53%, 80.92%, 78.94% and 78.54% of the total network cost in the ARO, NARO, SP and DM approaches, respectively. The cost breakdown information of the studied models is illustrated in Figure 4. Even though the exportation and lost demand costs are included in the estimation of the cost breakdown, their slices of the overall cost are quite small, i.e., almost 0%, and hence they have been omitted to enhance the readability of the charts without loss of generality.
As shown in Figure 4, the total network cost is divided into the same proportions for both ARO and DM approaches, while the proportions are much different for the other approaches. For instance, the SP and NARO approaches have increased the oil procurement cost by 1% and 3%, respectively, and have decreased the total of the other costs by 1% and 3%, respectively, when compared with the previous approaches. In most cases, the importation cost is the second most relevant cost item, followed by the secondary and primary transportation costs, respectively. The inventory cost aggregates the costs for keeping inventories of oil and refined products at the network facilities and amounts to 1% of the overall cost. Figure 5 compares the absolute values of the cost items among the optimization methods. Notice that the oil procurement cost is not displayed, because it is much larger than the other cost items, and assumes quite similar values in all the methods, i.e., €2,408,811,163 on average. As it can be seen in Figure 5, the ARO and DM methods have much similar network costs, which are usually higher than the cost items for the NARO and SP models. Notice that the export and unmet demand costs are much smaller than the other cost items, and hence they are displayed in a different scale. Even though the NARO presents the best performance with regards to the network costs, its poorer performance in the network margins makes it as the most conservative approach. In turn, the SP model is the less conservative model, but it is not so efficient as the others in order to fulfill the required demand, and thus the lost demand is larger.        Figure 6 shows how the total volume, which is transported over the network, is divided into different proportions by using the optimization models. As it can be observed, the ARO and DM models return the same volume portions, what is fully consistent with the cost breakdown information in Figure 4. However, the SP and NARO models provide different results when compared with the previous models, but some similarities are also observed. For instance, the amount of oil processed also corresponds to the largest slice of the total network volume, and the associated percentages are 26% and 28% in the SP and DM models, respectively. The oil delivery refers to the second biggest piece of the total volume, and accounts for 23% in the ARO, SP and DM models and 24% in the NARO model. Notice that, at all the volume charts, the oil processed is higher than the oil delivery due to the initial oil inventory at oil refineries in the first-time point, which is consumed throughout the planning horizon. models return the same volume portions, what is fully consistent with the cost breakdown information in Figure 4. However, the SP and NARO models provide different results when compared with the previous models, but some similarities are also observed. For instance, the amount of oil processed also corresponds to the largest slice of the total network volume, and the associated percentages are 26% and 28% in the SP and DM models, respectively. The oil delivery refers to the second biggest piece of the total volume, and accounts for 23% in the ARO, SP and DM models and 24% in the NARO model. Notice that, at all the volume charts, the oil processed is higher than the oil delivery due to the initial oil inventory at oil refineries in the first-time point, which is consumed throughout the planning horizon.

Network Planning for the Refined Products Distribution
As it can be seen in Figure 6, the portion of volumes conveyed through primary distribution is considerably bigger than the piece of volumes distributed via secondary distribution. The secondary distribution costs are much bigger than the primary distributions cost as displayed in Figures 4 and  5, because the former is only performed via roadway, i.e., the most expensive way to convey refined products in the network, while the latter can be undertaken by any transportation mode. Similarly, the importation volumes are lower than the exportation volumes, but they generate much bigger costs due to the importation tariffs that are paid to bring the refined product into the Portuguese network. The inventory volumes also present a certain relevance in the network and account for 3% or 4% of the total network volume.  Figure 7 displays the actual volumes determined by solving the case study using the optimization approaches. The NARO model presents the most different network flows among the optimization models, as well as the worst overall performance. Although the NARO model defines to purchase and process the same volumes of crude oil seen in the other models, the network flows As it can be seen in Figure 6, the portion of volumes conveyed through primary distribution is considerably bigger than the piece of volumes distributed via secondary distribution. The secondary distribution costs are much bigger than the primary distributions cost as displayed in Figures 4 and 5, because the former is only performed via roadway, i.e., the most expensive way to convey refined products in the network, while the latter can be undertaken by any transportation mode. Similarly, the importation volumes are lower than the exportation volumes, but they generate much bigger costs due to the importation tariffs that are paid to bring the refined product into the Portuguese network. The inventory volumes also present a certain relevance in the network and account for 3% or 4% of the total network volume. Figure 7 displays the actual volumes determined by solving the case study using the optimization approaches. The NARO model presents the most different network flows among the optimization models, as well as the worst overall performance. Although the NARO model defines to purchase and process the same volumes of crude oil seen in the other models, the network flows through the primary and secondary distributions are significantly shorter, besides the inventories are sensibly higher. Hence, the NARO model does not provide a network that is so profitable as the other models do -see Table 1. Notice that these other models present much similar performances. However, the SP model is the only one that has a so evident lost demand.
Processes 2019, 7, x FOR PEER REVIEW 17 of 32 through the primary and secondary distributions are significantly shorter, besides the inventories are sensibly higher. Hence, the NARO model does not provide a network that is so profitable as the other models do -see Table 1. Notice that these other models present much similar performances. However, the SP model is the only one that has a so evident lost demand.

General Aspects about the Developed Modeling Frameworks
All the proposed approaches are useful to handle uncertainty in DOSC problems, and some conclusions can be withdrawn from the previous analyses. Under a second-stage stochastic programming approach, the decision variables are separated into two different groups, i.e., the firstand second-stage variables. This is a troublesome task, which depends on the decision maker's knowledge about the problem under study [8]. Nonetheless, once this separation is successfully performed, it may improve the model robustness against infeasibilities caused by the realization of the random parameters, because the second-stage variables might be properly adjusted to any particular realization of uncertainty [6]. In general, stochastic programming with recourse might be a good option when the probability distribution of the random parameters can be obtained from the historical data, such that a set of scenarios, i.e., a scenario tree, can be generated to represent the underlying uncertainty [32]. The decision maker can precisely model uncertainty by eliminating the undesirable scenarios and specifying the most adequate scenarios. However, the assignment of probabilities to scenarios, as well as the definition of scenario tree frameworks, could not be easy. Additionally, a wide range of scenarios should be considered to model uncertainty adequately, which could result in large-scale or even intractable mathematical programs [31]. Hence, the use of decomposition methods and approximation schemes for their solution are usually employed to solve this class of optimization problems [33].
In contrast to stochastic programming, robust optimization does not assume that uncertainty has a probability distribution [27], but alternatively it assumes that uncertainty is represented through uncertainty sets [29]. In this way, the decision maker can represent uncertainty in the random parameters by defining their nominal values and variation amplitudes from the historical data. Another advantage of employing robust optimization is the computational tractability for solving numerous classes of uncertainty sets and problem types [25]. In this methodology, the decision maker aims at establishing a feasible solution for any realization of the random parameters in a given uncertainty set [34], while the decision maker can control the trade-off between robustness and performance by using a budget of uncertainty that is introduced in the prescribed set [35]. However, a single-stage (non-adjustable) robust optimization approach tends to be very conservative because

General Aspects about the Developed Modeling Frameworks
All the proposed approaches are useful to handle uncertainty in DOSC problems, and some conclusions can be withdrawn from the previous analyses. Under a second-stage stochastic programming approach, the decision variables are separated into two different groups, i.e., the firstand second-stage variables. This is a troublesome task, which depends on the decision maker's knowledge about the problem under study [8]. Nonetheless, once this separation is successfully performed, it may improve the model robustness against infeasibilities caused by the realization of the random parameters, because the second-stage variables might be properly adjusted to any particular realization of uncertainty [6]. In general, stochastic programming with recourse might be a good option when the probability distribution of the random parameters can be obtained from the historical data, such that a set of scenarios, i.e., a scenario tree, can be generated to represent the underlying uncertainty [32]. The decision maker can precisely model uncertainty by eliminating the undesirable scenarios and specifying the most adequate scenarios. However, the assignment of probabilities to scenarios, as well as the definition of scenario tree frameworks, could not be easy. Additionally, a wide range of scenarios should be considered to model uncertainty adequately, which could result in large-scale or even intractable mathematical programs [31]. Hence, the use of decomposition methods and approximation schemes for their solution are usually employed to solve this class of optimization problems [33].
In contrast to stochastic programming, robust optimization does not assume that uncertainty has a probability distribution [27], but alternatively it assumes that uncertainty is represented through uncertainty sets [29]. In this way, the decision maker can represent uncertainty in the random parameters by defining their nominal values and variation amplitudes from the historical data. Another advantage of employing robust optimization is the computational tractability for solving numerous classes of uncertainty sets and problem types [25]. In this methodology, the decision maker aims at establishing a feasible solution for any realization of the random parameters in a given uncertainty set [34], while the decision maker can control the trade-off between robustness and performance by using a budget of uncertainty that is introduced in the prescribed set [35]. However, a single-stage (non-adjustable) robust optimization approach tends to be very conservative because all decisions are made before uncertainty is revealed [27] while a two-stage adjustable robust optimization has a higher modeling capability, in which the second-stage problem models decision making after the first-stage decisions are made and uncertainty is disclosed [28].
Generally, the proposed modeling frameworks showed to be efficient and effective to cope with DOSC problems under uncertainty. These methodologies present different goals and consider specific assumptions and simplifications to represent uncertainty. Therefore, the most adequate methodology depends on the considered problem, the dataset and the decision maker preferences.

Conclusions
In this paper, a two-stage adjustable robust optimization model is developed to deal with demand uncertainty in the tactical planning of refined products distribution in a downstream oil supply chain. The adjustable robust model is then compared with its non-adjustable, stochastic and deterministic counterparts, whose objectives are different, that is, the robust approaches concern to maximize the profit at the worst-case scenario, the stochastic approach aims at maximizing the expected profit for a set of scenarios, and the deterministic approach at maximizing the total profit of the nominal problem. However, all the optimization approaches provide comparable results in terms of economic performance and material flows, and the major discrepancies occur with regards to problem sizes and computational properties.
Specifically, the obtained results show that the non-adjustable model is the most conservative, while the stochastic model is in turn the least conservative. However, the main drawback of the stochastic approach is the limitation of problem size due to the computational burden, while the major advantage of the non-adjustable robust approach is that the problem size is not overly enlarged with regards to the nominal deterministic approach. In comparison, the adjustable robust model establishes a problem that is not as short as its non-adjustable counterpart, as well as is not so big as its stochastic counterpart, so that the model tractability issues are reasonable. All the optimization approaches provide different network flows, but too comparable. The adjustable approach presents the best performance in this respect among the developed approaches to cope with uncertainty, because it provides the highest service level in order to fulfill the required demand for refined products. In contrast, the non-adjustable approach has the most inferior performance over the supply chain, whose network flows are majorly lower in the primary and secondary distributions, for example.
In summary, all the developed optimization approaches are valuable to deal adequately with refined products distribution under uncertainty. Each approach has a specific objective and assumes distinct assumptions and simplifications in order to model and represent adequately uncertainty. Hence, the most appropriate method depends on the problem under study, as well as on the available dataset and on the decision maker preferences.
As future work, and as a direct extension of the present work, the two-stage ARO model could be further explored to include other uncertainty sets, as well as modeling more than one uncertainty type simultaneously, ex. crude oil and product prices. Also, other approaches to deal with uncertainty could be explored such as fuzzy programming and chance-constrained programming. In addition, Markov chain and game theory might be investigated and employed to cope with the stochastic parameters. Finally, the studied approaches to deal with uncertainty could be also applied to the strategic and tactical problem of the downstream oil network allowing for the design and planning of such system. Initial stock of oil at refinery i ISP n,p Initial stock of product p at node n MTD Maximum travel distance in meters allowed in the road transportation mode PC i Processing capacity at refinery i PO t Price of oil at time point t PP a,p,t Price of product p at activity a at time point t Route n,o,m Route between nodes n and o connected by transportation mode m SC n,p Storage capacity of product p at node n SCO i Storage capacity of oil at refinery i SSO i Safety stock of oil at refinery i defined as a percentage of the overall oil storage capacity SSP n Safety stock of products at node n defined as a percentage of the overall storage capacity TN r,p Tariff per network stage r and product p TCM n,p Throughput capacity multiplier per node n and product p YF i,p Yield fractions by refinery i of product p per cubic meters of oil Γ k,p Budget of uncertainty for deviations of the demand for product p at market k  The deterministic formulation is briefly reported below through its objective function (Equations (A1)-(A13)), network equations (Equations (A14)-(A37)) and model notation (Table A2). For the sake of brevity, the descriptions of the equations are omitted, but the adjustable robust optimization (ARO) counterpart can be consulted within the full paper for further details.
Objective function MD j,p,t = (k,m)∈Route i,j,m XS j,k,m,p,t × PP a,p,t − TN r,p − (i,m)∈Route i,j,m XP i,j,m,p,t × PP a 2 ,p,t ∀ j ∈ J, p ∈ P, t ∈ T, a = r = depot, a 2 = re f inery (A3) MC k,p,t = XRP k,p,t − XU k,p,t × PP a 1 ,p,t − TN r,p − [( (i,m)∈Route i,k,m XP i,k,m,p,t ) ×PP a 2 ,p,t + ( ( j,m)∈Route j,k,m XS j,k,m,p,t ) × PP a 3 ,p,t ] ∀k ∈ K, p ∈ P, t ∈ T, a 1 = r = retail, a 2 = re f inery, a 3 = depot (A4) CE i,p,t = XE i,p,t × TN r,p ∀i ∈ I, p ∈ P, t ∈ T, r = export (A5) CI h,p,t = XI h,p,t × PP a,p + TN r,p ∀h ∈ H, p ∈ P, t ∈ T, a = r = import (A6) CPD i,p,t = (l,m)∈Route i,l,m XP i,l,m,p,t × CT m,p × Dist i,l,m ∀i ∈ I, p ∈ P, t ∈ T (A7) CSD j,p,t = (k,m)∈Route j,k,m XS j,k,m,p,t × CT m,p × Dist j,k,m ∀j ∈ J, p ∈ P, t ∈ T (A8) CIR i,p,t = CKI × IR i,p,t × PP a,p,t ∀i ∈ I, p ∈ P, t ∈ T, a = re f inery (A10) CID j,p,t = CKI × ID j,p,t × PP a,p,t ∀j ∈ J, p ∈ P, t ∈ T, a = depot (A11) CIM k,p,t = CKI × IM k,p,t × PP a,p,t ∀k ∈ K, p ∈ P, t ∈ T, a = retail (A12) CUD k,p,t = XU k,p,t × TN r,p ∀k ∈ K, p ∈ P, t ∈ T, r = unmet (A13) IR i,p,t = ISP i,p + XR i,p,t + XI i,p,t − (l,m)∈Route i,l,m XP i,l,m,p,t − XE i,p,t ∀i ∈ I, p ∈ P, t ∈ T, t = t 1 (A19) IR i,p,t = IR i,p,t−1 + XR i,p,t + XI i,p,t − (l,m)∈Route i,l,m XP i,l,m,p,t − XE i,p,t ∀i ∈ I, p ∈ P, t ∈ T, t > t 1 (A20) ID j,p,t = ISP j,p + XI j,p,t + (i,m)∈Route i, j,m XP i,j,m,p,t − (k,m)∈Route j,k,m XS j,k,m,p,t ∀j ∈ J, p ∈ P, t ∈ T, t = t 1 (A21) ID j,p,t = ID j,p,t−1 + XI j,p,t + (i,m)∈Route i,j,m XP i,j,m,p,t − (k,m)∈Route j,k,m XS j,k,m,p,t ∀j ∈ J, p ∈ P, t ∈ T, t > t 1 (A22) IM k,p,t = ISP k,p + (i,m)∈Route i,k,m XP i,k,m,p,t + ( j,m)∈Route j,k,m XS j,k,m,p,t + XU k,p,t − XRP k,p,t ∀k ∈ K, p ∈ P, t ∈ T, t = t 1 (A23) IM k,p,t = IM k,p,t−1 + (i,m)∈Route i,k,m XP i,k,m,p,t + ( j,m)∈Route j,k,m XS j,k,m,p,t + XU k,p,t − XRP k,p,t ∀k ∈ K, p ∈ P, t ∈ T, t > t 1 (A24) XRP k,p,t ≤ DP k,p,t ∀k ∈ K, p ∈ P, t ∈ T (A25) SSP i × SC i,p ≤ IR i,p,t ≤ SC i,p ∀i ∈ I, p ∈ P, t ∈ T (A27) SSP j × SC j,p ≤ ID j,p,t ≤ SC j,p ∀j ∈ J, p ∈ P, t ∈ T (A28) SSP k × SC k,p ≤ IM k,p,t ≤ SC k,p ∀k ∈ K, p ∈ P, t ∈ T (A29) l∈Route i,l,m XP i,l,m,p,t ≤ ASPD i,m,p ∀i ∈ I, m ∈ M, p ∈ P, t ∈ T (A30) k∈Route j,k,m XS j,k,m,p,t ≤ ASSD j,m,p ∀j ∈ J, m ∈ M, p ∈ P, t ∈ T (A31) p∈P XP i,l,m,p,t ≤ ACPD i,l,m ∀(i, l, m) ∈ Route i,l,m , t ∈ T (A32) p∈P XS j,k,m,p,t ≤ ACSD j,k,m ∀( j, k, m) ∈ Route j,k,m , t ∈ T (A33) (i,m)∈Route i,j,m XP i,j,m,p,t + XI j,p,t ≤ SC j,p × TCM j,p ∀j ∈ J, p ∈ P, t ∈ T (A34) (i,m)∈Route i,k,m XP i,k,m,p,t + ( j,m)∈Route j,k,m XS j,k,m,p,t ≤ SC k,p × TCM k,p ∀k ∈ K, p ∈ P, t ∈ T (A35) XP i,l,m,p,t = 0 ∀i ∈ I, l ∈ L, p ∈ P, t ∈ T, m = road, µ i,j,m > MTD (A36) XS j,k,m,p,t = 0 ∀j ∈ J, k ∈ K, p ∈ P, t ∈ T, m = road, µ j,k,m > MTD (A37)  Demand of oil at refinery i at time point t DP k,p,t Demand of product p per market k at time point t ISO i Initial stock of oil at refinery i ISP n,p Initial stock of product p at node n MTD Maximum travel distance in meters allowed in the road transportation mode PC i Processing capacity at refinery i PO t Price of oil at time point t PP a,p,t Price of product p at activity a at time point t Route n,o,m Route between nodes n and o connected by transportation mode m SC n,p Storage capacity of product p at node n SCO i Storage capacity of oil at refinery i SSO i Safety stock of oil at refinery i defined as a percentage of the overall oil storage capacity SSP n Safety stock of products at node n defined as a percentage of the overall storage capacity TN r,p Tariff per network stage r and product p TCM n,p Throughput capacity multiplier per node n and product p YF i,p Yield fractions by refinery i of product p per cubic meters of oil Cost of importing product p by refinery or depot h at time point t CID j,p,t Cost of inventory at depot j for product p at time point t CIM k,p,t Cost of inventory at market k for product p at time point t CIO i,t Cost of inventory for oil at refinery i at time point t CIR i,p,t Cost of inventory at refinery i for product p at time point t CPD i,p,t Cost of primary distribution from refinery i for product p at time point t CSD j,p,t Cost of secondary distribution from depot j for product p at time point t CUD k,p,t Cost of unsatisfied demand for product p at market k at time point t ID j,p,t Inventory of product p at depot j at time point t IM k,p,t Inventory of product p at market k at time point t IO i,t Inventory of oil at refinery i at time point t IR i,p,t Inventory of product p at refinery i at time point t XCO i,t Volume of crude oil received by refinery i at time point t XE i,p,t Volume of product p exported by refinery i at time point t XI h,p,t Volume of product p imported by refinery or depot h at time point t XOP i,t

Appendix C. Non-Adjustable Robust Optimization (NARO) Mathematical Formulation
The non-adjustable robust formulation considers the same polyhedral budget uncertainty set of its equivalent ARO model, presented in the full paper. Hereinafter, the NARO model is introduced through its objective function (Equations (A38)-(A50)), network equations (Equations (A51)-(A77)) and model notation (Table A3). The presentation of the ARO model in the full paper must be consulted for details on the descriptions of the equations.
Objective  ∀k ∈ K, p ∈ P, t ∈ T, a 1 = r = retail, a 2 = re f inery, a 3 = depot (A41) CE i,p,t = XE i,p,t × TN r,p ∀i ∈ I, p ∈ P, t ∈ T, r = export (A42) CI h,p,t = XI h,p,t × PP a,p + TN r,p ∀h ∈ H, p ∈ P, t ∈ T, a = r = import (A43) CPD i,p,t = (l,m)∈Route i,l,m XP i,l,m,p,t × CT m,p × Dist i,l,m ∀i ∈ I, p ∈ P, t ∈ T (A44) CSD j,p,t = (k,m)∈Route j,k,m XS j,k,m,p,t × CT m,p × Dist j,k,m ∀j ∈ J, p ∈ P, t ∈ T (A45) IR i,p,t = ISP i,p + XR i,p,t + XI i,p,t − (l,m)∈Route i,l,m XP i,l,m,p,t − XE i,p,t ∀i ∈ I, p ∈ P, t ∈ T, t = t 1 (A56) IR i,p,t = IR i,p,t−1 + XR i,p,t + XI i,p,t − (l,m)∈Route i,l,m XP i,l,m,p,t − XE i,p,t ∀i ∈ I, p ∈ P, t ∈ T, t > t 1 (A57) XP i,j,m,p,t + XI j,p,t ≤ SC j,p × TCM j,p ∀j ∈ J, p ∈ P, t ∈ T (A74) (i,m)∈Route i,k,m XP i,k,m,p,t + ( j,m)∈Route j,k,m XS j,k,m,p,t ≤ SC k,p × TCM k,p ∀k ∈ K, p ∈ P, t ∈ T (A75) XP i,l,m,p,t = 0 ∀i ∈ I, l ∈ L, p ∈ P, t ∈ T, m = road, µ i,j,m > MTD (A76) XS j,k,m,p,t = 0 ∀j ∈ J, k ∈ K, p ∈ P, t ∈ T, m = road, µ j,k,m > MTD (A77) h ∈ H = I ∪ J Set of refineries and depots l ∈ L = J ∪ K Set of depots and markets Cost of importing product p by refinery or depot h at time point t CID j,p,t Cost of inventory at depot j for product p at time point t CIM k,p,t Cost of inventory at market k for product p at time point t CIO i,t Cost of inventory for oil at refinery i at time point t CIR i,p,t Cost of inventory at refinery i for product p at time point t CPD i,p,t Cost of primary distribution from refinery i for product p at time point t CSD j,p,t Cost of secondary distribution from depot j for product p at time point t CUD k,p,t Cost of unsatisfied demand for product p at market k at time point t ID j,p,t Inventory of product p at depot j at time point t IM k,p,t Inventory of product p at market k at time point t IO i,t Inventory of oil at refinery i at time point t IR i,p,t Inventory of product p at refinery i at time point t XCO i,t Volume of crude oil received by refinery i at time point t XE i,p,t Volume of product p exported by refinery i at time point t XI h,p,t Volume of product p imported by refinery or depot h at time point t XOP i,t Volume of oil processed by refinery i at time point t XP i,l,m,p,t Volume of product p sent by refinery i to depot or market l by transportation mode m at time point t XR i,p,t Volume of product p yielded by refinery i at time point t XRP k,p,t Volume of product p delivered to market k at time point t XS j,k,m,p,t Volume of product p sent by depot j to market k by transportation mode m at time point t XU k,p,t Volume of unsatisfied demand per market k and product p at time point t

Continuous variables
Profit Profit for the downstream oil supply chain over the planning horizon MD j,p,t Margin per depot j and product p at time point t MC k,p,t Margin per consumer market k and product p at time point t MR i,p,t Margin per refinery i at time point t Binary variable

Y g
Auxiliary variable to aid the robust formulation to handle product demand uncertainty, where g = |I| + 1 Budget parameter to adjust the robustness of product demand DP max k,p,t Maximum variation in product demand for market k and product p at time point t Robust dual variables η demand k,p Dual variable associated with the establishment of the budget parameter of product demand ξ + demand k,p,t Quantify the sensitivity to positive deviation in product demand for market k and product p at time point t ξ − demand k,p,t Quantify the sensitivity to negative deviation in product demand for market k and product p at time point t

Appendix D. Stochastic Mathematical Programming Formulation
The two-stage stochastic programming (SP) model is formulated using node-variable formulation, where the decision variables of the optimization problem are associated with the nodes of the scenario tree. The objective function (Equations (A78)-(A92)), network equations (Equations (A93)-(A117)) and model notation (Table A4) of the SP model are presented below. The scenario tree to represent the evolution of the product demands is established considering an optimistic growth of 5% with 0.35 probability, a realistic and unchangeable occurrence of 0% with 0.50 probability and a pessimistic decrease of 10% with 0.15 probability, in accordance with the reasoning developed by Fernandes et al. [36]. For more details about the SP formulation, the interested reader is referred to Lima et al. [1].
Objective RR i,t = p∈P XR i,p,t,s × PP a,p,t − TN r,p ∀i ∈ I, (t, s) ∈ TS, a = r = re f inery (A81) MD j,p,t,s = [ (k,m)∈Route j,k,m XS j,k,m,p,t,s × PP a,p,t − TN r,p ] − [ (i,m)∈Route i,j,m XP i,j,m,p,t,s × PP a 2 ,p,t ] ∀j ∈ J, p ∈ P, (t, s) ∈ TS, a = r = depot, a 2 = re f inery (A82) MC k,p,t,s = XRP k,p,t,s − XU k,p,t,s × PP a 1 ,p,t − TN r,p − [( (i,m)∈Route i,k,m XP i,k,m,p,t,s ) ×PP a 2 ,p,t + ( ( j,m)∈Route j,k,m XS j,k,m,p,t,s ) × PP a 3 ,p,t ] ∀k ∈ K, p ∈ P, (t, s) ∈ TS, a 1 = r = retail, a 2 = re f inery, a 3 = depot (A83) CE i,p,t,s = XE i,p,t,s × TN r,p ∀i ∈ I, p ∈ P, (t, s) ∈ TS, r = export (A84) CI h,p,t,s = XI h,p,t,s × PP a,p,s + TN r,p ∀h ∈ H, p ∈ P, (t, s) ∈ TS, a = r = import (A85) CPD i,p,t,s = (l,m)∈Route i,l,m XP i,l,m,p,t,s × CT m,p × Dist i,l,m ∀i ∈ I, p ∈ P, (t, s) ∈ TS (A86) p∈P XP i,l,m,p,t,s ≤ ACPD i,l,m ∀(i, l, m) ∈ Route i,l,m , (t, s) ∈ TS (A112) p∈P XS j,k,m,p,t,s ≤ ACSD j,k,m ∀( j, k, m) ∈ Route j,k,m , (t, s) ∈ TS (A113) (i,m)∈Route i,j,m XP i,j,m,p,t,s + XI j,p,t,s ≤ SC j,p × TCM j,p ∀j ∈ J, p ∈ P, (t, s) ∈ TS (A114) (i,m)∈Route i,k,m XP i,k,m,p,t,s + ( j,m)∈Route j,k,m XS j,k,m,p,t,s ≤ SC k,p × TCM k,p ∀k ∈ K, p ∈ P, (t, s) ∈ TS (A115) XP i,l,m,p,t,s = 0 ∀i ∈ I, l ∈ L, p ∈ P, (t, s) ∈ TS, m = road, Dist i,j,m > MTD (A116) XS j,k,m,p,t,s = 0 ∀j ∈ J, k ∈ K, p ∈ P, (t, s) ∈ TS, m = road, Dist j,k,m > MTD (A117)  Demand of oil at refinery i at time point t DP k,p Demand of product p per market k DPR k,p,t,s Demand realization of product p for market k in time point t and state s ISO i Initial stock of oil at refinery i ISP n,p Initial stock of product p at network node n MTD Maximum travel distance in meters allowed in the road transportation mode NTP Number of time points P s Probability of each state s in the scenario tree approach PC i Processing capacity at refinery i PO t Price of oil at activity a at time point t PP a,p,t Price of product p at activity a and time point t SC n,p Storage capacity of product p at network node n SCO i Storage capacity of oil at refinery i SSO i Safety stock of oil at refinery i defined as a percentage of the overall oil storage capacity SSP n Safety stock of products at network node n defined as a percentage of the overall storage capacity TN r,p Tariff per network stage r and product p TCM n,p Throughput capacity multiplier per network node n and product p YF i,p Yield fractions by refinery i of product p per cubic meters of oil χ p Market tendency per product p ψ s Market tendency per state s