Class WeibullPar

All Implemented Interfaces:
AutoCheck, Parameter

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

Copyright (c) 2021
Imperial College London
Author:
Giuliano Casale, g.casale@imperial.ac.uk
  • Constructor Summary

    Constructors
    Constructor
    Description
    WeibullPar(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 Type
    Method
    Description
    boolean
    It controls if the parameters are correct or not.
    double
    It returns the parameter alpha of the erlang distribution, also called the "scale" parameter.
    double
    It returns the parameter r of the erlang distribution, also called the "shape" parameter.
    void
    setAlpha(double alpha)
    It allows the user to modify the value of the parameter alpha of the erlang distribution.
    void
    setMean(double value)
    Sets mean for a given distribution parameter.
    void
    setR(double r)
    It allows the user to modify the value of the parameter r of the erlang distribution.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • 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.
      Specified by:
      check in interface AutoCheck
      Specified by:
      check in interface Parameter
      Overrides:
      check in class AbstractParameter
      Returns:
      boolean indicating if the parameters are correct or not.
    • 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

      public void setAlpha(double alpha) throws IncorrectDistributionParameterException
      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

      public void setR(double r) throws IncorrectDistributionParameterException
      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

      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.