NODEID - the ID type of the Node, e.g., String.LINKID - the ID type of the Link, e.g., String.public class OTSLink<LINKID,NODEID> extends Object implements Link<LINKID,NODEID>, Serializable, LocatableInterface
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-07-26 22:05:02 +0200 (Sun, 26 Jul 2015) $, @version $Revision: 1156 $, by $Author: averbraeck $,
initial version Aug 19, 2014
| Constructor and Description |
|---|
OTSLink(LINKID id,
Node<NODEID> startNode,
Node<NODEID> endNode,
OTSLine3D designLine)
Construct a new link with infinite capacity.
|
OTSLink(LINKID id,
Node<NODEID> startNode,
Node<NODEID> endNode,
OTSLine3D designLine,
DoubleScalar.Abs<FrequencyUnit> capacity)
Construct a new link.
|
| Modifier and Type | Method and Description |
|---|---|
javax.media.j3d.Bounds |
getBounds() |
DoubleScalar.Abs<FrequencyUnit> |
getCapacity() |
OTSLine3D |
getDesignLine() |
Node<NODEID> |
getEndNode() |
LINKID |
getId() |
DoubleScalar.Rel<LengthUnit> |
getLength() |
DirectedPoint |
getLocation() |
Node<NODEID> |
getStartNode() |
void |
setCapacity(DoubleScalar.Abs<FrequencyUnit> capacity)
Set the link capacity.
|
String |
toString() |
public OTSLink(LINKID id, Node<NODEID> startNode, Node<NODEID> endNode, OTSLine3D designLine, DoubleScalar.Abs<FrequencyUnit> capacity)
id - the link idstartNode - start node (directional)endNode - end node (directional)designLine - the OTSLine3D design line of the Linkcapacity - link capacity in GTUs per hourpublic final Node<NODEID> getStartNode()
getStartNode in interface Link<LINKID,NODEID>public final Node<NODEID> getEndNode()
getEndNode in interface Link<LINKID,NODEID>public final DoubleScalar.Abs<FrequencyUnit> getCapacity()
getCapacity in interface Link<LINKID,NODEID>public final void setCapacity(DoubleScalar.Abs<FrequencyUnit> capacity)
setCapacity in interface Link<LINKID,NODEID>capacity - the new capacity of the link as a frequency in GTUs per time unit.public final OTSLine3D getDesignLine()
getDesignLine in interface Link<LINKID,NODEID>public final DoubleScalar.Rel<LengthUnit> getLength()
public final DirectedPoint getLocation() throws RemoteException
getLocation in interface LocatableInterfaceRemoteExceptionpublic final javax.media.j3d.Bounds getBounds()
throws RemoteException
getBounds in interface LocatableInterfaceRemoteExceptionCopyright © 2014–2015 Delft University of Technology. All rights reserved.