matsim-proto/matsim_engine.py

24 lines
595 B
Python

import math
import subprocess
import xmltodict
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)
subprocess.run(command)