Package jline.solvers.fluid.handlers
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 Summary
ConstructorsConstructorDescriptionPassageTimeODE(NetworkStruct sn, Map<Station, Map<JobClass, Matrix>> mu, Map<Station, Map<JobClass, Matrix>> phi, Map<Station, Map<JobClass, MatrixCell>> proc, Matrix rt, Matrix S, SolverOptions options) PassageTimeODE(NetworkStruct sn, Map<Station, Map<JobClass, Matrix>> mu, Map<Station, Map<JobClass, Matrix>> phi, Map<Station, Map<JobClass, MatrixCell>> proc, Matrix rt, Matrix S, SolverOptions options, int numDimensions) -
Method Summary
Modifier and TypeMethodDescriptioncalculateFactors(double[] x, double[] sigma2, Matrix[] covblk) Per-coordinate service shares evaluated at an explicit closure variance.calculateFactorsJacobian(double[] x, double[] sigma2, Matrix[] covblk) Analytic Jacobian of the per-coordinate service shares.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.calculateRatesClosing(double t, double[] x) voidcomputeDerivatives(double t, double[] x, double[] dxdt) Precomputed jump matrix of the closing method (dimension x numEvents).intboolean[][]Precomputed per-(station,class) enabled flags of the closing method.Precomputed per-event source state coordinate of the closing method.Projector onto the coordinates that survive the immediate elimination, null when nothing was eliminated.Expected firings of each ORIGINAL event per firing of each reduced one, null when nothing was eliminated (which the caller reads as the identity).getKic()Precomputed per-(station,class) phase count of the closing method.intNumber of leading events of the ORIGINAL event list that are service completions, the rest being intra-PH phase changes.Source coordinate of each event BEFORE the immediate elimination.Precomputed per-(station,class) starting state index of the closing method.Precomputed per-event constant rate factor of the closing method.Shared per-coordinate service share evaluator of the closing method.booleanWhether the drift is AUTONOMOUS, i.e.
-
Constructor Details
-
PassageTimeODE
-
PassageTimeODE
-
-
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
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
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
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
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
-
getAllJumps
Precomputed jump matrix of the closing method (dimension x numEvents). -
getQIndices
Precomputed per-(station,class) starting state index of the closing method. -
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
Per-coordinate service shares evaluated at an explicit closure variance. -
calculateFactorsJacobian
Analytic Jacobian of the per-coordinate service shares. -
getRateBase
Precomputed per-event constant rate factor of the closing method. -
getEventIdx
Precomputed per-event source state coordinate of the closing method. -
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:
computeDerivativesin interfaceorg.apache.commons.math3.ode.FirstOrderDifferentialEquations- Throws:
org.apache.commons.math3.exception.MaxCountExceededExceptionorg.apache.commons.math3.exception.DimensionMismatchException
-
getDimension
public int getDimension()- Specified by:
getDimensionin interfaceorg.apache.commons.math3.ode.FirstOrderDifferentialEquations
-