R/flows.R

Defines functions flows.marked_petrinet flows.petrinet flows

Documented in flows flows.marked_petrinet flows.petrinet

#' @title Flows
#'
#' @description Extracts the flows from a (marked) Petri Net
#'
#' @param PN \code{\link{petrinet}} or \code{\link{marked_petrinet}}
#'
#' @return A data.frame containing the flows of the petri net.
#'
#' @export flows

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

#' @describeIn flows Flow of petrinet
#' @export

flows.petrinet <- function(PN) {
	return(PN$flows)
}

#' @describeIn flows Flow of marked petrinet
#' @export

flows.marked_petrinet <- function(PN) {
	flows(PN$petrinet)
}

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.