Class WeibullPar
java.lang.Object
random.AbstractParameter
random.WeibullPar
This is the parameter that should be passed to the Weibull
distribution.
Copyright (c) 2021
Imperial College London
Copyright (c) 2021
Imperial College London
- Author:
- Giuliano Casale, g.casale@imperial.ac.uk
-
Constructor Summary
ConstructorsConstructorDescriptionWeibullPar(double alpha, double r) It creates a new Weibull parameter with the information provided by the user.WeibullPar(Double walpha, Double wr) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheck()It controls if the parameters are correct or not.doublegetAlpha()It returns the parameter alpha of the erlang distribution, also called the "scale" parameter.doublegetR()It returns the parameter r of the erlang distribution, also called the "shape" parameter.voidsetAlpha(double alpha) It allows the user to modify the value of the parameter alpha of the erlang distribution.voidsetMean(double value) Sets mean for a given distribution parameter.voidsetR(double r) It allows the user to modify the value of the parameter r of the erlang distribution.
-
Constructor Details
-
WeibullPar
It creates a new Weibull parameter with the information provided by the user.- Parameters:
alpha- double containing the "scale" parameter (must be greater than zero).r- double containing the "shape" parameter (must be greater than zero).- Throws:
IncorrectDistributionParameterException- if any of the double provided is less than or equal to zero.
-
WeibullPar
-
-
Method Details
-
check
public boolean check()It controls if the parameters are correct or not. For the erlang distribution, the parameters are right if they are both greater than zero. -
getAlpha
public double getAlpha()It returns the parameter alpha of the erlang distribution, also called the "scale" parameter.- Returns:
- double with alpha which is the "scale" parameter.
-
getR
public double getR()It returns the parameter r of the erlang distribution, also called the "shape" parameter.- Returns:
- double with r which is the "shape" parameter.
-
setAlpha
It allows the user to modify the value of the parameter alpha of the erlang distribution. It verifies that the new value is correct. Alpha must be greater than zero.- Parameters:
alpha- double indicating the new value of the parameter alpha.- Throws:
IncorrectDistributionParameterException- if the provided parameter is less than or equal to zero.
-
setR
It allows the user to modify the value of the parameter r of the erlang distribution. It verifies that the new value is correct. r must be greater than zero.- Parameters:
r- double indicating the new value of the parameter r.- Throws:
IncorrectDistributionParameterException- if the provided parameter is less than or equal to zero.
-
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.
-