Class Solver

java.lang.Object
solvers.Solver
Direct Known Subclasses:
ClosedMultiToSingleSolverWrapper, SolverSingleClosedCoMoM, SolverSingleClosedExact, SolverSingleClosedMonteCarloLogistic, SolverSingleClosedMVA, SolverSingleClosedRECAL, SolverSingleOpen

public abstract class Solver extends Object
Solver is an abstract class, which contains the methods to initialize and solve models with a single class of jobs.
Version:
Date: 8-set-2003; Time: 9.43.21
Author:
Federico Granata
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    constant for delay center
    static final int
    constant for Non-preemptive Head-of-Line center
    static final int
    constant for Load Dependent service center
    static final int
    constant for Load Independent service center
    protected String[]
    array containing the names of the stations
    static final int
    constant for Preemptive Resume center
    protected double[]
    array containing the queue length of each service center
    protected double[]
    array containing the residence time of each service center.
    protected double[][]
    array of array (i.e.
    protected int
    number of resources
    protected double[]
    array containing the throughput of each service center
    protected double
    total response time
    protected double
    total throughput
    protected double
    total number of users
    protected int[]
    array containing the types of the stations
    protected double[]
    array containing the utilization of each service center
    protected double[]
    array containing the number of visits to each service center
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    returns the queue length of each service center
    double
    getQueueLen(int serv)
    returns the queue length for the requested station
    double[]
    return the residence time of each service center
    double
    getResTime(int serv)
    returns the residence time for the requested station
    double[]
    returns the throughput of each service center
    double
    getThroughput(int serv)
    returns the throughput for the requested station
    double
    returns the response time for the system
    double
    returns the throughput of the system
    double
    returns the mean number of customers in the system
    double[]
    returns the utilization of each service center
    double
    getUtilization(int serv)
    returns the utilization for the requested station
    abstract boolean
    A system is said to have sufficient capacity to process a given load lambda if no service center is saturated as a result of such a load.
    boolean
    input(String[] n, int[] t, double[][] s, double[] v)
    Initializes the solver with the model parameters.
    void
    prints all the calculated indices in the system.out it is used to debug or test the class.
    abstract void
    Must be implemented to create a single class model solver.
    generates a string with all the calculated indices.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • LD

      public static final int LD
      constant for Load Dependent service center
      See Also:
    • LI

      public static final int LI
      constant for Load Independent service center
      See Also:
    • DELAY

      public static final int DELAY
      constant for delay center
      See Also:
    • PRS

      public static final int PRS
      constant for Preemptive Resume center
      See Also:
    • HOL

      public static final int HOL
      constant for Non-preemptive Head-of-Line center
      See Also:
    • stations

      protected int stations
      number of resources
    • name

      protected String[] name
      array containing the names of the stations
    • type

      protected int[] type
      array containing the types of the stations
    • servTime

      protected double[][] servTime
      array of array (i.e. matrix) containing the service rates of the service centers [station] [population]
    • visits

      protected double[] visits
      array containing the number of visits to each service center
    • throughput

      protected double[] throughput
      array containing the throughput of each service center
    • utilization

      protected double[] utilization
      array containing the utilization of each service center
    • queueLen

      protected double[] queueLen
      array containing the queue length of each service center
    • residenceTime

      protected double[] residenceTime
      array containing the residence time of each service center. residence time = time spent in queue + time spent in service
    • totThroughput

      protected double totThroughput
      total throughput
    • totRespTime

      protected double totRespTime
      total response time
    • totUser

      protected double totUser
      total number of users
  • Constructor Details

    • Solver

      public Solver()
  • Method Details

    • input

      public boolean input(String[] n, int[] t, double[][] s, double[] v)
      Initializes the solver with the model parameters. It must be called before trying to solve the model.
      Parameters:
      n - array of n of service centers.
      t - array of the types (LD or LI) of service centers.
      s - matrix of service time of the service centers.
      v - array of visits to the service centers.
      Returns:
      true if the operation is completed with success
    • printIndices

      public void printIndices()
      prints all the calculated indices in the system.out it is used to debug or test the class.
    • toString

      public String toString()
      generates a string with all the calculated indices.
      Overrides:
      toString in class Object
      Returns:
      the string
    • getTotThroughput

      public double getTotThroughput()
      returns the throughput of the system
      Returns:
      the throughput
    • getThroughput

      public double getThroughput(int serv)
      returns the throughput for the requested station
      Parameters:
      serv - the number of the service center
      Returns:
      the throughput
    • getThroughput

      public double[] getThroughput()
      returns the throughput of each service center
      Returns:
      the throughput
    • getUtilization

      public double[] getUtilization()
      returns the utilization of each service center
      Returns:
      the utilization
    • getUtilization

      public double getUtilization(int serv)
      returns the utilization for the requested station
      Parameters:
      serv - the number of the service center
      Returns:
      the utilization
    • getQueueLen

      public double getQueueLen(int serv)
      returns the queue length for the requested station
      Parameters:
      serv - the number of the service center
      Returns:
      the queue length
    • getQueueLen

      public double[] getQueueLen()
      returns the queue length of each service center
      Returns:
      the queue length
    • getResTime

      public double getResTime(int serv)
      returns the residence time for the requested station
      Parameters:
      serv - the number of the service center
      Returns:
      the residence time
    • getResTime

      public double[] getResTime()
      return the residence time of each service center
      Returns:
      the residence time
    • getTotResTime

      public double getTotResTime()
      returns the response time for the system
      Returns:
      the residence time
    • getTotUser

      public double getTotUser()
      returns the mean number of customers in the system
      Returns:
    • hasSufficientProcessingCapacity

      public abstract boolean hasSufficientProcessingCapacity()
      A system is said to have sufficient capacity to process a given load lambda if no service center is saturated as a result of such a load.
      WARNING: This method should be called before solving the system.
      Returns:
      true if sufficient capacity exists for the given workload, false otherwise
    • solve

      public abstract void solve()
      Must be implemented to create a single class model solver.