Workbench for vulnerability analysis of Vietnam energy sector Edelev A.V.1 [0000-0003-2219-9754], Fereferov E.S.2 [0000-0002-7316-444X], and Hmelnov A.E.2 [0000-0002-2470-6230] 1 Melentiev Energy Systems Institute of Siberian Branch of SB RAS, Lermontov Str. 130, Irkutsk, Russia, 664033 2 Matrosov Institute for System Dynamics and Control Theory of SB RAS, 134 Lermontov St., Irkutsk, Russia, 664033 E-mail: flower@isem.irk.ru, fereferov@icc.ru Abstract. The paper addresses the problem of supporting research of the Vi- etnam energy sector vulnerability. The vulnerability study is understood as search for system weak points. A mathematical model has been developed to describe the energy sector of Vietnam. The model takes into account the charac- teristics and constraints of all objects of the energy sector: suppliers, consumers and the transport system. To study the vulnerability of the energy sector and make decisions, we have created a workbench that allows simulating increased loads and calculating the consequences. Specification-based database applica- tion development technology was applied to create the workbench. This tech- nology allows you to quickly develop applications that provide interaction with databases and digital maps, as well as support interaction with external software modules. The main advantage of the proposed workbench is its flexibility and applicability at all stages of the study of the Vietnam energy sector vulnerability starting from gathering the energy operation and development information and ending with evaluation of satisfying demand in energy. Keywords: Decision Support System, Vulnerability Analysis, Energy Sector, Specification. 1 Introduction The resilience of an energy system can be understood as the system ability to prevent damage before disturbance events, mitigate losses during the events, and improve the recovery capability after the events [1]. The interdependent national energy system are united to form a country energy sector. The main stages of the interdependent energy systems resilience research scheme are presented in [2]. The central role in the resilience research plays the vulnerability analysis [3]. The vulnerability characterizes the scale of negative system consequenc- es caused by a disturbance impact on interdependent energy systems. The vulnerability analysis process consists of the following general stages: Copyright © 2020 for this paper by its authors. Use permitted under Creative Com- mons License Attribution 4.0 International (CC BY 4.0). 1. gathering an energy sector operation and development information 2. calculation on an energy sector model 3. solution data processing 4. solution data presentation 5. evaluation of satisfying demands A workbench presented in this paper supports the vulnerability analysis of Vietnam energy sector and automates the stages from 2 to 5. 2 Related work Decision support systems have a critical role in assessing the natural disasters risk of energy systems networks and in enabling their managers to test the effectiveness of alternative mitigation strategies and investments on resilience [4]. For example, CIP- Cast decision support system can predict scenarios of punctual damages to the differ- ent critical infrastructure components and impact scenarios, where services outages induced by the physical damage to critical infrastructure components, are assessed at different scales [5]. CIPCast was as a combination of free/open source software envi- ronments including Geographic Information System (GIS) [6]. A GIS technology play a major role in the construction of such decision support systems [7-9] because multi-source data and GIS-integrated analysis can contribute to a better disturbance prediction and mitigation planning [10, 11]. 3 Methodology The workbench represents ways of energy sector development as a directed graph (see Fig. 1). The first moment is always equal 0 and presents the current year. Each node of the graph represents the energy sector state at specific moment (year) in the future. Each arc defines a transition from state at one moment in time (year) to anoth- er state at next moment in time (year). Fig. 1. An energy sector development scenario Each node of the energy sector development graph is associated with the following information about the energy sector: • demands in energy; • energy transmission capacity and cost; • energy production capacity and cost; • energy transformation capacity and cost. Thus energy sector development scenario is described as sequence of nodes at differ- ent time moments: Node 0 — the energy sector model data for initial time moment Node 1 — the energy sector model data for second time moment Node 2 — the energy sector model data for third time moment Node 3 and further — energy sector model data for next time moment 3.1 General view of energy sector balance model The Vietnam energy sector model is based on the initial information of one of the national energy sector perspective development plans. Analysis of such options by means of the energy sector model can address the following specific strategic chal- lenges of Vietnam energy sector development: • the deployment of new energy sources of different kinds around the country, in- cluding nuclear power plants; • the deployment of energy resources import entries on the area of the country; • the order of the creation of new facilities of coal mining, natural gas extraction, crude oil extraction and refining taking into account the capabilities of existing and new energy resources transmission lines, etc. A general energy sector model consists from the following equations and inequali- ties: (C,X) + (𝑟𝑟,g) → 𝑚𝑚𝑖𝑖𝑛𝑛 (1) AX−𝑌𝑌 = 0 (2) 0 ≤ 𝑋𝑋 ≤ 𝐷𝐷 (3) 0 ≤ 𝑌𝑌 ≤ 𝑅𝑅 (4) where X – the decision vector of the energy resources production, extraction, generation, transformation or transmission facilities usage; Y – the decision vector of energy resources consumption; A – the matrix of technological coefficients (rates) of energy resources production, extraction, generation, transformation or transmission facilities; D – the vector of energy resources supply and transmission facilities capacity; R – the vector of energy resources demand; The first part of the goal function represents total costs of the FEC operation. The 𝐶𝐶 is the cost vector of the energy resources production and transmission facilities. The second part of the goal function characterizes financial losses due to energy resource shortages. The vector 𝑔𝑔 is equal to the difference (𝑅𝑅 − 𝑌𝑌). The 𝑟𝑟 is cost vec- tor of energy resource shortages. The estimation of real costs of damage from a short- age is difficult due to variety of shortage after-effects, which are not always possible to identify and quantify. 3.2 The energy sector state visualization There is a one digital map per each energy recourse distribution net. Each digital map should consists of 3 layers: 1. Consumers as polygon type layer; 2. Producers as point type layer; 3. Transmission links as line type layer. To show state by color coloring rules for each layer type were created. Coloring rules for consumers are shown in Table 1. Table 1. Coloring rules for consumers Rule name Consumption ratio Color Description interval in percents No data [-1, 0.0] Cyan Object is with undefined demand Zero demand [0.0, 0.2] Light green Consumer is with zero demand Nondelivery ( 0.2, 99.8) Yellow Consumer needs are not satisfied Satisfied [99.8, 100] Green Consumer needs are fully satisfied Coloring rules for producers are shown in Table 2. Table 2. Coloring rules for producers Rule name Production and up Color Description value of capacity ratio interval in percents Not used [0.0, 0.2] Blue Producer is not used at all Normal ( 0.2, 99.8) Black Normal usage No reserve [99.8, 100] Green Producer is fully loaded and do not have capacity reserve Coloring rules for transmission links are shown in 3. Table 3. Coloring rules for transmission links Rule name Transmission and up Color Description value of capacity ratio interval in percents Not used [0.0, 0.2] Blue Transmission link is not used at all Normal ( 0.2, 99.8) Black Normal usage No reserve [99.8, 100] Green Transmission link is fully loaded and do not have capacity reserve Colors of energy resource producer according to 1 are shown in 4. Table 4. Colors of energy resource producer Energy resource producer state Rule name Description Not used Producer is not used at all Normal Normal usage No reserve Producer is fully loaded and do not have capacity reserve Colors of energy resource transmission link according to 2 are shown in 5. Table 5. Colors of energy resource transmission link Energy resource transmission Rule name Description link state Not used Transmission link is not used at all Normal Normal usage No reserve Transmission link is fully loaded and do not have capacity reserve Colors of energy resource consumer according to Table 3 are shown in table 6. Table 6. Colors of energy resource consumer Energy resource consumer state Rule name Description No data Consumer has unde- fined demand Zero demand Consumer has zero value demand Nondelivery Consumer needs are not satisfied Satisfied Consumer needs are fully satisfied 4 Vietnam energy sector model 4.1 Assumptions The energy sector model describes the following major energy systems of Vi- etnam: • Gas supply system consists of natural gas fields which are combined into gas- producing areas and possible entries of imported liquefied natural gas. Natural gas transport within the country is represented by network of existing and new gas pipelines. • Coal supply system. Coal mines can be aggregated by locality. The qualitative structure of coals can be taken into account by separation of particular kinds. Transport of coal between regions matches directions of the main cargo transfer paths. • The crude oil refinery products supply system can be represented by the production and distribution of light oil and fuel oil. Transportation of petroleum products is represented by set roads, marine links and railways between producers and con- sumers. • Power system. Power plants are divided into several types: thermal, hydro, nuclear power plants and renewable energy sources. Thermal power plants are classified by type of main fuel: natural gas, coal and fuel oil. Renewable energy source are di- vided into the solar cells, wind farms and thermal power plants using biomass. Except for the production and transportation blocks in the energy sector model there is a block of consumption, which is represented by the main consumers of the energy sector, ranked by category of importance. 4.2 Nomenclature The main symbols used in this paper are described below for quick reference. Indices 𝑅𝑅 – amount of regions p, r ∈ {1,𝑅𝑅} – order number of region 𝑙𝑙 ∈ {a,b,g,z,e,o,u,h,d,k,w} – energy resource, where 𝑎𝑎 – anthracite; 𝑏𝑏 – brown coal; 𝑔𝑔 – natural gas; 𝑧𝑧 – LPG; 𝑒𝑒 – electricity; 𝑜𝑜 – crude oil; 𝑢𝑢 – gasoline; ℎ – FO; 𝑑𝑑 – DO; 𝑘𝑘 – kerosene; 𝑤𝑤 – aviation gasoline; Input parameters 𝑄𝑄¯ 𝑟𝑟𝑙𝑙 – up value of capacity to produce or extract energy resource 𝑙𝑙 in region 𝑟𝑟, 𝑙𝑙∈a,b,g,z,o,u,h,d,k,w 𝑙𝑙 𝑥𝑥¯ rp – up value of capacity to transmit energy resource 𝑙𝑙 from region 𝑟𝑟 to region 𝑝𝑝, 𝑙𝑙 ∈ {a,b,g,e,z,o,u,h,d,k,w} 𝑙𝑙 𝑒𝑒¯rp – up value of capacity to export energy resource 𝑙𝑙 from region 𝑟𝑟 to region 𝑝𝑝, 𝑙𝑙 ∈ {a,b,g,e,z,o,u,h,d,k,w} 𝑙𝑙 𝐷𝐷𝑟𝑟 – up value of energy resource 𝑙𝑙 demand in region 𝑟𝑟, 𝑙𝑙 ∈ {e,z,o,u,k,w} 𝑆𝑆¯𝑟𝑟TPS,l – up value of total capacity of TPS burning fuel 𝑙𝑙 in region 𝑟𝑟, 𝑙𝑙 ∈ {a,b,g,h,d} 𝑣𝑣𝑟𝑟𝑙𝑙 – value of burning fuel 𝑙𝑙 to generate one unit of electricity on TPS in region 𝑟𝑟, 𝑙𝑙 ∈ {a,b,g,h,d} 𝑆𝑆¯𝑟𝑟NPP – up value of total nuclear power plants (NPP) capacity in region 𝑟𝑟 𝑆𝑆¯𝑟𝑟HPS – up value of total hydro power stations (HPS) capacity in region 𝑟𝑟 𝑆𝑆¯𝑟𝑟oth – up value of others sources total capacity in region 𝑟𝑟 𝑄𝑄¯ 𝑟𝑟𝑙𝑙 𝑦𝑦𝑟𝑟𝑙𝑙 = 𝑜𝑜 – crude oil refinery coefficient for energy resource 𝑙𝑙 production in region 𝐷𝐷𝑟𝑟 𝑟𝑟, 𝑙𝑙 ∈ {h,d,k,w,z} Output parameters 𝑄𝑄𝑟𝑟𝑙𝑙 – energy resource 𝑙𝑙 production in region 𝑟𝑟, 𝑙𝑙 ∈ {a,b,g,z,o,u,h,d,k,w} 𝑙𝑙 𝑥𝑥rp – transport of energy resource 𝑙𝑙 from region 𝑟𝑟 to region 𝑝𝑝, 𝑙𝑙 ∈ {a,b,g,z,e,o,u,h,d,k,w} 𝑙𝑙 𝑒𝑒rp – export of energy resource 𝑙𝑙 from region 𝑟𝑟 to region 𝑝𝑝, 𝑙𝑙 ∈ {a,b,g,z,e,o,u,h,d,k,w} 𝐷𝐷𝑟𝑟𝑙𝑙 – energy resource 𝑙𝑙 consumption in region 𝑟𝑟, 𝑙𝑙 ∈ {e,z,o,u,k,w} 𝑆𝑆𝑟𝑟TPS,l – power generation by TPS burning fuel 𝑙𝑙 in region 𝑟𝑟, 𝑙𝑙 ∈ {a,b,g,h,d} 𝑆𝑆𝑟𝑟NPP – power generation by NPP in region 𝑟𝑟 𝑆𝑆𝑟𝑟HPS – power generation by HPS in region 𝑟𝑟 𝑆𝑆𝑟𝑟oth – power generation by other sources in region 𝑟𝑟 Cost 𝑐𝑐𝑄𝑄𝑟𝑟𝑙𝑙 – cost of energy resource 𝑙𝑙 produced in region 𝑟𝑟, 𝑙𝑙 ∈ {a,b,g,z,o,u,h,d,k,w} 𝑐𝑐𝑆𝑆 TPS,l – cost of power generated by TPS burning fuel 𝑙𝑙 in region 𝑟𝑟, 𝑙𝑙 ∈ {a,b,g,h,d} 𝑟𝑟 𝑐𝑐𝑆𝑆𝑟𝑟HPS – cost of power generated by HPS in region 𝑟𝑟 𝑐𝑐𝑆𝑆𝑟𝑟NPP – cost of power generated by NPP in region 𝑟𝑟 𝑐𝑐𝑆𝑆𝑟𝑟oth – cost of power generated by other sources in region 𝑟𝑟 𝑙𝑙 – cost of one unit of energy resource 𝑙𝑙 transmission (transportation or import) 𝑐𝑐𝑥𝑥rp from region 𝑟𝑟 to region 𝑝𝑝, 𝑙𝑙 ∈ {a,b,g,z,e,o,u,h,d,k,w} 𝑙𝑙 – losses due to one unit of exported energy resource 𝑙𝑙 non-delivery from re- 𝑐𝑐𝑒𝑒rp gion 𝑟𝑟 to region 𝑝𝑝, 𝑙𝑙 ∈ {a,b,g,z,e,o,u,h,d,k,w} 𝑐𝑐𝐷𝐷𝑟𝑟𝑙𝑙 – losses due to one unit of energy resource 𝑙𝑙 non-delivery for consumption in region 𝑟𝑟, 𝑙𝑙 ∈ {a,b,g,z,e,o,u,h,d,k,w} 4.3 Generalized Network Flow Model Mathematical Formulation Energy resource balance Natural gas balance in region 𝑟𝑟 𝑔𝑔 𝑔𝑔 𝑔𝑔 𝑔𝑔 𝑔𝑔 TPS,g g Q 𝑟𝑟 + ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥pr − ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥rp − ∑𝑝𝑝≠𝑟𝑟 𝑒𝑒rp − 𝑣𝑣𝑟𝑟 S𝑟𝑟 -D𝑟𝑟 ≥ 0 (5) Anthracite balance in region 𝑟𝑟 Q𝑎𝑎𝑟𝑟 + ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥pr 𝑎𝑎 − ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥rp 𝑎𝑎 − ∑𝑝𝑝≠𝑟𝑟 𝑒𝑒rp 𝑎𝑎 − 𝑣𝑣𝑟𝑟𝑎𝑎 S𝑟𝑟TPS,a -Da𝑟𝑟 ≥ 0 (6) Brown coal balance in region 𝑟𝑟 Q𝑏𝑏𝑟𝑟 + ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥pr 𝑏𝑏 − ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥rp 𝑏𝑏 − ∑𝑝𝑝≠𝑟𝑟 𝑒𝑒rp 𝑏𝑏 − 𝑣𝑣𝑟𝑟𝑏𝑏 S𝑟𝑟TPS,b -Db𝑟𝑟 ≥ 0 (7) Crude oil balance in region 𝑟𝑟 Q𝑜𝑜𝑟𝑟 + ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥pr 𝑜𝑜 − ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥rp 𝑜𝑜 − ∑𝑝𝑝≠𝑟𝑟 𝑒𝑒rp 𝑜𝑜 − 𝐷𝐷𝑟𝑟𝑜𝑜 ≥ 0 (8) LPG balance in region 𝑟𝑟 𝑄𝑄𝑟𝑟𝑧𝑧 + 𝑦𝑦𝑟𝑟𝑧𝑧 𝐷𝐷𝑟𝑟𝑜𝑜 + ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥pr𝑧𝑧 − ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥rp 𝑧𝑧 − ∑𝑝𝑝≠𝑟𝑟 𝑒𝑒rp 𝑧𝑧 -D𝑟𝑟𝑧𝑧 ≥ 0 (9) FO balance in region 𝑟𝑟 Qℎ𝑟𝑟 + 𝑦𝑦𝑟𝑟ℎ 𝐷𝐷𝑟𝑟𝑜𝑜 + ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥pr ℎ − ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥rp ℎ − ∑𝑝𝑝≠𝑟𝑟 𝑒𝑒rp ℎ − 𝑣𝑣𝑟𝑟𝑜𝑜 𝑆𝑆𝑟𝑟TPS,h − 𝐷𝐷𝑟𝑟h ≥ 0 (10) DO balance in region 𝑟𝑟 Q𝑑𝑑𝑟𝑟 + 𝑦𝑦𝑟𝑟𝑑𝑑 𝐷𝐷𝑟𝑟𝑜𝑜 + ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥pr 𝑑𝑑 − ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥rp 𝑑𝑑 − ∑𝑝𝑝≠𝑟𝑟 𝑒𝑒rp 𝑑𝑑 − 𝑣𝑣𝑟𝑟𝑑𝑑 𝑆𝑆𝑟𝑟TPS,d − 𝐷𝐷𝑟𝑟d ≥ 0 (11) Gasoline balance in region 𝑟𝑟 Q𝑢𝑢𝑟𝑟 + 𝑦𝑦𝑟𝑟𝑢𝑢 𝐷𝐷𝑟𝑟𝑜𝑜 + ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥pr 𝑢𝑢 − ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥rp 𝑢𝑢 − ∑𝑝𝑝≠𝑟𝑟 𝑒𝑒rp 𝑢𝑢 -D𝑢𝑢𝑟𝑟 ≥ 0 (12) Kerosene balance in region 𝑟𝑟 Q𝑘𝑘𝑟𝑟 + 𝑦𝑦𝑟𝑟𝑘𝑘 𝐷𝐷𝑟𝑟𝑜𝑜 + ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥pr 𝑘𝑘 − ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥rp 𝑘𝑘 − ∑𝑝𝑝≠𝑟𝑟 𝑒𝑒rp 𝑘𝑘 -D𝑘𝑘𝑟𝑟 ≥ 0 (13) Aviation gasoline balance in region 𝑟𝑟 Q𝑧𝑧𝑟𝑟 + 𝑦𝑦𝑟𝑟𝑧𝑧 𝐷𝐷𝑟𝑟𝑜𝑜 + ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥pr 𝑧𝑧 − ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥rp 𝑧𝑧 − ∑𝑝𝑝≠𝑟𝑟 𝑒𝑒rp 𝑧𝑧 -D𝑟𝑟𝑧𝑧 ≥ 0 (14) Electricity balance in region 𝑟𝑟 ∑𝑙𝑙 𝑆𝑆𝑟𝑟TPS,l +S𝑟𝑟HPP +S𝑟𝑟HPS + 𝑆𝑆𝑟𝑟oth + ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥pr 𝑒𝑒 − ∑𝑝𝑝≠𝑟𝑟 𝑥𝑥rp 𝑒𝑒 − ∑𝑝𝑝≠𝑟𝑟 𝑒𝑒rp 𝑒𝑒 − 𝐷𝐷𝑟𝑟𝑒𝑒 ≥ 0, 𝑙𝑙 ∈ {a,b,g,h,d} (15) Bound constraints Up values of energy resource 𝑙𝑙 production in region 𝑟𝑟 0 ≤ 𝑄𝑄𝑟𝑟𝑙𝑙 ≤ 𝑄𝑄¯ 𝑟𝑟𝑙𝑙 , 𝑙𝑙 ∈ {a,b,g,z,o,u,h,d,k,w} (16) Up values of power generation by TPS burning fuel 𝑙𝑙 in region 𝑟𝑟, 𝑙𝑙 ∈ {a,b,g,h,d} 0 ≤ 𝑆𝑆𝑟𝑟TPS,l ≤ 𝑆𝑆¯𝑟𝑟TPS,l (17) Up values of NPP power generation in region 𝑟𝑟 0 ≤ 𝑆𝑆𝑟𝑟NPP ≤ 𝑆𝑆¯𝑟𝑟NPP (18) Up values of HPS power generation in region 𝑟𝑟 0 ≤ 𝑆𝑆𝑟𝑟HPS ≤ 𝑆𝑆¯𝑟𝑟HPS (19) Up values of power generation by other sources in region 𝑟𝑟 0 ≤ 𝑆𝑆𝑟𝑟oth ≤ 𝑆𝑆¯𝑟𝑟oth (20) Up values of energy resource 𝑙𝑙 transport between region 𝑟𝑟 and 𝑝𝑝 𝑙𝑙 0 ≤ 𝑥𝑥rp 𝑙𝑙 ≤ 𝑥𝑥¯ rp , 𝑙𝑙 ∈ {a,b,g,e,z,o,u,h,d,k,w} (21) Up values of energy resource 𝑙𝑙 export between region 𝑟𝑟 and 𝑝𝑝 𝑙𝑙 0 ≤ 𝑒𝑒rp 𝑙𝑙 ≤ 𝑒𝑒¯rp , 𝑙𝑙 ∈ {a,b,g,e,z,o,u,h,d,k,w} (22) Up values of consumption of energy resource 𝑙𝑙 in region 𝑟𝑟 𝑙𝑙 0 ≤ 𝐷𝐷𝑟𝑟𝑙𝑙 ≤ 𝐷𝐷𝑟𝑟 , 𝑙𝑙 ∈ {e,z,u,k,w} (23) 4.4 Goal function ∑𝑟𝑟[∑l={a,b,g,z,o,u,h,d,k,w} 𝑐𝑐𝑄𝑄𝑙𝑙 𝑄𝑄𝑟𝑟𝑙𝑙 + GEN𝑟𝑟 + ∑𝑟𝑟≠𝑝𝑝 ∑l={a,b,g,e,z,o,u,h,d,k,w} 𝑐𝑐𝑥𝑥rp 𝑙𝑙 𝑙𝑙 𝑥𝑥rp + 𝑟𝑟 EXPORT𝑟𝑟 + LOSS𝑟𝑟 ] (24) GEN𝑟𝑟 = ∑l={a,b,g,h,d} 𝑐𝑐𝑆𝑆 TPS,l 𝑆𝑆𝑟𝑟TPS,l +c𝑆𝑆𝑟𝑟NPP 𝑆𝑆𝑟𝑟NPP +c𝑆𝑆𝑟𝑟HPS 𝑆𝑆𝑟𝑟HPS +c𝑆𝑆𝑟𝑟oth 𝑆𝑆𝑟𝑟oth (25) 𝑟𝑟 EXPORT𝑟𝑟 = ∑𝑟𝑟≠𝑝𝑝 ∑l={a,b,g,e,z,o,u,h,d,k,w} 𝑐𝑐𝑒𝑒rp 𝑙𝑙 𝑙𝑙 𝑒𝑒rp (26) 𝑙𝑙 LOSS𝑟𝑟 = ∑l={a,b,g,e,z,o,u,h,d,k,w} 𝑐𝑐𝐷𝐷𝑟𝑟𝑙𝑙 �𝐷𝐷𝑟𝑟 − 𝐷𝐷𝑟𝑟𝑙𝑙 � (27) To find minimum of goal function (24) is to find costs minimum. Equation (25) is total power generation of region 𝑟𝑟. Equation (26) is total region 𝑟𝑟 losses due to energy resources non-delivery outside country. Equation (27) is total region 𝑟𝑟 losses due to energy resources non-delivery inside country. 5 Workbench for vulnerability analysis of Vietnam energy sector For vulnerability study of energy sector, an expert needs to be able to interact with source data of the energy sector model, prepare data for calculations, configure and execute calculations, and view results. Energy sector model objects are represented as relational database entities. Therefore, database interaction is one of base functions of the information system for studying the vulnerability of the energy sector. Information systems that provide the implementation of СRUD (create, read, up- date, delete), search and some other operations (for example, reports generation) are called database applications. Database application development is a routine and time- consuming process because you have to perform many repetitive steps. Indeed, the code parts, which implement the typical operations for different tables usually have no substantial differences, besides from the names of the used tables and fields. There are approaches to partially automate the development of database applications. For example, using the Hibernate / NHibernate [12], Entity Framework [13] libraries al- lows you to automate the building of the object model of database tables. However, instead of interacting with tables, the application interacts with objects. In any case, the rest of the application code still needs to be written. Also, a model-oriented approach is used for automate the development of database applications. For example, "Model-Based User Interface Development" [14] or "Model Driven Architecture" [15]. The formal representation of information about AIS structure is used to generate database objects and the code of client application. The generated code is very schematic and requires further development to make it of production quality. As a result it becomes very hard to reflect the changes in the spec- ification, which usually happen during the application life-cycle. We used an approach based on the use of specifications of database applications (SDA) [16, 17] to create a system for vulnerability study of the energy sector. SDA is a declarative representation of a database application model. SDA contains the mini- mum information required in a pure form about database tables, their fields, relation- ships between them and their use in the database application. All the other tasks are performed by general algorithms, controlled by SDA. In addition, in the SDA, you can configure the call of external subsystems and the references of database tables with objects of digital maps. To create the SDA, we used the GeoARM tool, which provides an interactive setup of all the necessary database objects. Interpreting SDA GeoARM becomes an applied information system that provides a user interface for interacting with a database, building user queries, calling external subsystems and interacting with digital maps. The Workbench for vulnerability analysis of energy sector (see Fig. 2) created with the help of GeoARM provides interaction with the entities of the ES database in the modes of tables and individual records, and also allows you to build user queries and display information on digital maps. Researcher can generate map objects if there are fields in the database with the coordinates of the objects. You can also display on the map the result of a user query to the database. In this case, you can set the color of objects on the map depending on the values of a specific field of the query result. We can run compute modules that return results to the database. Further, based on the results obtained, we can create digital map objects and carry out analysis. In addition, you can display the result of a custom query to the database on the map. At the same time, you can set the color of objects on the map depending on the values of a specific characteristic of objects in the energy sector. Fig. 2. Workbench for vulnerability analysis of energy sector 6 Calculation Module A special tool has been developed to provide calculation on the model (5)-(27). The calculation module reads the Vietnam energy sector operation and development information from database and arranges that data into a development scenario (Fig 1). Then the module transforms the particular data associated with each node of directed graph shown in Fig. 1 into the linear programming problem (5)-(27) and solves the constructed problems sequentially. Thus the module can help to analyze time series of different energy sector parameters. 7 Conclusions In the paper, we considered the problems concerned supporting the research of the Vietnam energy sector vulnerability. Conducting vulnerability studies requires a lot of efforts to prepare data, process data, perform calculations and analyze the results. The vulnerability analysis support requires user-friendly software that allows one to pro- cess data, run calculation modules, analyze and display the results. We have developed a workbench to support the vulnerability analysis of interde- pendent national energy systems. The workbench is based on structural specifications that allow standardized solutions to the wide range of problems. The developed work- bench allows us to solve the following tasks: • Interact with the database through a convenient user interface, • Execute external calculation modules, • Conduct data analysis: build queries to the database, build thematic maps in the GIS. An example of the workbench to support finding the Vietnam energy sector vul- nerability analysis was considered. It is shown that the described tools provides the flexible prototyping and fast implementation of applications. And in comparison with other approaches, the main advantage of proposed workbench is that it is applicable for all stages of the vulnerability analysis starting from gathering the energy operation and development information and ending with evaluation of satisfying demand in energy. 8 Acknowledgments The research was supported by the Program of the Fundamental Research of the Sibe- rian Branch of the Russian Academy of Sciences, project no. IV.38.1.2 (reg. no. АААА-А17-117032210079-1). The development of the calculation module was sup- ported by the Russian Foundation of Basic Research and Government of Irkutsk Re- gion, project no. 20‑47‑380002 (reg. no. АААА-А20-120021090008-7). Results are achieved using the Centre of collective usage «Integrated information network of Irkutsk scientific educational complex». References 1. Voropai, N., Rehtanz, C. Flexibility and Resiliency of Electric Power Systems: Analysis of Definitions and Content. In EPJ Web of Conferences, vol. 217, p. 01018. EDP Sciences. (2019). 2. Edelev AV, Fereferov ES. A software platform to support the energy system resilience study. Proceedings of the 2nd International Workshop on Information, Computation, and Control Systems for Distributed Environments. CEUR-WS Proceedings. 2020. Vol. 2638. pp 79–88 3. Zio E. Challenges in the vulnerability and risk analysis of critical infrastructures. Reliabil- ity Engineering & System Safety 152, pp 137–150 (2016). 4. Palutikof, J.P., Street, R.B. and Gardiner, E.P. Decision support platforms for climate change adaptation: an overview and introduction. Climatic Change, 153(4), pp. 459–476. (2019). 5. Tofani, A., Di Pietro, A., Lavalle, P.L., Pollino, M., Rosato, V., Alessandroni, S.: CIPRNet decision support system: modelling electrical distribution grid internal dependencies. J. Polish Saf. Reliab. Assoc. 6, 133–140 (2015) 6. Pollino, M., Modica, G.: Free web mapping tools to characterise landscape dynamics and to favour e-participation. In: Murgante, B., Misra, S., Carlini, M., Torre, C.M., Nguyen, H.-Q., Taniar, D., Apduhan, B.O., Gervasi, O. (eds.) ICCSA 2013. LNCS, vol. 7973, pp. 566–581. Springer, Heidelberg (2013). 7. Steiniger, S., Bocher, E.: An overview on current free and open source desktop GIS devel- opments. Intern. Journal of Geographical Information Science. vol. 23, N 10. pp. 1345– 1370. (2009). 8. Steiniger, S., Hay, G.J.: Free and open source geographic information tools for landscape ecology. Ecological Informatics, vol. 4, iss. 4, pp. 183–195. (2009). 9. Chen, D., Shams, S., Carmona-Moreno C., Leone A. Assessment of open source GIS software for water resources management in developing countries. Journal of Hydro- environment Research, vol. 4, iss. 3, pp. 253–264. (2010). 10. Pollino, M., Fattoruso, G., La Porta, L., Della Rocca, A.B., James, V.: Collaborative open source geospatial tools and maps supporting the response planning to disastrous earth- quake events. Futur. Internet. 4, 451–468 (2012) 11. Fathi, H. and Ghavami, M.S. Using GIS data and satellite images to manage hazard zone in earthquake. Advances in Computer Science: an International Journal, 4(3), pp.104-110. (2015). 12. Liljas, G., Zaytsev, A., Dentler, J.J.: NHibernate 4.x Cookbook. 2nd edn. Packt Publishing, UK. p. 448. (2017). 13. Smith, J.P.: Entity Framework Core in Action. Manning Publications company, New York. p. 520. (2018). 14. Yigitbas, E., Fischer, H., Sauer, S. Model-Based User Interface Development for Adaptive Self-Service Systems. In: Marcus A. (eds) Design, User Experience, and Usability. Theo- ries, Methods, and Tools for Designing the User Experience. DUXU 2014. Lecture Notes in Computer Science, vol. 8517, pp 206-213. Springer, Cham. (2014). 15. Rhazali, Y., Hadi, Y., Mouloudi, A. Model Transformation with ATL into MDA from CIM to PIM Structured through MVC. Procedia Computer Science, vol. 83, pp. 1096- 1101. (2016). 16. Bychkov, I.V., Hmelnov, A.E., Fereferov, E.S., Rugnikov, G.M. and Gachenko, A.S. Methods and Tools for Automation of Development of Information Systems Using Speci- fications of Database Applications. In: Proc. of the 3rd Russian-Pacific Conf. on Computer Technology and Applications (RPC) pp 1–6. (2018). 17. Hmelnov, A. and Fereferov, E. Development of cross-platform problem-oriented systems using specifications of database applications. In: Proc. of the 2nd Scientific-Practical Workshop Information Technologies: Algorithms, Models, Systems (ITAMS'2019), CEUR Workshop Proceedings, vol. 2463, pp. 59–69. (2019).