## 5 Conclusions
### Setting Up the EnergyHub Model in the GAMS Program Environment  
GAMS (General Algebraic Modeling System) is an algebraic modeling system suitable for mathematical optimization. This is an effective optimization method. We compared other optimization methods such as special optimization methods, including linear programming, dynamic programming, and convex programming, as well as another so-called combinatorial optimization. GAMS was the best for us. We applied GAMS for the purpose of designing the city energy center (EnergyHub) in the defined area of Prague 6-Bubenee. This is an effective optimization method that has been used for our purpose. We will briefly introduce the source codes for the compilation and calculation of the proposed variants (three variants) of the Energy Node. To compile the program model code, we enter the input data, and then the GAMS program calculates the value of the purpose function. The basis for the calculation is the hourly energy consumption and electricity prices. These energy prices are always dependent on the current tariff. Figure 22 shows the necessary variables for time and the creation of a table of energy consumption, available power of photovoltaic panels, and hourly electricity prices). Figure 22: Input data code. We will show only the module of the third EnergyHub program. Option 3 has components: transformer, cogeneration unit, gas boiler, battery storage, heat pump, and photovoltaic system. Variants 2 and 1 just mention the information of their composition. They contain the following components. Option 2 has the following components: a transformer, a cogeneration unit, a gas boiler, a heat pump, and a photovoltaic system. Option 1 has the following components: transformer, cogeneration unit, gas boiler, and heat pump. Based on the resulting value of the variable \"cost\", we find the most optimal solution in Figure 23.  
We will now deduce variables for variant 3 Figure 24.  
We will now introduce the equations into the GAMS program and run the solution to this problem, which is the following Figure 25.  
Evaluation of results:  
Option 1: The value of the objective function was evaluated at CZK 215,210.175. Compared to the original value of daily energy costs, we have a saving of 18.82%. Option 2: The value of the objective function was evaluated at CZK 211,102.50. Compared to the original value of daily energy costs, we save 20.37%. Option 3: The value of the objective function was evaluated at CZK 210,837.78. Compared to the original value of daily energy costs, we have savings of 20.47%. Figure 23: Introduction of variables. The conclusion is that we will come up with the optimization of the purpose function, which we performed in the GAMS environment, and based on the results, we recommended to accept the composition of EnegyHub in variant 3. The importance of the application of artificial intelligence in the process of energy savings and thus also the significant impact on the environment (reduction of CO2 emissions) is clear. Currently selected methods of artificial intelligence allow us to solve optimization practical solutions. It was these applications that I used in our research. For example, the EH (EnergyHub) urban energy system was designed using the GAMS simulation software. Three EH variants were proposed and subsequently compared in terms of their energy efficiency and energy savings. From the results of the partial solutions, we can see that the composition of EH in the system of photovoltaic panels and battery storage has led to a significant decrease in daily energy costs. In addition, these results were evaluated in a period of adverse weather conditions (autumn 2021). Energy savings reached up to 20% of the original variant without optimization. If we researched these savings during the spring or summer, for example, we would achieve significantly better austerity measures. It is logical that the performance of individual EH components also depends on the environment.