Class PassageTimeODE

java.lang.Object
jline.solvers.fluid.handlers.PassageTimeODE
All Implemented Interfaces:
org.apache.commons.math3.ode.FirstOrderDifferentialEquations

public class PassageTimeODE extends Object implements org.apache.commons.math3.ode.FirstOrderDifferentialEquations
  • Constructor Details

  • Method Details

    • isAutonomous

      public boolean isAutonomous()
      Whether the drift is AUTONOMOUS, i.e. depends on the state alone.

      A rate schedule (NHPP, MAPt, PHt) makes the right-hand side a function of t as well, and then a zero residual at one instant says nothing about the next segment. The fixed-point short circuit in ClosingAndStateDepMethodsAnalyzer is armed only when this is true.

    • calculateRatesClosing

      public Matrix calculateRatesClosing(double[] x)
      Raw closing-method event-rate vector, mirroring MATLAB ode_rates_closing: the per-index scheduling correction gathered over the event index set and scaled by the rate base. The returned vector has one entry per event of the (possibly immediate-eliminated) closing machinery and is left-multiplied by the jump matrix to obtain the derivative. It is exposed for the trajectory-based iteration (TBI) analyzer, which applies the row-restricted jump matrix of each cell to this full rate vector.
      Parameters:
      x - full fluid state (length equal to getDimension())
      Returns:
      column vector of event rates (numEvents x 1)
    • getImmediateAbsorb

      public Matrix getImmediateAbsorb()
      Projector onto the coordinates that survive the immediate elimination, null when nothing was eliminated. Applied to the initial point by the analyzer: once the instantaneous coordinates are complemented away no event moves them any more, so whatever mass the initial condition parked there -- a cold start puts everything in phase 1, but a warm start from an earlier LN iterate does not -- would be frozen for the whole integration and lost from its chain.
      Returns:
      the [nStates x nStates] projector, or null
    • getImmediateEmap

      public Matrix getImmediateEmap()
      Expected firings of each ORIGINAL event per firing of each reduced one, null when nothing was eliminated (which the caller reads as the identity).
      Returns:
      the [nEventsReduced x nEventsOriginal] map, or null
    • getOriginalEventIdx

      public Matrix getOriginalEventIdx()
      Source coordinate of each event BEFORE the immediate elimination. Event attributes are classified on this indexing and mapped onto the reduced events through getImmediateEmap.
      Returns:
      the original [nEventsOriginal x 1] event index vector
    • getOriginalDepartureCount

      public int getOriginalDepartureCount()
      Number of leading events of the ORIGINAL event list that are service completions, the rest being intra-PH phase changes.
      Returns:
      the departure-event count
    • calculateRatesClosing

      public Matrix calculateRatesClosing(double t, double[] x)
    • getAllJumps

      public Matrix getAllJumps()
      Precomputed jump matrix of the closing method (dimension x numEvents).
    • getQIndices

      public Matrix getQIndices()
      Precomputed per-(station,class) starting state index of the closing method.
    • getKic

      public Matrix getKic()
      Precomputed per-(station,class) phase count of the closing method.
    • getEnabled

      public boolean[][] getEnabled()
      Precomputed per-(station,class) enabled flags of the closing method.
    • calculateFactors

      public Matrix calculateFactors(double[] x, double[] sigma2, Matrix[] covblk)
      Per-coordinate service shares evaluated at an explicit closure variance.
    • calculateFactorsJacobian

      public Matrix calculateFactorsJacobian(double[] x, double[] sigma2, Matrix[] covblk)
      Analytic Jacobian of the per-coordinate service shares.
    • getRateBase

      public Matrix getRateBase()
      Precomputed per-event constant rate factor of the closing method.
    • getEventIdx

      public Matrix getEventIdx()
      Precomputed per-event source state coordinate of the closing method.
    • getRateFactors

      public FluidRateFactors getRateFactors()
      Shared per-coordinate service share evaluator of the closing method.
    • computeDerivatives

      public void computeDerivatives(double t, double[] x, double[] dxdt) throws org.apache.commons.math3.exception.MaxCountExceededException, org.apache.commons.math3.exception.DimensionMismatchException
      Specified by:
      computeDerivatives in interface org.apache.commons.math3.ode.FirstOrderDifferentialEquations
      Throws:
      org.apache.commons.math3.exception.MaxCountExceededException
      org.apache.commons.math3.exception.DimensionMismatchException
    • getDimension

      public int getDimension()
      Specified by:
      getDimension in interface org.apache.commons.math3.ode.FirstOrderDifferentialEquations