|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.architecture.traffic.infrastructure.Node
org.jscience.architecture.traffic.infrastructure.SpecialNode
org.jscience.architecture.traffic.infrastructure.EdgeNode
public class EdgeNode
EdgeNode, a node used as starting and end point for Roadusers.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jscience.architecture.traffic.infrastructure.Node |
|---|
Node.NodeStatistics |
| Field Summary | |
|---|---|
protected DestFrequency[][] |
destFreq
The frequency with which spawned roadusers choose specific destinations |
protected SpawnFrequency[] |
spawnFreq
The frequency at which various roadusers spawn |
protected static int |
type
The type of this node |
| Fields inherited from class org.jscience.architecture.traffic.infrastructure.SpecialNode |
|---|
isAlpha, loadData, road, roadPos, waitingQueue |
| Fields inherited from class org.jscience.architecture.traffic.infrastructure.Node |
|---|
C_DOWN, C_LEFT, C_RIGHT, C_UP, coord, D_AHEAD, D_BACK, D_LEFT, D_RIGHT, EDGE, inboundLanes, JUNCTION, NET_TUNNEL, nodeId, NON_TL, outboundLanes, parentName, spdata, STAT_NUM_DATA, statistics |
| Constructor Summary | |
|---|---|
EdgeNode()
Creates a new EdgeNode object. |
|
EdgeNode(java.awt.Point _coord)
Creates a new EdgeNode object. |
|
| Method Summary | |
|---|---|
DestFrequency[][] |
getDestFrequencies()
Returns the array of arrays of Destination Frequenties |
float |
getDestFrequency(int edgeId,
int ruType)
Returns the destination frequency for certain destination edgenode and roaduser type. |
java.lang.String |
getName()
Returns the name of this edgenode. |
SpawnFrequency[] |
getSpawnFrequencies()
Returns the array of Spawning Frequenties |
float |
getSpawnFrequency(int ruType)
Returns the spawn freqeuncy for the Roadusers of type ruType |
int |
getType()
Returns the type of this node |
java.lang.String |
getXMLName()
DOCUMENT ME! |
void |
load(XMLElement myElement,
XMLLoader loader)
Load this XMLSerializable |
void |
paint(java.awt.Graphics g)
DOCUMENT ME! |
void |
paint(java.awt.Graphics g,
int x,
int y,
float zf)
DOCUMENT ME! |
void |
paint(java.awt.Graphics g,
int x,
int y,
float zf,
double bogus)
DOCUMENT ME! |
void |
saveChilds(XMLSaver saver)
DOCUMENT ME! |
XMLElement |
saveSelf()
DOCUMENT ME! |
void |
setDestFrequencies(DestFrequency[][] dests)
Sets the Destination Frequencies |
void |
setDestFrequency(int edgeId,
int ruType,
float dest)
Sets the destination frequency for certain destination edgenode and roaduser type. |
void |
setSpawnFrequencies(SpawnFrequency[] spawns)
Sets the Spawning Frequencies |
void |
setSpawnFrequency(int ruType,
float freq)
Sets the spawn frequency for Roadusers of type ruType |
| Methods inherited from class org.jscience.architecture.traffic.infrastructure.SpecialNode |
|---|
addRoad, calcDelay, dequeueRoaduser, doStep, enqueueRoaduser, enter, getAllLanes, getAllRoads, getAlpha, getAlphaRoads, getDesiredSignType, getInboundLanes, getLanesLeadingFrom, getLanesLeadingTo, getNumAllLanes, getNumAlphaRoads, getNumInboundLanes, getNumOutboundLanes, getNumRealSigns, getNumRoads, getNumSigns, getOutboundLanes, getRoad, getRoadPos, getWaitingQueue, getWaitingQueueLength, getWidth, isAlphaRoad, isConnected, isConnectedAt, isConnectionPosFree, loadSecondStage, placeRoaduser, remAllRoads, remRoad, remRoad, reset, setAlpha, setAlphaRoad, setRoad, setRoadPos, setSigns, setWaitingQueue, start, stop |
| Methods inherited from class org.jscience.architecture.traffic.infrastructure.Node |
|---|
addShortestPath, areAllTailsFree, canCreateInstance, createInstance, getBounds, getCenterPoint, getChildren, getComplexBounds, getCoord, getDirection, getDistance, getId, getNumSkip, getSelectionPoint, getSelectionPoints, getShortestPathDestinations, getShortestPaths, getStatistics, getStatistics, hasChildren, initStats, isSelectable, processStats, remPaths, resetStats, setCoord, setId, setParentName, setShortestPath, updateLanes, zapShortestPaths |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jscience.architecture.traffic.xml.XMLSerializable |
|---|
setParentName |
| Field Detail |
|---|
protected static final int type
protected SpawnFrequency[] spawnFreq
protected DestFrequency[][] destFreq
| Constructor Detail |
|---|
public EdgeNode()
public EdgeNode(java.awt.Point _coord)
_coord - DOCUMENT ME!| Method Detail |
|---|
public void load(XMLElement myElement,
XMLLoader loader)
throws XMLTreeException,
java.io.IOException,
XMLInvalidInputException
XMLSerializable
load in interface XMLSerializableload in class SpecialNodemyElement - The XMLElement which represents this object in the XML
tree. It can contain attributes which hold information about the
object.loader - The XMLLoader which this XMLSerializable can use to load
child objects.
XMLTreeException - The parser can throw this exception if it is
called by the XMLSerializable. The XMLSerializable should NOT
throw this exception by itself and preferrably not catch it
too.
java.io.IOException - Thrown in case of an read error in the XML file.
XMLInvalidInputException - The XMLSerializable can throw this
exception if it cannot load itself or one of its child objects
for whatever reason.
public XMLElement saveSelf()
throws XMLCannotSaveException
saveSelf in interface XMLSerializablesaveSelf in class SpecialNodeXMLCannotSaveException - DOCUMENT ME!
public void saveChilds(XMLSaver saver)
throws XMLTreeException,
java.io.IOException,
XMLCannotSaveException
saveChilds in interface XMLSerializablesaveChilds in class SpecialNodesaver - DOCUMENT ME!
XMLTreeException - DOCUMENT ME!
java.io.IOException - DOCUMENT ME!
XMLCannotSaveException - DOCUMENT ME!public java.lang.String getXMLName()
getXMLName in interface XMLSerializablegetXMLName in class SpecialNodepublic int getType()
getType in class Nodepublic java.lang.String getName()
getName in class Nodepublic SpawnFrequency[] getSpawnFrequencies()
public void setSpawnFrequencies(SpawnFrequency[] spawns)
spawns - DOCUMENT ME!public DestFrequency[][] getDestFrequencies()
public void setDestFrequencies(DestFrequency[][] dests)
dests - DOCUMENT ME!public float getSpawnFrequency(int ruType)
ruType - DOCUMENT ME!
public void setSpawnFrequency(int ruType,
float freq)
ruType - DOCUMENT ME!freq - DOCUMENT ME!
public float getDestFrequency(int edgeId,
int ruType)
edgeId - DOCUMENT ME!ruType - DOCUMENT ME!
public void setDestFrequency(int edgeId,
int ruType,
float dest)
edgeId - DOCUMENT ME!ruType - DOCUMENT ME!dest - DOCUMENT ME!
public void paint(java.awt.Graphics g)
throws TrafficException
Node
paint in class Nodeg - DOCUMENT ME!
TrafficException - DOCUMENT ME!
public void paint(java.awt.Graphics g,
int x,
int y,
float zf)
throws TrafficException
paint in class Nodeg - DOCUMENT ME!x - DOCUMENT ME!y - DOCUMENT ME!zf - DOCUMENT ME!
TrafficException - DOCUMENT ME!
public void paint(java.awt.Graphics g,
int x,
int y,
float zf,
double bogus)
throws TrafficException
g - DOCUMENT ME!x - DOCUMENT ME!y - DOCUMENT ME!zf - DOCUMENT ME!bogus - DOCUMENT ME!
TrafficException - DOCUMENT ME!
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||