pm4py.algo.simulation.playout.petri_net.variants package#

PM4Py – A Process Mining Library for Python

Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see this software project’s root or visit <https://www.gnu.org/licenses/>.

Website: https://processintelligence.solutions Contact: info@processintelligence.solutions

Submodules#

pm4py.algo.simulation.playout.petri_net.variants.basic_playout module#

PM4Py – A Process Mining Library for Python

Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see this software project’s root or visit <https://www.gnu.org/licenses/>.

Website: https://processintelligence.solutions Contact: info@processintelligence.solutions

class pm4py.algo.simulation.playout.petri_net.variants.basic_playout.Parameters(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: Enum

ACTIVITY_KEY = 'pm4py:param:activity_key'#
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'#
CASE_ID_KEY = 'pm4py:param:case_id_key'#
RETURN_VISITED_ELEMENTS = 'return_visited_elements'#
NO_TRACES = 'noTraces'#
MAX_TRACE_LENGTH = 'maxTraceLength'#
PETRI_SEMANTICS = 'petri_semantics'#
ADD_ONLY_IF_FM_IS_REACHED = 'add_only_if_fm_is_reached'#
FM_LEQ_ACCEPTED = 'fm_leq_accepted'#
pm4py.algo.simulation.playout.petri_net.variants.basic_playout.apply_playout(net, initial_marking, no_traces=100, max_trace_length=100, case_id_key='concept:name', activity_key='concept:name', timestamp_key='time:timestamp', final_marking=None, return_visited_elements=False, semantics=<pm4py.objects.petri_net.semantics.ClassicSemantics object>, add_only_if_fm_is_reached=False, fm_leq_accepted=False)[source]#

Do the playout of a Petrinet generating a log

Parameters#

net

Petri net to play-out

initial_marking

Initial marking of the Petri net

no_traces

Number of traces to generate

max_trace_length

Maximum number of events per trace (do break)

case_id_key

Trace attribute that is the case ID

activity_key

Event attribute that corresponds to the activity

timestamp_key

Event attribute that corresponds to the timestamp

final_marking

If provided, the final marking of the Petri net

semantics

Semantics of the Petri net to be used (default: petri_net.semantics.ClassicSemantics())

add_only_if_fm_is_reached

Adds the case only if the final marking is reached

fm_leq_accepted

Accepts traces ending in a marking that is a superset of the final marking

pm4py.algo.simulation.playout.petri_net.variants.basic_playout.apply(net: PetriNet, initial_marking: Marking, final_marking: Marking = None, parameters: Dict[str | Parameters, Any] | None = None) EventLog[source]#

Do the playout of a Petrinet generating a log

Parameters#

net

Petri net to play-out

initial_marking

Initial marking of the Petri net

final_marking

If provided, the final marking of the Petri net

parameters
Parameters of the algorithm:

Parameters.NO_TRACES -> Number of traces of the log to generate Parameters.MAX_TRACE_LENGTH -> Maximum trace length Parameters.PETRI_SEMANTICS -> Petri net semantics to be used (default: petri_nets.semantics.ClassicSemantics()) Parameters.ADD_ONLY_IF_FM_IS_REACHED -> adds the case only if the final marking is reached Parameters.FM_LEQ_ACCEPTED -> Accepts traces ending in a marking that is a superset of the final marking

pm4py.algo.simulation.playout.petri_net.variants.extensive module#

PM4Py – A Process Mining Library for Python

Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see this software project’s root or visit <https://www.gnu.org/licenses/>.

Website: https://processintelligence.solutions Contact: info@processintelligence.solutions

class pm4py.algo.simulation.playout.petri_net.variants.extensive.Parameters(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: Enum

ACTIVITY_KEY = 'pm4py:param:activity_key'#
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'#
CASE_ID_KEY = 'pm4py:param:case_id_key'#
MAX_TRACE_LENGTH = 'maxTraceLength'#
RETURN_ELEMENTS = 'return_elements'#
MAX_MARKING_OCC = 'max_marking_occ'#
PETRI_SEMANTICS = 'petri_semantics'#
pm4py.algo.simulation.playout.petri_net.variants.extensive.apply(net: PetriNet, initial_marking: Marking, final_marking: Marking = None, parameters: Dict[str | Parameters, Any] | None = None) EventLog[source]#

Do the playout of a Petrinet generating a log (extensive search; stop at the maximum trace length specified

Parameters#

net

Petri net to play-out

initial_marking

Initial marking of the Petri net

final_marking

If provided, the final marking of the Petri net

parameters
Parameters of the algorithm:

Parameters.MAX_TRACE_LENGTH -> Maximum trace length Parameters.PETRI_SEMANTICS -> Petri net semantics

pm4py.algo.simulation.playout.petri_net.variants.stochastic_playout module#

PM4Py – A Process Mining Library for Python

Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see this software project’s root or visit <https://www.gnu.org/licenses/>.

Website: https://processintelligence.solutions Contact: info@processintelligence.solutions

class pm4py.algo.simulation.playout.petri_net.variants.stochastic_playout.Parameters(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: Enum

ACTIVITY_KEY = 'pm4py:param:activity_key'#
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'#
CASE_ID_KEY = 'pm4py:param:case_id_key'#
RETURN_VISITED_ELEMENTS = 'return_visited_elements'#
NO_TRACES = 'noTraces'#
MAX_TRACE_LENGTH = 'maxTraceLength'#
LOG = 'log'#
STOCHASTIC_MAP = 'smap'#
PETRI_SEMANTICS = 'petri_semantics'#
pm4py.algo.simulation.playout.petri_net.variants.stochastic_playout.apply_playout(net, initial_marking, no_traces=100, max_trace_length=100, case_id_key='concept:name', activity_key='concept:name', timestamp_key='time:timestamp', final_marking=None, smap=None, log=None, return_visited_elements=False, semantics=<pm4py.objects.petri_net.semantics.ClassicSemantics object>, parameters=None)[source]#

Do the playout of a Petrinet generating a log

Parameters#

net

Petri net to play-out

initial_marking

Initial marking of the Petri net

no_traces

Number of traces to generate

max_trace_length

Maximum number of events per trace (do break)

case_id_key

Trace attribute that is the case ID

activity_key

Event attribute that corresponds to the activity

timestamp_key

Event attribute that corresponds to the timestamp

final_marking

If provided, the final marking of the Petri net

smap

Stochastic map

log

Log

semantics

Semantics of the Petri net to be used (default: petri_net.semantics.ClassicSemantics())

pm4py.algo.simulation.playout.petri_net.variants.stochastic_playout.apply(net: PetriNet, initial_marking: Marking, final_marking: Marking = None, parameters: Dict[str | Parameters, Any] | None = None) EventLog[source]#

Do the playout of a Petrinet generating a log

Parameters#

net

Petri net to play-out

initial_marking

Initial marking of the Petri net

final_marking

If provided, the final marking of the Petri net

parameters
Parameters of the algorithm:

Parameters.NO_TRACES -> Number of traces of the log to generate Parameters.MAX_TRACE_LENGTH -> Maximum trace length Parameters.PETRI_SEMANTICS -> Petri net semantics to be used (default: petri_nets.semantics.ClassicSemantics())