|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Observable
org.jscience.architecture.traffic.simulation.statistics.StatisticsModel
public class StatisticsModel
Class to maintain statistics as shown in extensions of StatisticsView.
| Field Summary | |
|---|---|
protected boolean |
allTimeAvg
Determines whether to use all time averages or 'last |
protected float |
allTimeJunctionWT
|
protected float |
allTimeTripWT
|
protected int |
cycle
|
protected java.lang.String |
infraAuthor
|
protected java.lang.String |
infraName
|
protected int |
junctionCrossings
|
protected int |
lastXJunctionCount
|
protected float |
lastXJunctionWT
|
protected int |
lastXTripCount
|
protected float |
lastXTripWT
|
protected SimModel |
model
The SimModel to get the statistical data from. |
protected Node.NodeStatistics[][] |
nodeStats
|
protected int |
numJunctions
|
protected int |
numNodes
|
protected int |
numSpecial
|
protected int |
roadusersArrived
|
static java.lang.String |
SEP
Separator used when saving data. |
protected java.lang.String |
simName
|
protected static int |
statNumData
The length of the delay tables maintained in each Node. |
| Constructor Summary | |
|---|---|
StatisticsModel(SimModel _model)
Creates a StatisticsModel. |
|
| Method Summary | |
|---|---|
boolean |
getAllTimeAvg()
Returns whether all time averages should be used or not. |
float |
getAllTimeJunctionWT()
|
float |
getAllTimeTripWT()
|
int |
getCycle()
|
java.lang.String |
getInfraAuthor()
|
java.lang.String |
getInfraName()
|
int |
getJunctionCrossings()
|
int |
getLastXJunctionCount()
|
float |
getLastXJunctionWT()
|
int |
getLastXTripCount()
|
float |
getLastXTripWT()
|
Node.NodeStatistics[][] |
getNodeStatistics()
|
int |
getNumJunctions()
|
int |
getNumNodes()
|
int |
getNumSpecialNodes()
|
int |
getRoadusersArrived()
|
SimModel |
getSimModel()
Returns the SimModel to be shown. |
java.lang.String |
getSimName()
|
void |
refresh()
Refresh the statistical data from the model and repaint. |
protected void |
saveData(java.lang.String filename)
Save data to a CSV file. |
void |
setAllTimeAvg(boolean b)
Sets whether all time averages should be used or not. |
void |
setSimModel(SimModel _model)
Sets the SimModel to be used. |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String SEP
protected static final int statNumData
protected boolean allTimeAvg
protected SimModel model
protected java.lang.String infraName
protected java.lang.String infraAuthor
protected java.lang.String simName
protected int numNodes
protected int numSpecial
protected int numJunctions
protected int cycle
protected Node.NodeStatistics[][] nodeStats
protected float allTimeTripWT
protected float lastXTripWT
protected float allTimeJunctionWT
protected float lastXJunctionWT
protected int roadusersArrived
protected int junctionCrossings
protected int lastXTripCount
protected int lastXJunctionCount
| Constructor Detail |
|---|
public StatisticsModel(SimModel _model)
StatisticsModel.
_model - The SimModel statistics should be read from.| Method Detail |
|---|
public void setSimModel(SimModel _model)
public SimModel getSimModel()
public void setAllTimeAvg(boolean b)
public boolean getAllTimeAvg()
public java.lang.String getInfraName()
public java.lang.String getInfraAuthor()
public java.lang.String getSimName()
public int getNumNodes()
public int getNumSpecialNodes()
public int getNumJunctions()
public int getCycle()
public Node.NodeStatistics[][] getNodeStatistics()
public float getAllTimeTripWT()
public float getLastXTripWT()
public float getAllTimeJunctionWT()
public float getLastXJunctionWT()
public int getRoadusersArrived()
public int getJunctionCrossings()
public int getLastXTripCount()
public int getLastXJunctionCount()
public void refresh()
protected void saveData(java.lang.String filename)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||