as_pm4py_marking: Convert to a PM4Py marking

Description Usage Arguments Examples

View source: R/bridge.R

Description

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

Usage

1
as_pm4py_marking(x, petrinet)

Arguments

x

A character vector with (possible duplicate) place identifiers.

petrinet

A PM4Py Petri net.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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))
}

pm4py documentation built on Jan. 8, 2020, 1:08 a.m.