# Ferry Scheduling Optimization Considering Arrival Time Uncertainty and In-Place Time Differences
## 3 Problem Transformation and Model Solving
### Model Transformation  
Chance-constrained programming is an important branch of stochastic programming, which was jointly proposed by [PERSON] and [PERSON] in 1959 [28]. In stochastic scheduling problems, a comprehensive response to uncertainty can lead to excessive resource demand due to stochastic factors. In chance-constrained programming, a balance is obtained between the penalty cost from not satisfying the constraint and the resource allocation cost by allowing a certain degree of non-satisfaction with the constraint. Chance constraints are commonly used to obtain a scheduling plan that satisfies the confidence level of constraint satisfaction by presetting the level of confidence \(\xi\) at which the constraint is satisfied. The deviation between the estimated arrival and departure times of flights and the actual times is unavoidable [19]. For example, the start time of the ferry service \(t_{j}^{0}\) is not certain at the time of decision making. For this reason, the random variable \(\hat{t}_{j}^{0}\) is redefined to denote the arrival time of ferry service \(j\). \(P(\Theta)\) is used to denote the probability of event \(\Theta\). The mathematical description is presented in Section 2, and Equation (8) needs to be transformed into Equation (10). \[P\left(a_{j,r}^{m}\cdot z_{j,r}^{m}\leq \begin{cases}\hat{t}_{j}^{0}-d_{0}+M \Big{(}1-z_{j,r}^{m}\Big{)},m=0\\ \hat{t}_{j}^{m-1}+d_{p}+d_{1}\quad,1\leq m\end{cases} \right)\geq\xi,\forall j \in J,r\in R,m\in\big{[}0,u_{j}\big{)} \tag{10}\]  
In Equation (10), the start time of the sub-service \(m=0\) of ferry service \(j\) is not fully known. To ensure that ferry \(r\) can satisfy the arrival before the advance time \(d_{0}\) with different confidence levels, the chance constraints are used to describe the requirements of the ferry's in-place time. When \(\xi=1\), the ferry \(r\) in-place time for the sub-service \(m\) of \(j\) needs to fully satisfy the in-place time requirement of ferry service \(j\) with different arrival times. The directly defined random variable is \(\hat{t}_{j}^{0}\), and it is easy to know from the perspective of problem characterization that the range of values of \(\hat{t}_{j}^{m-1}\) is affected by \(\hat{t}_{j}^{0}\). Therefore, all constraints related to service arrival time in Section 2 can be understood as constraints with random variables. Equations (4) and (9), when considering random variables, are rewritten as follows:  
\[P\left(\hat{t}_{i}^{m}+d_{p}+d_{i^{\prime},i^{\prime\prime}}+d_{d}+d_{i^{\prime \prime},i^{\prime}}+M\Big{(}z_{i,r}^{m}+z_{j,r}^{m^{\prime}}-2\Big{)}\leq a_{ j,r}^{m^{\prime}}+M\big{(}1-y_{i,j}\big{)}\right)\geq\xi \tag{11}\]  
\[P\left(  
variable \(b_{j,w}^{m-1}\) takes the value 0 and otherwise is 1. Thus, Equation (10) is transformed into Equations (13) and (14). \[a_{j,r}^{m},z_{j,r}^{m}\leq\left\{ \begin{matrix}t_{j,w}^{0}-d_{0}+M \big{(}1-z_{j,r}^{m}\big{)}+Mb_{j,w}^{0},m=0\\ t_{j,w}^{m-1}+d_{p}+d_{1}+Mb_{j,w}^{m}\\ \end{matrix} ,1\leq m^{m}\,\forall j\in J,r\in R,m\in\big{[}0,u_{j}\big{)},w\in W\right. \tag{13}\] \[\sum\limits_{w\in W}b_{j,w}^{m}\leq|W|\cdot(1-\xi),\forall j\in J,m\in[0,u_{j}) \tag{14}\]  
For Equation (11), when \(t_{i,w}^{m}+d_{p}+d_{i^{\prime},i^{\prime\prime}}+d_{d}+d_{i^{\prime\prime},j ^{\prime}}+M\big{(}z_{i,r}^{m}+z_{j,r}^{m^{\prime}}-2\big{)}\leq a_{j,r}^{m^{ \prime}}+M\big{(}1-y_{i,j}\big{)}\), the indicator variable \(c_{j,w}^{m-1}\) takes the value 0 and otherwise is 1. Thus, Equation (11) is transformed into Equations (15) and (16). \[t_{i,w}^{m}+d_{p}+d_{i^{\prime},i^{\prime\prime}}+d_{d}+d_{i^{\prime\prime},j ^{\prime}}+M\Big{(}z_{i,r}^{m}+z_{j,r}^{m^{\prime}}-2\Big{)}\leq a_{j,r}^{m^{ \prime}}+M\big{(}1-y_{i,j}\big{)}+Mc_{i,w}^{m} \tag{15}\]  
\[\sum\limits_{w\in W}c_{j,w}^{m}\leq|W|\cdot(1-\xi) \tag{16}\]  
For Equation (12), the indicator variables \(u_{j,w}^{m}\) and \(v_{j,w}^{m}\) are introduced. When \(\sum\limits_{r\in R}a_{j,r}^{m}\cdot z_{j,r}^{m}<t_{j,w}^{m-1}+d_{p}\), the value of \(u_{j,w}^{m}\) is 0, and \(v_{j,w}^{m}\) can take \(-1\) or 0.