# A Novel Multi-Agent-Based Approach for Train Rescheduling in Large-Scale Railway Networks
## 4 Multi-Agent System for Train Rescheduling Problems
### Collaborative Strategy: Condorcet Voting Method
\(\mathcal{V}(J_{m},J_{n}|\tau_{m},\tau_{n})=1\) stands for the voting between the passing sequences of trains \(\tau_{m}\) and \(\tau_{n}\)._  
In the proposed MAS for train rescheduling, the collaborative agent plays a crucial role in ensuring that the decisions made by each junction agent are globally feasible. The collaborative agent achieves this by checking all coupling indicators among junctions and their respective decisions on train passing sequences. It then compiles a voting list that includes all the voting sections to be executed. To ensure an organized and effective voting process, the voting sections are ordered as follows:  
1. Voting sections covering multiple position variables (Priority 1): 1. Voting sections that involve the same voting seeds (i.e., common trains or decision points) and cover the most position variables are prioritized. 2. These sections are voted on first because their outcomes have the broadest impact on the network and can significantly influence other decisions. 3. Resolving these high-impact voting sections early helps minimize conflicts and dependencies in subsequent votes. 2. Voting sections affecting other voting sections (Priority 2): 1. Next, priority is given to voting sections that include the same one or two voting seeds, especially those in which the voting results could affect other sections. 2. These sections are critical, as they may create cascading effects across the network, impacting decisions in other junctions. 3. Voting on these sections second ensures that the most interconnected decisions are resolved before addressing more isolated conflicts. 3. Voting sections involving only two junction agents (Priority 3): 1. Finally, voting sections that involve only two junction agents are addressed. 2. These sections are voted on last because they are typically more localized and have a limited impact on the broader network. 3. Resolving these simpler, less interconnected conflicts after the more complex sections helps streamline the decision-making process. By applying this structured approach, the collaborative agent ensures that the voting process is both efficient and effective, resolving the most critical and interconnected conflicts first. This hierarchical approach helps optimize the overall train rescheduling process, leading to more globally feasible and robust solutions. Once the voting sequence is decided, the voting for each voting section regarding the decision variables with coupling is started. The voting for each pair of trains is inherently a trade-off for passing indicators that have conflicts with each other. From the solution tables for each junction agent, the classified solutions can be indexed with their decision for \(i_{\tau_{m},\tau_{n}}^{J_{m}}\), and the voting value is chosen from the values for objective function of top solutions of \(i_{m,\tau_{n}}^{I_{m}}=1\) and \(i_{m,\tau_{n}}^{I_{m}}=0\) among all the junctions that have a conflict in the train passing sequence, which is illustrated in (23):  
\[ \begin{split}\mathcal{V}(I_{1},I_{2},\ldots,\ J_{N_{0}}|\tau_{m}, \tau_{n})\overset{\text{def}}{=}\begin{cases}i_{m,\tau_{n}}^{I_{1}I_{2}\ldots J _{N_{0}}}=1,\ \langle\tau_{m}|\tau_{n}\rangle=\sum\limits_{I_{n,\tau_{n}}J_{N_{0}}}TD \Big{(}\mathbf{X}_{i=1}^{I_{m}}\Big{)}\\ i_{m,\tau_{n}}^{I_{1}I_{2}\ldots J_{N_{0}}}=0,\ \langle\tau_{n}|\tau_{m}\rangle= \sum\limits_{I_{n,\tau_{n}}J_{N_{0}}}TD\Big{(}\mathbf{X}_{i=0}^{I_{m}}\Big{)}\\ \text{\bf IF}\ \mathcal{V}(I_{1},I_{2}|\tau_{m},\tau_{n})=\mathcal{V}(I_{2}, J_{3}|\tau_{m},\tau_{n})=\ldots=\mathcal{V}(J_{N_{0}-1},J_{N_{0}}|\tau_{m},\tau_{n})= \mathcal{V}(J_{N_{0}},J_{1}|\tau_{m},\tau_{n})=1\end{split}  \tag{23}\]  
where \(\mathcal{V}(J_{1},J_{2},\ldots,\ J_{N_{0}}|\tau_{m},\tau_{n})\) denotes the voting on the passing sequence of trains \(\tau_{m}\) and \(\tau_{n}\) among junctions \(J_{1},J_{2},\ldots,\ J_{N_{0}}\), and the subscript \(N_{v}\) stands for the number of conflict junctions.