Class MMDP
-
- All Implemented Interfaces:
-
java.io.Serializable,jline.lang.Copyable
public class MMDP extends Markovian implements Serializable
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
-
-
Method Summary
Modifier and Type Method Description MatrixQ()Returns the generator matrix Q. MatrixR()Returns the rate matrix R (diagonal). Matrixr()Returns the rate vector (diagonal of R). longgetNumberOfPhases()Gets the number of phases in this Markovian distribution. doublegetMeanRate()Computes the stationary mean rate. doublegetMean()Gets the mean of this Markovian distribution. doublegetRate()Gets the rate of this distribution (inverse of mean). doublegetSCV()Computes the squared coefficient of variation of rates. MatrixCellgetProcess()Gets the matrix representation of this Markovian process. static MMDPfromMAP(MAP map)Converts a MAP to MMDP (deterministic representation). static MMDPfromMMPP2(double r0, double r1, double sigma0, double sigma1)Creates an MMDP from MMPP2 parameters. static booleanisFeasible(Matrix Q, Matrix R)Checks if the given (Q, R) matrices define a valid MMDP. StringtoString()-
Methods inherited from class jline.lang.processes.Markovian
D, acf, 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, numPhases, numberOfPhases, phi, process, rate, sample, sample, scv, setMean, setProcess, setRate, skewness, subgenerator, var, variance -
Methods inherited from class jline.lang.processes.Distribution
evalProbInterval, getName, getNumParams, getParam, getSupport, isContinuous, isDisabled, isDiscrete, isImmediate, isMarkovian, name, numParams, param, setNumParams, setParam, support -
Methods inherited from class jline.lang.Copyable
copy -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
R
Matrix R()
Returns the rate matrix R (diagonal).
- Returns:
n×n diagonal matrix of deterministic rates
-
r
Matrix r()
Returns the rate vector (diagonal of R).
- Returns:
n-vector of deterministic rates per phase
-
getNumberOfPhases
long getNumberOfPhases()
Gets the number of phases in this Markovian distribution.
- Returns:
the number of phases
-
getMeanRate
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
double getMean()
Gets the mean of this Markovian distribution.
- Returns:
the mean value, or NaN if the process contains NaN values
-
getRate
double getRate()
Gets the rate of this distribution (inverse of mean).
- Returns:
the rate value (1/mean)
-
getSCV
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.
- Returns:
squared coefficient of variation
-
getProcess
MatrixCell getProcess()
Gets the matrix representation of this Markovian process.
- Returns:
MatrixCell containing D0, D1, ... matrices
-
fromMAP
static MMDP fromMAP(MAP map)
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
static MMDP fromMMPP2(double r0, double r1, double sigma0, double sigma1)
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
static boolean isFeasible(Matrix Q, Matrix R)
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
-
-
-
-