Class PetriTerms
fluid_petri_terms.
A GSPN is already a density-dependent Markov population process, which is
the object the moment-closure family of SolverFluid is built on: the marking
is the population, a transition mode is a reaction, its incidence column is
the jump, and the rate law lambda*min(enabling degree, servers) is the
same min() non-linearity the min-normal closure exists to smooth. Nothing
about the closure changes here; only where the drift comes from.
dx/dt = D * r(x, Sigma, phi, mu)
THE STATE, x = [ m ; y ].
m(p,k)token mass of class k at place p. One coordinate per (place, class) pair some arc touches, the initial marking loads, or a Source feeds; a pair nothing reaches is dropped rather than carried as a null direction of the Newton system.y(j,h)the number of mode-j servers running in phase h, for a mode whose firing time has more than one phase. Their SUM is not free: the ENABLE synchronization latches it instantaneously to min(enabling degree, servers), so the latch is an ALGEBRAIC row with one free-sign unknown mu_j and the phase split evolves differentially. CARRYING THE DISTRIBUTION INSTEAD OF THE COUNT LOOKS TIDIER AND IS WRONG: the resulting equation is missing a term and agrees with the count form only AT a fixed point.
There is no Source coordinate: an exogenous arrival is a CONSTANT-propensity event depositing one token, as it is in the NRM SPN runner. There is no Sink coordinate either: a firing arc into a sink is mass leaving the net.
THE EVENTS, one column of D each: kind 1 a firing of mode j out of phase h into phase h'; kind 2 an internal phase change; kind 3 an exogenous arrival; kind 4 a firing of an IMMEDIATE mode, at the algebraic flow phi_j; kind 5 the server latch of a multi-phase mode, at the free-sign unknown mu_j; kind 6 the FLUID FLOW of mode j into (or out of) fluid place c, a unit column on the level f(c) signed by the direction of the flow, at |rate| per running server. A flow is DETERMINISTIC: it enters the drift and its Jacobian but not the diffusion. An impulse is not a column of its own; it is the fluid entry of the mode's firing column, so it is a stochastic jump.
A FLUID PLACE (FSPN) takes no marking coordinate: its level f(c) is one coordinate per fluid place, appended after the phase block.
-
Field Summary
FieldsModifier and TypeFieldDescriptionint[]int[]int[]int[]THE COVARIANCE COVERS EVERY COORDINATE, phases included: the rate of a multi-phase mode is linear in y and reads no marking, so dropping the phases would sever that mode's whole restoring force.int[][]int[]int[]Kind 6: the flow's position in its mode's flowSlot; 0 for every other kind.int[]int[]int[]int[]int[]int[]node -> level coordinate, -1 for a node that is not a fluid place.int[]The deterministic fluid flow columns (kind 6).double[]double[]String[]Fluid places (node indices), their level coordinates, bounds, initial levels, stations and names.int[]int[]intint[]int[]intint[]intdouble[][]intintintintintint[][](a,b) -> closure unknown index, symmetric, -1 where the drift never reads it.int[][](node, class) -> state coordinate, -1 where the pair carries none.double[]int[]The DIFFUSION counts the stochastic events only: an immediate flow and a server latch are both the limit of an infinitely fast mechanism whose fluctuation is slaved, not a Poisson stream with an intensity.double[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PetriTermsbuild(NetworkStruct sn, SolverOptions options) consumersOf(int ist, int k) consumerWOf(int ist, int k) producersOf(int ist, int k)
-
Field Details
-
M
public int M -
K
public int K -
I
public int I -
places
-
transitions
-
fluidPlaces
Fluid places (node indices), their level coordinates, bounds, initial levels, stations and names. -
nf
public int nf -
fidx
public int[] fidxnode -> level coordinate, -1 for a node that is not a fluid place. -
fluidSlot
public int[] fluidSlot -
fluidCap
public double[] fluidCap -
fluidInit
public double[] fluidInit -
fluidStation
public int[] fluidStation -
fluidName
-
flowCol
public int[] flowColThe deterministic fluid flow columns (kind 6). -
namesNode
-
nstate
public int nstate -
nm
public int nm -
pidx
public int[][] pidx(node, class) -> state coordinate, -1 where the pair carries none. -
coordNode
public int[] coordNode -
coordClass
public int[] coordClass -
coordStation
public int[] coordStation -
modes
-
timedIdx
-
immIdx
-
D
-
rateBase
public double[] rateBase -
nev
public int nev -
evKind
public int[] evKind -
evMode
public int[] evMode -
evPhase
public int[] evPhase -
evTo
public int[] evTo -
evStation
public int[] evStation -
evClass
public int[] evClass -
evFlow
public int[] evFlowKind 6: the flow's position in its mode's flowSlot; 0 for every other kind. -
immCol
public int[] immCol -
latchCol
public int[] latchCol -
stochCol
public int[] stochColThe DIFFUSION counts the stochastic events only: an immediate flow and a server latch are both the limit of an infinitely fast mechanism whose fluctuation is slaved, not a Poisson stream with an intensity. -
latchMode
-
covIdx
public int[] covIdxTHE COVARIANCE COVERS EVERY COORDINATE, phases included: the rate of a multi-phase mode is linear in y and reads no marking, so dropping the phases would sever that mode's whole restoring force. -
covPairs
public int[][] covPairs -
npair
public int npair -
pairIndex
public int[][] pairIndex(a,b) -> closure unknown index, symmetric, -1 where the drift never reads it. -
immColOf
public int[] immColOf -
consumers
-
consumerW
-
producers
-
x0
public double[] x0 -
m0full
public double[][] m0full -
options
-
-
Constructor Details
-
PetriTerms
public PetriTerms()
-
-
Method Details
-
consumersOf
-
consumerWOf
-
producersOf
-
build
-