|
Loading
|
||||
Queue system queue delayA number of monitors for the Queue system example net illustrate different ways to measure the amount of time that jobs wait in the queue. Queue delay
This is a generic data collector monitor that is associated with the
Each job is represented by a record, and the record contains a field named This data collector monitor can be used to calculate several interesting statistics, such as the average and maximum queue delays and how many jobs passed through the queue during a simulation. This monitor calculates untimed statistics. The data collector monitoring functions for the monitor are described below. Predicate function
The predicate function for the monitor is invoked each time the transition
fun pred (bindelem) =
let
fun predBindElem (Server'Start (1, {jobs, job,proctime})) = true
| predBindElem _ = false
in
predBindElem bindelem
end
Observation function
This observation function invoked every time the above predicate function returns true, i.e. it will be invoked every time the
fun obs (bindelem) =
let
fun obsBindElem (Server'Start (1, {jobs, job,proctime})) =
(intTime()-(#AT job))
| obsBindElem _ = ~1
in
obsBindElem bindelem
end
Each time the Initialization and stop functions
This monitor does not need to collect data either before a simulation starts or when simulation stop criteria are fulfilled. Therefore, both the initialization and stop functions return the value fun init () = NONE fun stop () = NONE Queue delay real
This monitor is very similar to the
fun obs (bindelem) =
let
fun obsBindElem (Server'Start (1, {jobs, job,proctime})) =
Real.fromInt(intTime()-(#AT job))
| obsBindElem _ = ~1.0
in
obsBindElem bindelem
end
Queue delay IntInf
This monitor is also very similar to the Long delay times
This generic data collector monitor is used to calculate the proportion of jobs that have to wait in the queue for a long time. The reference variable
The monitor is associated with the The initialization and stop functions return the value NONE.
The predicate function returns true whenever the
The observation function accesses the last value that was collected by the “Queue Delay” monitor, using the fun obs (bindelem) = if IntInf.toInt(Queue_Delay.last()) >= (!longdelaytime) then 1 else 0 The sum for this monitor will indicate how many jobs had long waiting times, while the average for this monitor will indicate the proportion of jobs that had long waiting times.
Each time the Related pagesQueue System, Queue system queue length, Queue System Server Utilization, Queue System Miscellaneous Monitors |
||||