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

Submodules

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

This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).

PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

PM4Py 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 General Public License for more details.

You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.

class pm4py.algo.simulation.playout.petri_net.variants.basic_playout.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

ACTIVITY_KEY = 'pm4py:param:activity_key'
CASE_ID_KEY = 'pm4py:param:case_id_key'
INITIAL_CASE_ID = 'initial_case_id'
INITIAL_TIMESTAMP = 'initial_timestamp'
MAX_TRACE_LENGTH = 'maxTraceLength'
NO_TRACES = 'noTraces'
PETRI_SEMANTICS = 'petri_semantics'
RETURN_VISITED_ELEMENTS = 'return_visited_elements'
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'
pm4py.algo.simulation.playout.petri_net.variants.basic_playout.apply(net: pm4py.objects.petri_net.obj.PetriNet, initial_marking: pm4py.objects.petri_net.obj.Marking, final_marking: Optional[pm4py.objects.petri_net.obj.Marking] = None, parameters: Optional[Dict[Union[str, pm4py.algo.simulation.playout.petri_net.variants.basic_playout.Parameters], Any]] = None) pm4py.objects.log.obj.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.INITIAL_TIMESTAMP -> The first event is set with INITIAL_TIMESTAMP increased from 1970 Parameters.INITIAL_CASE_ID -> Numeric case id for the first trace Parameters.PETRI_SEMANTICS -> Petri net semantics to be used (default: petri_nets.semantics.ClassicSemantics())

pm4py.algo.simulation.playout.petri_net.variants.basic_playout.apply_playout(net, initial_marking, no_traces=100, max_trace_length=100, initial_timestamp=10000000, initial_case_id=0, 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>)[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)

  • initial_timestamp – Increased timestamp from 1970 for the first event

  • initial_case_id – Case id of the first event

  • 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())

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

This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).

PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

PM4Py 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 General Public License for more details.

You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.

class pm4py.algo.simulation.playout.petri_net.variants.extensive.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

ACTIVITY_KEY = 'pm4py:param:activity_key'
CASE_ID_KEY = 'pm4py:param:case_id_key'
MAX_MARKING_OCC = 'max_marking_occ'
MAX_TRACE_LENGTH = 'maxTraceLength'
PETRI_SEMANTICS = 'petri_semantics'
RETURN_ELEMENTS = 'return_elements'
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'
pm4py.algo.simulation.playout.petri_net.variants.extensive.apply(net: pm4py.objects.petri_net.obj.PetriNet, initial_marking: pm4py.objects.petri_net.obj.Marking, final_marking: Optional[pm4py.objects.petri_net.obj.Marking] = None, parameters: Optional[Dict[Union[str, pm4py.algo.simulation.playout.petri_net.variants.extensive.Parameters], Any]] = None) pm4py.objects.log.obj.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

This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).

PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

PM4Py 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 General Public License for more details.

You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.

class pm4py.algo.simulation.playout.petri_net.variants.stochastic_playout.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

ACTIVITY_KEY = 'pm4py:param:activity_key'
CASE_ID_KEY = 'pm4py:param:case_id_key'
LOG = 'log'
MAX_TRACE_LENGTH = 'maxTraceLength'
NO_TRACES = 'noTraces'
PETRI_SEMANTICS = 'petri_semantics'
RETURN_VISITED_ELEMENTS = 'return_visited_elements'
STOCHASTIC_MAP = 'stochastic_map'
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'
pm4py.algo.simulation.playout.petri_net.variants.stochastic_playout.apply(net: pm4py.objects.petri_net.obj.PetriNet, initial_marking: pm4py.objects.petri_net.obj.Marking, final_marking: Optional[pm4py.objects.petri_net.obj.Marking] = None, parameters: Optional[Dict[Union[str, pm4py.algo.simulation.playout.petri_net.variants.stochastic_playout.Parameters], Any]] = None) pm4py.objects.log.obj.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())

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())

Module contents

This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).

PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

PM4Py 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 General Public License for more details.

You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.