Package casa.lepton
Class OppNetGraphDGS
java.lang.Object
org.graphstream.graph.implementations.AbstractElement
org.graphstream.graph.implementations.AbstractGraph
org.graphstream.graph.implementations.AdjacencyListGraph
org.graphstream.graph.implementations.MultiGraph
casa.lepton.OppNetGraph
casa.lepton.OppNetGraphDGS
- All Implemented Interfaces:
OppNet
,OppNetEventsSource
,Closeable
,AutoCloseable
,Iterable<org.graphstream.graph.Node>
,Runnable
,org.graphstream.graph.Element
,org.graphstream.graph.Graph
,org.graphstream.graph.Structure
,org.graphstream.stream.AttributeSink
,org.graphstream.stream.ElementSink
,org.graphstream.stream.Pipe
,org.graphstream.stream.Replayable
,org.graphstream.stream.Sink
,org.graphstream.stream.Source
A
OppNetGraph
read from an input DGS file.-
Nested Class Summary
Nested classes/interfaces inherited from class org.graphstream.graph.implementations.AdjacencyListGraph
org.graphstream.graph.implementations.AdjacencyListGraph.EdgeIterator<T extends org.graphstream.graph.Edge>, org.graphstream.graph.implementations.AdjacencyListGraph.NodeIterator<T extends org.graphstream.graph.Node>
Nested classes/interfaces inherited from class org.graphstream.graph.implementations.AbstractElement
org.graphstream.graph.implementations.AbstractElement.AttributeChangeEvent
Nested classes/interfaces inherited from interface org.graphstream.stream.Replayable
org.graphstream.stream.Replayable.Controller
-
Field Summary
Fields inherited from class casa.lepton.OppNetGraph
area, connectivityProfiles, console, currentStep, defaultConnectivityType, dgsWriter, duration, edgeFactory, edgeListeners, frame, graphAttributes, hasNext, hub, lastLogTime, makeEdges, nodeFactory, nodeListeners, oppNetRules, output, period, props, refTime, started, thread, timezone
Fields inherited from class org.graphstream.graph.implementations.AdjacencyListGraph
DEFAULT_EDGE_CAPACITY, DEFAULT_NODE_CAPACITY, edgeArray, edgeCount, edgeMap, GROW_FACTOR, nodeArray, nodeCount, nodeMap
Fields inherited from class org.graphstream.graph.implementations.AbstractElement
attributes, attributesBeingRemoved, id
Fields inherited from interface casa.lepton.OppNet
EDGE_ADDED, EDGE_CHANGED, EDGE_REMOVED, NODE_ADDED, NODE_MOVED, NODE_REMOVED
-
Constructor Summary
ConstructorDescriptionOppNetGraphDGS
(String networkId, String dgsFile, OppNetProperties props) Constructor. -
Method Summary
Methods inherited from class casa.lepton.OppNetGraph
addConnectivityType, addEdge, addEdge, addEdgeListener, addNodeListener, areNeighbors, close, getAccel, getArea, getAttributes, getConsole, getCoordCar, getCoordGeo, getCurrentStep, getCurrentTime, getEdgeStatus, getHub, getLabel, getNeighbors, getNeighborsNodes, getNodes, getNodeStatus, getRefTime, getTag, getTimeZone, hasConsole, hasNext, isNode, isOnline, join, logDGS, makeEdgeId, makeFrame, makeOutput, nbNeighbors, notifyEdgeListeners, notifyNodeListeners, play, println, removeAllEdges, removeConnectivityType, removeEdge, removeEdge, removeEdgeListener, removeNodeListener, run, setAccel, setArea, setEdgeStatus, setLabel, setNodeStatus, setOnline, setTag, stop, updateEdges, waitUntil
Methods inherited from class org.graphstream.graph.implementations.AdjacencyListGraph
addEdgeCallback, addNodeCallback, clearCallback, getEdge, getEdge, getEdgeCount, getEdgeIterator, getNode, getNode, getNodeCount, getNodeIterator, removeEdgeCallback, removeNodeCallback
Methods inherited from class org.graphstream.graph.implementations.AbstractGraph
addAttributeSink, addEdge, addEdge, addEdge, addEdge, addEdge, addElementSink, addNode, addSink, attributeChanged, attributeSinks, clear, clearAttributeSinks, clearElementSinks, clearSinks, display, display, edgeAdded, edgeAttributeAdded, edgeAttributeChanged, edgeAttributeRemoved, edgeFactory, edgeRemoved, elementSinks, getEachEdge, getEachNode, getEdgeSet, getNodeSet, getReplayController, getStep, graphAttributeAdded, graphAttributeChanged, graphAttributeRemoved, graphCleared, isAutoCreationEnabled, isStrict, iterator, nodeAdded, nodeAttributeAdded, nodeAttributeChanged, nodeAttributeRemoved, nodeFactory, nodeRemoved, nullAttributesAreErrors, read, read, removeAttributeSink, removeEdge, removeEdge, removeEdge, removeEdge, removeEdge, removeElementSink, removeNode, removeNode, removeNode, removeNode, removeSink, setAutoCreate, setEdgeFactory, setNodeFactory, setNullAttributesAreErrors, setStrict, stepBegins, stepBegins, write, write
Methods inherited from class org.graphstream.graph.implementations.AbstractElement
addAttribute, addAttributes, changeAttribute, clearAttributes, clearAttributesWithNoEvent, getArray, getAttribute, getAttribute, getAttributeCount, getAttributeKeyIterator, getAttributeKeySet, getEachAttributeKey, getFirstAttributeOf, getFirstAttributeOf, getHash, getId, getIndex, getNumber, getVector, hasArray, hasAttribute, hasAttribute, hasHash, hasLabel, hasNumber, hasVector, removeAttribute, setAttribute, setIndex, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.graphstream.graph.Element
addAttribute, addAttributes, changeAttribute, clearAttributes, getArray, getAttribute, getAttribute, getAttributeCount, getAttributeKeyIterator, getAttributeKeySet, getEachAttributeKey, getFirstAttributeOf, getFirstAttributeOf, getHash, getId, getIndex, getNumber, getVector, hasArray, hasAttribute, hasAttribute, hasHash, hasLabel, hasNumber, hasVector, removeAttribute, setAttribute
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
OppNetGraphDGS
Constructor.- Parameters:
networkId
- a network id.dgsFile
- a source dgs file nameprops
- properties- Throws:
IOException
-
-
Method Details
-
step
public boolean step()Description copied from class:OppNetGraph
Run a simulation step: move nodes and update edges accordingly, and wait for the next step time- Overrides:
step
in classOppNetGraph
- Returns:
- false if this step is the last one
-
addNode
Description copied from interface:OppNet
Add a new node in the OppNet.- Specified by:
addNode
in interfaceOppNet
- Overrides:
addNode
in classOppNetGraph
- Parameters:
nodeId
- the new node id.profile
- the node's profile name (may be null)
-
deleteNode
Description copied from interface:OppNet
Remove a node from the OppNet.- Specified by:
deleteNode
in interfaceOppNet
- Overrides:
deleteNode
in classOppNetGraph
- Parameters:
nodeId
- the id of the node to be deleted.
-