public interface Link extends Locatable, Serializable
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2016-09-17 13:24:58 +0200 (Sat, 17 Sep 2016) $, @version $Revision: 2262 $, by $Author: averbraeck $,
initial version Aug 19, 2014
| Modifier and Type | Field and Description |
|---|---|
static nl.tudelft.simulation.event.EventType |
GTU_ADD_EVENT
The timed event type for pub/sub indicating the addition of a GTU to the link.
|
static nl.tudelft.simulation.event.EventType |
GTU_REMOVE_EVENT
The timed event type for pub/sub indicating the removal of a GTU from the link.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDirectionality(GTUType gtuType,
LongitudinalDirectionality directionality)
This method sets the directionality of the link for a GTU type.
|
void |
addGTU(GTU gtu)
Add a GTU to this link (e.g., for statistical purposes, or for a model on macro level).
|
OTSLine3D |
getDesignLine() |
LongitudinalDirectionality |
getDirectionality(GTUType gtuType)
This method returns the directionality of the link for a GTU type.
|
Node |
getEndNode() |
int |
getGTUCount()
Provide the number of GTUs on this link.
|
Set<GTU> |
getGTUs()
Provide a safe copy of the set of GTUs.
|
String |
getId() |
org.djunits.value.vdouble.scalar.Length |
getLength() |
LinkType |
getLinkType() |
Network |
getNetwork()
Return the network in which this link is registered.
|
Node |
getStartNode() |
void |
removeDirectionality(GTUType gtuType)
This method removes an earlier provided directionality of the link for a given GTU type, e.g.
|
void |
removeGTU(GTU gtu)
Remove a GTU from this link.
|
getBounds, getLocationstatic final nl.tudelft.simulation.event.EventType GTU_ADD_EVENT
static final nl.tudelft.simulation.event.EventType GTU_REMOVE_EVENT
Network getNetwork()
String getId()
Node getStartNode()
Node getEndNode()
LinkType getLinkType()
OTSLine3D getDesignLine()
org.djunits.value.vdouble.scalar.Length getLength()
LongitudinalDirectionality getDirectionality(GTUType gtuType)
gtuType - the GTU type to request the directionality forvoid addDirectionality(GTUType gtuType, LongitudinalDirectionality directionality)
gtuType - the GTU type to set the directionality for.directionality - the longitudinal directionality of the link (FORWARD, BACKWARD, BOTH or NONE) for the given GTU
type.void removeDirectionality(GTUType gtuType)
gtuType - the GTU type to remove the directionality for.void addGTU(GTU gtu)
gtu - GTU; the GTU to add.void removeGTU(GTU gtu)
gtu - GTU; the GTU to remove.Set<GTU> getGTUs()
int getGTUCount()
Copyright © 2014–2016 Delft University of Technology. All rights reserved.