AnyLogic
Expand
Font size

TimeMeasureEnd

TimeMeasureEnd as well as TimeMeasureStart compose a pair of blocks measuring the time the agents spend between them (given points in a flowchart), such as "time in system", "length of stay", etc.

For each incoming agent this block measures the time it spent since it has been through one of the corresponding TimeMeasureStart blocks. There can be more than one TimeMeasureEnd block referencing a number of TimeMeasureStart blocks.

The statistics collected is available in the form of a distribution (HistogramData element distribution) and in the form of a dataset (Dataset element dataset).

Agents do not spend any time at this block.

Parameters

TimeMeasureStart blocks
Specify one or several TimeMeasureStart blocks where time measuring starts (and ends here, in this TimeMeasureEnd block). Add blocks into the list either by clicking the button and choosing the names from the list, or clicking the button and selecting the required blocks in the graphical editor
Syntax: TimeMeasureStart[] startObjects
Dataset capacity
Capacity of the block's dataset where the time measure history is kept — maximum number of data samples that can be stored in this dataset.
Syntax: int datasetCapacity
Default value: 100
Set new value dynamically: set_datasetCapacity(new value)

Actions

On enter
Code executed when the agent enters the block.
Local variable: T agent — the agent

Variables

DataSet dataset
Data set that stores for each incoming agent the time it spent since it has been through one of the corresponding TimeMeasureStart blocks.
HistogramData distribution
Histogram data element that stores distribution of time agents spent since they have been through one of the corresponding TimeMeasureStart.

Functions

Reset statistics
Function Description
void resetStats() Resets the statistics collected for this block in dataset and distribution data items.

Ports

in
The input port.
out
The output port.
How can we improve this article?