Usage¶
Installation¶
Clone this git repository (or download a specific release)
git clone git@github.com:mpm-tu-berlin/eflips-depot.git
Install the packages listed in
poetry.lockandpyproject.tomlinto your Python environment. Notes:The suggested Python version os 3.11.*, it may work with other versions, but this is not tested.
The supported platforms are macOS and Windows, Linux should work, but is not tested.
Using the poetry package manager is recommended. It can be installed accoring to the instructions listed here.
macOS
poetry env use 3.11 poetry install
Windows If you are using Windows, you have to provide the full path to the desired Python executable, e.g.:
poetry env use C:\Users\user\AppData\Local\Programs\Python\Python311\python.exe poetry install
To start a simulation, the script
bus_depot/STARTSIM_busdepot.pyneeds to be executed. This loads the 3 necessary files for settings, schedule and template for depot layout. After the execution, all relevant results are in theevvariable in the workspace (e.g. if you are using PyCharm as your IDE, if the script is run with the “Run with Python Console” option). To analyse or plot results the example calls for the console ineflips/depot/plots.pycan be used. ```python import os os.chdir(‘bus_depot’) # Optional, if not already in the bus_depot folder exec(open(os.path.join(‘STARTSIM_busdepot.py’)).read())ev.sl_all() # For example to plot a result ```
To use eFLIPS-Depot API, see script
bus_depot/user_example.py