matsim-proto/matsim_engine.py

16 lines
367 B
Python

import subprocess
class MatSimEngine:
def __init__(self, config_file_path):
self._config_file_path = config_file_path
def run(self):
java_path = "java"
jar_path = "matsim.jar"
command = [java_path, "-jar", jar_path]
# Must generate this config file first.
command.append(self._config_file_path)
subprocess.run(command, check=True)