tut03 - Adding Statistical Output
- Example tut03:
- queuing system with statistical output
- current queue length
- current utilization of the server
- total throughput time of the entities (waiting
time + processing time)
- model
- getting statistical data
- output nq of queue
- output n of server
+ am_utilization component
- storing times inside entities
- Working with attributes:
- attributes = internal data fields in an entity with
name and value
- library components for attributes
- am_adddata adds data
fields to the input object
- am_writedata changes
value of an incoming data field, possibly using values from
other fields
- am_readdata outputs
value of an attribute of the input entity
- am_deletedata deletes
data fields from the input object
- getting throughput time
- am_adddata creates
attribute startTime = 0
- am_writedata
sets startTime = get_time()
- am_writedata1
sets startTime = get_time() -
startTime
- am_readdata
outputs startTime
- Simulation results: