## 5 Experimental Setup  
As stated in the optimization task, considering the available daily timetable, the goal is to optimize peak charging power due to terrestrial power network limitations. In this case, we consider the example of the largest Croatian city on the coast of the Adriatic Sea. Namely, the majority of consumers in the area of the city of Split are supplied via the \"Dobri\" and \"Sucidar\" transformer stations (TS) with an installed capacity of 2 \(\times\) 40 MVA each. Furthermore, the maximum measured peak load of the \"TS Dobri\", to which the City Port of Split gravitates, is 102% [36]. Within the City Port of Split is \"TS Trajektna luka\" with an installed power of 0.63 MVA and \"TS Jadran ribolov\" with an installed power of 0.5 MVA. Even if the losses and needs of all other consumers of the City Port of Split are ignored, the existing connection does not meet the peak energy needs of the ferry fleet.  
Nine ferries take part in the national lines that dock at the City Port of Split and are operated by Jadrolinija. The daily energy load diagram of the analyzed ferry fleet is presented in Figure 4. The daily energy load diagram is derived from [24; 25; 37; 38]. The \(y\)-axis represents the required power in MW. The figure shows nine ferries with the required daily energy diagrams. The \(x\)-axis represents the time period of a day in which ships are available for charging. It has to be noted that the continuous time interval was sampled into discrete signals as 5-minute intervals within 24 h, representing one day. The 5-minute time slots were implemented as the maximum possible interval to present the sailing schedule concerning departure and arrival times. Also, maximum intervals of 5 min were chosen to reduce the number of possible combinations. Observing the daily energy needs load diagram, it is evident that it is non-periodic.  
Further, as noted in the figure, \"Ferry 6\" (marked yellow) has the highest daily energy needs, and it docks shortly at the berth twice daily (from 9:15 to 10:15 and 17:00 to 17:30). However, the other ships, like \"Ferry 5\" (marked red), are available four times at the Split port docks, are easier to charge, and have the lowest charging priority. Furthermore, for instance, at t = 10:00, the current load is 2.594 MW, almost 5.5 times higher than the average daily load (0.477 MW). At the observed moment, the peak load is the sum of the power required to charge the ship's ESS for six berthed ships that are available to charge.  
In the process of creating a model, the following limitations are applied:  
* The ship docking schedule is shown in Figure 4 and represents the examined case, i.e., it is given;
* The availability for recharging a ferry that spends the night on the ship's mooring in the port of call is a limitation. If the ship spends the night, it is treated as one charge within the same day because the reference period is 24 h. This limitation of the algorithm can be explained by the example of \"Ferry 4\" (marked orange) in Figure 4.  
Namely, the ship docks at the port the previous day at 22:00 and remains on the dock until 01:30 in the morning. The algorithm model treats this charging as one;
* Each ship is charged with constant power at all intervals during charging. This setting is important not to exceed the batteries' maximum charging current. Fast charging accelerates the battery's aging process and can ultimately lead to permanent damage [25];
* The charging interval is five minutes;
* If two or more ships are available for charging, at least one ship must be connected to the charger to reduce the number of variations;
* Each ship's daily energy needs must be met during charging;
* It is assumed that all docks are equipped with an adequate charger.  
The model was developed using MATLAB R2023b. A Dell OptiPlex 5080 computer with a built-in Intel (r) Core(tm) i5-10500 CPU 3.10 GHz, 8 GB RAM, 64-bit operating system, and Windows 11 Pro was used. The basic simulation settings are shown in Table 1.