des_parallel_process.runSim
des_parallel_process.runSim(
run,
total_runs,
sim_duration,
warm_up_time,
sim_start_date,
amb_data,
random_seed=101,
save_params_csv=True,
demand_increase_percent=1.0,
activity_duration_multiplier=1.0,
print_debug_messages=False,
)Run a single discrete event simulation (DES) for the specified configuration.
This function initializes and runs a DES_HEMS simulation model for a given run number, logs performance and configuration details, and optionally saves simulation parameters.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| run | int | The index of the current simulation run (starting from 0). | required |
| total_runs | int | Total number of simulation runs being executed. | required |
| sim_duration | int | The total simulation duration (excluding warm-up) in minutes or other time unit. | required |
| warm_up_time | int | The warm-up period to discard before recording results. | required |
| sim_start_date | datetime | The datetime representing the start of the simulation. | required |
| amb_data | bool | Flag indicating whether ambulance-specific data should be generated in the simulation. | required |
| save_params_csv | bool | If True, simulation parameters will be saved to CSV (only on the first run). Default is True. | True |
| demand_increase_percent | float | Factor by which demand is increased (e.g., 1.10 for a 10% increase). Default is 1.0. | 1.0 |
| activity_duration_multiplier | float | Multiplier to adjust generated durations of activities (e.g., 1.10 for a 10% increase). Default is 1.0. | 1.0 |
| print_debug_messages | bool | If True, enables additional debug message output. Default is False. | False |
Returns
| Name | Type | Description |
|---|---|---|
| pandas.DataFrame | A DataFrame containing the simulation results. |
Notes
- Only the first run (i.e.,
run == 0) will trigger the saving of run parameters ifsave_params_csvis True. - Timing information and configuration details are printed and logged for transparency.