Package org.opentrafficsim.core.network
Class ExpansionNetwork
java.lang.Object
nl.tudelft.simulation.event.EventProducer
org.opentrafficsim.core.network.OTSNetwork
org.opentrafficsim.core.network.ExpansionNetwork
- All Implemented Interfaces:
Serializable,EventProducerInterface,Identifiable,Definitions,Network,PerceivableContext
public abstract class ExpansionNetwork extends OTSNetwork
A Network consists of a set of links. Each link has, in its turn, a start node and an end node. An expandable network can be
an (expanded) node as well. An example is shown below:
|
-------O--------
|
can be expanded into:
|
A
/|\
/ | \
-----B--C--D-----
\ | /
\|/
E
|
Node O in the example is expanded into the subnetwork consisting of nodes A, B, C, D, and E, and links AB, AC, AD, BC, CD,
BE, CE, and DE. It also means that when node expansion takes place, the links to node O have to be replaced. In the example
below:
X
|
Y------O-------Z
|
W
can be expanded into:
X
|
A
/|\
/ | \
Y----B--C--D----Z
\ | /
\|/
E
|
W
The node XO is replaced by XA, YO is replaced by YB, OZ is replaced by DZ, and OW is replaced by EW in the network. The
reverse takes place when we do node collapse.
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2019-03-17 22:16:44 +0100 (Sun, 17 Mar 2019) $, @version $Revision: 5158 $, by $Author: averbraeck $,
initial version Aug 19, 2014
- Author:
- Alexander Verbraeck, Peter Knoppers, Guus Tamminga
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface
FIRST_POSITION, LAST_POSITIONFields inherited from interface org.opentrafficsim.core.network.Network
ANIMATION_GENERATOR_ADD_EVENT, ANIMATION_GENERATOR_REMOVE_EVENT, ANIMATION_GTU_ADD_EVENT, ANIMATION_GTU_REMOVE_EVENT, ANIMATION_INVISIBLE_OBJECT_ADD_EVENT, ANIMATION_INVISIBLE_OBJECT_REMOVE_EVENT, ANIMATION_LINK_ADD_EVENT, ANIMATION_LINK_REMOVE_EVENT, ANIMATION_NODE_ADD_EVENT, ANIMATION_NODE_REMOVE_EVENT, ANIMATION_OBJECT_ADD_EVENT, ANIMATION_OBJECT_REMOVE_EVENT, ANIMATION_ROUTE_ADD_EVENT, ANIMATION_ROUTE_REMOVE_EVENT, GENERATOR_ADD_EVENT, GENERATOR_REMOVE_EVENT, GTU_ADD_EVENT, GTU_REMOVE_EVENT, INVISIBLE_OBJECT_ADD_EVENT, INVISIBLE_OBJECT_REMOVE_EVENT, LINK_ADD_EVENT, LINK_REMOVE_EVENT, NODE_ADD_EVENT, NODE_REMOVE_EVENT, OBJECT_ADD_EVENT, OBJECT_REMOVE_EVENT, ROUTE_ADD_EVENT, ROUTE_REMOVE_EVENT -
Constructor Summary
Constructors Constructor Description ExpansionNetwork(String id, boolean addDefaultTypes) -
Method Summary
Methods inherited from class org.opentrafficsim.core.network.OTSNetwork
addDefaultGtuTypes, addDefaultLinkTypes, addGTU, addGtuType, addInvisibleObject, addLink, addLinkType, addNode, addObject, addRoute, buildGraph, containsGTU, containsGtuId, containsInvisibleObject, containsInvisibleObject, containsLink, containsLink, containsNode, containsNode, containsObject, containsObject, containsRoute, containsRoute, getDefinedRouteMap, getExtent, getGTU, getGTUs, getGtuType, getGtuType, getGtuTypes, getId, getInvisibleObjectMap, getInvisibleObjectMap, getLink, getLink, getLink, getLinkGraphs, getLinkMap, getLinkType, getLinkType, getLinkTypes, getNode, getNodeMap, getObject, getObjectMap, getObjectMap, getRoute, getRoute, getRouteMap, getRoutesBetween, getShortestRouteBetween, getShortestRouteBetween, getShortestRouteBetween, removeGTU, removeInvisibleObject, removeLink, removeNode, removeObject, removeRoute, setRawRouteMap, toStringMethods inherited from class nl.tudelft.simulation.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface nl.tudelft.simulation.event.EventProducerInterface
addListener, addListener, addListener, addListener, removeListener
-
Constructor Details
-
ExpansionNetwork
- Parameters:
id- String; the network id.addDefaultTypes- add the default GTUTypes and LinkTypes, or not
-