SimulationReporter

class SimulationReporter(theModel: Model)

This class facilitates simulation output reporting. There are two main reporting functions: within replication statistics and across replication statistics. The class automatically reports within replication and across replication statistics to comma separated value files by attaching observers to the model. If you do not want this automated output, then you should use the appropriate turnOffXXX methods.

This class attaches a CSVReplicationReport to the model for collection purposes. If the simulation is run multiple times, then statistical data continues to be observed by the CSVReplicationReport, unless it is turned off. Thus, data across many experiments can be captured in this manner. This produces a comma separated value file containing all end of replication statistical summaries for every counter and response variable in the model.

There are a number of options available if you want to capture across replication statistics.

The class uses a CSVExperimentReport to observe the model. This produces a comma separated value file containing all across replication statistical summaries for every counter and response variable in the model.

Use any of the writeAcrossReplicationX() methods. These methods will write across replication summary statistics to files, standard output, LaTeX, CSV, etc.

Author

rossetti

Constructors

Link copied to clipboard
constructor(theModel: Model)

Properties

Link copied to clipboard

A convenience method. Gets the counters from the model

Link copied to clipboard

A convenience method. Gets the frequencies from the model

Link copied to clipboard

A convenience method. Gets the histograms from the model

Link copied to clipboard

A convenience method. Gets the response variables from the model

Functions

Link copied to clipboard

Uses a StringBuilder to hold the across replication statistics formatted as a comma separated values with an appropriate header

Link copied to clipboard

Fills the StringBuilder with across replication statistics

Link copied to clipboard

Returns the across replication statistics as a data frame with confidence intervals specified by the provided level.

Returns a StringBuilder representation of the across replication statistics as a LaTeX document

Link copied to clipboard

List of StringBuilder representing LaTeX tables

Gets shortened across replication statistics for response variables as a LaTeX tabular. Each StringBuilder in the list represents a tabular with a maximum number of rows

Link copied to clipboard

Gets the across replication statistics as a list

Link copied to clipboard

Fills the supplied list with the across replication statistics

Link copied to clipboard

Fills the list with across replication statistics from the Counters

Link copied to clipboard

Fills the list with across replication statistics from the response variables (Response and TWResponse).

Link copied to clipboard

Returns all frequency response results as a string

Link copied to clipboard
fun halfWidthSummaryReport(title: String? = null, confLevel: Double = 0.95): StringBuilder
Link copied to clipboard

Returns all histogram results as a string

Link copied to clipboard

Prints the across replication statistics as comma separated values

Link copied to clipboard

Writes the across replication statistics as text values to System.out

Link copied to clipboard

Writes the across replication statistics as text values to System.out

Link copied to clipboard
fun printHalfWidthSummaryReport(title: String? = null, confLevel: Double = 0.95)
Link copied to clipboard

Writes the across replication statistics to the supplied PrintWriter as comma separated value output

Creates a PrintWriter with the supplied name in directory jslOutput and writes out the across replication statistics

fun writeAcrossReplicationCSVStatistics(fName: String = model.simulationName + "_AcrossRepCSVStatistics.csv"): PrintWriter

Creates a PrintWriter with the supplied name in default output directory for the simulation writes out the across replication statistics

Link copied to clipboard

Writes shortened across replication statistics to the supplied PrintWriter as text output

Creates a PrintWriter with the supplied name in directory within jslOutput and writes out the across replication statistics

fun writeAcrossReplicationSummaryStatistics(fName: String = model.simulationName + "_SummaryStatistics.txt"): PrintWriter

Creates a PrintWriter with the supplied name in directory jslOutput and writes out the across replication statistics

Creates a file with name getSimulation().getName() + "_LaTeX_Across_Replication_Summary.tex" in the simulation's output directory with the results as a LaTeX table.

Writes shortened across replication statistics to the supplied PrintWriter as text output in LaTeX document form

Creates a PrintWriter using the supplied path and writes out the across replication statistics as a LaTeX file

Creates a file with the supplied name in the simulation's output directory with the results as a LaTeX table.

Link copied to clipboard

Writes the full across replication statistics to the supplied PrintWriter as text output. Full means all statistical quantities are printed for every statistic

Creates a PrintWriter with the supplied path and writes the full statistics to the file. Full means all detailed statistical quantities for every statistic.

fun writeFullAcrossReplicationStatistics(fName: String = model.simulationName + "_FullAcrossRepStatistics.txt"): PrintWriter

Creates a PrintWriter with the supplied name in the default output directory for the model writes out the across replication statistics.

Link copied to clipboard
fun writeHalfWidthSummaryReport(out: PrintWriter = PrintWriter(System.out), title: String? = null, confLevel: Double = 0.95)
Link copied to clipboard
fun writeHalfWidthSummaryReportAsMarkDown(out: PrintWriter = PrintWriter(System.out), title: String? = null, confLevel: Double = 0.95, df: DecimalFormat? = null)