pm4py.analysis.solve_marking_equation#
- pm4py.analysis.solve_marking_equation(petri_net: PetriNet, initial_marking: Marking, final_marking: Marking, cost_function: Dict[Transition, float] = None) float [source]#
Solves the marking equation of a Petri net. The marking equation is solved as an ILP problem. An optional transition-based cost function to minimize can be provided as well.
- Parameters:
- Return type:
float
import pm4py net, im, fm = pm4py.read_pnml('model.pnml') heuristic = pm4py.solve_marking_equation(net, im, fm)