# Ship Scheduling Algorithm Based on Markov-Modulated Fluid Priority Queues
## 3 Problem Modeling and Algorithm Modeling
### Algorithm Modeling and Parameter Setting
\begin{table}
\begin{tabular}{c l} \hline \hline
**Parameter Symbol** & \multicolumn{1}{c}{**Meaning**} \\ \hline \(\mathcal{S}=\{S_{1},S_{2},\cdots,S_{n}\}\) & State space of the anchorage, which contains n different states \\ \(k\) & Indices of ship priorities, where \(k\in\{1,2,\cdots,K\}\) \\ \(Q\) & \(Q=\left[q_{ij}\right]_{n\times n}\) is the generation matrix of the CTMC \\ \(r_{i}^{(k)}\) & Arrival rate of ships of the \(k\)-th category when the anchorage state is \(i\) \\ \(l\) & Used in summation notation to traverse priority categories \\ \(R^{(k)}\) & Diagonal matrix composed of the arrival rates of ships of the \(k\)-th category under different anchorage states, \(R^{(k)}=diag\Big{\langle}r_{i}^{(k)}\Big{\rangle}\) \\ d & Rate at which the anchorage serves ships \\ \(L_{k}(t)\) & Queue length of ships of type \(k\) at time \(t\) (comparing the number of ships to the quantity of a fluid) \\ \(\pi\) & Steady-state probability vector of the CTMC, which satisfies \(\pi Q=0,\pi\mathrm{l}=1\) \\ \(\lambda^{(k)}\) & Average arrival rate of \(k\) class ships in steady state \\ \(C^{(k)}\) & Net rate matrix \\ \(p^{(k)}\) & Probability mass vector of the queue length being 0, where \(p^{(k)}=\left[0p_{-}^{(k)}p_{0}^{(k)}\right]\) \\ x & Queue length at the departure time of ships of type \(k\) \\ \(y\) & Queue length of ships of type \(k\) at any time \\ \(f_{\mathrm{x}}^{(k)*}\) & Laplace–Stieltjes transform (LST) of the queue length at the departure time of ships of type \(k\) \\ \(\hat{\pi}^{(k)}\) & Initial phase distribution vector related to ships of the \(k\)-th category in MMFPQ, \\ \(\hat{\pi}^{(k)}\) & \(\hat{\pi}^{(k)}=\left[\kappa^{(k+)}\quad 0\right]\), which is used to calculate waiting-time-related indicators \\ \(\Phi^{*}(s)\) & Matrix related to LST that describes the cumulative rewards during the busy period, which is used to derive indicators such as the LST \(f_{T}^{*}(s)\) of the waiting time \\ \(\Phi^{(m)}\) & \(m\)-th derivative matrix of \(\Phi^{*}(s)\) as \(s\to 0\), which is used to calculate the \(m\)-th \\  & moment \(E(\mathcal{T}^{m})\) of the waiting time \\ \(\hat{\pi}^{(k)}\) & Probability mass of zero queue length (the probability that the system is idle when a ship arrives) \\ \(F_{\mathrm{X}}^{(n)}(x)\) & Erlangization approximate distribution of the queue length at the departure time \\ \(u\) & Actual length of the ship queue in the anchorage (such as the number of ships or fluid level) \\ \(f_{\mathrm{y}}^{(k)}(u)\) & Probability density function of the queue length at a random time \\ \(F_{\mathrm{y}}^{(k)}(u)\) & Erlangization approximate distribution of the queue length at a random time \\ \(s\) & Transform variable connecting the queue distributions at random times and the departure time \\  & Joint density function of the workload and the background process state at time \(t\), \\ \(\mathrm{w}^{(k+)}(t,x)\) & and its element \(\mathrm{w}_{i}^{(k+)}(t,x)=\frac{d}{dx}P(\mathrm{W}^{(k+)}(t)\leq x,J(t)=i)\) ; \(\mathrm{W}^{(k)}(t)\) is no lower \\  & than \(k\) at time \(t\) \\  & Row vector of the joint probabilities that the system workload is 0 and the \\ \(\alpha^{(k+)}(t)\) & background process state is \(i\), \(\alpha^{(k+)}(t)=\left[\alpha_{i}^{(k+)}(t)\right]\), where \\  & \(\alpha_{i}^{(k+)}(t)=P(\mathrm{W}^{(k+)}(t)=0,J(t)=i)\) \\ \(f_{T}^{*}(s)\) & LST of the waiting time \(\mathrm{W}_{k}\) of ships of the \(k\)-th category, which is used to analyze the characteristics of the waiting time in the frequency domain \\  & \(m\)-th moment of the waiting time \(\mathrm{W}_{k}\) of ships of the \(k\)-th category, which reflects the statistical characteristics of the waiting time, such as the mean value (when \(m=1\)) and the variance (related to the moment when \(m=2\)) \\  & \(n\)-th-order approximation of the distribution function of the waiting time \(\mathrm{W}_{k}\) of ships of the \(k\)-th category, which is used to approximate the distribution of the waiting time in the time domain \\ \hline \hline \end{tabular}
\end{table} 
Table 2: _Cont._