Class HyperExpPar
java.lang.Object
random.AbstractParameter
random.HyperExpPar
This is the parameter that should be passed to the Hyperexponential
distribution.
Copyright (c) 2003
Politecnico di Milano - dipartimento di Elettronica e Informazione
Copyright (c) 2003
Politecnico di Milano - dipartimento di Elettronica e Informazione
- Author:
- Fabrizio Frontera - ffrontera@yahoo.it
-
Constructor Summary
ConstructorsConstructorDescriptionHyperExpPar(double p, double lambda1, double lambda2) It creates a new hyperexponential parameter based on the data provided by the user.HyperExpPar(Double wp, Double wlambda1, Double wlambda2) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheck()It verifies if the parameter is correct.It returns the parameter used to create the 1st exponential distribution used by the hyperexponential distribution.It returns the parameter used to create the 2nd exponential distribution used by the hyperexponential distribution.doubleIt returns the value of the parameter lambda1, the parameter lambda for the 1st exponential distribution created by the hyperexponential parameter.doubleIt returns the value of the parameter lambda2, the parameter lambda for the 2nd exponential distribution created by the hyperexponential parameter.doublegetMean()It returns the value of the mean of the hyperexponential distribution which is provided by the user or evaluated according to other data.doublegetP()It returns the value of the parameter p, the probability to select one of the exponential distribution.doublegetVar()It returns the value of the variance of the hyperexponential distribution which is provided by the user or evaluated according to other data.voidsetMean(double value) Sets mean for a given distribution parameter.
-
Constructor Details
-
HyperExpPar
public HyperExpPar(double p, double lambda1, double lambda2) throws IncorrectDistributionParameterException It creates a new hyperexponential parameter based on the data provided by the user. This constructor takes three parameters and creates two instances of exponential distribution which are selected with probability p provided.- Parameters:
p- double containing the probability to select one of the two exponential.lambda1- double containing the value of lambda for the 1st exponential.lambda2- double containing the value of lambda for the 2nd exponential.- Throws:
IncorrectDistributionParameterException- if p is not between zero and one or if lambda1 and lambda2 are not both greater than zero.
-
HyperExpPar
public HyperExpPar(Double wp, Double wlambda1, Double wlambda2) throws IncorrectDistributionParameterException
-
-
Method Details
-
check
public boolean check()It verifies if the parameter is correct. For the hyperexponential distribution, the parameter is right if p probability is between 0 and 1 and both the lambda values are gtz. -
getP
public double getP()It returns the value of the parameter p, the probability to select one of the exponential distribution.- Returns:
- double with p the probability to select one of the exponential distribution.
-
getLambda1
public double getLambda1()It returns the value of the parameter lambda1, the parameter lambda for the 1st exponential distribution created by the hyperexponential parameter.- Returns:
- double with lambda1 the value of lambda for the 1st exponential distribution.
-
getLambda2
public double getLambda2()It returns the value of the parameter lambda2, the parameter lambda for the 2nd exponential distribution created by the hyperexponential parameter.- Returns:
- double with lambda2 the value of lambda for the 2nd exponential distribution.
-
getMean
public double getMean()It returns the value of the mean of the hyperexponential distribution which is provided by the user or evaluated according to other data.- Returns:
- double with the mean of the hyperexponential distribution.
-
getVar
public double getVar()It returns the value of the variance of the hyperexponential distribution which is provided by the user or evaluated according to other data.- Returns:
- double with the variance of the hyperexponential distribution.
-
getExpParam1
It returns the parameter used to create the 1st exponential distribution used by the hyperexponential distribution.- Returns:
- exponentialPar with expParam1 the parameter of the 1st exponential distribution.
-
getExpParam2
It returns the parameter used to create the 2nd exponential distribution used by the hyperexponential distribution.- Returns:
- exponentialPar with expParam2 the parameter of the 2nd exponential distribution.
-
setMean
Sets mean for a given distribution parameter. This method is required to adjust the mean value of a distribution into Load Dependent Service Time Strategy.
Author: Bertoli Marco- Specified by:
setMeanin interfaceParameter- Overrides:
setMeanin classAbstractParameter- Parameters:
value- New mean value for this distribution.- Throws:
IncorrectDistributionParameterException- if mean value is invalid for this distribution.
-