Modelling the Process of Production of Diesel Fuels by the Use of Generalized Nets

: The process of commodity diesel fuel production in a reﬁnery has been modelled by the use of the Generalized Net (GN) apparatus. GNs are extensions of Petri nets and of all their modiﬁcations and extensions. The model accounts for the orders of different grades of diesel fuel and the available amounts of the different diesel fuel components. It can be used for the synchronization and optimization of these processes.


Introduction
The modelling and simulation of the complex processes in a petroleum refinery is a powerful tool to optimize their performance and improve refinery profitability [1][2][3][4][5][6][7][8][9][10]. Moro et al. [7], based on nonlinear process model for refinery production, quantified a potential increase of 6,000,000 USD per year in profitability for a typical refinery with operational capacity of 169.8 kbpd/day. Their model takes into account the market limitations for each kind of diesel oil usually supplied by the refinery, and the optimization algorithm proposed by them was able to define a new point of operation, increasing the production of more valuable oil, while satisfying all specification limits. Most models applied in petroleum refining employ the linear programming (LP) technique. Another technique capable of modelling parallel processes such as these in petroleum refining is the Generalized Net (GN) [11][12][13]). GNs were introduced in 1982 as extensions of the Petri nets of Carl-Adam Petri [14] and of their other extensions and modifications. In contrast to Petri nets, and as extension of the coloured Petri nets [15], the GN-tokens enter the net with initial characteristics and, transferring from one place to another, they obtain subsequent characteristics. Furthermore, in contrast to the predicate-transition nets [16], GN-transitions contain a special type of matrices, called index matrices (see [17,18]), with element sentences, predicates and the constants true and f alse. Therefore, GNs can describe simultaneously the analytical information and the logical conditions of the modelled processes.
The GN was employed to model the production of different grades of automotive gasoline in our recent study [19]. Now, in this study, we focus on the modelling of the production of different grades of automotive diesel fuels in a petroleum refinery, with LUKOIL Neftohim Burgas, Bulgaria refinery serving as an example. Two refining processes-the hydrotreatment of primary and secondary light and heavy middle distillates along with the import of biodiesel, cetane improver, lubricating and antistatic additives-operate in parallel, delivering automotive diesel fuel components for the production of five grades of automotive diesel fuels. The imports of diesel fuel components are bought from the • L and L are finite, non-empty sets of places (the transition's input and output places, respectively); for the transition in Figure 1, these are L = {l 1 , l 2 , . . . , l m } and L = {l 1 , l 2 , . . . , l n }; • r is the transition's condition determining which tokens will pass (or transfer) from the transition's inputs to its outputs; this has the form of an Index Matrix (IM; see [17]): r i,j is the predicate that corresponds to the i-th input and j-th output place (1 ≤ i ≤ m, 1 ≤ j ≤ n). When its truth value is "true", a token from the i-th input place transfers to the j-th output place; otherwise, this is not possible.
In general, the GN is defined as an ordered four-tuple, but in the present case, it has the form A is a set of transitions; • K is the set of the GN's tokens; • X is the set of all initial characteristics that the tokens can obtain on entering the net; • Φ is the characteristic function that assigns new characteristics to every token when it makes the transfer from an input to an output place of a given transition.
Operations, relations and operators are defined over GNs (see [13]).
Mathematics 2021, 9, 2351 3 of 10 ally, every transition (see Figure 1) is described by a seven-tuple, but for our use its following reduced form: The form of a GN-transition nd L are finite, non-empty sets of places (the transition's input and output es, respectively); for the transition in Figure 1 these are L = {l 1 , l 2 , . . . , l m } and {l 1 , l 2 , . . . , l n }; the transition's condition determining which tokens will pass (or transfer) from transition's inputs to its outputs; it has the form of an Index Matrix (IM; see ): s the predicate that corresponds to the i-th input and j-th output place (1 ≤ m, 1 ≤ j ≤ n). When its truth value is "true", a token from the i-th input place sfers to the j-th output place; otherwise, this is not possible. eneral, the GN is defined as ordered four-tuple, but in the present case, it has E = A, K, X, Φ , a set of transitions; the set of the GN's tokens. the set of all initial characteristics which the tokens can obtain on entering the the characteristic function that assigns new characteristics to every token when akes the transfer from an input to an output place of a given transition.

Generalized Net Model of Production of Diesel Fuel Grades from Seven Different Diesel Fuel Components in the LUKOIL Neftohim Burgas Refinery
The production of diesel fuel in a refinery is a typical parallel process in which some of the diesel fuel components are produced by the hydrotreatment of different middle distillate petroleum fractions, as explained in our recent study (see [19]), and others are imported, such as bio-diesel, cetane improver, lubricating additive, cold flow improvers and antistatic additive (see Figure 2).
The GN model contains 19 transitions, 58 places and 7 types of tokens representing the 7 grades of the produced diesel fuels in the LUKOIL Neftohim Burgas refinery (see Figure 3). The first group with seven tokens is as follows: α-tokens represent hydrotreated heavy middle distillates with a sulphur level less than 10 ppm; β-tokens represent a mixture of hydrotreated light and heavy-middle distillates with a sulphur level less than 10 ppm; γ-tokens represent biodiesel; δ-tokens represent cetane improvers; ε-tokens represent lubricating additives; ζ-tokens represent cold flow improvers; η-tokens represent antistatic additives.
They stay permanently in places l 9 , l 11 , l 13 , l 15 , l 17 , l 19 , l 21 , respectively, with the following initial and current characteristic: "current quantity of the respective diesel fuel component".
Each one of these tokens is split into two tokens if there is a request for the respective diesel fuel with two tokens: the original one and a new one α , β , ..., η that enters place l 8 , l 10 , l 12 , l 14 , l 16 , l 18 , l 20 , respectively, with the following characteristic: "necessary quantity of the respective diesel fuel component".
The second group with five tokens is as follows: κ-tokens represent Euro VI diesel fuel for export; λ-tokens represent Euro VI diesel fuel containing a biodiesel component; µ-tokens represent off-road diesel fuel; ν-tokens represent Euro VI arctic diesel fuel; π-tokens represent Euro VI arctic diesel fuel containing a biodiesel component.
They stay permanently in places l 50 , l 52 , l 54 , l 56 , l 58 , respectively, with the following initial and current characteristic: "current quantity of the respective grade (Euro VI diesel fuel for export; or Euro VI diesel fuel containing biodiesel component; or off-road diesel fuel; or Euro VI arctic diesel fuel; or Euro VI arctic diesel fuel containing biodiesel component)".
When α, β, ..., η tokens enter each one of the places l 50 , l 52 , l 54 , l 56 , l 58 , they unite with the token staying permanently in the respective place, and this changes the value of its current characteristic.
When there is a necessity for the respective grades-Euro VI diesel fuel for export; Euro VI diesel fuel containing a biodiesel component; off-road diesel fuel; Euro VI arctic diesel fuel; Euro VI arctic diesel fuel containing a biodiesel component (five grades)-tokens κ, λ, µ, ν, π split into two tokens: the original one and a new one κ , λ , ..., π that enters place l 51 , l 53 , l 55 , l 57 , l 59 , respectively, with the following characteristic: "necessary quantity of the respective diesel fuel grade".  The GN-transitions have the following forms.
. Each step of the modelled process can be evaluated by Intuitionistic Fuzzy Pairs (IFPs, see [20,21]). Each IFP has the form a, b , where a, b, a + b ∈ [0, 1]. For this, we can use the information from the flow meters placed in the outputs of the tanks (here, their number is seven) for the diesel fuel components (places l 9 , l 11 , . . . , l 21 and from the flow meters placed in the inputs of the tanks (here, their number is five) for the storage of the diesel fuel grades (places l 22 , l 23 , . . . , l 48 ). For some of the tanks for diesel fuel components, the flow meter shows that after discharging of the diesel fuel component, the tank that contained C units has A units remaining in it, and the flow meter accounting for the diesel fuel component that enters in the tank for storage of the finished diesel fuel grade shows that B units have entered this tank. Then, the intuitionistic fuzzy evaluation will have the form

Conclusions
The presented GN model describes the processes of production of different grades of diesel fuels in a petroleum refinery, accounting for the available amounts of the different diesel fuel components. It can be used for the synchronization and optimization of these processes in a real process management and automation system. The paper is a continuation of a series of papers by the authors in which GN models are described.
In the near future, this model could be extended in several directions. All oil refining product modelling should be completed, and then a higher-level GN model could be created that encompasses the more detailed, already developed lower-level GN models. Then, the higher-level GN model could be used as a tool for decision making because the petroleum refining concerns several parallel-series processes which are interrelated, and making a decision when dealing only with diesel fuel production, for example, can affect the processes of aviation fuel, automotive gasoline and fuel oil production.