public class OTSLink extends Object implements Link, 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-08-30 00:16:51 +0200 (Sun, 30 Aug 2015) $, @version $Revision: 1329 $, by $Author: averbraeck $,
initial version Aug 19, 2014
| Constructor and Description |
|---|
OTSLink(String id,
Node startNode,
Node endNode,
OTSLine3D designLine)
Construct a new link with infinite capacity.
|
OTSLink(String id,
Node startNode,
Node endNode,
OTSLine3D designLine,
org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.FrequencyUnit> capacity)
Construct a new link.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Bounds |
getBounds() |
org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.FrequencyUnit> |
getCapacity() |
OTSLine3D |
getDesignLine() |
Node |
getEndNode() |
String |
getId() |
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> |
getLength() |
DirectedPoint |
getLocation() |
Node |
getStartNode() |
int |
hashCode() |
void |
setCapacity(org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.FrequencyUnit> capacity)
Set the link capacity.
|
String |
toString() |
public OTSLink(String id, Node startNode, Node endNode, OTSLine3D designLine, org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.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 getStartNode()
getStartNode in interface Linkpublic final Node getEndNode()
getEndNode in interface Linkpublic final org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.FrequencyUnit> getCapacity()
getCapacity in interface Linkpublic final void setCapacity(org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.FrequencyUnit> capacity)
setCapacity in interface Linkcapacity - the new capacity of the link as a frequency in GTUs per time unit.public final OTSLine3D getDesignLine()
getDesignLine in interface Linkpublic final org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> getLength()
public final DirectedPoint getLocation() throws RemoteException
getLocation in interface LocatableInterfaceRemoteExceptionpublic final Bounds getBounds() throws RemoteException
getBounds in interface LocatableInterfaceRemoteExceptionCopyright © 2014–2015 Delft University of Technology. All rights reserved.