How do I use REPORT Statement?

Calculates and reports the current statistics to the output database. This is useful to get a snapshot of the model at various points during the simulation.

The REPORT statement may be followed by the WITH RESET option to reset the statistics after the report is made to the database. When you use the WITH RESET option, you generally want to provide some periodic looping event that will call the report function at specific times.

Used with the AS option, REPORT creates a report with the name specified in the expression.

Syntax

REPORT [WITH RESET] [AS < text string >]
REPORT
REPORT WITH RESET
IF v_thruput = 50 THEN REPORT AS “RepOvr50”

text string A unique name given to the report so it can be easily identified in the General Stats dialog in the Output Program. If any reports have the same name, a number is tacked on the end of the name to make it unique.

Example

To get a snapshot report every 40 hours, schedule a “dummy entity” to arrive periodically (every 40 hours) at a “dummy activity.” In the action logic field, enter the statement REPORT WITH RESET AS 40HOUR and set the activity time to 0.

Report syntax action logic

This results in reports named, 40HOUR, 40HOUR2, 40HOUR3, etc.

 Variables are not automatically reset. You will need to manually reset the variables with the report statement if they are being used to track statistics.

 When a REPORT statement is used in a model, the final report is not generated. So unless a Report statement occurs exactly at the end of the simulation, there will likely be some additional processing that occurs. But that last bit of processing won’t be reported. Make sure the last Report statement occurs exactly at the end of simulation time.

 The “reset” doesn’t reset the number of entities in the activity. So at the start of each new report, there could be entities already in the activity. Therefore, if we add the Total Entries values for each report, we will have a number greater than the actual number of entities that entered that activity. Rather than add the Total Entries values, increment a variable in the activity in question. Then view that variable in the output report.

Logic Statements:

Was this article helpful?

Related Articles

Go to Top