## 5 Conclusions  
This research encompassed a comprehensive and up-to-date literature review on hybrid energy solutions and optimization models within ports and marine environments. It detailed the materials and methodologies developed in the study, including the strategic operational energy management approach and the fundamental principles underlying each optimization model. Furthermore, it introduced a machine learning tool to predict energy surplus and deficits under varying energy demand conditions. The study included a case analysis of the Port of Aviles, providing an overview of the system's characterization, key components of the hybrid energy solution, simulation results, and discussions of the performance of all examined models. Specifically, it evaluated the developed Energy Management Tool model (EMTv1) and Hybrid for Renewable Energy Solutions (HY4 RES), alongside the Hybrid Optimization of Multiple Energy Resources (HOMER\({}^{\otimes}\) 3.16.2) model, a widely recognized commercial energy tool used for comparative analysis. Model transferability to other ports with different geographic, climatic, and operational conditions requires the study of key factors, such as varying load profiles, renewable resource availability, and local energy policies, which have been acknowledged as influencing model adaptation and performance. This research enhanced modeling proficiency while ensuring system reliability through optimized energy management models and machine learning-based energy balance predictions. Figure 22: Artificial neural network employed considering a higher demand for various scenarios: (**a**) No.1; (**b**) No. 2; (**c**) No. 3; (**d**) No. 4; and (**e**) No. 5. A novel methodology was developed, consisting of two key steps:
* Optimization of Renewable Energy Sources and Storage System Management--This step involved the strategic optimization of energy sources and storage systems using three distinct mathematical models: EMTv1 and HY4 RES, both developed under the HY4 RES research project, and HOMER\({}^{\otimes}\) 3.16.2 Pro, a widely recognized commercial energy tool. Seven different scenarios (labeled from Sc1 to Sc7) were designed and analyzed based on the models' capabilities in integrating energy components and managing storage systems. * Machine Learning-Based Energy Balance Prediction--This step focused on forecasting energy surplus and deficit through machine learning techniques. Predictions were conducted for five scenarios derived from the developed optimization models, enhancing the overall accuracy and reliability of energy management assessments. The simulated scenarios included the following: **Scenario 1**, covering _EMTv1 modeling with solar, wind, and hydrokinetic energy and PAT on-grid with waste of excess energy;_ **Scenario 2**, focused on _EMTv1 modeling, with solar, wind, and hydrokinetic energy and PAT on-grid_; **Scenario 3**, featuring _HY4 RES modeling, with solar, wind, and hydrokinetic energy and the grid_; **Scenario 4**, covering _HY4 RES modeling, with solar, wind, and hydrokinetic energy and PAT_; **Scenario 5**, characterized by _HY4 RES modeling, with solar, wind, and hydrokinetic energy and BESS_; **Scenario 6**, using _HOMER modeling, with solar, wind, and hydrokinetic energy and an electric grid_; and **Scenario 7**, featuring _HOMER modeling, with solar, wind, and hydrokinetic energy and BESS_. In Scenario 1, a comparison of generated and consumed energy highlighted a substantial surplus, with the hybrid module producing 1449 kWh/year while demand was only 171 kWh/year. Seasonal variations in renewable energy generation and storage dynamics were analyzed to assess system sizing and demand distribution. Hourly calculations revealed that a single hybrid module covered 60.26% of demand (5506 out of 8760 h), requiring 558,431 kWh to be imported from the grid. Scenario 2 examined the interaction between energy generation, demand, and storage within a single hybrid module.