Skip to content

Commit

Permalink
Fix for path definition on Windows machines
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruchon, Matthew authored and Bruchon, Matthew committed Oct 30, 2023
1 parent b4cfeef commit fcda4e7
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions python/altrios/rollout.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,18 @@ def simulate_prescribed_rollout(
print(f"Elapsed time to run `run_speed_limit_train_sims()` for year {scenario_year}: {t2-t1:.3g} s")

if write_complete_results:
print(results_folder +'/RolloutResults_Year {}_Demand {}.json'.format(scenario_year, os.path.basename(demand_file_path)).replace('.csv',''))
sims.to_file(results_folder +'/RolloutResults_Year {}_Demand {}.json'.format(scenario_year, os.path.basename(demand_file_path)).replace('.csv',''))
sims.to_file(
str(results_folder / 'RolloutResults_Year {}_Demand {}.json'
.format(scenario_year, Path(demand_file_path).name)
)
.replace('.csv',''))

train_consist_plan.write_csv(
str(results_folder / 'ConsistPlan_Year {}_Demand {}.csv'
.format(scenario_year, Path(demand_file_path).name)
)
.replace('.csv','') + '.csv')

train_consist_plan.write_csv(results_folder +'/ConsistPlan_Year {}_Demand {}.csv'.format(scenario_year, os.path.basename(demand_file_path)).replace('.csv','')+ '.csv')
t3 = time.perf_counter()

if DEBUG:
Expand Down

0 comments on commit fcda4e7

Please sign in to comment.