Class ServiceTimeStrategy

java.lang.Object
NetStrategies.ServiceStrategy
NetStrategies.ServiceStrategies.ServiceTimeStrategy
All Implemented Interfaces:
AutoCheck

public class ServiceTimeStrategy extends ServiceStrategy
This strategy calculates the time of service of a job, using the specified distribution and parameters.
  • Field Details

    • distribution

      protected Distribution distribution
      Service time distribution.
    • parameter

      protected Parameter parameter
      Distribution parameters.
  • Constructor Details

    • ServiceTimeStrategy

      public ServiceTimeStrategy()
      Creates a new instance of ServiceTime.
    • ServiceTimeStrategy

      public ServiceTimeStrategy(Distribution distribution, Parameter parameter)
      Creates a new instance of ServiceTime.
      Parameters:
      distribution - service time distribution.
      parameter - distribution parameter.
  • Method Details

    • setDistribution

      public boolean setDistribution(Distribution distribution)
      Sets the distribution.
      Parameters:
      distribution - the distribution to be used by this strategy.
      Returns:
      true, if distribution has been set.
    • setParameter

      public boolean setParameter(Parameter parameter)
      Sets the parameters of the distribution.
      Parameters:
      parameter - the parameter object.
      Returns:
      true, if parameters have been set.
    • wait

      public double wait(NodeSection nodeSection, JobClass jobClass) throws NetException
      Calculates the service time using the specified distribution.
      Specified by:
      wait in class ServiceStrategy
      Parameters:
      nodeSection - the node section which applies this strategy.
      jobClass - the job class which follows this strategy.
      Returns:
      the value of service time.
      Throws:
      NetException
    • expect

      public double expect(NodeSection nodeSection, JobClass jobClass) throws NetException
      Calculates the service mean using the specified distribution.
      Specified by:
      expect in class ServiceStrategy
      Parameters:
      nodeSection - the node section which applies this strategy.
      jobClass - the job class which follows this strategy.
      Returns:
      the value of service mean.
      Throws:
      NetException
    • getDistribution

      public Distribution getDistribution()
    • getParameter

      public Parameter getParameter()
    • getRand

      public double getRand()