public class SimpleSimQueueVisitsStat<J extends SimJob,Q extends SimQueue> extends AbstractSimQueueStat<J,Q>
SimQueue.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 |
|---|
SimpleSimQueueVisitsStat()
Constructor.
|
SimpleSimQueueVisitsStat(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 |
getAvgSojournTime()
Returns the average sojourn time at the queue.
|
double |
getAvgWaitingTime()
Returns the average waiting time at the queue.
|
double |
getMaxSojournTime()
Returns the maximum sojourn time at the queue.
|
double |
getMaxWaitingTime()
Returns the maximum waiting time at the queue.
|
double |
getMinSojournTime()
Returns the minimum sojourn time at the queue.
|
double |
getMinWaitingTime()
Returns the minimum waiting time at the queue.
|
int |
getNumberOfArrivals()
Returns the number of arrivals.
|
int |
getNumberOfAutoRevocations()
Returns the number of auto-revoked jobs.
|
int |
getNumberOfDepartures()
Returns the number of departures.
|
int |
getNumberOfExits()
Returns the number of job exits.
|
int |
getNumberOfJobsDropped()
Returns the number of dropped jobs.
|
int |
getNumberOfRevocations()
Returns the number of revoked jobs (not auto-revoked).
|
int |
getNumberOfStartedJobs()
Returns the number of started jobs.
|
void |
notifyArrival(double time,
J job,
Q queue)
Does nothing.
|
void |
notifyAutoRevocation(double time,
J job,
Q queue)
Does nothing.
|
void |
notifyDeparture(double time,
J job,
Q queue)
Does nothing.
|
void |
notifyDrop(double time,
J job,
Q queue)
Does nothing.
|
void |
notifyRevocation(double time,
J job,
Q queue)
Does nothing.
|
void |
notifyStart(double time,
J job,
Q queue)
Does nothing.
|
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, notifyNewStartArmed, notifyOutOfServerAccessCredits, notifyRegainedServerAccessCredits, notifyResetEntity, notifyStartQueueAccessVacation, notifyStateChanged, notifyStopQueueAccessVacation, notifyUpdate, reset, setQueue, updatepublic SimpleSimQueueVisitsStat(Q queue)
queue - The queue to gather statistics from.public SimpleSimQueueVisitsStat()
null.public final int getNumberOfArrivals()
public final int getNumberOfJobsDropped()
public final int getNumberOfRevocations()
public final int getNumberOfAutoRevocations()
public final int getNumberOfStartedJobs()
public final int getNumberOfDepartures()
public final int getNumberOfExits()
public final double getAvgWaitingTime()
The average is taken over all jobs that started.
Double.NaN in case no job has started (yet).public final double getAvgSojournTime()
The average is taken over all jobs that departed; ignoring jobs that left the queue through other means.
Double.NaN in case no job has departed (yet).public final double getMinWaitingTime()
The minimum is taken over all jobs that started.
Double.NaN in case no job has started (yet).public final double getMinSojournTime()
The minimum is taken over all jobs that departed; ignoring jobs that left the queue through other means.
Double.NaN in case no job has departed (yet).public final double getMaxWaitingTime()
The maximum is taken over all jobs that started.
Double.NaN in case no job has started (yet).public final double getMaxSojournTime()
The maximum is taken over all jobs that departed; ignoring jobs that left the queue through other means.
Double.NaN in case no job has departed (yet).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.public void notifyArrival(double time,
J job,
Q queue)
AbstractSimQueueStatnotifyArrival in interface SimJQListener<J extends SimJob,Q extends SimQueue>notifyArrival in class AbstractSimQueueStat<J extends SimJob,Q extends SimQueue>time - The (current) time.job - The job.queue - The queue.SimQueue.arrive(double, J)public void notifyStart(double time,
J job,
Q queue)
AbstractSimQueueStatnotifyStart in interface SimJQListener<J extends SimJob,Q extends SimQueue>notifyStart in class AbstractSimQueueStat<J extends SimJob,Q extends SimQueue>time - The (current) time.job - The job.queue - The queue.public void notifyDrop(double time,
J job,
Q queue)
AbstractSimQueueStatnotifyDrop in interface SimJQListener<J extends SimJob,Q extends SimQueue>notifyDrop in class AbstractSimQueueStat<J extends SimJob,Q extends SimQueue>time - The (current) time.job - The job.queue - The queue.public void notifyRevocation(double time,
J job,
Q queue)
AbstractSimQueueStatnotifyRevocation in interface SimJQListener<J extends SimJob,Q extends SimQueue>notifyRevocation in class AbstractSimQueueStat<J extends SimJob,Q extends SimQueue>time - The (current) time.job - The job.queue - The queue.SimQueue.revoke(double, J, boolean)public void notifyAutoRevocation(double time,
J job,
Q queue)
AbstractSimQueueStatnotifyAutoRevocation in interface SimJQListener<J extends SimJob,Q extends SimQueue>notifyAutoRevocation in class AbstractSimQueueStat<J extends SimJob,Q extends SimQueue>time - The (current) time.job - The job.queue - The queue.SimQueue.getAutoRevocationPolicy()public void notifyDeparture(double time,
J job,
Q queue)
AbstractSimQueueStatnotifyDeparture in interface SimJQListener<J extends SimJob,Q extends SimQueue>notifyDeparture in class AbstractSimQueueStat<J extends SimJob,Q extends SimQueue>time - The (current) time.job - The job.queue - The queue.Copyright © 2018. All rights reserved.