R/nodes.R

Defines functions nodes.petrinet nodes

Documented in nodes

#' Get nodes from (marked) petrinet
#'
#' @inheritParams flows
#' @export
#'

nodes <- function(PN) {
	UseMethod("nodes")
}

#' @export
nodes.petrinet <- function(PN) {
	places <- places(PN) %>% mutate(type = "place")
	transitions <- transitions(PN) %>% mutate(type = "transition")

	places %>%
		bind_rows(transitions)
}

Try the petrinetR package in your browser

Any scripts or data that you put into this service are public.

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