pm4py.objects.petri_net 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

Subpackages#

Submodules#

pm4py.objects.petri_net.obj 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.objects.petri_net.obj.Marking(iterable=None, /, **kwds)[source]#

Bases: Counter

class pm4py.objects.petri_net.obj.PetriNet(name: str = None, places: Collection[Place] = None, transitions: Collection[Transition] = None, arcs: Collection[Arc] = None, properties: Dict[str, Any] = None)[source]#

Bases: object

class Place(name, in_arcs=None, out_arcs=None, properties=None)[source]#

Bases: object

property name#
property in_arcs#
property out_arcs#
property properties#
class Transition(name, label=None, in_arcs=None, out_arcs=None, properties=None)[source]#

Bases: object

property name#
property label#
property in_arcs#
property out_arcs#
property properties#
class Arc(source, target, weight=1, properties=None)[source]#

Bases: object

property source#
property target#
property weight#
property properties#
property name: str#
property places: Collection[Place]#
property transitions: Collection[Transition]#
property arcs: Collection[Arc]#
property properties: Dict[str, Any]#
class pm4py.objects.petri_net.obj.InhibitorNet(name=None, places=None, transitions=None, arcs=None, properties=None)[source]#

Bases: PetriNet

class InhibitorArc(source, target, weight=1, properties=None)[source]#

Bases: Arc

class pm4py.objects.petri_net.obj.ResetNet(name=None, places=None, transitions=None, arcs=None, properties=None)[source]#

Bases: PetriNet

class ResetArc(source, target, weight=1, properties=None)[source]#

Bases: Arc

class pm4py.objects.petri_net.obj.ResetInhibitorNet(name=None, places=None, transitions=None, arcs=None, properties=None)[source]#

Bases: InhibitorNet, ResetNet

pm4py.objects.petri_net.properties 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

pm4py.objects.petri_net.sem_interface 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.objects.petri_net.sem_interface.Semantics[source]#

Bases: object

is_enabled(t, pn, m, **kwargs)[source]#

Deprecated since version 2.3.0: This will be removed in 3.0.0. this method will be removed, use PetriNetSemantics.is_enabled() instead

execute(t, pn, m, **kwargs)[source]#

Deprecated since version 2.3.0: This will be removed in 3.0.0. this method will be removed, use PetriNetSemantics.fire() instead

weak_execute(t, pn, m, **kwargs)[source]#

Deprecated since version 2.3.0: This will be removed in 3.0.0. this method will be removed, use PetriNetSemantics.fire() instead

enabled_transitions(pn, m, **kwargs)[source]#

Deprecated since version 2.3.0: This will be removed in 3.0.0. this method will be removed

pm4py.objects.petri_net.semantics 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.objects.petri_net.semantics.PetriNetSemantics[source]#

Bases: Generic[N]

classmethod is_enabled(pn: N, transition: T, marking: Counter[P]) bool[source]#

Checks whether a given transition is enabled in a given Petri net and marking

Parameters#

rtype:

bool

param pn:

Petri net

param transition:

transition to check

param marking:

marking to check

Returns#

return:

true if enabled, false otherwise

classmethod fire(pn: N, transition: T, marking: Counter[P]) Counter[P][source]#

Execute a transition For performance reasons, the algorithm method not check if the transition is enabled, i.e., this should be performed by the invoking algorithm (if needed). Hence, markings can become negative.

Parameters#

param pn:

Petri net

param transition:

transition to execute

param marking:

marking to use

Returns#

return:

newly reached marking

class pm4py.objects.petri_net.semantics.ClassicSemantics[source]#

Bases: Semantics

is_enabled(t, pn, m, **kwargs)[source]#

Verifies whether a given transition is enabled in a given Petri net and marking

Parameters#

param t:

transition to check

param pn:

Petri net

param m:

marking to check

Returns#

return:

true if enabled, false otherwise

execute(t, pn, m, **kwargs)[source]#

Executes a given transition in a given Petri net and Marking

Parameters#

param t:

transition to execute

param pn:

Petri net

param m:

marking to use

Returns#

return:

newly reached marking if :param t: is enabled, None otherwise

weak_execute(t, pn, m, **kwargs)[source]#

Execute a transition even if it is not fully enabled

Parameters#

param t:

transition to execute

param pn:

Petri net

param m:

marking to use

Returns#

return:

newly reached marking if :param t: is enabled, None otherwise

enabled_transitions(pn, m, **kwargs)[source]#

Returns a set of enabled transitions in a Petri net and given marking

Parameters#

param pn:

Petri net

param m:

marking of the pn

Returns#

return:

set of enabled transitions

pm4py.objects.petri_net.semantics.is_enabled(t, pn, m)[source]#
pm4py.objects.petri_net.semantics.execute(t, pn, m)[source]#
pm4py.objects.petri_net.semantics.weak_execute(t, m)[source]#
pm4py.objects.petri_net.semantics.enabled_transitions(pn, m)[source]#