Package jsl.observers.textfile
Class CSVResponseReport
- java.lang.Object
-
- jsl.observers.ModelElementObserver
-
- jsl.observers.textfile.CSVReport
-
- jsl.observers.textfile.CSVResponseReport
-
- All Implemented Interfaces:
ObserverIfc
,GetNameIfc
,IdentityIfc
public class CSVResponseReport extends CSVReport
Facilitates the collection of replication statistics for named responses to a comma separated value file. For the supplied list of responses, a CSV file is created to hold the results from each simulation replication. See SimulationDemos.demoResponseReport() for an example usage.
-
-
Field Summary
Fields Modifier and Type Field Description protected int
myRepCount
-
Fields inherited from class jsl.observers.textfile.CSVReport
myHeaderFlag, myLine, myLineWidth, myWriter, quoteChar
-
Fields inherited from class jsl.observers.ModelElementObserver
myName
-
-
Constructor Summary
Constructors Constructor Description CSVResponseReport(java.nio.file.Path pathToFile, java.util.List<java.lang.String> responseNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
afterReplication(ModelElement m, java.lang.Object arg)
protected void
beforeExperiment(ModelElement m, java.lang.Object arg)
protected void
writeHeader()
protected void
writeResponses(Model model)
-
Methods inherited from class jsl.observers.ModelElementObserver
afterExperiment, beforeReplication, getId, getModelElement, getName, initialize, montecarlo, removedFromModel, replicationEnded, setModelElement, setName, timedUpdate, toString, update, update, warmUp
-
-
-
-
Constructor Detail
-
CSVResponseReport
public CSVResponseReport(java.nio.file.Path pathToFile, java.util.List<java.lang.String> responseNames)
- Parameters:
pathToFile
- the path to the file, must not be nullresponseNames
- the model element names of the ResponseVariable, TimeWeighted, or Counter to be written to the report
-
-
Method Detail
-
beforeExperiment
protected void beforeExperiment(ModelElement m, java.lang.Object arg)
- Overrides:
beforeExperiment
in classCSVReport
-
writeHeader
protected void writeHeader()
- Specified by:
writeHeader
in classCSVReport
-
afterReplication
protected void afterReplication(ModelElement m, java.lang.Object arg)
- Overrides:
afterReplication
in classModelElementObserver
-
writeResponses
protected void writeResponses(Model model)
-
-