|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.lenkaspace.creeper.report.CRBaseReport net.lenkaspace.creeper.report.CRCsvReport
public class CRCsvReport
Can create csv reports of the whole simulation and organize values as: Run1_Trial1_value1, Run1_Trial1_value2, Run1_Trial1_value3, ... Run2_Trial1_value1, Run2_Trial1_value2, Run2_Trial1_value3, ... ... Run1_Trial2_value1, Run1_Trial2_value2, Run1_Trial2_value3, ... Run2_Trial2_value1, Run2_Trial2_value2, Run2_Trial2_value3, ... For better performance, maintain an instance that opens and closes with (updated) data rather than creating a new popup every time.
Constructor Summary | |
---|---|
CRCsvReport(java.lang.String title_,
java.lang.String[] variableNames_,
java.awt.Dimension size_)
Constructor |
Method Summary | |
---|---|
void |
addValue(java.lang.String variableName_,
double value_)
Put a new value for a specific trial, run and variable name to the value set |
void |
addValue(java.lang.String variableName_,
java.lang.String value_)
Put a new value for a specific trial, run and variable name to the value set |
void |
addValue(java.lang.String variableName_,
java.lang.String value_,
int trialNumber_,
int runNumber_)
Put a new value for a specific trial, run and variable name to the value set |
void |
addValueSet(double[] values_)
Put array of values for a specific trial and run to the value set The value set size should be the same as size of set names the report was initialised with. |
void |
addValueSet(double[] values_,
int trialNumber_,
int runNumber_)
Put array of values for a specific trial and run to the value set The value set size should be the same as size of set names the report was initialised with. |
void |
addValueSet(java.lang.String[] values_)
Put array of values for a specific trial and run to the value set The value set size should be the same as size of set names the report was initialised with. |
void |
addValueSet(java.lang.String[] values_,
int trialNumber_,
int runNumber_)
Put array of values for a specific trial and run to the value set The value set size should be the same as size of set names the report was initialised with. |
void |
createSelf(java.lang.String printToFileName_,
boolean show_)
Create a window of the report. |
void |
onSimulationEnd()
Called by CRController each time a simulation ends Use this to save any simulation-persisting data |
void |
onSimulationStart()
Called by CRController each time a new simulation starts Use this to reset any simulation-persisting data |
Methods inherited from class net.lenkaspace.creeper.report.CRBaseReport |
---|
display, getDisplaysWindow, getFileName, onRunEnd, onRunStart, onTrialEnd, onTrialStart, onUpdateLoopEnd, onUpdateLoopStart, setController, setReportController |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CRCsvReport(java.lang.String title_, java.lang.String[] variableNames_, java.awt.Dimension size_)
title_
- String title of the reportvariableNames_
- String array of variable names to identify different setssize_
- Dimension size of the report windowMethod Detail |
---|
public void onSimulationStart()
onSimulationStart
in class CRBaseReport
public void onSimulationEnd()
onSimulationEnd
in class CRBaseReport
public void addValueSet(double[] values_)
values_
- double[] array of valuespublic void addValueSet(double[] values_, int trialNumber_, int runNumber_)
values_
- double[] array of valuestrialNumber_
- int trial number <1;totalTrials>runNumber_
- int run number <1;totalRuns>public void addValueSet(java.lang.String[] values_)
values_
- String[] array of valuespublic void addValueSet(java.lang.String[] values_, int trialNumber_, int runNumber_)
values_
- String[] array of valuespublic void addValue(java.lang.String variableName_, double value_)
variableName_
- String new value namevalue_
- double new valuepublic void addValue(java.lang.String variableName_, java.lang.String value_)
variableName_
- String new value namevalue_
- String new valuepublic void addValue(java.lang.String variableName_, java.lang.String value_, int trialNumber_, int runNumber_)
variableName_
- String new value namevalue_
- String new valuetrialNumber_
- int trial number <1;totalTrials>runNumber_
- int run number <1;totalRuns>public void createSelf(java.lang.String printToFileName_, boolean show_)
createSelf
in class CRBaseReport
printToFileName_
- String file name to print report into, without extensionshow_
- boolean if false, report is hidden immediately after printed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |