Package jline.solvers.fluid.moments
Class FluidMomentTerms
java.lang.Object
jline.solvers.fluid.moments.FluidMomentTerms
Event-based representation of the fluid population process, as required by the
moment-closure methods of SolverFluid. Java twin of the MATLAB
fluid_moment_terms.
The closing ODEs are a density-dependent Markov population process
dx/dt = F(x) = D * r(x), r_e(x) = rateBase(e) * g_e(x)
with D the jump matrix and g the rate-factor vector of
FluidRateFactors. The closing analyzer discards D and r once it has
composed the right-hand side, but the covariance equation of the linear noise
approximation needs them separately: the diffusion matrix is
D*diag(r(x))*D', which cannot be recovered from F alone. This class
rebuilds that representation and exposes drift, rate and Jacobian evaluations
that all take the closure variance as an explicit argument.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal int[][]final int[]Coordinates carrying a real population, i.e.final MatrixJump matrix (nstate x nevents).final Matrix[nEventsReduced x nEventsOriginal] expected firings of each original event per firing of each reduced one; the identity when no immediate coordinate was eliminated.final boolean[][]final int[]final int[]Source state coordinate of each event.final boolean[]Event classification, so throughputs can be read off the rate vector.final int[]final MatrixProjector taking an initial condition onto the surviving coordinates: the identity on a coordinate the immediate reduction kept and the absorption distribution on one it folded away, so a zero diagonal marks an eliminated coordinate.final boolean[]final intfinal Matrixfinal Matrixfinal intfinal boolean[]Stations whose occupancy cannot reach their server count, where min(n,c) is the identity and the Gaussian closure must stay first order.final intfinal Matrixfinal MatrixConstant rate factor of each event (nevents x 1).final MatrixEffective server counts, with an infinite server replaced by the closed population.final SchedStrategy[]final int[][]State coordinates of each station, and of each (station, class). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRefuses any station whose discipline has no drift branch.Fluid drift F(x) = D*r(x).intdriftKinkStation(double[] x, double[] sigma2) First station sitting on the saturation kink of the first-order rate factor, or -1 when none does.Per-coordinate service shares at the given closure variance.Analytic Jacobian dF/dx = D*(rateBase .* G(eventIdx,:)).double[]nudgedOffKink(double[] x, double[] sigma2, double rel) The state with every kinked station moved strictly onto one side of its kink.Event rates, i.e.
-
Field Details
-
M
public final int M -
K
public final int K -
nstate
public final int nstate -
D
Jump matrix (nstate x nevents). -
rateBase
Constant rate factor of each event (nevents x 1). -
eventIdx
public final int[] eventIdxSource state coordinate of each event. -
qIndices
-
Kic
-
enabled
public final boolean[][] enabled -
sched
-
S
Effective server counts, with an infinite server replaced by the closed population. -
lldscaling
-
stationBlock
public final int[][] stationBlockState coordinates of each station, and of each (station, class). -
classBlock
public final int[][] classBlock -
covIdx
public final int[] covIdxCoordinates carrying a real population, i.e. everything but the EXT source pools. -
isExt
public final boolean[] isExt -
minExact
public final boolean[] minExactStations whose occupancy cannot reach their server count, where min(n,c) is the identity and the Gaussian closure must stay first order. See buildMinExact. -
evIsDeparture
public final boolean[] evIsDepartureEvent classification, so throughputs can be read off the rate vector. -
evStation
public final int[] evStation -
evClass
public final int[] evClass -
Emap
[nEventsReduced x nEventsOriginal] expected firings of each original event per firing of each reduced one; the identity when no immediate coordinate was eliminated. Event attributes above are indexed by ORIGINAL event, so a throughput is read asr' * (Emap * indicatorOverOriginalEvents). -
immediateAbsorb
Projector taking an initial condition onto the surviving coordinates: the identity on a coordinate the immediate reduction kept and the absorption distribution on one it folded away, so a zero diagonal marks an eliminated coordinate. Null when nothing was eliminated.
-
-
Constructor Details
-
FluidMomentTerms
- Parameters:
sn- network structure, after the non-Markovian to phase-type conversionoptions- solver options
-
-
Method Details
-
factors
Per-coordinate service shares at the given closure variance. -
rates
Event rates, i.e. the rate base scaled by the service shares. -
drift
Fluid drift F(x) = D*r(x). -
driftKinkStation
public int driftKinkStation(double[] x, double[] sigma2) First station sitting on the saturation kink of the first-order rate factor, or -1 when none does. SeeFluidRateFactors.driftKinkStation(double[], double[]): at such a pointjacobian(double[], double[], jline.util.matrix.Matrix[])exists only one-sidedly, so a caller needing a differentiable drift must check this rather than trust the returned slope. -
nudgedOffKink
public double[] nudgedOffKink(double[] x, double[] sigma2, double rel) The state with every kinked station moved strictly onto one side of its kink. SeeFluidRateFactors.nudgedOffKink(double[], double[], double). -
jacobian
Analytic Jacobian dF/dx = D*(rateBase .* G(eventIdx,:)). -
checkSupported
public void checkSupported()Refuses any station whose discipline has no drift branch.
-