public final class LaneFactory extends Object
Copyright (c) 2013-2017 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 30 okt. 2014
Modifier and Type | Method and Description |
---|---|
static org.opentrafficsim.core.geometry.OTSLine3D |
makeBezier(org.opentrafficsim.core.network.OTSNode n1,
org.opentrafficsim.core.network.OTSNode n2,
org.opentrafficsim.core.network.OTSNode n3,
org.opentrafficsim.core.network.OTSNode n4) |
static Lane |
makeLane(org.opentrafficsim.core.network.Network network,
String name,
org.opentrafficsim.core.network.OTSNode from,
org.opentrafficsim.core.network.OTSNode to,
org.opentrafficsim.core.geometry.OTSPoint3D[] intermediatePoints,
LaneType laneType,
org.djunits.value.vdouble.scalar.Speed speedLimit,
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator,
org.opentrafficsim.core.network.LongitudinalDirectionality direction)
Create a simple Lane.
|
static CrossSectionLink |
makeLink(org.opentrafficsim.core.network.Network network,
String name,
org.opentrafficsim.core.network.Node from,
org.opentrafficsim.core.network.Node to,
org.opentrafficsim.core.geometry.OTSPoint3D[] intermediatePoints,
org.opentrafficsim.core.network.LongitudinalDirectionality direction,
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator)
Create a Link along intermediate coordinates from one Node to another.
|
static Lane[] |
makeMultiLane(org.opentrafficsim.core.network.Network network,
String name,
org.opentrafficsim.core.network.OTSNode from,
org.opentrafficsim.core.network.OTSNode to,
org.opentrafficsim.core.geometry.OTSPoint3D[] intermediatePoints,
int laneCount,
int laneOffsetAtStart,
int laneOffsetAtEnd,
LaneType laneType,
org.djunits.value.vdouble.scalar.Speed speedLimit,
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator,
org.opentrafficsim.core.network.LongitudinalDirectionality direction)
Create a simple road with the specified number of Lanes.
This method returns an array of Lane. |
static Lane[] |
makeMultiLane(org.opentrafficsim.core.network.Network network,
String name,
org.opentrafficsim.core.network.OTSNode from,
org.opentrafficsim.core.network.OTSNode to,
org.opentrafficsim.core.geometry.OTSPoint3D[] intermediatePoints,
int laneCount,
LaneType laneType,
org.djunits.value.vdouble.scalar.Speed speedLimit,
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator,
org.opentrafficsim.core.network.LongitudinalDirectionality direction)
Create a simple road with the specified number of Lanes.
This method returns an array of Lane. |
static Lane[] |
makeMultiLaneBezier(org.opentrafficsim.core.network.Network network,
String name,
org.opentrafficsim.core.network.OTSNode n1,
org.opentrafficsim.core.network.OTSNode n2,
org.opentrafficsim.core.network.OTSNode n3,
org.opentrafficsim.core.network.OTSNode n4,
int laneCount,
int laneOffsetAtStart,
int laneOffsetAtEnd,
LaneType laneType,
org.djunits.value.vdouble.scalar.Speed speedLimit,
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator,
org.opentrafficsim.core.network.LongitudinalDirectionality direction)
Create a simple road with the specified number of Lanes, based on a Bezier curve.
This method returns an array of Lane. |
public static CrossSectionLink makeLink(org.opentrafficsim.core.network.Network network, String name, org.opentrafficsim.core.network.Node from, org.opentrafficsim.core.network.Node to, org.opentrafficsim.core.geometry.OTSPoint3D[] intermediatePoints, org.opentrafficsim.core.network.LongitudinalDirectionality direction, org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator) throws org.opentrafficsim.core.geometry.OTSGeometryException, org.opentrafficsim.core.network.NetworkException
network
- the networkname
- String; name of the new Linkfrom
- Node; start Node of the new Linkto
- Node; end Node of the new LinkintermediatePoints
- OTSPoint3D[]; array of intermediate coordinates (may be null); the intermediate points may
contain the coordinates of the from node and to nodedirection
- the direction of the linksimulator
- the simulator for this networkorg.opentrafficsim.core.geometry.OTSGeometryException
- when the design line is degenerate (only one point or duplicate point)org.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 static Lane makeLane(org.opentrafficsim.core.network.Network network, String name, org.opentrafficsim.core.network.OTSNode from, org.opentrafficsim.core.network.OTSNode to, org.opentrafficsim.core.geometry.OTSPoint3D[] intermediatePoints, LaneType laneType, org.djunits.value.vdouble.scalar.Speed speedLimit, org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator, org.opentrafficsim.core.network.LongitudinalDirectionality direction) throws NamingException, org.opentrafficsim.core.network.NetworkException, org.opentrafficsim.core.geometry.OTSGeometryException
network
- the networkname
- String; name of the Lane (and also of the Link that owns it)from
- Node; starting node of the new Laneto
- Node; ending node of the new LaneintermediatePoints
- OTSPoint3D[]; intermediate coordinates or null to create a straight road; the intermediate
points may contain the coordinates of the from node and to nodelaneType
- LaneType; type of the new LanespeedLimit
- Speed; the speed limit on the new Lanesimulator
- OTSDEVSSimulatorInterface; the simulatordirection
- the direction of the underlying link, DIR_PLUS or DIR_MINUS (or DIR_BOTH)NamingException
- when names cannot be registered for animationorg.opentrafficsim.core.network.NetworkException
- on network inconsistencyorg.opentrafficsim.core.geometry.OTSGeometryException
- when creation of center line or contour failspublic static Lane[] makeMultiLane(org.opentrafficsim.core.network.Network network, String name, org.opentrafficsim.core.network.OTSNode from, org.opentrafficsim.core.network.OTSNode to, org.opentrafficsim.core.geometry.OTSPoint3D[] intermediatePoints, int laneCount, int laneOffsetAtStart, int laneOffsetAtEnd, LaneType laneType, org.djunits.value.vdouble.scalar.Speed speedLimit, org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator, org.opentrafficsim.core.network.LongitudinalDirectionality direction) throws NamingException, org.opentrafficsim.core.network.NetworkException, org.opentrafficsim.core.geometry.OTSGeometryException
network
- the networkname
- String; name of the Linkfrom
- Node; starting node of the new Laneto
- Node; ending node of the new LaneintermediatePoints
- OTSPoint3D[]; intermediate coordinates or null to create a straight road; the intermediate
points may contain the coordinates of the from node and to nodelaneCount
- int; number of lanes in the roadlaneOffsetAtStart
- int; extra offset from design line in lane widths at start of linklaneOffsetAtEnd
- int; extra offset from design line in lane widths at end of linklaneType
- LaneType; type of the new LanesspeedLimit
- Speed; the speed limit on all lanessimulator
- OTSDEVSSimulatorInterface; the simulatordirection
- the direction of the underlying link, DIR_PLUS or DIR_MINUS (or DIR_BOTH)NamingException
- when names cannot be registered for animationorg.opentrafficsim.core.network.NetworkException
- on topological problemsorg.opentrafficsim.core.geometry.OTSGeometryException
- when creation of center line or contour failspublic static Lane[] makeMultiLane(org.opentrafficsim.core.network.Network network, String name, org.opentrafficsim.core.network.OTSNode from, org.opentrafficsim.core.network.OTSNode to, org.opentrafficsim.core.geometry.OTSPoint3D[] intermediatePoints, int laneCount, LaneType laneType, org.djunits.value.vdouble.scalar.Speed speedLimit, org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator, org.opentrafficsim.core.network.LongitudinalDirectionality direction) throws NamingException, org.opentrafficsim.core.network.NetworkException, org.opentrafficsim.core.geometry.OTSGeometryException
network
- the networkname
- String; name of the Linkfrom
- Node; starting node of the new Laneto
- Node; ending node of the new LaneintermediatePoints
- OTSPoint3D[]; intermediate coordinates or null to create a straight road; the intermediate
points may contain the coordinates of the from node and to nodelaneCount
- int; number of lanes in the roadlaneType
- LaneType; type of the new LanesspeedLimit
- Speed the speed limit (applies to all generated lanes)simulator
- OTSDEVSSimulatorInterface; the simulatordirection
- the direction of the underlying link, DIR_PLUS or DIR_MINUS (or DIR_BOTH)NamingException
- when names cannot be registered for animationorg.opentrafficsim.core.network.NetworkException
- on topological problemsorg.opentrafficsim.core.geometry.OTSGeometryException
- when creation of center line or contour failspublic static Lane[] makeMultiLaneBezier(org.opentrafficsim.core.network.Network network, String name, org.opentrafficsim.core.network.OTSNode n1, org.opentrafficsim.core.network.OTSNode n2, org.opentrafficsim.core.network.OTSNode n3, org.opentrafficsim.core.network.OTSNode n4, int laneCount, int laneOffsetAtStart, int laneOffsetAtEnd, LaneType laneType, org.djunits.value.vdouble.scalar.Speed speedLimit, org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator, org.opentrafficsim.core.network.LongitudinalDirectionality direction) throws NamingException, org.opentrafficsim.core.network.NetworkException, org.opentrafficsim.core.geometry.OTSGeometryException
network
- the networkname
- String; name of the Linkn1
- Node; control node for the start directionn2
- Node; starting node of the new Lanen3
- Node; ending node of the new Lanen4
- Node; control node for the end directionlaneCount
- int; number of lanes in the roadlaneOffsetAtStart
- int; extra offset from design line in lane widths at start of linklaneOffsetAtEnd
- int; extra offset from design line in lane widths at end of linklaneType
- LaneType; type of the new LanesspeedLimit
- Speed; the speed limit on all lanessimulator
- OTSDEVSSimulatorInterface; the simulatordirection
- the direction of the underlying link, DIR_PLUS or DIR_MINUS (or DIR_BOTH)NamingException
- when names cannot be registered for animationorg.opentrafficsim.core.network.NetworkException
- on topological problemsorg.opentrafficsim.core.geometry.OTSGeometryException
- when creation of center line or contour failspublic static org.opentrafficsim.core.geometry.OTSLine3D makeBezier(org.opentrafficsim.core.network.OTSNode n1, org.opentrafficsim.core.network.OTSNode n2, org.opentrafficsim.core.network.OTSNode n3, org.opentrafficsim.core.network.OTSNode n4) throws org.opentrafficsim.core.geometry.OTSGeometryException
n1
- node 1n2
- node 2n3
- node 3n4
- node 4org.opentrafficsim.core.geometry.OTSGeometryException
- on failure of Bezier curve creationCopyright © 2014–2017 Delft University of Technology. All rights reserved.