pm4py.sim.play_out#

pm4py.sim.play_out(*args: Tuple[PetriNet, Marking, Marking] | dict | Counter | ProcessTree, **kwargs) EventLog[source]#

Performs the playout of the provided model, generating a set of traces.

The function accepts one of the following inputs: - A Petri net with initial and final markings. - A Directly-Follows Graph (DFG) represented as a dictionary. - A process tree.

Parameters:
  • args

    • For Petri net playout: a PetriNet, an initial Marking, and a final Marking.

    • For DFG playout: a dict representing the DFG, followed by additional required arguments.

    • For process tree playout: a single ProcessTree.

  • kwargs

    Optional parameters of the method, including: - parameters: A dictionary containing parameters of the playout, such as:

    • smap: (optional) A stochastic map to be used for probabilistic transition selection.

    • log: (optional) An EventLog used to compute the stochastic map if smap is not provided.

Return type:

EventLog

import pm4py

net, im, fm = pm4py.read_pnml('model.pnml')
log = pm4py.play_out(net, im, fm)