Class MAPt
- All Implemented Interfaces:
Serializable,Copyable
Following Ko and Pender, "Diffusion limits for the (MAP_t/Ph_t/inf)^N queueing network", Oper. Res. Lett. 45 (2017) 248-253, a MAP_t is an ordinary MAP whose two matrices are functions of the wall clock, D0(t) and D1(t), required only to be locally integrable. This class realises that definition with a piecewise-constant schedule, which is dense in L1_loc and is the form that serialises: segment k covers [breakpoints[k], breakpoints[k+1]) and carries the pair (D0[k], D1[k]), so breakpoints has one more entry than the matrix lists. D0 holds transition rates without an arrival, D1 the rates that generate one, and D0+D1 is a generator in every segment.
Two horizon conventions, as for NHPP: a cyclic schedule repeats with period breakpoints[n]-breakpoints[0]; a non-cyclic one is silent outside its horizon and is therefore a transient construct.
Setting h = 1 with D0 = -lambda_k and D1 = lambda_k recovers exactly the NHPP with the same breakpoints and rates.
This is neither a renewal process nor a time-homogeneous one, so the scalar summaries that
presuppose an i.i.d. interval distribution -- getSCV, getSkewness, evalCDF, evalLST -- return
NaN rather than a representative value that would misreport the process as stationary. The
schedule is the parameterisation: read it with getRateSchedule().
The class deliberately does NOT extend Markovian. Code gated on isMarkovian reads getProcess as a single stationary (D0, D1) pair and would silently drop the schedule.
Constant support. The fluid solver expresses a segment as a per-entry multiplier on the time-averaged nominal, and that multiplier is undefined where the nominal entry is zero, so the constructor requires one sparsity pattern across segments.
The MatrixCell layout is flat, [breakpoints, D0_1..D0_n, D1_1..D1_n, cyclic], because a MatrixCell cannot nest; n follows from the length.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classCapability type exposed so that model compilation can recognise a schedule-bearing process by capability rather than by class name. -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckCommonSupport(List<Matrix> mats, boolean ignoreDiagonal, String label) Rejects a schedule whose matrices do not share one sparsity pattern.doubleevalCDF(double t) NaN; seegetSCV().doubleevalLST(double s) NaN; seegetSCV().double[]getD0At(double t) D0 in force at t; the zero matrix past a non-cyclic horizon.getD1At(double t) D1 in force at t; the zero matrix past a non-cyclic horizon.doublegetMean()Palm mean interval of the time-averaged MAP.intintdoubleHorizon length, which is the period when cyclic.Gets the process representation with actual distribution parameters.doublegetRate()Gets the rate of this distribution (inverse of mean).doublegetRateAt(double t) Arrival rate of the MAP in force at t; zero past a non-cyclic horizon.The parameterisation of the process; the scalar summaries are not.doublegetSCV()NaN: a MAP_t is neither renewal nor time-homogeneous, so there is no i.i.d.intgetSegmentIndexAt(double t) Index of the segment in force at t, or -1 past a non-cyclic horizon.doubleNaN; seegetSCV().Width-weighted average (D0bar, D1bar) over the horizon.doubleArrival rate of the time-averaged MAP.booleanisCyclic()double[]nextArrival(double from, int phase, Random random) Time to the next arrival from wall clock from in the given phase.voidRestart the sample path at the schedule start, in phase 1.double[]Draws n successive interarrival times along ONE sample path.toString()Methods inherited from class jline.lang.processes.Distribution
evalLST, evalProbInterval, getFeatureName, getName, getNumParams, getNumParams, getParam, getParam, getParams, getSupport, getVar, hasParam, isContinuous, isDisabled, isDiscrete, isImmediate, isMarkovian, mean, name, numParams, param, rate, sample, scv, setNumParams, setParam, skewness, support, var
-
Constructor Details
-
MAPt
Creates a MAP_t with a piecewise-constant matrix schedule.- Parameters:
breakpoints- strictly increasing segment boundaries, length n+1d0- per-segment no-arrival rate matrices, length nd1- per-segment arrival-generating rate matrices, length ncyclic- whether the schedule repeats with the horizon as period
-
MAPt
Creates a cyclic MAP_t.
-
-
Method Details
-
checkCommonSupport
Rejects a schedule whose matrices do not share one sparsity pattern.The fluid solver expresses a segment as a per-entry multiplier on a nominal matrix, and that multiplier is undefined where the nominal entry is zero. Requiring one pattern is what makes the nominal nonzero wherever any segment is.
-
getBreakpoints
public double[] getBreakpoints() -
getD0Segments
-
getD1Segments
-
isCyclic
public boolean isCyclic() -
getNumSegments
public int getNumSegments() -
getNumberOfPhases
public int getNumberOfPhases() -
getPeriod
public double getPeriod()Horizon length, which is the period when cyclic. -
getSegmentIndexAt
public int getSegmentIndexAt(double t) Index of the segment in force at t, or -1 past a non-cyclic horizon. -
getD0At
D0 in force at t; the zero matrix past a non-cyclic horizon. -
getD1At
D1 in force at t; the zero matrix past a non-cyclic horizon. -
getTimeAverageProcess
Width-weighted average (D0bar, D1bar) over the horizon.This is the nominal stationary MAP that carries the phase structure where a solver needs a time-homogeneous carrier. A convex combination of generators is a generator, so it is itself a valid MAP.
-
getTimeAverageRate
public double getTimeAverageRate()Arrival rate of the time-averaged MAP. For h = 1 this is exactly the NHPP width-weighted average intensity. -
getRateAt
public double getRateAt(double t) Arrival rate of the MAP in force at t; zero past a non-cyclic horizon. This is the stationary rate of that segment, not the instantaneous conditional intensity, which depends on the current phase. -
getRateSchedule
The parameterisation of the process; the scalar summaries are not. Model compilation recognises a schedule-bearing process by this capability rather than by class name. -
getMean
public double getMean()Palm mean interval of the time-averaged MAP.- Specified by:
getMeanin classDistribution- Returns:
- the mean value
-
getRate
public double getRate()Description copied from class:DistributionGets the rate of this distribution (inverse of mean).- Overrides:
getRatein classDistribution- Returns:
- the rate value (1/mean)
-
getSCV
public double getSCV()NaN: a MAP_t is neither renewal nor time-homogeneous, so there is no i.i.d. interval distribution for an SCV to summarise. Returning the SCV of the time-averaged MAP would report a time-varying process as a stationary one to every consumer of sn.scv.- Specified by:
getSCVin classDistribution- Returns:
- the squared coefficient of variation
-
getSkewness
public double getSkewness()NaN; seegetSCV().- Specified by:
getSkewnessin classDistribution- Returns:
- the skewness value
-
evalCDF
public double evalCDF(double t) NaN; seegetSCV().- Specified by:
evalCDFin classDistribution- Parameters:
t- the point at which to evaluate the CDF- Returns:
- the CDF value at point t
-
evalLST
public double evalLST(double s) NaN; seegetSCV().- Specified by:
evalLSTin classContinuousDistribution- Parameters:
s- the Laplace domain variable- Returns:
- the LST value at s
-
getProcess
Description copied from class:ContinuousDistributionGets the process representation with actual distribution parameters. Returns a MatrixCell containing the distribution parameters.- Specified by:
getProcessin classContinuousDistribution- Returns:
- MatrixCell with distribution-specific parameters
-
resetSampleClock
public void resetSampleClock()Restart the sample path at the schedule start, in phase 1. -
sample
Draws n successive interarrival times along ONE sample path. Both the intensity and the phase depend on absolute time, so this advances an internal clock and phase across calls.- Specified by:
samplein classDistribution- Parameters:
n- the number of samples to generaterandom- the random number generator to use- Returns:
- array of random samples
-
nextArrival
Time to the next arrival from wall clock from in the given phase.Exact: within a segment the phase process is a homogeneous CTMC, and by the memoryless property the residual holding time may be redrawn at a breakpoint, so the boundary is crossed by advancing the clock and resampling under the new matrices.
- Returns:
- {interval, phase after the arrival}; interval 0 when a non-cyclic horizon is exhausted, which callers read as "no further arrival"
-
toString
-