Learn R Programming

petrinetR (version 0.3.0)

create_PN: Create Petri Net

Description

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

Usage

create_PN(places, transitions, flows)

Value

A petrinet

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.

Examples

Run this code
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