multimedia.model
Class MMPPNModel

java.lang.Object
  |
  +--multimedia.model.GenericAggregatedModel
        |
        +--multimedia.model.GenericModel
              |
              +--multimedia.model.GenericAudioModel
                    |
                    +--multimedia.model.MMPPNModel
Direct Known Subclasses:
MMPP2Model

public class MMPPNModel
extends GenericAudioModel


Field Summary
 double[] alpha
           
 double[] beta
           
 double[] lambda
           
 
Fields inherited from class multimedia.model.GenericAudioModel
codec
 
Constructor Summary
MMPPNModel()
           
MMPPNModel(int unEtatCount, int unEtatDepart, AudioCodec unCodec)
          MMPPNModel :
MMPPNModel(int unEtatCount, int unEtatDepart, double[] unAlpha, double[] unBeta, double[] unLambda, AudioCodec unCodec)
          MMPP-N Model general description
MMPPNModel(int unEtatCount, int unEtatDepart, double unAlpha, double unBeta, AudioCodec unCodec)
          MMPPNModel : we use this constructor when a codec is specified
 
Method Summary
 double calculT(double unParam)
          Method calculT
 java.lang.String getCompleteName()
           
 double getParam(int unEtat, java.lang.String param)
          getParam: use to get all parameters: alpha, beta and gamma
 java.lang.Object getParameter(int idx)
          Method getParameter.
 double getParamOn()
          Method getParamOn.
static void main(java.lang.String[] args)
          Methode: Main pour tester la classe
 double meanRate()
          meanRate : to calculate mean of generated packet number per second mean = N*1/InterPacketTime*Pon = N*lambda*Pon where N is the number of state 1...N for a MMPP-N+1, i.e.
 void setParam(java.lang.String unParam, double uneValeur)
          setParam alpha[0]=alpha(0)=0, alpha[1]=alpha(1)=alpha, ..., alpha[N]=alpha(N)=N*alpha beta[0]=beta(0)=N*beta, ..., beta[N]=beta(N)=0 lambda[0]=lambda(0)=0,lambda[1]=lambda(1)=lambda, ...,lambda[N]=lambda(N)=N*lambda
 void setParams(double unAlpha, double unBeta, double unLambda)
          setParams use to define all parameters: alpha, beta and gamma
 
Methods inherited from class multimedia.model.GenericAudioModel
getCodec, getEtatCount, getEtatDepart, setCodec, setEtatCount, setEtatDepart
 
Methods inherited from class multimedia.model.GenericAggregatedModel
getName, getParamsCount, setName, setParamsCount
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

alpha

public double[] alpha

beta

public double[] beta

lambda

public double[] lambda
Constructor Detail

MMPPNModel

public MMPPNModel()

MMPPNModel

public MMPPNModel(int unEtatCount,
                  int unEtatDepart,
                  AudioCodec unCodec)
MMPPNModel :

Parameters:
unEtatCount - defines N (in MMPP-N+1 modelName), it corresponds to the number of states
unEtatDepart - Fix a start state
unCodec - it's the associated Codec which gives packet size and inter-packet time
Throws:
java.lang.IllegalArgumentException

MMPPNModel

public MMPPNModel(int unEtatCount,
                  int unEtatDepart,
                  double unAlpha,
                  double unBeta,
                  AudioCodec unCodec)
           throws java.lang.IllegalArgumentException
MMPPNModel : we use this constructor when a codec is specified

Parameters:
unEtatCount - defines N (im MMPP-N+1 modelName), it corresponds to the number of states
unEtatDepart - Fix a start state
unAlpha - parameter of exponential distributions
unBeta - parameter of exponential distributions
unCodec - it's the associated Codec which gives packet size and inter-packet time
Throws:
java.lang.IllegalArgumentException

MMPPNModel

public MMPPNModel(int unEtatCount,
                  int unEtatDepart,
                  double[] unAlpha,
                  double[] unBeta,
                  double[] unLambda,
                  AudioCodec unCodec)
           throws java.lang.IllegalArgumentException
MMPP-N Model general description

Parameters:
unEtatCount - it defines the number of states
unEtatDepart - it defines the state of the system at the start
unAlpha - it's a table of value which define exponential distribution parameter
unBeta - it's a table of value which define exponential distribution parameter
unLambda - it's a table of exponential distribution parameters which define inter-packet time (state 1 to N)
unCodec - it's the associated Codec
Throws:
java.lang.IllegalArgumentException
Method Detail

setParam

public void setParam(java.lang.String unParam,
                     double uneValeur)
              throws java.lang.IllegalArgumentException
setParam alpha[0]=alpha(0)=0, alpha[1]=alpha(1)=alpha, ..., alpha[N]=alpha(N)=N*alpha beta[0]=beta(0)=N*beta, ..., beta[N]=beta(N)=0 lambda[0]=lambda(0)=0,lambda[1]=lambda(1)=lambda, ...,lambda[N]=lambda(N)=N*lambda

Specified by:
setParam in class GenericAudioModel
Parameters:
unParam -
uneValeur -
Throws:
java.lang.IllegalArgumentException

setParams

public void setParams(double unAlpha,
                      double unBeta,
                      double unLambda)
               throws java.lang.IllegalArgumentException
setParams use to define all parameters: alpha, beta and gamma

Parameters:
unAlpha - we have: alpha[0]=0 and i>0 alpha[i]= i * unAlpha
unBeta - we have: beta[N]=0 and iunLambda - we have: lambda[0]=0 for i=1..N lambda[i] = i * unLambda
Throws:
java.lang.IllegalArgumentException

calculT

public double calculT(double unParam)
               throws java.lang.IllegalArgumentException
Method calculT

Specified by:
calculT in class GenericAudioModel
Throws:
java.lang.IllegalArgumentException
See Also:
multimedia.GenericModel#calculT(double)

getParam

public double getParam(int unEtat,
                       java.lang.String param)
                throws java.lang.IllegalArgumentException
getParam: use to get all parameters: alpha, beta and gamma

Specified by:
getParam in class GenericAudioModel
Parameters:
unEtat - it contained between 0 and N (~etatCount-1)
param - the parameter name
Throws:
java.lang.IllegalArgumentException

meanRate

public double meanRate()
meanRate : to calculate mean of generated packet number per second mean = N*1/InterPacketTime*Pon = N*lambda*Pon where N is the number of state 1...N for a MMPP-N+1, i.e. M=N+1 <=> MMPP-M

Returns:
mean rate in kbits/s

getParamOn

public double getParamOn()
Method getParamOn. to calculate Pon = beta/(alpha + beta) where alpha = 1/Ton = alpha[1] and beta = 1/Toff = beta[N-1]

Returns:
double

getParameter

public java.lang.Object getParameter(int idx)
                              throws java.lang.IllegalArgumentException
Method getParameter.

Parameters:
idx -
Returns:
Object
Throws:
java.lang.IllegalArgumentException

getCompleteName

public java.lang.String getCompleteName()

main

public static void main(java.lang.String[] args)
Methode: Main pour tester la classe