Class ImmediateElimination

java.lang.Object
jline.solvers.fluid.handlers.ImmediateElimination

public class ImmediateElimination extends Object
Stochastic complementation of the IMMEDIATE coordinates of the fluid ODE.

A coordinate whose exit rate is GlobalConstants.Immediate (= 1/FineTol = 1e8) is not a fast coordinate, it is an INSTANTANEOUS one: the rate is LINE's stand-in for infinity, written by SolverLN for the branch of an activity that takes no time (an entry called with probability y < 1 carries a second PH phase at InfRate entered with probability 1-y). Integrating it numerically is meaningless work -- the mode relaxes 1e8 times faster than anything else in the model -- and it is what made a two-station LN layer take 145 s here and 70 s in MATLAB for an answer identical, to every digit, to the one the reduced system returns in 0.35 s.

THE REDUCTION IS EXACT, not an approximation. It is the ODE twin of ctmc_stochcomp: the instantaneous coordinates F are absorbed into the timed ones S by the absorption probabilities of the embedded jump chain restricted to F, so the flow that would enter F is routed straight to where F would have sent it.

WHY THIS IS A STRUCTURAL COMPOSITION AND NOT A GENERATOR ROUND TRIP. Every event of the fluid event set is a single -1 at its source coordinate and a single +1 at its destination, so a path through F composes to one event, -1 at the original source and +1 at the absorbing coordinate, that keeps the original source's GATING. Rebuilding the events from a reduced generator instead (the shape this class had before) loses that identity, and with it the event ORDER that FluidMomentTerms reads throughputs off -- which is why the moment-closure methods used to refuse the reduction outright. Emap carries the identity across instead: Emap(e,o) is the expected number of times the ORIGINAL event o fires per firing of the reduced event e, so a caller maps any per-event quantity with newAttr = Emap * oldAttr. It is the identity when nothing is eliminated.

A COMPOSED EVENT CAN BE A DEPARTURE AT TWO STATIONS AT ONCE, which is why a single evIsDeparture flag cannot survive the composition: a job that leaves the delay, passes through the queue's immediate phase and returns has completed at BOTH, and both throughputs must count it.

See Also:
  • Constructor Details

    • ImmediateElimination

      public ImmediateElimination()
  • Method Details

    • eliminateImmediate

      public static ImmediateElimination.EliminationResult eliminateImmediate(Matrix allJumps, Matrix rateBase, Matrix eventIdx, NetworkStruct sn, SolverOptions options)
      Eliminate the instantaneous coordinates from the fluid event set.
      Parameters:
      allJumps - [nStates x nEvents] jump matrix
      rateBase - [nEvents x 1] fixed part of each event rate
      eventIdx - [nEvents x 1] source coordinate of each event, which also gates it
      sn - model structure, unused, kept for the caller's signature
      options - solver options; options.config immediate_tol overrides the threshold
      Returns:
      the reduced system together with Emap and absorb