Function to create a petri net by specificing a set of places, transitions, flows and a marking.

create_PN(places, transitions, flows, marking)

Arguments

places

A vector of unique places.

transitions

A vector of unique transitions.

flows

A data.frame of flows, with columns named "from" and "to".

marking

The names of the places to be marked.

Examples

create_PN("place_1", "transition_1", data.frame(from = "place_1",to = "transition_1"), marking = "place_1")
#> [1] "place_1" #> id enabled #> 1 transition_1 TRUE