DOI: 10.5281/zenodo.10594254
title: An Online Approach to Solving Public Transit Stationing and Dispatch Problem

description: Simulator for Stationing and Dispatch of Public Transit Buses

This will produce 4 figures used in the paper. The total run time is ~4 hours. Note that this REP is a truncated version of what is used in the paper since running the complete thing will be taking too long. However, configuration can be modified to run exactly what is in the paper, requiring at least a CPU with 10 cores and almost 100GB of memory.

 

Modify run_many.py for the configurations:



./code_root/experiments/TEST/run_many.py


Minimum requirements:





Programs: Either Docker or Python 3.11

CPU: At least 4 cores

RAM: At least 64 GB

DISK: At least 20 GB

GPU: None

OS: At least Ubuntu 18.04.5 LTS



Tested on:



CPU: AMD Ryzen Threadripper 1950X 16-Core Processor 3.7MHz

RAM: 94GB total, 300G swap

GPU: NVIDIA TITAN Xp 12GB x4

OS: Ubuntu 18.04.5 LTS


Setup (Unix):



Download REP_57.tar.gz

Download ARTIFACT_FILES.tar.gz

Extract REP_57: 





tar -xzvf REP_57.tar.gz




Move the ARTIFACT_FILES.tar.gz to REP_57 and Navigate to REP_57.





mv ARTIFACT_FILES.tar.gz REP_57
cd REP_57




Extract ARTIFACT_FILES.tar.gz inside REP_57:





tar -xzvf ARTIFACT_FILES.tar.gz




Build Docker Image and Run it:





# Build
docker build -t iccps2024_stationing .

# Run in background
docker run -d -v $PWD/code_root:/usr/src/app/code_root iccps2024_stationing




If run with the background -d parameter, it will return a container ID and you can use it to tail the container logs using:





sudo docker logs -f 81e580565d017676784678b46a845bbb2c4741b694f869f01fea410a092a395e




Total run time will be around 4 hours.

Once the execution is finished, figures will be generated in:





./code_root/experiments/TEST/plots







Setup (Windows):



Download REP_57.tar.gz

Download ARTIFACT_FILES.tar.gz

Extract REP_57: 





tar -xzvf REP_57.tar.gz




Move the ARTIFACT_FILES.tar.gz to REP_57 and Navigate to REP_57.





mv ARTIFACT_FILES.tar.gz REP_57
cd REP_57




Extract ARTIFACT_FILES.tar.gz inside REP_57:





tar -xzvf ARTIFACT_FILES.tar.gz




Build Docker Image and Run it:





# Build
docker build -t iccps2024_stationing .

# Run in background
docker run -d -v "%cd%"/code_root:/usr/src/app/code_root iccps2024_stationing




If run with the background -d parameter, it will return a container ID and you can use it to tail the container logs using:





sudo docker logs -f 81e580565d017676784678b46a845bbb2c4741b694f869f01fea410a092a395e




Total run time will be around 4 hours.

Once the execution is finished, figures will be generated in:





./code_root/experiments/TEST/plots





Output:

Logs and Results:



Found in:





./code_root/experiments/TEST/logs
./code_root/experiments/TEST/results




Can be used to monitor the current running experiments.


Plots:

I have uploaded the plots.tar.gz for verification.



Figure 4 Top: Deadhead kilometers traveled

Figure 4 Bottom: Passengers served mean count

Figure 5 heatmap: Heatmap of passengers served 

Figure 7: Iteration search


Troubleshooting:



If running using Docker Desktop on a Mac, you might need to allow file sharing on the current git repo directory.

The time in the results is in UTC. The first one contains the raw logs detailing the bus movement and passenger pickups and dropoffs. The second one is a summary containing 3 distinct CSVs and a summary of the results at the bottom.

Docker might require sudo access.

Email updates can be obtained by providing a .env file in the root folder, this requires a sign-in password from Google, generate it here.





EMAIL_ADDRESS=email@gmail.com
EMAIL_PASSWORD=16stringpassword