Python generator for MATSim plans.
Florian 83be0c481b distribution visualizer (ugly) | 7 years ago | |
---|---|---|
input | 7 years ago | |
plan_gen | 7 years ago | |
.gitignore | 7 years ago | |
README.md | 7 years ago | |
setup.py | 7 years ago |
Python generator for MATSim random plans.
use venv
(https://github.com/juliendehos/venv)
MATSim network files (.xml
)
(test files are available in input/
folder)
venv i plan_gen
venv a plan_gen
pip install pkgconfig setuptools
pip install . --upgrade
plan_gen_cli.py [ params ] > out_plans.xml
np
: number of persons to generatenw
: global network file pathhc
(optional) : home clusters network file paths. If multiple cluster files, separate paths with :
symbol (path1:path2:...:pathx
).wc
(optional) : work clusters network file paths. If multiple cluster files, same as hc
parameter.generate 1000 persons with totally random home and work locations:
plan_gen_cli.py np=1000,nw=input/network.xml
generate 5000 persons with home locations reparted in 2 clusters (work locations are totally random):
plan_gen_cli.py np=5000,nw=input/network.xml,hc=input/c01.xml:input/c02.xml
generate 1000 persons with home and work locations reparted in different clusters:
plan_gen_cli.py np=1000,nw=input/network.xml,\
hc=input/c02.xml:input/c03.xml,\
wc=input/c01.xml:input/c04.xml