3.1. Problem Description
Before constructing the mathematical model, it is essential to provide a detailed introduction to the transportation process of tramp shipping. During tramp shipping voyages, in addition to the contracted cargoes, there often arise short-term spot cargo transportation demands in the shipping market [
25]. At this point, tramp ships, while ensuring the completion of contracted cargo transportation, strive to transport spot cargoes within their transportable capacity, thereby increasing operational revenue [
26]. In this study, the factors influencing shipping routes primarily include CII value limitations, port berthing capacity constraints, channel capacity constraints, annual port throughput capacity, and route operating costs. With the objective of minimizing the total annual operating cost, this paper establishes a route optimization model that, based on CII limitations, integrates ship speed and cargo capacity to select economically and environmentally friendly routes, ensuring compliance with international carbon reduction requirements.
As illustrated in
Figure 1, this assumes the original ship transportation plan involves loading Cargo 1 with a freight volume of x from Port A, sailing to Port B for unloading, then sailing empty to Port C to load Cargo 2 with a freight volume of y destined for Port D. When two spot cargo transportation demands emerge in the shipping market, the ship needs to formulate a subsequent transportation plan based on the loading and unloading ports of the spot cargoes and their time window requirements. Cargo 3 with a freight volume of z has loading and unloading ports at Port B and Port E, respectively, and must be loaded within the 5th to 10th day after the order appears. Cargo 4 with a freight volume of w has loading and unloading ports at Port E and Port D, respectively, and must be loaded within the 5th to 15th day after the order appears. According to these spot cargo transportation demands, the ship can alter its transportation plan by unloading Cargo 1 at Port B, transporting Cargo 3 to Port E, loading Cargo 4 at Port E, transporting it to Port D, then sailing empty to Port C to load Cargo 2 and finally transporting it to Port D.
3.2. Mixed-Integer Programming Model
3.2.1. Model Assumptions
To facilitate the establishment of the model and based on practical considerations, the following assumptions are made:
- (1)
Due to the relatively short voyage distances, the need for refueling at ports is not considered. The ship is assumed to have sufficient fuel for each voyage before departure.
- (2)
All data related to the ports that need to be visited in this study are known.
- (3)
During navigation, the sea conditions are assumed to be good, with no adverse or extreme weather conditions that could affect the voyage.
- (4)
Cargo from the origin port to the destination port is transported in a single shipment, without being split into multiple loads.
- (5)
The ship meets all port and channel restrictions, and other natural factors are not considered.
- (6)
Contracted cargo does not have a loading time limit within the study period; it only needs to be delivered within the study period. However, spot cargo must meet the specified loading time window.
- (7)
Since all cargo in this study is assumed to be loaded and unloaded, handling fees and port charges are not considered. Operating costs only include fuel costs during navigation and while the ship is berthed at ports.
- (8)
During the study period, all information related to the loading and unloading ports, freight volumes, normal berthing waiting times at ports, and the loading time windows for spot cargo are known.
- (9)
The allowable speed range of the ship and the fluctuation range of fuel prices during the study period are known.
3.2.2. Variable and Parameter Settings
In modeling this problem, the main parameters related to ports, ships, cargo, and fuel costs are considered, as follows:
D1 = {1, 2, …, n}: the set of loading ports for all cargo (contracted cargo and spot cargo).
D2 = {n + 1, n + 2, …, 2n}: the set of unloading ports for all cargo (contracted cargo and spot cargo).
D3: the set of ports where transportation tasks have already been completed according to the original plan.
D4: the set of ports where transportation tasks have not been completed according to the original plan.
D5: the set of loading ports for spot cargo.
V: the set of available ships, k∈V.
i: the cargo ID, which also represents the loading port for the i-th shipment of cargo.
i + N: the unloading port for the i-th shipment of cargo.
: a 0–1 variable, which takes the value of 1 when ship k departs from port i and sails to port j; otherwise, it takes the value of 0.
: performance parameter for ship k.
: fixed operating cost per unit time for ship k.
: fuel price.
: the voyage distance between port i and port j.
: the economic speed adopted by ship k on the voyage segment between port i and port j.
: fuel consumption per unit time while ship k is waiting at port for berthing.
: the normal port stay time for ship k.
: the average number of ships at port i.
: the shipping capacity of port i.
: fuel consumption per unit time during loading and unloading operations for ship k at port.
: the cargo loading volume of ship k at port i.
: the cargo unloading volume of ship k at port i.
: the total throughput of port i.
: the total time spent on loading and unloading operations by all ships currently at port i.
: the berthing time of ship k at port i.
: the departure time of ship k from port i’s berth.
[,]: the selectable speed range for ship k.
[,]: the fluctuation range of fuel prices during the study period.
: the maximum deadweight tonnage of ship k.
[]: the loading time window for spot cargo at port i.
: The CO2 emission limit required by CII;
: represents the fuel-to- mass conversion factor for the fuel used by ship k.
: the time of arrival of ship k at port i.
Both ω and θ are constants, with ω taking the value of 1 and θ taking the value of 1.5 in this paper.
3.2.3. Model Construction
In this paper, a mixed integer programming approach is adopted to establish an optimization model for tramp shipping scheduling, with the objective function set to minimize the overall fleet cost. The model comprises four main components: the voyage fuel cost for completed transportation tasks, the voyage fuel cost for uncompleted transportation tasks, the fuel cost incurred by ships while waiting at ports (excluding port handling time), and the fuel cost during loading and unloading operations at ports [
27].
The objective function of the tramp shipping scheduling optimization model can be expressed as follows:
In Equation (1), Z represents the total operating cost of the shipping company; is a 0–1 variable, which takes the value of 1 when vessel k sails from port i to port j, and 0 otherwise; C1 denotes the voyage fuel cost for completed transport tasks; C2 represents the voyage fuel cost for incomplete transport tasks; C3 refers to the fuel cost incurred during waiting time at the port for berthing (excluding loading and unloading time at the port); and C4 represents the fuel cost incurred during loading and unloading operations at the port.
- (1)
Calculation of fuel cost during the voyage
Among these, C1 and C2 are both fuel costs during the voyage, and the calculation formula is as follows:
In Equation (2), represents the performance parameters of vessel k, represents the fixed operating cost per unit time of vessel k, represents the fuel price, represents the voyage distance between port i and port j, and represents the economic speed adopted by vessel k on the voyage segment between port i and port j (the formula for calculating the economic speed is . Since is a known parameter, can be divided into two cases: loaded and ballast. Therefore, the economic speed mainly depends on the fuel price and the loading state of the vessel).
- (2)
Calculation of fuel cost during the vessel waiting time at port
In this paper, the road congestion function released by the American Highway Administration is introduced and converted into a port congestion waiting time function to calculate the fuel cost incurred during the vessel’s waiting time at the port. The expression of the road congestion function is as follows:
In Equation (3), t represents the congestion time on the studied road segment,
represents the normal travel time through the studied road segment,
represents the actual traffic flow on the studied road segment,
represents the capacity of the studied road segment, and both
and
are constants. When congestion occurs at the port, the road congestion function is converted into a port congestion waiting time function, as shown below:
In Equation (4), represents the congestion waiting time of vessel k at the port, represents the normal waiting time of vessel k at the port, represents the average number of vessels at port i, and represents the vessel handling capacity of port i.
The formula for calculating the fuel cost C
3 of a vessel waiting at the port during congestion is as follows:
In Equation (5), represents the fuel consumption per unit time for vessel k while waiting at the port.
- (3)
Calculation of Fuel Cost During Ship Loading and Unloading at Port
The formula for calculating the fuel cost incurred during ship loading and unloading at the port, denoted as
, is as follows:
In Equation (6),
represents the fuel consumption per unit time for vessel
k during loading and unloading operations at port
i,
represents the loading volume of vessel
k at port
i,
represents the unloading volume of vessel
k at port
i, and
represents the average loading and unloading efficiency at port
i (
can be expressed by the formula
, where
represents the total throughput of port
i, and
represents the sum of all loading and unloading operation times for vessels at port
i). The sum of all loading and unloading operation times at the port can be obtained from the following formula:
In Equation (7), represents the time when vessel k enters the berth at port i, and represents the time when vessel k leaves the berth at port i.
The fuel cost during vessel loading and unloading at the port can be expressed as follows:
In summary, the objective function of the vessel scheduling optimization model in this paper can be expressed as follows:
Among the constraints, [,] represents the selectable speed range for vessel k, [,] represents the fluctuation range of fuel prices during the study period, represents the maximum deadweight tonnage of vessel k, represents the loading time window for spot cargo at port i, and represents the arrival time of vessel k at port i. Equation (10) indicates that the vessel’s overall voyage route meets the CII requirements. Equation (11) ensures that once a vessel enters a port, it must exit from that port. Equation (12) signifies that all contracted cargo transportation tasks have been completed. Equation (13) reflects that new spot cargo demands can emerge in the shipping market at any time. Equation (14) ensures that a vessel does not directly re-enter the same port after leaving it. Equation (15) guarantees that the vessel does not deviate from its intended route. Lastly, Equation (16) states that cargo must be transported from the loading port to the unloading port.
3.3. Algorithm Design for the Tramp Shipping Scheduling Optimization Problem
Due to the immense scale of variables in tramp shipping scheduling optimization problems, it is challenging to solve them using exact algorithms. However, heuristic algorithms with global search capabilities, such as genetic algorithms, tabu search, simulated annealing, and others, have been applied to similar scheduling problems and have achieved certain results [
28].
Although numerous new heuristic algorithms have been employed in ship scheduling optimization problems, the adaptive genetic algorithm remains highly suitable for studying such issues because its chromosomes can conveniently represent the decision variables of the problem and can yield results within a relatively short time. Based on the scheduling rules during tramp shipping operations, this paper introduces an adaptive genetic algorithm. The algorithm flowchart is shown in
Figure 2.
The algorithm steps are as follows:
Step 1: Randomly generate an initial population .
Step 2: Evaluate each individual in the population and calculate its fitness.
Step 3: Perform selection operations on the population using a combination of stochastic universal sampling and an elite preservation strategy.
Step 4: Calculate the standard deviation of fitness values for the population after crossover.
Step 5: Perform mutation operations on the population to generate a new population , and calculate the standard deviation of fitness values for this new population .
Step 6: Compare the standard deviation of fitness values between the original population and the mutated population . If the standard deviation of the mutated population is smaller, indicating poor population diversity, increase its mutation rate ; otherwise, maintain the mutation rate.
Step 7: Recombine the candidate population obtained after selection, crossover, and mutation operations with the elite individuals preserved from the parent generation through the elite preservation strategy to form the offspring population.
Step 8: Determine whether the iteration termination condition has been met. If not, use the offspring population as the parent population for the next generation and repeat steps 2 through 7. If the termination condition is met, end the algorithm.
- (1)
Algorithm Encoding
To avoid a reduction in solution accuracy caused by excessively long chromosomes, this paper adopts a two-dimensional real number encoding method [
29,
30]. The first group represents the cargo codes for each shipment batch, and the second group indicates the ship ID assigned to perform the transportation task. For example, suppose a shipping company has 4 ships and a total of 10 contractual cargo batches that need to be transported. Through random generation, the cargoes are assigned to the corresponding ships for transportation, forming a set of encodings. A random allocation scheme is shown in
Figure 3a, indicating that Ship 1 transports the cargoes with numbers 1, 3, and 9; Ship 2 transports the cargoes with numbers 5, 6, and 8; Ship 3 transports the cargoes with numbers 2, 4, and 10; and Ship 4 transports the cargo with number 7. Subsequently, the initial allocation scheme is sorted by ship ID, as shown in
Figure 3b. Then, the order of port calls for ships is arranged based on the order of loading and unloading ports specified in the cargo attributes, resulting in a new allocation scheme, as shown in
Figure 3c. Finally, when new spot cargo demands arise in the market, specifically the cargoes numbered 11 and 12, the shipping company assigns ships to undertake these spot cargo transportation tasks based on the principle of minimizing costs, forming the final allocation scheme, as shown in
Figure 3d.
- (2)
Initializing the Population
Under the consideration of constraint conditions, this paper adopts a random generation method to produce the initial population.
- (3)
Calculating Fitness Values
With the objective of minimizing shipping operation costs, the objective function of this paper is also chosen to be the minimization of transportation costs. Therefore, the fitness function is also selected to be the minimum transportation cost. If the calculated fitness value is higher, this indicates a lower transportation cost. Consequently, when the fitness value reaches its maximum, the optimal solution to the objective function is obtained.
- (4)
Designing the Selection Operator
This chapter adopts a method that combines stochastic universal sampling with an elite preservation strategy. The elite preservation strategy is used to prevent the loss of superior individuals. Assuming the generated population size is , a set of chromosomes are selected from the current population as parents for reproduction based on certain rules, with the selection probability for replication. Here, represents the fitness value of the -th chromosome. The selection rule employs the roulette wheel method: When selecting, a random number is first generated. If this random number falls within the fitness value interval of a particular individual, that individual is chosen and replicated into the next generation’s population. This selection process is repeated times, resulting in the formation of a new generation’s population.
- (5)
Designing Crossover and Mutation Operators
Firstly, this paper adopts the roulette wheel selection method for individual selection. By calculating the proportion of each individual’s fitness to the total fitness, individuals with higher fitness are selected.
Then, two chromosomes are randomly selected for crossover. However, to avoid the same cargo appearing on two different ships, this paper makes appropriate adjustments to the genes after crossover. Assuming that cargo 2 and cargo 7 on chromosome 1 need to be crossed with cargo 3 and cargo 4 on chromosome 2, a new set of chromosomes will be formed after crossover. However, there will be overlapping cargo numbers on the two chromosomes, so cargo 3 and cargo 4 on chromosome 1, and cargo 2 and cargo 4 on chromosome 2 need to be swapped before the crossover operation takes place, resulting in new chromosomes 3 and 4, as shown in
Figure 4.
In the design of the mutation operator, this paper compares the standard deviation of the fitness values between the parent and offspring populations before and after mutation. If the offspring’s standard deviation is smaller than the parent’s, the mutation rate is increased by 0.01. If the offspring’s standard deviation is greater than or equal to the parent’s, the mutation rate remains unchanged.