5 CONCLUSION
In this paper, we studied the problem of train routing
in a shared environment. We proposed two models.
The first one is based on a classical MAPF reduction-
based approach. In this approach, each train is mod-
eled as a group of agents moving to the goal loca-
tion in a connected manner, simulating the position
of the whole train. Our second model is inspired by a
scheduling problem, where the graph is split into con-
tinuous locations – rail segments. Each activity rep-
resents a traversal of a given location by a train. The
activities are intertwined in such a manner to ensure
that the trains do not perform a forbidden movement;
specifically, they do not occupy the exact physical lo-
cation at the same time.
We compared the two models by their ability to
model the real world. It seems that the scheduling
model can represent a wider variety of real-world at-
tributes, such as different speeds in any segment of
the rail network. On the other hand, it is more com-
plicated to create the instance for this model automat-
ically from the grid-like MAPF maps
We also evaluated the models empirically and
found that the MAPF model does not scale well over
instances with just a few trains. On the other hand, the
scheduling model solved all of the instances in just a
fraction of the allocated runtime, showing great po-
tential.
ACKNOWLEDGEMENTS
This research is supported by the Czech-USA Coop-
erative Scientific Research Project LTAUSA19072.
REFERENCES
Andreychuk, A., Yakovlev, K. S., Atzmon, D., and Stern, R.
(2019). Multi-agent pathfinding with continuous time.
In Kraus, S., editor, 28th International Joint Confer-
ence on Artificial Intelligence (IJCAI), pages 39–45.
ijcai.org.
Atzmon, D., Diei, A., and Rave, D. (2019). Multi-train
path finding. In Surynek, P. and Yeoh, W., edi-
tors, 12th International Symposium on Combinatorial
Search (SOCS), pages 125–129. AAAI Press.
Atzmon, D., Felner, A., Stern, R., Wagner, G., Bart
´
ak,
R., and Zhou, N. (2017). k-robust multi-agent path
finding. In Fukunaga, A. and Kishimoto, A., edi-
tors, 10th International Symposium on Combinatorial
Search (SOCS), pages 157–158. AAAI Press.
Atzmon, D., Zax, Y., Kivity, E., Avitan, L., Morag, J.,
and Felner, A. (2020). Generalizing multi-agent path
finding for heterogeneous agents. In Harabor, D. and
Vallati, M., editors, 13th International Symposium on
Combinatorial Search (SOCS), pages 101–105. AAAI
Press.
Bart
´
ak, R., Svancara, J., and Vlk, M. (2018). A scheduling-
based approach to multi-agent path finding with
weighted and capacitated arcs. In Andr
´
e, E., Koenig,
S., Dastani, M., and Sukthankar, G., editors, 17th In-
ternational Conference on Autonomous Agents and
MultiAgent Systems (AAMAS), pages 748–756.
Bart
´
ak, R., Zhou, N.-F., Stern, R., Boyarski, E., and
Surynek, P. (2017). Modeling and solving the multi-
agent pathfinding problem in picat. In 29th IEEE In-
ternational Conference on Tools with Artificial Intel-
ligence (ICTAI), pages 959–966. IEEE Computer So-
ciety.
Laborie, P. (2009). IBM ILOG CP optimizer for detailed
scheduling illustrated on three problems. In van Ho-
eve, W. J. and Hooker, J. N., editors, 6th Interna-
tional Conference on Integration of AI and OR Tech-
niques in Constraint Programming for Combinatorial
Optimization Problems (CPAIOR), volume 5547 of
Lecture Notes in Computer Science, pages 148–162.
Springer.
Laborie, P., Rogerie, J., Shaw, P., and Vil
´
ım, P. (2009). Rea-
soning with conditional time-intervals. part ii: An al-
gebraical model for resources. In 22nd Florida AI Re-
search Society Conference (FLAIRS), pages 201–206.
Li, J., Chen, Z., Zheng, Y., Chan, S., Harabor, D., Stuckey,
P. J., Ma, H., and Koenig, S. (2021). Scalable rail plan-
ning and replanning: Winning the 2020 flatland chal-
lenge. In Biundo, S., Do, M., Goldman, R., Katz, M.,
Yang, Q., and Zhuo, H. H., editors, 31st International
Conference on Automated Planning and Scheduling
(ICAPS), pages 477–485. AAAI Press.
Mohanty, S. P., Nygren, E., Laurent, F., Schneider, M.,
Scheller, C., Bhattacharya, N., Watson, J. D., Egli,
A., Eichenberger, C., Baumberger, C., Vienken, G.,
Sturm, I., Sartoretti, G., and Spigler, G. (2020).
Flatland-rl : Multi-agent reinforcement learning on
trains. CoRR, abs/2012.05893.
Stern, R., Sturtevant, N. R., Felner, A., Koenig, S., Ma, H.,
Walker, T. T., Li, J., Atzmon, D., Cohen, L., Kumar,
T. K. S., Bart
´
ak, R., and Boyarski, E. (2019). Multi-
agent pathfinding: Definitions, variants, and bench-
marks. In Surynek, P. and Yeoh, W., editors, 12th
International Symposium on Combinatorial Search
(SOCS), pages 151–159. AAAI Press.
Tackling Train Routing via Multi-agent Pathfinding and Constraint-based Scheduling
313