# Ship Type Selection and Cost Optimization of Marine Container Ships Based on Genetic Algorithm
## 2 Establishment of the Bi-Level Programming Model
### Constraints  
(1) Transport Cost in for Single Shipping Task for the Shipping Company  
The transport cost is primarily influenced by the assigned cargo volume and the sailing distance of different ship types on their respective routes. The formula for transport cost F1 is as follows:  
\[\text{F1}=\sum_{i=1}^{n}\lambda_{i}\alpha_{i}x_{i}x_{i} \tag{1}\]  
(2) Value-Added Service Cost for a Single Shipping Task for the Shipping Company  
When a ship docks at various ports for loading, unloading, sorting, and handling cargo, value-added service costs are incurred. Therefore, the value-added service cost is related to the assigned cargo volume. The formula for value-added service cost F2 is as follows:  
\[\text{F2}=\sum_{i=1}^{n}\lambda_{i}\beta_{i}x_{i} \tag{2}\]  
(3) Fixed Cost in a Single Shipping Task for the Shipping Company  
Due to the different types of ships purchased by the shipping company, the depreciation and other fixed costs vary by ship type. Thus, the fixed cost is only related to the type of ship. The formula for fixed cost F3 is as follows:  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Variable** & **Meaning** \\ \hline \(F\) & Total operating cost of a single transport mission for the shipping company \\ \hline \(F1\) & Transport cost for a single transport mission of the shipping company \\ \hline \(F2\) & Value-added service cost of the transportation of a single unit of cargo by ship \(i\) \\ \hline \(F3\) & Fixed cost of transportation of a single unit of cargo by ship \(i\) \\ \hline \(\lambda_{i}\) & 0–1 variable: 1 when type \(i\) ship is configured on the route, otherwise 0 \\ \hline \(\alpha_{i}\) & Transportation cost per nautical mile (nm) \\ \hline \(\beta_{i}\) & Indicates the value-added service cost per unit ton of cargo incurred when the type \(i\) ship provides simple value-added services (such as handling, sorting, etc.) \\ \hline \(\eta_{i}\) & Indicates the fixed cost incurred when selecting type \(i\) ship \\ \hline \(x_{i}\) & Indicates the logistics business volume that type \(i\) ship receives from the shipping company’s business, that is, the cargo volume (TEU) \\ \hline \(n\) & The number of different types of ships owned by the shipping company \\ \hline \(K_{i}\) & The distance from the destination for which type \(i\) ship provides logistics \\ services; varies with the different routes arranged by different ships. \\ \hline \(X\) & The total carbon emissions of a single transport mission of the shipping company \\ \hline \(EEDI_{i}\) & Ship energy efficiency design index of type \(i\) ship \\ \hline \(w_{i}\) & The maximum cargo carrying capacity of ship \(i\) in a single transport \\ \hline \hline \end{tabular}
\end{table}
Table 1: Parameter variable meaning.  
\[\text{F3}=\sum\limits_{i=1}^{n}\lambda_{i}\eta_{i} \tag{3}\]  
(4) \(CO_{2}\) Emissions Generated by Completing a Single Order  
Different ship types procured by the shipping company have corresponding Energy Efficiency Design Index (EEDI) values. Therefore, \(CO_{2}\) emissions can be calculated based on the EEDI coefficient, the cargo transport distance, and the cargo load of the ship. The total \(CO_{2}\) emissions \(X\) for an order can be calculated using the following formula:  
\[X=\sum\limits_{i=1}^{n}\text{EEDI}_{i}\lambda_{i}\kappa_{i}x_{i} \tag{4}\]  
(5) Total Operating Cost of the Shipping Company  
The total operating cost of a single transport mission for the shipping company consists of three parts: transport cost, value-added service cost, and the fixed cost corresponding to different ship types. The formula for the total cost \(F\) is as follows:  
\[F=\sum\limits_{i=1}^{n}\lambda_{i}\alpha_{i}\kappa_{i}x_{i}+\sum\limits_{i=1} ^{n}\lambda_{i}\beta_{i}x_{i}+\sum\limits_{i=1}^{n}\lambda_{i}\eta_{i} \tag{5}\]