public class CrossSectionLink extends org.opentrafficsim.core.network.OTSLink implements Serializable
Copyright (c) 2013-2015 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
Constructor and Description |
---|
CrossSectionLink(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.
|
CrossSectionLink(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,
org.opentrafficsim.core.network.LongitudinalDirectionality directionality,
LaneKeepingPolicy laneKeepingPolicy)
Construction of a link, with a general directionality for GTUType.ALL.
|
CrossSectionLink(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,
Map<org.opentrafficsim.core.gtu.GTUType,org.opentrafficsim.core.network.LongitudinalDirectionality> directionalityMap,
LaneKeepingPolicy laneKeepingPolicy)
Construction of a cross section link.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addCrossSectionElement(CrossSectionElement cse)
Add a cross section element at the end of the list.
|
protected void |
addCrossSectionElement(CrossSectionElement cse,
int index)
Add a cross section element at specified index in the list.
Note: LEFT is seen as a positive lateral direction, RIGHT as a negative lateral direction. |
List<CrossSectionElement> |
getCrossSectionElementList() |
LaneKeepingPolicy |
getLaneKeepingPolicy() |
public CrossSectionLink(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, Map<org.opentrafficsim.core.gtu.GTUType,org.opentrafficsim.core.network.LongitudinalDirectionality> directionalityMap, LaneKeepingPolicy laneKeepingPolicy)
id
- the link id.startNode
- start node (directional).endNode
- end node (directional).linkType
- the linktypedesignLine
- the OTSLine3D design line of the LinkdirectionalityMap
- the directions (FORWARD, BACKWARD, BOTH, NONE) that GTUtypes can traverse this linklaneKeepingPolicy
- the policy to generally keep left, keep right, or keep lanepublic CrossSectionLink(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, org.opentrafficsim.core.network.LongitudinalDirectionality directionality, LaneKeepingPolicy laneKeepingPolicy)
id
- the link id.startNode
- start node (directional).endNode
- end node (directional).linkType
- the linktypedesignLine
- the OTSLine3D design line of the Linkdirectionality
- the default directionality for all GTUslaneKeepingPolicy
- the policy to generally keep left, keep right, or keep lanepublic CrossSectionLink(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)
id
- the link id.startNode
- start node (directional).endNode
- end node (directional).linkType
- the linktypedesignLine
- the OTSLine3D design line of the LinklaneKeepingPolicy
- the policy to generally keep left, keep right, or keep laneprotected final void addCrossSectionElement(CrossSectionElement cse)
cse
- the cross section element to add.protected final void addCrossSectionElement(CrossSectionElement cse, int index)
index
- the location to insert the element.cse
- the cross section element to add.public final List<CrossSectionElement> getCrossSectionElementList()
public final LaneKeepingPolicy getLaneKeepingPolicy()
Copyright © 2014–2015 Delft University of Technology. All rights reserved.