Class MPHt
- All Implemented Interfaces:
Serializable,Copyable
An MPH whose three ingredients are functions of the wall clock: segment j covers
[breakpoints[j], breakpoints[j+1]) and carries an entry law alpha_j, a sub-generator S_j and
K exit vectors s_(1,j), ..., s_(K,j) satisfying the partition identity
sum_c s_(c,j) = -S_j ein every segment. This is to
PHt what MPH is to PH.
It is STORED LOWERED to MMAPt form, segment by segment, by
D0_j = S_j, D1^(c)_j = s_(c,j) alpha_jexactly as a PHt is stored as its equivalent MAPt pair. One marked schedule walk therefore serves both families and there is a single sn.proc shape behind
ProcessType.isMarkedSchedule. The original (alpha, S, exits) are kept on the object
for the getters and for serialization, so a round trip returns an MPHt and not the MMAPt it
lowers to.
The lowering makes each segment's arrivals RENEWAL within that segment: D1^(c)_j factorises through alpha_j, so the phase after a completion does not depend on the phase before it. Across a breakpoint the process is still time-varying, which is what separates an MPH_t from an MPH.
At a Source the mark selects the class of the arriving job
(Source.setMarkedArrival, sn.markidx). As a SERVICE process it is sampled
for its duration and the mark is discarded, exactly as an MMAP is.
References: Q.-M. He, "The versatility of MMAP[K] and the MMAP[K]/G[K]/1 queue", Queueing Systems 38(4), 2001; Y. M. Ko and J. Pender, "Diffusion limits for the (MAP_t/Ph_t/inf)^N queueing network", Oper. Res. Lett. 45(3), 2017.
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleevalCDF(double t) NaN; seegetSCV().doubleevalLST(double s) NaN; seegetSCV().double[]All exit vectors, mark-major: get(c).get(j) is mark c+1 in segment j.getExitSegments(int k) Per-segment exit vectors of one mark.intThe 1-based mark of the interval last returned bysample(int, Random).doublegetMean()Gets the mean (expected value) of this distribution.intintintdoubleHorizon length, which is the period when cyclic.The MMAPt-shaped cell of the lowering, which is what reaches sn.proc.doublegetRate()Gets the rate of this distribution (inverse of mean).doublegetSCV()NaN: an MPH_t is time-varying, so no i.i.d.intgetSegmentIndexAt(double t) Index of the segment in force at t, or -1 past a non-cyclic horizon.doubleNaN; seegetSCV().double[]Per-mark arrival rates of the time-averaged process; seeMMAPt.Width-weighted average pair over the horizon, {D0bar, D1bar} of the lowered process.doubleArrival rate of the time-averaged aggregate MAP.booleanisCyclic()double[]nextArrival(double from, int phase, Random random) Time to the next completion, the phase after it and its mark; seeMMAPt.voidRestarts the sample path at the schedule start.double[]sample(int n) Generates random samples from this distribution using default random generator.double[]Generates random samples from this distribution using the specified random generator.toMAPts(int k) The marginal schedule of one mark; seeMMAPt.toMAPts(int).toMMAPt()The equivalent MMAP_t, which is the form this process is stored and sampled in.toPHt()The UNMARKED schedule of the duration, PHt(alpha, S).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, scv, setNumParams, setParam, skewness, support, var
-
Constructor Details
-
MPHt
public MPHt(double[] breakpoints, List<Matrix> alpha, List<Matrix> S, List<List<Matrix>> exit, boolean cyclic) Creates an MPH_t with a piecewise-constant marked phase-type schedule.- Parameters:
breakpoints- strictly increasing segment boundaries, length n+1alpha- per-segment 1-by-h entry laws, length nS- per-segment h-by-h sub-generators, length nexit- the K mark exits, each a list of n per-segment h-by-1 vectorscyclic- whether the schedule repeats with the horizon as period
-
MPHt
Creates a cyclic MPH_t.
-
-
Method Details
-
getBreakpoints
public double[] getBreakpoints() -
getAlphaSegments
-
getSSegments
-
getExitSegments
Per-segment exit vectors of one mark.- Parameters:
k- the 1-based mark index- Returns:
- the n per-segment exit vectors
-
getExitSegments
All exit vectors, mark-major: get(c).get(j) is mark c+1 in segment j. -
getNumberOfTypes
public int getNumberOfTypes() -
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. -
toMMAPt
The equivalent MMAP_t, which is the form this process is stored and sampled in.- Returns:
- the lowered marked schedule
-
toPHt
The UNMARKED schedule of the duration, PHt(alpha, S). -
toMAPts
The marginal schedule of one mark; seeMMAPt.toMAPts(int). -
getTimeAverageProcess
Width-weighted average pair over the horizon, {D0bar, D1bar} of the lowered process. -
getTimeAverageRate
public double getTimeAverageRate()Arrival rate of the time-averaged aggregate MAP. -
getTimeAverageMarkRates
public double[] getTimeAverageMarkRates()Per-mark arrival rates of the time-averaged process; seeMMAPt. -
getMean
public double getMean()Description copied from class:DistributionGets the mean (expected value) of this distribution.- 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: an MPH_t is time-varying, so no i.i.d. interval law summarises it.- 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
The MMAPt-shaped cell of the lowering, which is what reaches sn.proc.The procid stays MPHT, so the featset gate and the wire type still tell the two families apart; only the representation is shared.
- Specified by:
getProcessin classContinuousDistribution- Returns:
- MatrixCell with distribution-specific parameters
-
resetSampleClock
public void resetSampleClock()Restarts the sample path at the schedule start. -
getLastMark
public int getLastMark()The 1-based mark of the interval last returned bysample(int, Random). -
sample
Description copied from class:DistributionGenerates random samples from this distribution using the specified random generator.- Specified by:
samplein classDistribution- Parameters:
n- the number of samples to generaterandom- the random number generator to use- Returns:
- array of random samples
-
sample
public double[] sample(int n) Description copied from class:DistributionGenerates random samples from this distribution using default random generator.- Overrides:
samplein classDistribution- Parameters:
n- the number of samples to generate- Returns:
- array of random samples
-
nextArrival
Time to the next completion, the phase after it and its mark; seeMMAPt.
-