Utils: Utils

n_placesR Documentation

Utils

Description

Several auxilliary functions for Petri Net objects.

Usage

n_places(PN)

n_transitions(PN)

n_flows(PN)

n_nodes(PN)

rename_transitions(PN, .f, ...)

rename_places(PN, .f, ...)

add_places(PN, places)

add_transitions(PN, transitions)

add_flows(PN, flows)

Arguments

PN

A petri net

.f

A function name to apply for renaming

...

Additional 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.


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