process_mapping.add_sim_timestamp
process_mapping.add_sim_timestamp(
log,
time_col='time',
timestamp_col='timestamp',
sim_start=None,
time_unit='minutes',
)Add a pseudo-timestamp column to a simulation event log. This is a helper function for process-mining style outputs.
If the simulation does not have a ‘true’ start time
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| log | pd.DataFrame | Event log with a column containing the simulation-relative time per event. | required |
| time_col | str | Column containing simulation time since model start. Default: “time”. This will be the name of the column if you have made use of Vidigi’s EventLogger defaults. | 'time' |
| timestamp_col | str | Desired name of output timestamp column. Default: “timestamp” | 'timestamp' |
| sim_start | pd.Timestamp, str, or None | Start datetime of the simulation. If None, a fixed pseudo-start of ‘2000-01-01 00:00:00’ is used. | None |
| time_unit | str | Unit of the simulation time. Accepted values are ‘seconds’, ‘minutes’, ‘hours’, ‘days’ or ‘weeks’. Default: “minutes”. | 'minutes' |
Returns
| Name | Type | Description |
|---|---|---|
| pd.DataFrame | Copy of the provided event log (parameter log) with an added timestamp column. |