pm4py.objects.petri_net.utils.consumption_matrix module#

Implements the consumption matrix as explained in the following paper:

van Dongen, Boudewijn F. “Efficiently computing alignments.” International Conference on Business Process Management. Springer, Cham, 2018. https://link.springer.com/chapter/10.1007/978-3-319-98648-7_12

class pm4py.objects.petri_net.utils.consumption_matrix.ConsumptionMatrix(net: PetriNet)[source]#

Bases: object

property places: Dict[Place, int]#

Gets the places in the order in which they have been inserted in the consumption matrix

Returns:

Dictionary associating to each place an incremental number

Return type:

place_indices

property transitions: Dict[Transition, int]#

Gets the transitions in the order in which they have been inserted in the consumption matrix

Returns:

Dictionary associating to each transition an incremental number

Return type:

trans_indices

property c_matrix: ndarray#

Gets the Numpy representation of the consumption matrix

Returns:

C matrix

Return type:

C

pm4py.objects.petri_net.utils.consumption_matrix.construct(net: PetriNet) ConsumptionMatrix[source]#

Construct a consumption matrix given a Petri net

Parameters:

net – Petri net

Returns:

Consumption matrix object

Return type:

cons_mat