## 3 Modeling Method Used in This Work  
Our study relies on the mathematical model REM-2 (Renewable Energy Model) described in detail in [95]. In contrast to the well-known models (HOMER, HOGA, TRNSYS, and other models), it does not require an analysis of the structure options and a preliminary specification of the algorithm for switching energy flows between sources and storages. The optimal operating modes are determined based on GAMS (general algebraic modeling system) algorithms, given the random nature of solar energy and the variability of energy consumption conditions. This model finds the minimum of the objective function (the total discounted costs for the creation and operation of the system) under the balance of the secondary energy, primary energy consumption constraints, output energy production constraints, and variable constraints. For the energy system under study, we set the lists of primary energy sources \(J_{1}\), secondary energy carriers \(J_{2}\), and final types of energy \(J_{3}\). The primary energy resources include all input energy (for example, liquid fuel for a diesel power plant or electrical power from a centralized power supply system); the final energy consists of energy consumed at a given point, as well as the energy that enters the overseas market (for example, synthetic liquid fuel or hydrogen ones). The system comprises power installations (technologies) of the following two types: (a) energy conversion (transportation) and (b) energy (energy carriers) accumulation. Energy conversion installations converse primary and secondary energy into final and/or secondary energy of another type. Storage batteries accumulate secondary energy for subsequent use. The power system operation is modeled with a time step \(\Delta t\); the variables with the index \(t=0,1,2,\ldots,T\) denote the corresponding moments of time. At moment \(t\) the power of the \(i\)-th energy conversion installation is equal to \(N_{it}\leq\overline{N}_{i}\) (where \(\overline{N}_{i}\) is an installed capacity). During operation, it is possible not only to change the current power of the installation but to switch it to a different mode (for example, a CHP can be switched from heating into a condensing mode of operation). At moment \(t\), the \(i\)-th installation operates in the mode \(s_{it}\in S_{i}\) (where \(S_{i}\) is a set of admissible modes). For each energy conversion installation (\(i\in I\)), we set the following coefficients: \(\alpha_{ij}(s_{it})\) is a specific (per unit of power) consumption of the \(j\)-th energy source in the mode \(s_{it}\); \(\beta_{ik}(s_{it})\) is a specific production of the \(k\)-th energy type in the mode \(s_{it}\). For example, if we consider a fossil fuel power plant, then \(\beta_{ik}=1-\delta\), \(\alpha_{ij}=b\), where \(\delta\) is a share of auxiliary electricity consumption, \(b\) is specific fuel consumption per unit of electricity produced. For a solar power plant, we can set an arbitrary \(\alpha\) (the energy source is unlimited and free) and determine coefficient \(\beta\) by operating characteristics depending on the mode \(s_{it}\) (in this case, it is the intensity of solar radiation). At moment \(t\), the secondary energy reserve in the \(j\)-th energy storages equal to \(Q_{jt}\leq\overline{Q}_{j}\) (where \(\overline{Q}_{j}\) is the capacity). For each storage technology (\(j\in J_{2}\)), the efficiency \(\eta_{j}\) is preset and characterizes the energy losses in the battery. In addition, for all technologies (\(i\in I\cup J_{2}\)): \(k_{i}\) are the specific investments (for generators--per unit of power, for battery--per unit of capacity), \(\mu_{i}\) are the annual fixed operating costs (share of capital investments), and \(\Delta T_{i}\) is a lifetime of the installation.