pm4py.llm.abstract_petri_net#

pm4py.llm.abstract_petri_net(net: PetriNet, im: Marking, fm: Marking, response_header: bool = True) str[source]#

Obtains an abstraction of a Petri net.

Return type:

str

Parameters:
  • net (PetriNet) – The Petri net to abstract.

  • im (Marking) – The initial marking of the Petri net.

  • fm (Marking) – The final marking of the Petri net.

  • response_header (bool) – Whether to include a header in the abstraction.

Returns:

The Petri net abstraction as a string.

import pm4py

net, im, fm = pm4py.read_pnml('tests/input_data/running-example.pnml')
print(pm4py.llm.abstract_petri_net(net, im, fm))