pm4py.objects.petri_net.utils.murata 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.utils.murata.apply_reduction(net: PetriNet, im: Marking, fm: Marking) Tuple[PetriNet, Marking, Marking][source]#
Apply the Murata reduction to an accepting Petri net, removing structurally redundant (implicit) places.
This implementation follows the (Berthelot) implicit-place check by searching, via ILP, for a place-flow f = a_p * p - Σ a_q * q (a_p >= 1, a_q >= 0) such that:
f is a P-invariant (flow): a_p*C(p,t) - Σ a_q*C(q,t) = 0 for all transitions t where C(p,t) = Post(p,t) - Pre(p,t)
a_p*Pre(p,t) - Σ a_q*Pre(q,t) <= k for all transitions t with k = a_p*M0(p) - Σ a_q*M0(q), and k >= 0
If such a solution exists, the candidate place is implicit and can be removed without changing behavior.
- Parameters:
net – Petri net
im – Initial marking
fm – Final marking
- Returns:
net – Reduced Petri net
im – Initial marking (unchanged)
fm – Final marking (unchanged)