PetriNet
The PetriNet
class provides a simulation engine for Hybrid Colored Petri Nets. Reference: "Discrete-event simulation of fluid stochastic Petri Nets"
Value parameters
- colors
-
array of colors for tokens/fluids
- placeD
-
array of continuous places
- placeI
-
array of discrete places
- transition
-
array of timed transitions
Attributes
- Graph
-
- Supertypes
Members list
Value members
Constructors
Construct a discrete Petri net (tokens, but no fluids).
Construct a discrete Petri net (tokens, but no fluids).
Value parameters
- colors
-
array of colors for tokens
- placeI
-
array of discrete places
- transition
-
array of timed transitions
Attributes
Construct a continuous Petri net (fluids, but no tokens).
Construct a continuous Petri net (fluids, but no tokens).
Value parameters
- colors
-
array of colors for fluids
- placeD
-
array of continuous places
- transition
-
array of timed transitions
Attributes
Concrete methods
Get the current time.
Get the current time.
Attributes
Get the animation command queue.
Get the animation command queue.
Attributes
Initialize the animation by drawing the Petri net components onto the animation drawing panel using animation commands.
Initialize the animation by drawing the Petri net components onto the animation drawing panel using animation commands.
Value parameters
- gColors
-
the colors for nodes and edges in the graph i.e., discrete-places, continuous-places, transitions and arcs
- timeDilationFactor
-
time dilation is used to speed up/slow down animation
Attributes
Simulate the execution of the Petri Net.
Simulate the execution of the Petri Net.
Value parameters
- tStart
-
the starting time for the simulation
- tStop
-
the stopping time for the simulation
Attributes
Convert the Petri net to the string representation.
Convert the Petri net to the string representation.
Attributes
- Definition Classes
-
Any
Inherited methods
Function to compute the delay in firing a transition. The base time is given by a random variate. This is adjusted by weight vectors multiplying the number of aggregate tokens and the aggregate amount of fluids summed over all input places: delay = v + w_t * t + w_f * f.
Function to compute the delay in firing a transition. The base time is given by a random variate. This is adjusted by weight vectors multiplying the number of aggregate tokens and the aggregate amount of fluids summed over all input places: delay = v + w_t * t + w_f * f.
Value parameters
- f
-
the aggregate fluid level vector (summed over all input places)
- t
-
the aggregate token vector (summed over all input places)
- v
-
the random variate used to compute base firing time
- w_f
-
the weight for the fluid vector
- w_t
-
the weight for the token vector
Attributes
- Inherited from:
- PetriNetRules
Compute the amount of fluid to flow over an arc according to the system of first-order Ordinary Differential Equation 'ODE's: "integral 'derv' from t0 to t". Supports ODE base flow models.
Compute the amount of fluid to flow over an arc according to the system of first-order Ordinary Differential Equation 'ODE's: "integral 'derv' from t0 to t". Supports ODE base flow models.
Value parameters
- d
-
the time delay
- derv
-
the array of derivative functions
- f
-
the fluid vector (amount of fluid per color)
- t0
-
the current time
Attributes
- Inherited from:
- PetriNetRules
Compute the amount of fluid to flow over an arc according to the vector expression: b + r * (f-b) * d. If r is 0, returns b. Supports linear (w.r.t. time delay) and constant (d == 0) flow models.
Compute the amount of fluid to flow over an arc according to the vector expression: b + r * (f-b) * d. If r is 0, returns b. Supports linear (w.r.t. time delay) and constant (d == 0) flow models.
Value parameters
- b
-
the constant vector for base fluid flow
- d
-
the time delay
- f
-
the fluid vector (amount of fluid per color)
- r
-
the rate vector (amounts of fluids per unit time)
Attributes
- Inherited from:
- PetriNetRules
Return whether the vector inequality is true: f >= b. The firing threshold should be checked for every incoming arc. If all return true, the transition should fire.
Return whether the vector inequality is true: f >= b. The firing threshold should be checked for every incoming arc. If all return true, the transition should fire.
Value parameters
- b
-
The base constant vector
- f
-
The fluid vector (amount of fluid per color)
Attributes
- Inherited from:
- PetriNetRules
Return whether the vector inequality is true: t >= b. The firing threshold should be checked for every incoming arc. If all return true, the transition should fire.
Return whether the vector inequality is true: t >= b. The firing threshold should be checked for every incoming arc. If all return true, the transition should fire.
Value parameters
- b
-
the base constant vector
- t
-
the token vector (number of tokens per color)
Attributes
- Inherited from:
- PetriNetRules
Compute the number of tokens to flow over an arc according to the vector expression: b + r * (t-b) * d. If d is 0, returns b. Supports linear (w.r.t. time delay) and constant (d == 0) flow models.
Compute the number of tokens to flow over an arc according to the vector expression: b + r * (t-b) * d. If d is 0, returns b. Supports linear (w.r.t. time delay) and constant (d == 0) flow models.
Value parameters
- b
-
the constant vector for base token flow
- d
-
the time delay
- r
-
the rate vector (number of tokens per unit time)
- t
-
the token vector (number of tokens per color)
Attributes
- Inherited from:
- PetriNetRules