Statistical Data Collectors

Using a Counter

The Report

   
 

The model report now includes a section for Count objects where both of our new counters list their results.

CountExampleExperiment Report

Model CountExample

Description
This is a simple process-oriented model of the railway station inside a container terminal using bins to represent different storage areas. Container ships arrive at the terminal and deliver containers to the storage areas. From there they are loaded onto trains that leave for four different destinations: Northern, Central, and Eastern Europe and Germany. Each destination is allocated a storage area (Bin). Trains only load containers from the storage area that is associated with their destination whereas ships deliver containers to all storage areas.
Two counters are added to record the number of trains leaving the terminal and the overall number of containers exchanged. Report drawn at 1500.0. Last reset at 0.0.


Counts

Title
(Re)set
Obs
Current Value
Min
Max
number of trains0.03431343103431
number of containers0.034312056850205685


Bins

Title
Order
pass
(Re)set
Prod
Cons
Init
Max
Now
Averg.
avg.Wait
QLimit
QMaxL
refus.
Eastern EuropeFIFOno0.0250853509825476.68291.24983unlimit.10
Northern EuropeFIFOno0.025088050916076.502061.19614unlimit.10
Central EuropeFIFOno0.0250822506036966.305631.3146unlimit.10
GermanyFIFOno0.025087650745274.204161.20516unlimit.10


Distributions

Title
(Re)set
Obs
Type
Parameter 1
Parameter 2
Seed
Ships Arrival Stream0.0251Negative Exponential6.0 91080577
No of containers per destination0.01000Integer Uniform25.0400.071529105
Train Length Stream0.03435Integer Uniform30.090.043946618

By the way: The four Bin objects show that our counter for the number of trains is working correctly. If you add the values listed under Cons (consumers) for the four bins, you get the 3,431 trains that have departed from the terminal during the simulation run.

You may download the full source code of this example if you want to try it out yourself.



   
  http://desmoj.sourceforge.net/tutorial/statistics/counter2.html