RePast
v. 2.0

uchicago.src.sim.analysis
Class SimData

java.lang.Object
  |
  +--uchicago.src.sim.analysis.SimData

public class SimData
extends Object

Holds data in tabular format - a vector of vectors. Also provides methods for printing the data to a file.

See Also:
DataRecorder

Constructor Summary
SimData(String fileName, String modelHeader, SimModel model, boolean isBatch)
          Constructs this object with the specified fileName, model, and mode.
 
Method Summary
 void addData(Vector v)
          Add a vector of data to this SimData.
 void addToHeader(List l)
          Adds the specified list to the header associated with this data
 void addToHeader(String s)
          Adds the specified String to the header associated with this data
 void setDelimiter(String delim)
          Sets the column delimiter.
 void writeEnd()
          Writes ending data (current time) to the file
 void writeToFile()
          Writes the data (and a file header) out to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimData

public SimData(String fileName,
               String modelHeader,
               SimModel model,
               boolean isBatch)
Constructs this object with the specified fileName, model, and mode.

Parameters:
fileName - the fileName to write to
model - the model from which the data is taken. Used to create the file header.
isBatch - whether the simulation is run in batch mode or not
Method Detail

setDelimiter

public void setDelimiter(String delim)
Sets the column delimiter. Data is written out in tabular format where the columns are separated by the specified delimiter.

Parameters:
delim - the new delimiter

addToHeader

public void addToHeader(String s)
Adds the specified String to the header associated with this data


addToHeader

public void addToHeader(List l)
Adds the specified list to the header associated with this data


addData

public void addData(Vector v)
Add a vector of data to this SimData.

Parameters:
v - the data to add.

writeEnd

public void writeEnd()
Writes ending data (current time) to the file


writeToFile

public void writeToFile()
Writes the data (and a file header) out to a file. This flushes all data from the data vector out to a file.


RePast
v. 2.0

Bug reports and feature requests to RePast