Class SolverMulti
java.lang.Object
solvers.queueingnet.amva.SolverMulti
- Direct Known Subclasses:
AMVA
SolverMulti is an abstract class, which contains the methods initialize and
solve multiclass models.
- Author:
- Federico Granata, Stefano Omini
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intnumber of classesstatic final intconstant for Closed Classprotected double[]average number of users for each class
[class]protected double[]response time for each class
[class]protected double[]throughput for each class
[class]static final intconstant for delay centerstatic final intconstant for Load Dependent service centerstatic final intconstant for Load Independent service centerprotected String[]array of names of service centersstatic final intconstant for Open Classprotected PrintWriterPrinter writer: print formatted representations of objects to a text-output streamprotected double[][]queue length for each service station, class
[station] [class]protected double[][]residence time for each service station, class
[station] [class]protected double[]queue length of the service centers
[station]protected double[]residence time of the service centers
[station]protected double[]throughputs of the service centers
[station]protected double[]utilization of the service centers
[station]protected int[]array of number of servers for each service centerprotected double[][][]service times for each service station, class, population
[station] [class] [population]protected intnumber of service centersprotected doubleNumber of jobs in the systemprotected doubleSystem response timeprotected doubleSystem throughputprotected double[][]throughput for each service station, class
[station] [class]protected int[]array of types of service centersprotected double[][]utilization for each service station, class
[station] [class]protected double[][]visits for each service station, class
[station] [class] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]Returns the queue length for each service centerdoublegetAggrQueueLen(int cent) Returns the queue length for the requested service centerdouble[]Returns the residence time for each service centerdoublegetAggrResTime(int cent) Returns the residence time for the requested service centerdouble[]Returns the throughput for each service centerdoublegetAggrThroughput(int cent) Returns the throughput for the requested service centerdouble[]Returns the utilization for each service centerdoublegetAggrUtilization(int cent) Returns the utilization for the requested service centerdouble[]Returns the response time of the whole system for each customer classdoublegetClsResTime(int cls) Returns the response time of the whole system for the requested customer classdouble[]Returns the throughput of the whole system for each customer classdoublegetClsThroughput(int cls) Returns the throughput of the whole system for the requested customer classdouble[][]Returns the queue length of each class for each stationdoublegetQueueLen(int cent, int cls) Returns the queue length of the given class for the requested stationdouble[][]Returns the residence time of each class for each stationdoublegetResTime(int cent, int cls) Returns the residence time of the given class for the requested stationdouble[][]Returns the throughput of each class for each stationdoublegetThroughput(int cent, int cls) Returns the throughput of the given class for the requested stationdoubleReturns the response time of the systemdoubleReturns the throughput of the systemdouble[][]Returns the throughput of each class for each stationdoublegetUtilization(int cent, int cls) Returns the utilization of the given class for the requested stationabstract booleanA system is said to have sufficient capacity to process a given loadlambdaif no service center is saturated as a result of the combined loads of all the classes.booleanInitializes the Multiclass solver with the model parameters.voidPrints all the calculated indices in the system.out.abstract voidsolve()Must be implemented to create a multi class model solver.
-
Field Details
-
LD
public static final int LDconstant for Load Dependent service center- See Also:
-
LI
public static final int LIconstant for Load Independent service center- See Also:
-
DELAY
public static final int DELAYconstant for delay center- See Also:
-
OPEN_CLASS
public static final int OPEN_CLASSconstant for Open Class- See Also:
-
CLOSED_CLASS
public static final int CLOSED_CLASSconstant for Closed Class- See Also:
-
stations
protected int stationsnumber of service centers -
classes
protected int classesnumber of classes -
name
array of names of service centers -
type
protected int[] typearray of types of service centers -
servers
protected int[] serversarray of number of servers for each service center -
servTime
protected double[][][] servTimeservice times for each service station, class, population
[station] [class] [population] -
visits
protected double[][] visitsvisits for each service station, class
[station] [class] -
throughput
protected double[][] throughputthroughput for each service station, class
[station] [class] -
utilization
protected double[][] utilizationutilization for each service station, class
[station] [class] -
queueLen
protected double[][] queueLenqueue length for each service station, class
[station] [class] -
residenceTime
protected double[][] residenceTimeresidence time for each service station, class
[station] [class] -
scThroughput
protected double[] scThroughputthroughputs of the service centers
[station] -
scUtilization
protected double[] scUtilizationutilization of the service centers
[station] -
scQueueLen
protected double[] scQueueLenqueue length of the service centers
[station] -
scResidTime
protected double[] scResidTimeresidence time of the service centers
[station] -
clsRespTime
protected double[] clsRespTimeresponse time for each class
[class] -
clsThroughput
protected double[] clsThroughputthroughput for each class
[class] -
clsNumJobs
protected double[] clsNumJobsaverage number of users for each class
[class] -
sysResponseTime
protected double sysResponseTimeSystem response time -
sysThroughput
protected double sysThroughputSystem throughput -
sysNumJobs
protected double sysNumJobsNumber of jobs in the system -
pw
Printer writer: print formatted representations of objects to a text-output stream
-
-
Constructor Details
-
SolverMulti
public SolverMulti(int classes, int stations) Creates a multiclasss solver- Parameters:
classes- number of classes.stations- number of stations.
-
-
Method Details
-
input
Initializes the Multiclass solver with the model parameters.- Parameters:
n- array of names of service centers.t- array of the types (LD or LI) of service centers.s- matrix of service time of the service centers.v- matrix of visits to the service centers.- Returns:
- true if the operation is completed with success
-
solve
public abstract void solve()Must be implemented to create a multi class model solver. -
hasSufficientProcessingCapacity
public abstract boolean hasSufficientProcessingCapacity()A system is said to have sufficient capacity to process a given loadlambdaif no service center is saturated as a result of the combined loads of all the classes.
Must be implemented to create a multi class model solver.
WARNING: This method should be called before solving the system.- Returns:
- true if sufficient capacity exists for the given workload, false otherwise
-
getThroughput
public double getThroughput(int cent, int cls) Returns the throughput of the given class for the requested station- Parameters:
cent- the number of the service centercls- the customer class- Returns:
- the throughput
-
getThroughput
public double[][] getThroughput()Returns the throughput of each class for each station- Returns:
- the throughput[center][class] matrix for the system
-
getUtilization
public double getUtilization(int cent, int cls) Returns the utilization of the given class for the requested station- Parameters:
cent- the number of the service centercls- the customer class- Returns:
- the utilization
-
getUtilization
public double[][] getUtilization()Returns the throughput of each class for each station- Returns:
- the utilization[center][class] matrix for the system
-
getQueueLen
public double getQueueLen(int cent, int cls) Returns the queue length of the given class for the requested station- Parameters:
cent- the number of the service centercls- the customer class- Returns:
- the queue length
-
getQueueLen
public double[][] getQueueLen()Returns the queue length of each class for each station- Returns:
- the queueLen[center][class] matrix for the system
-
getResTime
public double getResTime(int cent, int cls) Returns the residence time of the given class for the requested station- Parameters:
cent- the number of the service centercls- the customer class- Returns:
- the residence time
-
getResTime
public double[][] getResTime()Returns the residence time of each class for each station- Returns:
- the residenceTime[center][class] matrix for the system
-
getAggrThroughput
public double getAggrThroughput(int cent) Returns the throughput for the requested service center- Parameters:
cent- the number of the service center- Returns:
- the throughput
-
getAggrThroughput
public double[] getAggrThroughput()Returns the throughput for each service center- Returns:
- the throughput for each service center in the system
-
getAggrUtilization
public double getAggrUtilization(int cent) Returns the utilization for the requested service center- Parameters:
cent- the number of the service center- Returns:
- the utilization
-
getAggrUtilization
public double[] getAggrUtilization()Returns the utilization for each service center- Returns:
- the utilization for each service center in the system
-
getAggrQueueLen
public double getAggrQueueLen(int cent) Returns the queue length for the requested service center- Parameters:
cent- the number of the service center- Returns:
- the queue length
-
getAggrQueueLen
public double[] getAggrQueueLen()Returns the queue length for each service center- Returns:
- the queue length for each service center in the system
-
getAggrResTime
public double getAggrResTime(int cent) Returns the residence time for the requested service center- Parameters:
cent- the number of the service center- Returns:
- the residence time
-
getAggrResTime
public double[] getAggrResTime()Returns the residence time for each service center- Returns:
- the residence time for each service center in the system
-
getClsResTime
public double getClsResTime(int cls) Returns the response time of the whole system for the requested customer class- Parameters:
cls- the customer class- Returns:
- the response time
-
getClsResTime
public double[] getClsResTime()Returns the response time of the whole system for each customer class- Returns:
- the overall response time for each customer class in the system
-
getClsThroughput
public double getClsThroughput(int cls) Returns the throughput of the whole system for the requested customer class- Parameters:
cls- the customer class- Returns:
- the overall throughput
-
getClsThroughput
public double[] getClsThroughput()Returns the throughput of the whole system for each customer class- Returns:
- the overall throughput for each customer class in the system
-
getTotResTime
public double getTotResTime()Returns the response time of the system- Returns:
- the response time
-
getTotThroughput
public double getTotThroughput()Returns the throughput of the system- Returns:
- the throughput
-
printIndices
public void printIndices()Prints all the calculated indices in the system.out. It is used to debug or test the class.
-