public class SimpleSimQueueStat<J extends SimJob,Q extends SimQueue> extends AbstractSimQueueStat<J,Q>
SimQueue.
We call a performance measure queue-related if its value depends only on the state of the queue. By definition of a queue's state, a queue-related performance measure is a so-called simple function, i.e., in this context, a function yielding a constant value during non-trivial intervals between queue updates, and integration is easily achieved by maintaining the current value of the performance measure and the time of the last update. Note that the actual value of the function at the "switch times" is irrelevant.
Copyright (C) 2005-2017 Jan de Jongh, TNO
This file is covered by the LICENSE file in the root of this project.
| Constructor and Description |
|---|
SimpleSimQueueStat()
Constructor.
|
SimpleSimQueueStat(Q queue)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
calculateStatistics(double startTime,
double endTime)
Calculates all the statistics from the accumulated updates.
|
double |
getAvgNrOfJobs()
Returns the average number of jobs residing at the queue.
|
double |
getAvgNrOfJobsInServiceArea()
Returns the average number of jobs in the service area at the queue.
|
double |
getMaxNrOfJobs()
Returns the maximum number of jobs residing at the queue.
|
double |
getMaxNrOfJobsInServiceArea()
Returns the maximum number of jobs in the service area at the queue.
|
double |
getMinNrOfJobs()
Returns the minimum number of jobs residing at the queue.
|
double |
getMinNrOfJobsInServiceArea()
Returns the minimum number of jobs in the service area at the queue.
|
int |
getNumberOfUpdates() |
protected void |
resetStatistics()
Resets all the statistics.
|
protected void |
updateStatistics(double time,
double dt)
Updates all the statistics from the state of the queue.
|
calculate, calculate, getLastUpdateTime, getQueue, getStartTime, getStatisticsValid, notifyArrival, notifyAutoRevocation, notifyDeparture, notifyDrop, notifyNewStartArmed, notifyOutOfServerAccessCredits, notifyRegainedServerAccessCredits, notifyResetEntity, notifyRevocation, notifyStart, notifyStartQueueAccessVacation, notifyStateChanged, notifyStopQueueAccessVacation, notifyUpdate, reset, setQueue, updatepublic SimpleSimQueueStat(Q queue)
queue - The queue to gather statistics from.public SimpleSimQueueStat()
null.public final int getNumberOfUpdates()
public final double getAvgNrOfJobs()
public final double getMinNrOfJobs()
public final double getMaxNrOfJobs()
public final double getAvgNrOfJobsInServiceArea()
public final double getMinNrOfJobsInServiceArea()
public final double getMaxNrOfJobsInServiceArea()
protected void resetStatistics()
This method must be overridden with a call to super if you want to add performance measures in a subclass.
Unfortunately, you must reset the statistics yourself upon construction, because this class avoids the trickery of
calling overridable methods from its constructors.
resetStatistics in class AbstractSimQueueStat<J extends SimJob,Q extends SimQueue>protected void updateStatistics(double time,
double dt)
This method must be overridden with a call to super if you want to add performance measures in a subclass.
updateStatistics in class AbstractSimQueueStat<J extends SimJob,Q extends SimQueue>time - The actual (new) time.dt - The time since the last update.protected void calculateStatistics(double startTime,
double endTime)
This method must be overridden with a call to super if you want to add performance measures in a subclass.
calculateStatistics in class AbstractSimQueueStat<J extends SimJob,Q extends SimQueue>startTime - The start time of the statistics gathering.endTime - The last time the statistic was updated.Copyright © 2018. All rights reserved.