R/postset.R

Defines functions post_set.petrinet post_set

Documented in post_set

#' @title Postset
#'
#' @description Get the postset of a transition or place in a Petri Net
#'
#' @param node \code{\link{character}} of length one: the node id for which to get the postset.
#' @inheritParams flows

#' @export post_set

post_set <- function(PN, node) {
	UseMethod("post_set")
}

post_set.petrinet <- function(PN, node) {
	(flows(PN) %>% filter(from == node))$to %>% return()
}

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.