IDL
- the ID type of the Link, e.g., String or Integer.IDN
- the ID type of the Node, e.g., String or Integer.P
- the type of Point that the Node uses.N
- the type of Node that this Link uses.public abstract class AbstractLink<IDL,IDN,P,N extends AbstractNode<IDN,P>> extends Object implements Link<IDL,N>, Serializable, nl.tudelft.simulation.dsol.animation.LocatableInterface
Copyright (c) 2013-2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
AbstractLink(IDL id,
N startNode,
N endNode,
DoubleScalar.Rel<LengthUnit> length)
Construct a a new link with infinite capacity.
|
AbstractLink(IDL id,
N startNode,
N endNode,
DoubleScalar.Rel<LengthUnit> length,
DoubleScalar.Abs<FrequencyUnit> capacity)
Construct a new link.
|
Modifier and Type | Method and Description |
---|---|
DoubleScalar.Abs<FrequencyUnit> |
getCapacity() |
N |
getEndNode() |
IDL |
getId() |
DoubleScalar.Rel<LengthUnit> |
getLength() |
N |
getStartNode() |
void |
setCapacity(DoubleScalar.Abs<FrequencyUnit> capacity)
Set the link capacity.
|
String |
toString() |
public AbstractLink(IDL id, N startNode, N endNode, DoubleScalar.Rel<LengthUnit> length, DoubleScalar.Abs<FrequencyUnit> capacity)
id
- the link idstartNode
- start node (directional)endNode
- end node (directional)length
- link length in a length unitcapacity
- link capacity in GTUs per hourpublic AbstractLink(IDL id, N startNode, N endNode, DoubleScalar.Rel<LengthUnit> length)
id
- the link idstartNode
- start node (directional)endNode
- end node (directional)length
- link length in a length unitpublic final IDL getId()
public final N getStartNode()
getStartNode
in interface Link<IDL,N extends AbstractNode<IDN,P>>
public final N getEndNode()
getEndNode
in interface Link<IDL,N extends AbstractNode<IDN,P>>
public final DoubleScalar.Abs<FrequencyUnit> getCapacity()
getCapacity
in interface Link<IDL,N extends AbstractNode<IDN,P>>
public final void setCapacity(DoubleScalar.Abs<FrequencyUnit> capacity)
Link
setCapacity
in interface Link<IDL,N extends AbstractNode<IDN,P>>
capacity
- set the link capacity.public final DoubleScalar.Rel<LengthUnit> getLength()
Copyright © 2014–2015 Delft University of Technology. All rights reserved.