Learn R Programming

pm4py (version 1.2.7)

as_pm4py_marking: Convert to a PM4Py marking

Description

Converts a character vector of place identifiers to a PM4Py marking object.

Usage

as_pm4py_marking(x, petrinet)

Arguments

x

A character vector with (possible duplicate) place identifiers.

petrinet

A PM4Py Petri net.

Examples

Run this code
# NOT RUN {
if (pm4py_available()) {
  library(eventdataR)
  data(patients)

  # As Inductive Miner of PM4PY is not life-cycle aware, keep only `complete` events:
  patients_completes <- patients[patients$registration_type == "complete", ]

  net <- discovery_inductive(patients_completes)
  as_pm4py_marking(c("sink"), r_to_py(net$petrinet))
}

# }

Run the code above in your browser using DataLab