powered by
Function to create a petrinet by specifying places, transitions and flows.
petrinet
create_PN(places, transitions, flows)
A petrinet
data.frame or tibble of places, with columns id and label. Both columns should be characters.
data.frame
tibble
data.frame or tibble of transitions, with columns id and label. Both columns should be characters.
data.frame or tibble of flows, with columns named "from" and "to", referring to ids of places and transitions. Both columns should be characters.
library(dplyr) create_PN(tibble(id = "p1", label = "place_1"), tibble(id = "t1", label = "transition_1"), tibble(from = "t1",to = "p1"))
Run the code above in your browser using DataLab