matsim-proto/main.py

21 lines
350 B
Python
Raw Normal View History

2024-01-15 12:31:41 -05:00
import subprocess
import sys
def run_matsim(config_file_path=None):
java_path = "java"
jar_path = "matsim.jar"
command = [java_path, "-jar", jar_path]
if config_file_path:
command.append(config_file_path)
subprocess.run(command)
if len(sys.argv) > 1:
config_file = sys.argv[1]
else:
config_file = None
run_matsim(config_file)