create_PN: Create Petri Net

View source: R/create_PN.R

create_PNR Documentation

Create Petri Net

Description

Function to create a petrinet by specifying places, transitions and flows.

Usage

create_PN(places, transitions, flows)

Arguments

places

data.frame or tibble of places, with columns id and label. Both columns should be characters.

transitions

data.frame or tibble of transitions, with columns id and label. Both columns should be characters.

flows

data.frame or tibble of flows, with columns named "from" and "to", referring to ids of places and transitions. Both columns should be characters.

Value

A petrinet

Examples

library(dplyr)
create_PN(tibble(id = "p1", label = "place_1"),
			tibble(id = "t1", label = "transition_1"),
			tibble(from = "t1",to = "p1"))


petrinetR documentation built on April 3, 2023, 5:21 p.m.