Skip to content

Commit

Permalink
check if necesarry files exist
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Jun 25, 2024
1 parent b834c3e commit f0ea25b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion matsim/calibration/run_simulations.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ def process_results(runs):
if not os.path.isdir(os.path.join(runs, run)):
continue

df = pd.read_csv(os.path.join(runs, run, "analysis", "population", "mode_choices.csv"))
out_path = os.path.join(runs, run, "analysis", "population", "mode_choices.csv")
if not os.path.exists(out_path):
print("Skipping %s, no mode_choices.csv found. Run probably not finished yet." % run)
continue

df = pd.read_csv(out_path)
if dfs is None:
dfs = df
else:
Expand Down

0 comments on commit f0ea25b

Please sign in to comment.