Class PHt
- 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 Ph_t is an ordinary phase-type distribution whose initial vector and sub-generator are functions of the wall clock, alpha(t) and S(t), required only to be locally integrable. This class realises that definition with a piecewise-constant schedule: segment k covers [breakpoints[k], breakpoints[k+1]) and carries the pair (alpha[k], S[k]). The exit vector is s(t) = -S(t)e.
Because both the phase and the elapsed service depend on absolute time, a Ph_t service
time is a function of the epoch at which service starts: sampleFrom(double, Random)
is the operative sampler, and sample(int, Random) walks one path.
Like MAPt this does NOT extend Markovian, and the scalar summaries getSCV, getSkewness, evalCDF and evalLST return NaN, the distribution of a service time being different at every start epoch.
The MatrixCell layout is flat, [breakpoints, alpha_1..alpha_n, S_1..S_n, cyclic], each alpha stored as a 1-by-h row so that every element of the cell is a matrix.
- 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 TypeMethodDescriptiondoubleevalCDF(double t) NaN; seegetSCV().doubleevalLST(double s) NaN; seegetSCV().getAlphaAt(double t) alpha in force at t; the last segment's row past a non-cyclic horizon.double[]doublegetMean()Mean of the time-averaged phase-type.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) Completion rate of the phase-type in force at t; zero past a non-cyclic horizon.The parameterisation of the process; the scalar summaries are not.getSAt(double t) S in force at t; the zero matrix past a non-cyclic horizon.doublegetSCV()NaN: the service-time distribution differs at every start epoch, so there is no single 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 nominal as a (D0, D1) MAP pair, D1 = s*alpha.doubleCompletion rate of the time-averaged phase-type.booleanisCyclic()voidRestart the sample path at the schedule start.double[]Draws n successive service times along ONE sample path: sample i starts where sample i-1 completed, not at a fixed epoch.doublesampleFrom(double t0, Random random) Service time for a job whose service starts at wall clock t0.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
-
PHt
Creates a Ph_t with a piecewise-constant schedule.- Parameters:
breakpoints- strictly increasing segment boundaries, length n+1alpha- per-segment initial probability rows (1-by-h), length nsubgen- per-segment sub-generators (h-by-h), length ncyclic- whether the schedule repeats with the horizon as period
-
PHt
Creates a cyclic Ph_t.
-
-
Method Details
-
getBreakpoints
public double[] getBreakpoints() -
getAlphaSegments
-
getSSegments
-
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. -
getAlphaAt
alpha in force at t; the last segment's row past a non-cyclic horizon. -
getSAt
S in force at t; the zero matrix past a non-cyclic horizon. -
getTimeAverageProcessMAP
Width-weighted average nominal as a (D0, D1) MAP pair, D1 = s*alpha.A convex combination of sub-generators is a sub-generator and of probability vectors a probability vector, so the nominal is a valid phase-type; the fluid carrier reads it as the equivalent MAP.
-
getTimeAverageRate
public double getTimeAverageRate()Completion rate of the time-averaged phase-type.A phase-type read as a MAP with D1 = s*alpha has arrival rate 1/mean, so the shared MAP routine answers this without a separate linear solve.
-
getRateAt
public double getRateAt(double t) Completion rate of the phase-type in force at t; zero past a non-cyclic horizon. -
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()Mean of the time-averaged phase-type.- 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: the service-time distribution differs at every start epoch, so there is no single i.i.d. law for an SCV to summarise.- 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. -
sample
Draws n successive service times along ONE sample path: sample i starts where sample i-1 completed, not at a fixed epoch.- Specified by:
samplein classDistribution- Parameters:
n- the number of samples to generaterandom- the random number generator to use- Returns:
- array of random samples
-
sampleFrom
Service time for a job whose service starts at wall clock t0.Exact: within a segment the phase process is a homogeneous absorbing CTMC, and by the memoryless property the residual holding time may be redrawn at a breakpoint.
-
toString
-