des_parallel_process.write_run_params

des_parallel_process.write_run_params(model)

Write the simulation parameters used in a DES model run to a CSV file.

Extracts key configuration parameters from the given model instance and writes them to a CSV file (run_params_used.csv) in the designated results folder. This provides a record of the conditions under which the simulation was executed.

SR NOTE: It would also be good to add some sort of identifier to both the run results csv and this csv so you can confirm that they came from the same model execution (to avoid issues with calculations being incorrect if e.g. it was not possible to write one of the outputs due to an error, write protection, etc.)

Parameters

Name Type Description Default
model DES_HEMS The simulation model instance from which to extract run parameters. Must have attributes including sim_start_date, sim_duration, warm_up_duration, amb_data, and activity_duration_multiplier. required

Returns

Name Type Description
None

Notes

  • The function calculates sim_end_date and warm_up_end_date based on the provided sim_start_date and durations.
  • Output CSV includes timing and configuration values such as:
    • Simulation duration and warm-up duration
    • Simulation start, end, and warm-up end datetimes
    • Whether ambulance data was used
    • Activity duration multiplier
    • Model execution timestamp
    • Assumed summer and winter period start dates
  • The output CSV is saved to Utils.RESULTS_FOLDER/run_params_used.csv.
  • Only supports a single simulation’s parameters at a time.
  • Future improvements may include adding a unique identifier for linking this file with the corresponding simulation results.

See Also

runSim : Runs an individual simulation and optionally calls this function. parallelProcessJoblib : Executes multiple runSim runs in parallel.