Class DeterministicDistrPar

java.lang.Object
random.AbstractParameter
random.DeterministicDistrPar
All Implemented Interfaces:
AutoCheck, Parameter

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

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

    • DeterministicDistrPar

      public DeterministicDistrPar(double t) throws IncorrectDistributionParameterException
      It creates a new deterministic parameter. It accepts a double greater than zero and uses this number as the constant value that will be returned.
      Parameters:
      t - Parameter of the deterministic distribution. It is the value which is always returned.
      Throws:
      IncorrectDistributionParameterException - if the provided parameter is not greater than zero.
    • DeterministicDistrPar

      public DeterministicDistrPar(Double t) throws IncorrectDistributionParameterException
      It creates a new deterministic parameter. It accepts a Double greater than zero and uses this number as the constant value that will be returned.
      Parameters:
      t - Parameter of the deterministic distribution. It is the value which is always returned.
      Throws:
      IncorrectDistributionParameterException - if the provided parameter is not greater than zero.
  • Method Details

    • check

      public boolean check()
      It controls if the parameter is correct or not. For the deterministic distribution, the parameter is correct if it is greater than zero.
      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.
    • getParameterValue

      public double getParameterValue()
      It returns the value of the parameter of the deterministic distribution, that is the constant value provided by the user.
      Returns:
      the value always returned by the distribution.
    • setParameterValue

      public void setParameterValue(double t) throws IncorrectDistributionParameterException
      It allows the user to change the value of the parameter of the deterministic distribution. It verifies if the new value is correct (must be greater than zero).
      Parameters:
      t - double indicating the new value of the parameter.
      Throws:
      IncorrectDistributionParameterException - if the provided parameter is not greater than zero.
    • 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.