matsim-proto/matsim_engine.py

24 lines
595 B
Python
Raw Normal View History

2024-02-05 23:11:26 -05:00
import math
import subprocess
import xmltodict
2024-01-26 15:11:49 -05:00
import geopandas as gpd
from shapely.geometry import Point
from matsim_activity_to_matsim_schedule import MatsimActivityToMatsimSchedule
from hub_function_to_matsim_activity import HubFunctionToMatsimActivity
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)
2024-02-05 23:11:26 -05:00
subprocess.run(command)