# Ship Scheduling Algorithm Based on Markov-Modulated Fluid Priority Queues
###### Abstract  
As a key node in port logistics systems, ship anchorage is often faced with congestion caused by ship flow fluctuations, multi-priority scheduling imbalances and the poor adaptability of scheduling models to complex environments. To solve the above problems, this paper constructs a ship scheduling algorithm based on a Markov-modulated fluid priority queue, which describes the stochastic evolution of the anchorage operation state via a continuous-time Markov chain and abstracts the arrival and service processes of ships into a continuous fluid input and output mechanism modulated by the state. The algorithm introduces a multi-priority service strategy to achieve the differentiated scheduling of different types of ships and improves the computational efficiency and scalability based on a matrix analysis method. Simulation results show that the proposed model reduces the average waiting time of ships by more than 90% compared with the M/G/1/1 and RL strategies and improves the utilization of anchorage resources by about 20% through dynamic service rate adjustment, showing significant advantages over traditional scheduling methods in multi-priority scenarios. ship anchorage; Markov-modulated fluid queue; priority scheduling; continuous-time Markov chain 202520258421252  
the dispatching sequences of multi-priority ships becomes the key to improving the operation efficiency of anchorage. Therefore, the modeling and optimization of ship scheduling in anchorage is of great significance to alleviate congestion, reduce waiting costs, realize the efficient utilization of resources, and improve the port throughput capacity and service level. The complexity of anchorage scheduling is mainly reflected in the need to satisfy multiple constraints and optimization objectives simultaneously. Anchorage scheduling should strictly follow the port operation plan and coordinate the waiting order and service priority among all types of ships. Because large container ships and tankers are highly sensitive to time and the anchorage capacity is relatively fixed, scheduling tasks face serious challenges. Ports are usually equipped with anchorage areas with different functions, and the use plan will be adjusted according to temporary needs to cope with the concentrated arrival of ships. In the anchorage dispatching system, the service capacity is often limited by natural conditions, which means that waiting ships often have to queue up. Therefore, three key dimensions need to be understood in the formulation of an anchorage dispatching scheme. The first one is the time window constraint [3]. The waiting time tolerance varies significantly among different types of ships, especially among refrigerated container ships and dangerous goods carriers. A slight scheduling delay may cause significant economic losses. The second one is the anchorage congestion problem. Due to the uncertainty of ship arrival times and the fluctuations in service times, congestion occurs from time to time. This delay will produce obvious conduction effects when ships arrive at ports in a dense manner, which will reduce the operation efficiency of the whole port system [4]. The third is the priority conflict problem; in the case of resource constraints, it is necessary to establish a scientific trade-off mechanism between the immediate service requirements of high-priority ships and the fair waiting rights of low-priority ships [5]. Current anchorage scheduling research still has obvious shortcomings in dealing with multi-priority dynamic balance and accurately predicting the waiting time. These limitations restrict the practical application effects of the scheduling system. For the anchorage scheduling problem, traditional methods have obvious limitations in dealing with ship arrival randomness, uncertainty in service times, and multi-priority scheduling requirements. Based on Markov decision process theory [6; 7], a novel anchorage scheduling optimization method is proposed in this paper.