MAPF-Competition / PlanViz

An offline visualization tool for analysing solutions to multi-robot coordination problems.
https://www.leagueofrobotrunners.org/
MIT License
28 stars 13 forks source link

Visualizer low performance on large list of tasks #4

Closed nobodyczcz closed 1 year ago

nobodyczcz commented 1 year ago

I created an implementation that finishes more than 10 thousand tasks in 5000 timesteps on warehouse_large.map. The visualizer failed open and render the output JSON on my machine, please check if it works on yours.

The output JSON is here: https://drive.google.com/file/d/12jiLQHessucOJ1rsIDuJBXTgHT2fbt3Q/view?usp=sharing

The map is: Start-Kit/example_problems/warehouse.domain/maps/warehouse_large.map

I realized there's an issue in the renderer of the visualizer, it loops through all tasks several time in each update:

for (_, _task_) in self.tasks.items():

and the visualizer renders all tasks (significantly larger amounts than the number of grid cells) separately, even if they are in the same location.

Here's another output.json I created on Start-Kit/example_problems/random.domain/maps/random-32-32-20.map: https://drive.google.com/file/d/1J-Rw2fnGbIUkWh_DAX7QvwT9kBaqQdVf/view?usp=sharing

In this one, there are only 1024 tiles on the map, but there are 6745 tasks. The visualizer loops through all the tasks several times in each frame, and many tasks are in the same location. To improve the performance I think it is necessary to avoid looping through all tasks in the visualizer.

shchan13 commented 1 year ago

Fix this issue in Version 1.1.0. Enjoy :)