## 4 Outer Dispatcher Methodology and Modelling
### Step 3--Optimal Modal Trip Composition (OMTC) Module
\begin{table}
\begin{tabular}{l l} \hline \hline
**Sets** & \\ \(N\) & set of all requests (clients) \\ \(J\) & set of vehicles \\ \(\hat{l}_{0}\) & set of vehicles with _null-vehicle_ \\ \(S\) & set of stops \\ \(S_{0}\) & set of stops with _null-stop_ \\ \(P(j)\) & passengers in vehicle \(j\in J\) \\
**Variables** & \\ \(x_{ij}\) & assignment client-to-vehicle, \(i\in N,j\in J_{0}\) \\ \(y_{jk}\) & assignment vehicle-to-stop, \(j\in J_{k},k\in S_{0}\) \\ \(z_{j\mu}\) & assignment of client to vehicle visiting a stop, \(i\in N,j\in J_{0}\), \(k\in S_{0}\) \\ \(\hat{T}_{i}\) & travel time of client, \(i\in N\) \\
**Time-Parameters** & \\ \(h_{0}\) & current time \\ \(\hat{t}_{i}\) & latest arrival time of client \(i\in N\) \\ \(\hat{s}_{i}\) & upper bound of \(i\) \\ \(t_{0}+\hat{s}_{i}\) & latest arrival time of passenger \(p\in P(j)\) (in vehicle \(j\in J\)) \\ \(t_{0}+\hat{s}_{i}\) & expected arrival time of passenger \(p\in P(j)\) (in vehicle \(j\in J\)) \\ \(\bar{\mu}_{ijk}\) & travel time for vehicle \(j\) to pick up client \(i\) and leave it at stop \(k\) \\ \(\bar{u}_{ik}\) & trip time of request \(i\) using PT \\ \(\bar{\theta}_{ijk}\) & additional detour time that passenger \(p\in P(j)\) will experience if the vehicle \(j\) he is boarded on picks \\  & up request \(i\) \\
**Cost-Parameters** & \\ \(f_{jk}\) & trip rate for client \(i\) with vehicle \(j\in J_{0}\) and stop \(k\in S_{0}\) \\ \(t_{ij}\) & trip time for client \(i\) with vehicle \(j\in J_{0}\) and stop \(k\in S_{0}\) \\ \(c_{ijk}\) & trip cost, combination of rare and time \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Summary of the notation used. Constraints (c1) to (c1\({}^{\prime\prime}\)) express the flow balance of binary variables \(x_{ij}\) and \(y_{jk}\), whereas constraints (c2) to (c2\({}^{\prime}\)) are a reformulation of the product \(z_{ijk}=x_{ij}y_{jk}\) in the form of linear constraints. By constraint (c2\({}^{\prime\prime}\)), if for client \(i\) no stop is suitable and no RP vehicle will pick him/her up, then \(x_{i0}\) is forced to 0 (request postponed). By constraint (c2\({}^{\prime\prime}\)), if PT will not be used for serving client \(i\), then the client will not reach any PT station. Because the batch size is assumed to be small, the model assumes that at each cycle, a vehicle picks up at most one client. Forced by constraints (c3) and (c5), variable \(T_{i}\) denotes the expected travel time of client \(i\) to his/her destination, which is bounded by its latest possible arrival time \(\hat{t}_{i}\) and a suitable upper bound \(\hat{s}_{i}\). Constraint (c4) ensures that the latest arrival time of passenger \(p\) given by \(t_{0}+\hat{o}_{p}\) will always be observed, taking into consideration the additional detour time for picking up a new client \(\hat{\theta}_{ipk}\) (in (c4), as also in (c5), \(M_{0}\) is simply a big integer and \(t_{0}\) is just the current time instant). Next, constraint (c6) applies to requests \(i\) in the class of requests that must be served by RP mandatorily in its only leg (clients with preference \(a\)) or in its last leg. If \(x_{i0}=0\), then the previously mentioned clients will not be served in the current cycle, and if \(x_{i0}=1\), they will be served by some vehicle. Likewise, constraint (c6\({}^{\prime}\)) applies for requests of clients with preference \(b\) and if \(x_{i0}=1\) no connection \(j\to k\) will be made, but if \(x_{i0}=0\), then some connection \(j\to k\) will be carried out. The first term in the objective function of the model considers cost parameters \(c_{ijk}=w_{f}\frac{f_{ijk}}{|f^{max}|}+w_{t}\frac{t_{ijk}}{|f^{max}|}\), which are the combination of two indices (with weights \(w_{f}\) and \(w_{t}\)), the user's trip time \(t_{ijk}\) and an estimation of the user's trip fare \(f_{ijk}\), which are both normalised by their maximum values and evaluated previously by steps 1 and 2 and the help of the PT Journey Planner and the MaaS Dispatcher.