pm4py.analysis.simplicity_petri_net#
- pm4py.analysis.simplicity_petri_net(net: PetriNet, im: Marking, fm: Marking, variant: str | None = 'arc_degree') float[source]#
Computes the simplicity metric for a given Petri net model.
Three available approaches are supported: - Arc Degree Simplicity: Described in the paper “ProDiGen: Mining complete, precise and minimal structure process models with a genetic algorithm.” by Vázquez-Barreiros, Borja, Manuel Mucientes, and Manuel Lama. Information Sciences, 294 (2015): 315-333. - Extended Cardoso Metric: Described in the paper “Complexity Metrics for Workflow Nets” by Lassen, Kristian Bisgaard, and Wil MP van der Aalst. - Extended Cyclomatic Metric: Also described in the paper “Complexity Metrics for Workflow Nets” by Lassen, Kristian Bisgaard, and Wil MP van der Aalst.
- Parameters:
- Returns:
The computed simplicity value.
- Return type:
float
import pm4py net, im, fm = pm4py.discover_petri_net_inductive( dataframe, activity_key='concept:name', case_id_key='case:concept:name', timestamp_key='time:timestamp' ) simplicity = pm4py.simplicity_petri_net(net, im, fm, variant='arc_degree')