public class CrossSectionLink extends org.opentrafficsim.core.network.OTSLink implements Serializable
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2015-09-16 19:20:07 +0200 (Wed, 16 Sep 2015) $, @version $Revision: 1405 $, by $Author: averbraeck $,
initial version Aug 19, 2014
Modifier and Type | Field and Description |
---|---|
static nl.tudelft.simulation.event.EventType |
LANE_ADD_EVENT
The (regular, not timed) event type for pub/sub indicating the addition of a Lane to a CrossSectionLink.
|
static nl.tudelft.simulation.event.EventType |
LANE_REMOVE_EVENT
The (regular, not timed) event type for pub/sub indicating the removal of a Lane from a CrossSectionLink.
|
Modifier | Constructor and Description |
---|---|
protected |
CrossSectionLink(org.opentrafficsim.core.network.Network newNetwork,
org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator,
boolean animation,
CrossSectionLink link)
Clone a CrossSectionLink for a new network.
|
|
CrossSectionLink(org.opentrafficsim.core.network.Network network,
String id,
org.opentrafficsim.core.network.Node startNode,
org.opentrafficsim.core.network.Node endNode,
org.opentrafficsim.core.network.LinkType linkType,
org.opentrafficsim.core.geometry.OTSLine3D designLine,
org.opentrafficsim.core.network.LongitudinalDirectionality directionality,
LaneKeepingPolicy laneKeepingPolicy)
Construction of a link, with a general directionality for GTUType.ALL.
|
|
CrossSectionLink(org.opentrafficsim.core.network.Network network,
String id,
org.opentrafficsim.core.network.Node startNode,
org.opentrafficsim.core.network.Node endNode,
org.opentrafficsim.core.network.LinkType linkType,
org.opentrafficsim.core.geometry.OTSLine3D designLine,
Map<org.opentrafficsim.core.gtu.GTUType,org.opentrafficsim.core.network.LongitudinalDirectionality> directionalityMap,
LaneKeepingPolicy laneKeepingPolicy)
Construction of a cross section link.
|
|
CrossSectionLink(org.opentrafficsim.core.network.Network network,
String id,
org.opentrafficsim.core.network.OTSNode startNode,
org.opentrafficsim.core.network.OTSNode endNode,
org.opentrafficsim.core.network.LinkType linkType,
org.opentrafficsim.core.geometry.OTSLine3D designLine,
LaneKeepingPolicy laneKeepingPolicy)
Construction of a link, on which no traffic is allowed after construction of the link.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addCrossSectionElement(CrossSectionElement cse)
Add a cross section element at the end of the list.
|
CrossSectionLink |
clone(org.opentrafficsim.core.network.Network newNetwork,
org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator,
boolean animation) |
CrossSectionElement |
getCrossSectionElement(String id)
Find a cross section element with a specified id.
|
List<CrossSectionElement> |
getCrossSectionElementList()
Retrieve a safe copy of the cross section element list.
|
LaneKeepingPolicy |
getLaneKeepingPolicy()
Retrieve the lane keeping policy.
|
List<Lane> |
getLanes()
Return a safe copy of the list of lanes of this CrossSectionLink.
|
String |
toString() |
addDirectionality, addGTU, equals, getBounds, getDesignLine, getDirectionality, getDirectionalityMap, getEndNode, getGTUCount, getGTUs, getId, getLength, getLinkType, getLocation, getNetwork, getStartNode, hashCode, removeDirectionality, removeGTU
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListener
public static final nl.tudelft.simulation.event.EventType LANE_ADD_EVENT
public static final nl.tudelft.simulation.event.EventType LANE_REMOVE_EVENT
public CrossSectionLink(org.opentrafficsim.core.network.Network network, String id, org.opentrafficsim.core.network.Node startNode, org.opentrafficsim.core.network.Node endNode, org.opentrafficsim.core.network.LinkType linkType, org.opentrafficsim.core.geometry.OTSLine3D designLine, Map<org.opentrafficsim.core.gtu.GTUType,org.opentrafficsim.core.network.LongitudinalDirectionality> directionalityMap, LaneKeepingPolicy laneKeepingPolicy) throws org.opentrafficsim.core.network.NetworkException
network
- Network; the networkid
- String; the link id.startNode
- OTSNode; the start node (directional).endNode
- OTSNode; the end node (directional).linkType
- LinkType; the link typedesignLine
- OTSLine3D; the design line of the LinkdirectionalityMap
- Map<GTUType, LongitudinalDirectionality>; the directions (FORWARD, BACKWARD, BOTH, NONE)
that various GTUtypes can traverse this linklaneKeepingPolicy
- LaneKeepingPolicy; the policy to generally keep left, keep right, or keep laneorg.opentrafficsim.core.network.NetworkException
- if link already exists in the network, if name of the link is not unique, or if the start node
or the end node of the link are not registered in the network.public CrossSectionLink(org.opentrafficsim.core.network.Network network, String id, org.opentrafficsim.core.network.Node startNode, org.opentrafficsim.core.network.Node endNode, org.opentrafficsim.core.network.LinkType linkType, org.opentrafficsim.core.geometry.OTSLine3D designLine, org.opentrafficsim.core.network.LongitudinalDirectionality directionality, LaneKeepingPolicy laneKeepingPolicy) throws org.opentrafficsim.core.network.NetworkException
network
- Network; the networkid
- String; the link id.startNode
- OTSnode; the start node (directional).endNode
- OTSNode; the end node (directional).linkType
- LinkType; the link typedesignLine
- OTSLine3D; the design line of the Linkdirectionality
- LongitudinalDirectionality; the default directionality for all GTUslaneKeepingPolicy
- LaneKeepingPolicy; the policy to generally keep left, keep right, or keep laneorg.opentrafficsim.core.network.NetworkException
- if link already exists in the network, if name of the link is not unique, or if the start node
or the end node of the link are not registered in the network.public CrossSectionLink(org.opentrafficsim.core.network.Network network, String id, org.opentrafficsim.core.network.OTSNode startNode, org.opentrafficsim.core.network.OTSNode endNode, org.opentrafficsim.core.network.LinkType linkType, org.opentrafficsim.core.geometry.OTSLine3D designLine, LaneKeepingPolicy laneKeepingPolicy) throws org.opentrafficsim.core.network.NetworkException
network
- Network; the networkid
- String; the link id.startNode
- OTSNode; the start node (directional).endNode
- OTSNode; the end node (directional).linkType
- LinkType; the link typedesignLine
- OTSLine3D; the design line of the LinklaneKeepingPolicy
- LaneKeepingPolicy; the policy to generally keep left, keep right, or keep laneorg.opentrafficsim.core.network.NetworkException
- if link already exists in the network, if name of the link is not unique, or if the start node
or the end node of the link are not registered in the network.protected CrossSectionLink(org.opentrafficsim.core.network.Network newNetwork, org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator, boolean animation, CrossSectionLink link) throws org.opentrafficsim.core.network.NetworkException
newNetwork
- the new network to which the clone belongsnewSimulator
- the new simulator for this networkanimation
- whether to (re)create animation or notlink
- the link to clone fromorg.opentrafficsim.core.network.NetworkException
- if link already exists in the network, if name of the link is not unique, or if the start node
or the end node of the link are not registered in the network.protected final void addCrossSectionElement(CrossSectionElement cse)
cse
- CrossSectionElement; the cross section element to add.public final List<CrossSectionElement> getCrossSectionElementList()
public final LaneKeepingPolicy getLaneKeepingPolicy()
public final CrossSectionElement getCrossSectionElement(String id)
id
- String; the id to search forpublic final List<Lane> getLanes()
public final String toString()
toString
in class org.opentrafficsim.core.network.OTSLink
public CrossSectionLink clone(org.opentrafficsim.core.network.Network newNetwork, org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator, boolean animation) throws org.opentrafficsim.core.network.NetworkException
clone
in class org.opentrafficsim.core.network.OTSLink
org.opentrafficsim.core.network.NetworkException
Copyright © 2014–2016 Delft University of Technology. All rights reserved.