## 1 Introduction  
Fossil fuels represent an unfavorable energy source for a ship's propulsion and have an environmental impact. Also, due to the increase in the price of marine fuel and the questionable possibility of obtaining it, this method of operation is becoming less and less competitive from an economic point of view. Although the awareness of the public and interest groups on this issue is at a high level, the current contribution of the world's ship-ping green fleet is negligible. According to [1], only 6.52% of global ships' fleet can be powered by alternative fuel.  
The possibility of applying a certain type of alternative energy depends on various parameters. It is necessary to consider the economic, ecological, technical, and social aspects of the application of each individual type of energy. Energy availability is one of the most important factors when conducting a technical feasibility study. In the paper [2], a multi-criteria analysis was conducted to select a suitable fuel type. All stakeholders involved in the research assessed the sustainability of maritime transport. The work strongly promotes the use of electric propulsion. Electric propulsion requires a large amount of electricity, which can be obtained from renewable energy sources (RESs) or battery storage.  
Renewable sources of electricity are used in a whole range of ships. However, considering the size of the vessel and the energy needs of a typical ferry fleet, the contribution of the self-produced electrical energy to power the ship's propulsion system is practically negligible [3]. The electricity produced could be used, for instance, for lighting or other low-consuming needs of the ship's power system. Therefore, it is necessary to ensure adequate charging of the ship's electrical energy storage system (ESS) to power its propulsion from the shore. From an ecological point of view, such a model is justified only if the electricity of the terrestrial power system is produced from RESs. The revised Renewable Energy Directive EU/2023/2413 raises the EU's binding renewable target for 2030 to a minimum of 42.5%, compared to the previous 32% target [4]. Although a significant number of scientific papers and studies research the possibility of electrification of ships, particularly ferries, the performance of the charging ships' electrical ESSs has not been sufficiently investigated. This is especially pronounced if a group of ships using a common port of call is observed. This research aims to optimize the ferry fleet's peak power charging process, considering the time available and daily energy profile.  
The main scientific contribution of this paper is the creation of the applicable model based on particle swarm optimization (PSO) and greedy algorithm methods that optimize the peak charging power of the ferry fleet, considering the timetable and daily energy profile without using additional sources and electricity storage.  
The remainder of the paper is organized into the following sections. The related work is described in Section 2. In Section 3, the proposed research and the methodology are presented. The Section 4, describes the PSO in general and the mathematical background of the applied algorithm. The Section 5, presents the experimental set-up of the proposed model. The Section 6, presents the obtained results. Furthermore, the proposed model has been tested for robustness and validated. Finally, the Section 7, presents conclusions of the proposed research and its future perspectives.