Package jline.lang.processes
Class MMDP
java.lang.Object
jline.lang.processes.Distribution
jline.lang.processes.ContinuousDistribution
jline.lang.processes.Markovian
jline.lang.processes.MMDP
- All Implemented Interfaces:
Serializable,Copyable
- Direct Known Subclasses:
MMDP2
A Markov-Modulated Deterministic Process (MMDP) for fluid queue modeling.
Models fluid flow with deterministic rates modulated by a background Markov chain.
Suitable for arrival and service processes in Markovian fluid queues analyzed
by the mfq method of SolverFLD.
The (Q, R) parameterization follows BUTools conventions:
- Q: Generator matrix of the modulating CTMC (row sums = 0)
- R: Diagonal matrix of deterministic rates per state
MMDP is the deterministic analogue of MMPP:
- MMPP: Poisson arrival rates modulated by a Markov chain
- MMDP: Deterministic rates modulated by a Markov chain
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MMDPConverts a MAP to MMDP (deterministic representation).static MMDPfromMMPP2(double r0, double r1, double sigma0, double sigma1) Creates an MMDP from MMPP2 parameters.doublegetMean()Gets the mean of this Markovian distribution.doubleComputes the stationary mean rate.longGets the number of phases in this Markovian distribution.Gets the matrix representation of this Markovian process.doublegetRate()Gets the rate of this distribution (inverse of mean).doublegetSCV()Computes the squared coefficient of variation of rates.static booleanisFeasible(Matrix Q, Matrix R) Checks if the given (Q, R) matrices define a valid MMDP.Q()Returns the generator matrix Q.r()Returns the rate vector (diagonal of R).R()Returns the rate matrix R (diagonal).toString()Methods inherited from class jline.lang.processes.Markovian
acf, D, embedded, embeddedProb, evalCDF, evalCDF, evalLST, evalMeanT, evalVarT, getACF, getEmbedded, getEmbeddedProb, getIDC, getIDI, getInitProb, getMoments, getMu, getPhi, getSkewness, getSubgenerator, getVar, getVariance, idc, idi, initProb, mean, moments, mu, numberOfPhases, numPhases, phi, process, rate, sample, sample, scv, setMean, setProcess, setRate, skewness, subgenerator, var, varianceMethods inherited from class jline.lang.processes.Distribution
evalProbInterval, getName, getNumParams, getParam, getSupport, isContinuous, isDisabled, isDiscrete, isImmediate, isMarkovian, name, numParams, param, setNumParams, setParam, support
-
Constructor Details
-
MMDP
public MMDP()Creates an empty MMDP instance. -
MMDP
Creates an MMDP with specified generator Q and rate matrix R.- Parameters:
Q- n×n generator matrix (row sums = 0)R- n×n diagonal matrix of deterministic rates, or n-vector
-
-
Method Details
-
Q
Returns the generator matrix Q.- Returns:
- n×n generator matrix of the modulating CTMC
-
R
Returns the rate matrix R (diagonal).- Returns:
- n×n diagonal matrix of deterministic rates
-
r
Returns the rate vector (diagonal of R).- Returns:
- n-vector of deterministic rates per phase
-
getNumberOfPhases
public long getNumberOfPhases()Description copied from class:MarkovianGets the number of phases in this Markovian distribution.- Overrides:
getNumberOfPhasesin classMarkovian- Returns:
- the number of phases
-
getMeanRate
public double getMeanRate()Computes the stationary mean rate. For MMDP: E[r] = π * diag(R), where π is the stationary distribution of the modulating CTMC with generator Q.- Returns:
- stationary mean deterministic rate
-
getMean
public double getMean()Description copied from class:MarkovianGets the mean of this Markovian distribution. -
getRate
public double getRate()Description copied from class:DistributionGets the rate of this distribution (inverse of mean). -
getSCV
public double getSCV()Computes the squared coefficient of variation of rates. Computes Var[r]/E[r]^2 where expectation is over the stationary distribution of the modulating CTMC. -
getProcess
Description copied from class:MarkovianGets the matrix representation of this Markovian process.- Overrides:
getProcessin classMarkovian- Returns:
- MatrixCell containing D0, D1, ... matrices
-
fromMAP
Converts a MAP to MMDP (deterministic representation). Converts a Markovian Arrival Process to a Markov-Modulated Deterministic Process by extracting the full generator and using row sums of D1 as the deterministic rates.- Parameters:
map- MAP object to convert- Returns:
- MMDP representation of the MAP
-
fromMMPP2
Creates an MMDP from MMPP2 parameters. Creates a 2-state MMDP using the same parameterization as MMPP2.- Parameters:
r0- rate in state 0r1- rate in state 1sigma0- transition rate from state 0 to state 1sigma1- transition rate from state 1 to state 0- Returns:
- 2-state MMDP
-
isFeasible
Checks if the given (Q, R) matrices define a valid MMDP. Requirements: - Q must be a valid generator (square, row sums = 0, proper signs) - R must be diagonal with non-negative entries - Q and R must have compatible dimensions- Parameters:
Q- generator matrixR- rate matrix- Returns:
- true if valid MMDP, false otherwise
-
toString
-