[Paper Review] A Python Extension to Simulate Petri nets in Process Mining
This paper presents a Python-based open-source extension for PM4Py that automatically generates simulated event logs from real process event logs using discrete event simulation (DES). By extracting process models (Petri nets) and performance data (durations, arrival rates), the tool enables 'what-if' analyses with user-defined parameters, producing realistic, timestamped event logs that preserve both flow and timing behavior of the original process.
The capability of process mining techniques in providing extensive knowledge and insights into business processes has been widely acknowledged. Process mining techniques support discovering process models as well as analyzing process performance and bottlenecks in the past executions of processes. However, process mining tends to be "backward-looking" rather than "forward-looking" techniques like simulation. For example, process improvement also requires "what-if" analyses. In this paper, we present a Python library that uses an event log to directly generate a simulated event log, with additional options for end-users to specify the duration of activities and the arrival rate. Since the generated simulation model is supported by historical data (event data)and it is based on the Discrete Event Simulation (DES) technique, the generated event data is similar to the behavior of the real process.
Motivation & Objective
- To address the lack of forward-looking simulation capabilities in existing process mining tools.
- To enable automated, data-driven simulation of business processes without requiring deep simulation expertise.
- To generate realistic simulated event logs that preserve both activity flow and timing characteristics from real process data.
- To support flexible 'what-if' scenario analysis by allowing users to adjust activity durations and arrival rates.
Proposed method
- The tool starts with an original event log and applies process mining to discover a Petri net model.
- It extracts activity durations and arrival rates from the event log using statistical analysis and distribution fitting.
- A discrete event simulation (DES) engine in Python (SimPy) is used to simulate process execution based on the Petri net and user-defined parameters.
- The simulation tracks case progression through activities, including queuing when capacity limits are reached.
- The simulation clock is converted to real timestamps, and events are captured into a new event log format.
- The final output is a simulated event log with case ID, activity, and timestamp attributes, suitable for further process mining analysis.
Experimental results
Research questions
- RQ1Can a process mining tool automatically generate a simulated event log from a real event log without requiring manual model creation?
- RQ2How accurately can a simulated event log reproduce the timing and flow behavior of the original process using only historical data and user-defined parameters?
- RQ3To what extent can user-defined parameters such as activity duration and arrival rate influence the realism and utility of the simulated event log?
- RQ4Can the simulated event log be used to re-discover the original process model with high fidelity, indicating the validity of the simulation?
Key findings
- The tool successfully generates simulated event logs that preserve the structural and temporal characteristics of the original process, as confirmed by re-discovering the same Petri net model from the simulated logs.
- The simulated event logs include realistic queuing behavior due to capacity constraints, reflecting real-world bottlenecks implicitly.
- The tool enables flexible 'what-if' analysis by allowing users to modify activity durations and arrival rates, facilitating scenario-based performance evaluation.
- The simulated logs are compatible with standard process mining tools, as demonstrated by the consistent model discovery results between original and simulated logs.
- The tool is open-source and has been validated in academic use cases, showing robustness and usability for diverse simulation scenarios.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.