A STOCHASTIC PROGRAMMING APPROACH TO LIQUIFIED NATURAL GAS PLANNING

This work reports on modeling and numerical experience in solving the liquefied natural gas (LNG) planning for an oil and gas company. We developed a model to optimize said purchase, optimizing the amount of LNG bought on the spot and on the long-term markets, based on the predicted demand for the planning horizon. A stochastic approach to address uncertainties related to the LNG demand and spot prices is presented. The expected cost of the operation is minimized, considering stock costs and the possibility to export the surplus gas. Numerical experiments in a real-life case are assessed.


INTRODUCTION
Natural gas is one of the current cleanest burning fossil fuel.Liquefied natural gas (LNG) is natural gas, cooled to -160 degrees Celsius to keep it in a liquid form.It is non-toxic, odorless, non-corrosive and less dense than water.Compared to conventional natural gas, LNG takes 600 times less space to stock and it can be shipped overseas, dramatically increasing its potential markets -conventional natural gas is usually transported through pipelines.Because it is a stable, low-risk fuel, it has been safely used and transported around the world for approximately 50 years and has been used throughout the world to reduce carbon dioxide emissions.Compared to coal, natural gas produces far fewer carbon dioxide and sulfur emissions.As a fuel, LNG produces relatively low emissions when burned.
When returned to its gaseous state, LNG is used across the residential, commercial and industrial sectors for purposes as diverse as heating and cooling homes, cooking, generating electricity and manufacturing paper, metal, glass and other materials.LNG is also increasingly being used to fuel heavy-duty vehicles.If it spills, LNG will warm, rise and dissipate into the atmosphere.
Driven by surging natural gas consumption in Asia and in the United States, global use of this form of fossil fuel rebounded 7.4% from its 2009 slump to hit a record 111.9 trillion cubic feet in 2010.This increase puts natural gas share of total energy consumption at 23.8%, a reflection of new pipelines and natural gas terminals in many countries.
Current prices differ widely between markets.Relying on imports to build new gas demand will seem risky to some countries.In the power sector (which nowadays consumes about 40% of world gas production) the market for gas depends on government policies for coal, nuclear and renewable rather than on factors intrinsic to the gas industry.As many oil and gas companies switch their emphasis from the oil to the gas business, the policies and dynamics influencing the utilities sector and potentially transport will be of growing strategic concern.However, a golden age for gas may not prevail soon or everywhere, causing investors to be concerned about the cost-competitiveness of new projects.
Therefore, there is a need for an optimization model that will define the best moment and the amounts of LNG to be purchased in the spot market or in the long-term market, as well as the stock management and loads to be exported.This set of decisions will be called, from now on, the LNG planning.
Nowadays, LNG has an important role in the Brazilian energy matrix.There are 3 regasification terminals currently in the country, at which LNG is heated up and taken back to its gaseous form, all of them belonging to Petrobras, brazilian biggest oil company.In addition to these ports, Petrobras has several long-term chartered vessels, comprising an heterogeneous fleet.These ships are the most substantial natural gas stocks currently existent in Brazil, and can also be used to export LNG or to carry an LNG load purchased on FOB mode.
The use of natural gas in the country is not only restricted to the supply of this commodity to customers, but also of great importance as a fuel for power plants in energy generation.However, due to volatility of the dispatch of these plants, and especially due to the short time between the dispatch order and the moment from which the plant should be generating energy, an optimal LNG planning is necessary.In Figure 1 the consequences of good and bad planning are shown.A natural way to address uncertainties in the LNG planning problem consists in modeling the problem into the framework of stochastic programming with recourse, as defined in Birge & Louveaux (1997).By using this framework, a set of possible scenarios (representing uncertain data realizations) approximates the real stochastic distribution of these uncertainties.
More precisely, this paper describes an optimization-based approach to a company's LNG planning in order to meet demand over time.The optimal scheduling (basically, volume of purchased, exported and stocked volumes of LNG) is formulated as a mixed linear integer programming (MILP) problem, where the objective function is the maximization of a company's total expected profit (this profit corresponds to the difference between the worth obtained by exportation of surplus gas, considering different scenarios of demand/prices, and the cost of LNG purchases and stock).
Such problem was modelled as a two-stage stochastic linear problem, meaning that some decisions -long-term load contracts -are of here-and-now type, i.e., they do not depend directly on the uncertain data.In each scenario, the decision maker can wait-and-see the uncertainty revealed, and take recourse decisions such as spot market purchases and stock management.
In the literature, one may find some models related to the use of optimization in LNG supply chain.In Zheng et al. (2010), several models applied to natural gas industry are presented, with the focus on the natural gas production, transportation, and market.Authors present linear and nonlinear models related with natural gas production -well location and maximum volume recovery, and pipeline-related problems, such as compressor allocation and pipelines dimensioning.However, none of the presented models focus on LNG planning.
In Foss & Halvorsen (2009), authors present a model to optimize the whole LNG supply chain.The system is composed by simple models of each main component starting at the wells and near-well region and ending with the export tanks for LNG, LPG and condensate.The resultant model is a deterministic nonlinear program, solved by a SQP algorithm Bonnans et al. (2006).In Fodstad (2010), the optimization model presented provides decision support for the LNG supply chain by coordinating vessel routing, inventory management, trading and contract obligation through a series of MIP problems.
The routing and scheduling decisions are also solved by separate MIP problems in Halvorsen-Weare & Fagerholt (2013).In Rakke (2011), the goal is to create an annual delivery program (ADP) to fulfill the long-term contracts at minimum cost, while maximizing revenue from selling LNG in the spot market.The ADP problem is solved with a MIP formulation.The authors in Stålhane (2012) solve the same problem as Rakke (2011) but in that case, the authors have developed a construction and improvement heuristic (CIH) instead of formulating a MIP.In Sönmez (2013), the MIP problem is modified and it considers special LNG vessels that allow regasification onboard.
The LNG supply chain is also a subject of Grønhaug (2008).In this work, the author deals with the whole LNG supply chain problem and presents two modelling approaches: arc-flow and pathflow formulations.Both of them focus on ship routing and ship inventory management and are suitable for an operational model, instead of a tactical model as the one discussed in this work.Resultant models are MIP problems.An extension of this work can be found in Andersson et al. (2010) and Grønhaug & Christiansen (2009).Authors state that a possible solution technique for a real world instance of the problem is the application of branch-and-price technique, Barnhart et al. (1998).The application of this technique to a LNG supply chain problem can be found in Grønhaug et al. (2010).
It is clear that the LNG supply chain has been a subject of different studies, through different perspectives.Moreover, one may find that most of them solve the problem successfully through integer linear programming as opposed to non linear programming.Therefore, that course was followed in this paper.However, the model presented separates itself from the previous papers researched in its focus on the tactical details it considers of the LNG planning process.The decision to buy and sell loads of LNG is made for every week of the study horizon.Furthermore, the model explores in detail the uncertainties, aka, stochastic aspects of the market.
The paper is organized as follows.In Section 2 some characteristics of the considered problem are explained and the deterministic mathematical model is presented.In order to validate the stochastic approach for the problem, stochastic measures are reviewed and compared in Section 3, and a stochastic model for the problem is also presented at this section.Numerical experiments for a 3-year horizon planning problem are given in Section 4. Finally, some concluding remarks are reported in Section 5.

Problem Statement
The LNG planning problem is composed of: • LNG regasification ports -nodes at which LNG is retaken to its gaseous form and injected into a pipelines' network; • long term LNG contracts -set of loads offered at some periods at a certain price; • spot market LNG loads -representing the possibility of an emergency load to be bought at uncertain price; • exportation possibilities -the company may, at some periods, export the amount of natural gas purchased but not used in internal demand supply (surplus gas).
As we are dealing with a mid-term (3-years horizon) planning problem, operational constraints are modeled with far less details than they would be in a short-term model, but some of them are still present in the model, such as maximum regasification daily flow and inventories maximum capacities.
The main goal of the model is to determine an optimal LNG purchase plan throughout the horizon, and the evolution of stock levels at each regasification port.In order to do this, the horizon is split into two different parts.The first one, usually the first two months of the planning horizon, is considered to be deterministic, i.e., long-term and spot market prices are known, as well as natural gas demand.Thus, decision variables associated with these decisions are deterministic.
The second part of the horizon is stochastic -spot market prices are uncertain.In this manner, decisions related to spot market purchases depend on the scenario realization.However, even for this part of the horizon (usually months 3 to 36), long-term LNG prices are considered to be certain, due to the fact that these loads are negotiated several months in advance, at fixed prices.
In Figure 2   As a consequence to this approach, the number of integer variables are independent from the number of scenarios considered.The number of integer variables will depend only on the size of the horizon (number of periods considered).
It is important to stress that the future (unknown) scenario differs from the scenarios considered in the problem, even if there is a great number of them.Therefore, statistics (like the mean) of second-stage variables (i.e., scenario-dependent variables) are more important than finding the optimum integer solution to each scenario.Even if second-stage variables are integer, most likely, their means will not be.That is why it was opted to consider them continuous.Long-term purchases will be considered integer throughout the entire horizon because they are planning variables (used in both segments of the horizon).
In the modeled problem, the company must buy LNG in order to supply natural gas demand at its ports.These demand levels are defined by a model that considers other natural gas sources, such as onshore and offshore production and natural gas imports (usually from Bolivia).Natural gas demand is also considered certain in the first part of the horizon, but must be uncertain in the second part due to its dependency on the hydroelectric dispatch, which is uncertain in Brazil.More details on the energy dispatch process in Brazil can be found in Maceira et al. (2008).

Mathematical Model
Let us first define sets P and T that stand for the sets of regasification ports and periods, respectively.Period τ ∈ T represents the first period of the stochastic horizon.The decision variables of the considered problem are: Moreover, the amounts of bought and exported natural gas must be a multiple of a vessel capacity, representing that one cannot buy nor export, for instance, a half-filled vessel.Thus, it is also necessary to consider the following decision variables: δ t , p , δ t s, p , and δ t e, p , that stand for the number of long-term and spot loads bought and the number of loads exported at port p, period t , respectively.The deterministic version of the LNG planning problem can now be stated and symbolized by max In this model, c t and c t s represent the unitary cost for LNG purchases in long-term and spot market, respectively.Parameter cs t p denotes unitary stock cost at port p, and r t , the exportation price.Thus, objective function (1a) consists of maximizing the profit of the company.Constraint (1b) represents stock balance through the considered horizon.One can see there is no possibility of demand shortfall -at each period, stock is decreased by demand volume.Equations (1c)-(1e) force bought and exported volumes to be equal to an integer number of loads.Sets X, , E, and , in constraint (1f) represent other (linear) restrictions, such as maximum values and non-negativity.

Compact Formulation
For convenience, model (1a)-(1f) is represented with the more compact notation where vector x represents decision variables related to the deterministic period plus long-term purchases for the whole horizon, and decision variable y, remaining variables, i.e., x = (x t ) t =1,...,T (x t s ) t =1,...,τ −1 (e t ) t =1,...,τ −1 (s t ) t =1,...,τ −1 , y = (x t s ) t =τ,...,T (e t ) t =τ,...,T (s t ) t =τ,...,T , where, for the sake of simplicity, x t represent both x t , p and δ t , p for all ports.The same simplification has been applied to x t s and e t .The polyhedral sets X and Y represent (1f).Matrix T and W are composed of parameters V , V s , V e , ones and minus ones.Vector h is composed of parameters d, and zeros, in such a manner that problems (1) and (2) are equivalent.
For practical interests, problem (2) (and thus (1)) might be simplistic.In fact, some parameters involved in problem (2) may not be considered deterministic, such as the ports' demands and spot market prices, as discussed in Section 1. Thereby, the deterministic model symbolized by problem (1) needs to be examined in a stochastic context.

INCORPORATING STOCHASTICITY INTO THE PROBLEM
The question we address in this section is the following one: Is there a significant gain by introducing stochasticity into the model represented by problem (1)?
In order to answer this question we use demand and spot market prices scenarios represented by the random vector ξ = d t , c t s in appropriated probability space ( , σ ( ), P).The resulting formulation is as follows where E stands for the expectation operator with respect to probability measure P.
It is assumed throughout this work that the random variable ξ is approximated by finitely many N scenarios ξ 1 , ξ 2 , . . ., ξ N , with associated probability p i > 0 for all i = 1, . . ., N .For the considered problem, a set of 100 scenarios ξ i is available.These scenarios are generated by a MIP model in another planning level.The way these scenarios are generated is unfortunately confidential to company members, but it is safe to say the scenarios are generated through a Monte Carlo Simulation.
Since the number N of scenarios is finite, the above problem can be written in the deterministic equivalent form In the quest of answering the stated question, we now review and apply some useful measures in stochastic programming.

Stochastic Measures
In this section we describe two important measures in stochastic programming: the expected value of perfect information (EVPI) and the value of stochastic solution (VSS).A more detailed discussion of these measures can be found in Birge & Louveaux (1997).

The value of stochastic solution
In practice, it is not unusual to find situations in which the deterministic equivalent problem (3) is not solvable.This may occur when this problem is large enough to become computationally intractable or when solving time is too excessive.Instead of applying more sophisticated techniques to solve the problem one may be tempted to solve a much simpler problem, replacing all uncertain parameters by their expected values: ξ := N i=1 p i ξ i .In this case, the measure VSS is useful to evaluate the cost of ignoring uncertainty in making a decision.
With purpose of defining the measure VSS, one has to solve the following problem, called the expected value problem (EV) Pesquisa Operacional, Vol.36( 1), 2016 We denote (x EV , y EV ) its optimal solution and z EV its correspondent objective value.In order to measure how good decision x EV is, one may test this solution by solving the following problem and by evaluating the expected cost of using the EV solution: Since problem ( 5) is decomposable for each scenario, its optimization is not an excessive timeconsuming task, in general.
As defined in Birge & Louveaux (1997), one may calculate the value of the stochastic solution VSS as where z RP is the optimal value of problem (3), considering N scenarios.As previously said, VSS represents the cost of ignoring uncertainty in the problem.Therefore, a small value for VSS means that there is no (sufficient) gain in solving the much more difficult problem (3), instead of solving (4).

The expected value of perfect information
Another important measure in stochastic programming is the expected value of perfect information -EVPI.This value represents obtained gain if complete and accurate information on future is available at the moment decision is made.Therefore, it is a useful measure to evaluate the scenarios used to define problem (3).
The EVPI is defined as the difference between the optimal value z RP of the deterministic equivalent problem (3) and the wait-and-see optimal value, given by i.e., EVPI := z RP − z WS .
The bigger EVPI is, the more important is the role played by the uncertainties.Therefore, more effort should be made in order to obtain a representative set of scenarios.It is shown in Birge & Louveaux (1997) that the optimal values of the given formulations satisfy the following relationship z WS ≤ z RP ≤ z EEV .

The Stochastic LNG Planning Problem
Model (1a)-(1f) must be rewritten in order to consider stochasticity on the uncertain parameters.
In our approach, port demands, d t p and spot market prices c t s are considered to be uncertain for periods t greater or equal to τ -first period of stochastic horizon.Thus, the stochastic LNG planning problem can be stated as max There is some value in taking into consideration that only equation (1b) has been duplicated in the stochastic approach to our problem, in Equations ( 7b) and (7c).Equation (1c) remains the same because, as stated before, long-term contracts are planning decisions and do not depend on the realization of scenarios.
On the other hand, original equations (1d) and (1e) are only valid in the deterministic period of our horizon -Equations (7e), (7f).Spot market purchases and load exportation are considered to be continuous (limited) in the stochastic horizon.This approximation is acceptable due to the fact that there is no need for a good accuracy in these values for this horizon -a mean, in terms of scenarios' probabilities, that can be understood as a tendency, is sufficient for analysis.Thus, complexity of the resultant model does not grow too much in terms of the number of scenarios because the number of integer variables depend only on the size of the horizon.

CASE STUDY
The framework was used to investigate the planning of commercialization of LNG loads for Petrobras, minimizing the cost of the process given the uncertain demand and uncertain prices of the LNG market.
It is interesting to analyze if incorporating stochasticity into a real problem pays off, i.e, if the determinist equivalent solution z RP is indeed greater than the expected value solution and smaller than the wait-and-see solution.Therefore, the three solutions will be run and compared, as follows.
Three LNG terminals were considered (Pecém, Guanabara and Salvador).A hundred different scenarios of demand/prices were taken into account, involving approximately US$1 billion.
The data used to build this case study is strictly confidential.The results below were the only ones approved for disclosure because it is important to highlight the magnitude of the problem in hand.

The Deterministic Equivalent Solution
The solution z RP came to US$976,932,590.The running time was 5.79 seconds.
The problem has 253,485 constraints, 366,213 variables (56 of them are integer variables), 1,156,484 non-zeros.
The solution is both numeric and graphic.The user may choose to analyze specifically the numbers or to analyze the problem as a whole through the charts.Some of these charts are represented below.

The Expected Value Solution
The expected value solution represents the case the average (expected) scenario were to occur.Therefore, the average scenario is run and the first stage variables are set, i.e., the problem is deterministic during its first stage.Then, the problem is run for its second stage, considering all scenarios (even though the first stage variables are already determined).
It is expected that the value of the objective function for this case (z EEV ) will be greater than the one of the deterministic equivalent solution (z RP ).This result is expected because the particularities of each scenario are not taken into account, a.k.a,only the average scenario is considered.Even if this scenario is obtained by calculating the average of all other scenarios, it loses the ability to represent the extreme cases.Therefore, its cost should be greater.
The solution z EEV found was US$1,038,590,420.The running time was 4.21 seconds.
The value of stochastic solution is the difference between z EEV and z RP and represents the cost of ignoring uncertainty in the problem.In this case: Therefore, it is safe to say that it is important to consider uncertainty in the problem in hand at a cost of approximately US$62 million.
Another way of proving this is by plotting the cumulative distribution of costs for both cases (expected value solution and deterministic equivalent solution).It is easy to visualize that the deterministic equivalent solution curve reaches the 100% mark at a lower cost than the expected value solution curve.

The Wait-and-See Solution
The wait-and-see solution represents the cost of the problem if complete information were to be obtained at the moment decision is made.In order to find the solution (z WS ), it is imperative to run each scenario independently as if each scenario was certain.z WS will be the average between the solutions of all scenarios.It is expected z WS to be smaller than z RP , since the results for the wait-and-see solution are specific to each scenario, and therefore, each specific cost is smaller, causing the average of them to be smaller, as well.
The solution z WS came to US$908,407,990, smaller than z RP , as expected.The running time was 5.93 seconds.
The expected value of perfect information is the difference between z RP and z WS and represents the role the uncertainties have in the problem.EVPI = z RP − z WS = US$68,524,600 EVPI(%) = (z RP − z WS )/z RP = 7,01% It is safe to assume a deterministic problem (and consequently the linear combination of them) will have a lower cost if compared to a stochastic problem.Moreover, it is utterly important to maintain stochasticity in the problem to fully represent it.

CONCLUSIONS
This work discussed the implementation of a model, developed to optimize the purchase of LNG for a company.Said purchase is obtained based on the minimization of the total cost of the operation.The expected cost considers scenarios of purchases in the long-term market, spot market, stock costs, scenarios of demand and the possibility of exporting surplus gas.
It proved important to solve this problem due to the emerging consumption of LNG around the world.It is essential to formulate it as a stochastic problem; the extra cost is excessive if too many simplifications are made.The solution was successfully obtained, considering the decision maker's availability and the particularities of the problem.
Extensions of the presented work include the calculation of the so called breakeven price.It is defined as the maximum acceptable price of a 'new' load offer, presented to the buyer in the middle of the decision-making process.The breakeven price is also calculated considering the different scenarios of demand and scenarios of LNG prices in the spot market and long term market.

Figure 1 -
Figure 1 -Decision process in LNG planning.
an example of uncertain demand for a given port can be seen.The blue line represents the average demand at each period, while the black bars correspond to the range between minimal and maximal demand values.In the first periods, demand is certain, what can be confirmed by the absence of black bars at this region of the figure.

Figure 3 -
Figure 3 -Model Output: expected LNG purchase for the deterministic equivalent solution.

Figure 4 -
Figure 4 -Model Output: expected LNG export for the deterministic equivalent solution.

Figure 5 -
Figure 5 -Model Output: expected final stock for the deterministic equivalent solution.

Figure 6 -
Figure 6 -The cumulative distribution of costs is shown for the expected value solution and the deterministic equivalent solution.
the amount of natural gas bought at port p, period t , in long-term contracts, in Mm 3 /d; + , the same for spot market, mutatis mutandis;• e t p ∈ R + , volume of natural gas exported from port p at period t , in Mm 3 /d; and• s t P ∈ R + , stock level at port p at the end of period t in Mm 3 .