Class HyperExpPar

All Implemented Interfaces:
AutoCheck, Parameter

public class HyperExpPar extends AbstractParameter implements Parameter
This is the parameter that should be passed to the Hyperexponential distribution.

Copyright (c) 2003
Politecnico di Milano - dipartimento di Elettronica e Informazione
Author:
Fabrizio Frontera - ffrontera@yahoo.it
  • Constructor Summary

    Constructors
    Constructor
    Description
    HyperExpPar(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 Type
    Method
    Description
    boolean
    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.
    double
    It returns the value of the parameter lambda1, the parameter lambda for the 1st exponential distribution created by the hyperexponential parameter.
    double
    It returns the value of the parameter lambda2, the parameter lambda for the 2nd exponential distribution created by the hyperexponential parameter.
    double
    It returns the value of the mean of the hyperexponential distribution which is provided by the user or evaluated according to other data.
    double
    It returns the value of the parameter p, the probability to select one of the exponential distribution.
    double
    It returns the value of the variance of the hyperexponential distribution which is provided by the user or evaluated according to other data.
    void
    setMean(double value)
    Sets mean for a given distribution parameter.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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
      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.
      Specified by:
      check in interface AutoCheck
      Specified by:
      check in interface Parameter
      Overrides:
      check in class AbstractParameter
      Returns:
      boolean indicating if the parameter is correct or not.
    • 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

      public ExponentialPar 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

      public ExponentialPar 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

      public void setMean(double value) throws IncorrectDistributionParameterException
      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:
      setMean in interface Parameter
      Overrides:
      setMean in class AbstractParameter
      Parameters:
      value - New mean value for this distribution.
      Throws:
      IncorrectDistributionParameterException - if mean value is invalid for this distribution.