## 3 Results
* The study of multi-energy systems was conducted under the following assumptions:
* The system is in a steady state;
* The energy flow has the direction from input to output;
* Energy flows are characterized only by energy indices. A flow diagram of an energy hub with ports is shown in Figure 3.  
The mathematical description of the energy hub, which relates the input and output flows through various energy channels in a matrix, is shown below:  
\[\underbrace{\left|I_{inn}\right. }_{ \begin{subarray}{c}i\text{ \ \ }\\ \vdots\\ I_{inn}\end{subarray} }=\underbrace{\left|c_{\alpha\alpha}\right. }_{ \begin{subarray}{c}\cdots\text{ \ \ }\\ \vdots\text{ \ }\\ c_{\alpha\omega}\text{ \ \ }\end{subarray} }\underbrace{\left|p_{im\alpha 1}\right. }_{ \begin{subarray}{c}\vdots\\ \vdots\\ p_{im\omega}\end{subarray} } \tag{7}\]  
where \(C_{imn}\) is a direct transformation matrix. The direct transformation matrix determines the internal relations between the energy hub and the factors of converting one type of energy to another. The system of Equation (7) allows obtaining the amount of energy for each of the input channels required to provide the energy load curves of the consumer [25]. In the case of solving the inverse problem, a matrix of inverse transformations is introduced:  
\[\underbrace{\left| \begin{matrix}p_{ima}\\ \vdots\\ p_{im\omega}\end{matrix} \right|}_{input\,P_{lm}}=\underbrace{\left| \begin{matrix}d_ {aa}&\cdots&d_{\omega a}\\ \vdots&\ddots&\vdots\\ d_{aa\omega}&\cdots&d_{\omega}\end{matrix} \right|}_{D_{imn}}\underbrace{ \left| \begin{matrix}l_{ima1}\\ \vdots\\ l_{im\omega}\end{matrix} \right|}_{output\,L_{in}} \tag{8}\]  
The relationship between the coefficients of the inverse and direct transformation has an unambiguous form:  
\[d_{\beta\alpha}= \begin{cases}c_{\alpha\beta}^{-1}\,\,\text{if}\,\,c_{\alpha \beta}\
eq 0\\ \,\,\,\,\,0\,\,\,\text{else}\end{cases}  \tag{9}\]  
Equations (7) and (8) describe the energy transfer port \(\rightarrow\) port. In the case of \(n\) output ports, the energy for each input channel is determined as follows:  
\[P_{lm}=\sum_{n=1}^{N}D_{imn}L_{in} \tag{10}\]  
This mathematical description of the energy hub does not include parameters to factor in energy flows for the case of energy storage devices. In 2007, [PERSON] [26] identified the application areas for the energy hub concept. These included the ones listed below:  
* Power plants with cogeneration and trigeneration [27];
* Large industrial entities employing various types of energy carriers in their technological process;
* Large office and administrative buildings;
* Limited geographic areas;
* Islanded energy systems. It is worth noting that the study presented in [28] investigated mostly multi-energy systems under the following assumptions:  
* All transient processes are damped, the system is in a steady state, and all values remain practically constant;
* Losses are taken into account only for the energy hub elements;
* Energy flows are directed from input to output;
* Power flows through converting devices are characterized only by energy and efficiency. Based on the above mathematical description of the energy hub, the redistribution of energy flows was considered given the energy storage systems. Figure 4 shows an energy storage device as a simplified model [29]. Figure 3: A flow diagram of an energy hub. The energy storage device is assumed to consist of the internal idealized storage unit and an external interface. The steady-state values of the input and output power are related to each other by the following relationship:  
\[\widetilde{q}_{\alpha}=e_{\alpha}q_{\alpha}. \tag{11}\]  
Given the direction of the energy flow (charge, discharge), we determine the coefficient \(e_{\alpha}\) as  
\[d_{\beta\alpha}=\left\{ \begin{matrix}e_{\alpha}^{+}&if&q_{\alpha}\geq 0\;(charging/standby )\\ &1/e_{\alpha}^{-}&0\;else\;(discharging)\end{matrix} \right. \tag{12}\]  
In general, an energy hub can contain an arbitrary number of energy storage devices.