Interface LinkSegment
-
- All Superinterfaces:
Cloneable,Comparable<IdAble>,EdgeSegment,ExternalIdAble,GraphEntity,IdAble,ManagedId,Serializable
- All Known Subinterfaces:
MacroscopicLinkSegment
- All Known Implementing Classes:
LinkSegmentImpl,MacroscopicLinkSegmentImpl
public interface LinkSegment extends EdgeSegment
Interface for link segments (directional) part of link (non-directional).- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description static doubleDEFAULT_MAX_SPEEDDefault maximum speed on a link segment in km/hstatic shortDEFAULT_NUMBER_OF_LANESDefault number of lanesstatic Class<LinkSegment>LINK_SEGMENT_ID_CLASSadditional id class for generating link segment idsstatic doubleMAXIMUM_DENSITYDefault maximum link density in pcu/km-
Fields inherited from interface org.goplanit.utils.graph.EdgeSegment
EDGE_SEGMENT_ID_CLASS
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default NodegetDownstreamNode()Collect downstream vertex as nodeNodegetDownstreamVertex()Get the segment's downstream vertexlonggetLinkSegmentId()Return id of this instance.default Class<? extends LinkSegment>getLinkSegmentIdClass()Return class used to generate unique link ids via the id generatorintgetNumberOfLanes()Collect the number of lanes of this segmentLinkgetParentEdge()Collect the parent edge of the segmentdefault LinkgetParentLink()Return the parent link of this link segmentdoublegetPhysicalSpeedLimitKmH()This is the maximum speed (Km/h) that is physically present and a driver can observe from the signs on the roaddefault NodegetUpstreamNode()Collect upstream vertex as nodeNodegetUpstreamVertex()Get the segment's upstream vertexvoidsetNumberOfLanes(int numberOfLanes)Set the number of lanesvoidsetPhysicalSpeedLimitKmH(double maximumSpeedKmH)This is the maximum speed that is physically present and a driver can observe from the signs on the road (km/h)-
Methods inherited from interface org.goplanit.utils.graph.EdgeSegment
clone, getIdClass, getParentName, hasParentName, isDirectionAb, remove, removeParentEdge, replace, setDownstreamVertex, setParent, setUpstreamVertex, validate
-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
getExternalId, getXmlId, hasExternalId, hasXmlId, setExternalId, setXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
recreateManagedIds, resetChildManagedIdEntities
-
-
-
-
Field Detail
-
LINK_SEGMENT_ID_CLASS
static final Class<LinkSegment> LINK_SEGMENT_ID_CLASS
additional id class for generating link segment ids
-
DEFAULT_NUMBER_OF_LANES
static final short DEFAULT_NUMBER_OF_LANES
Default number of lanes- See Also:
- Constant Field Values
-
DEFAULT_MAX_SPEED
static final double DEFAULT_MAX_SPEED
Default maximum speed on a link segment in km/h- See Also:
- Constant Field Values
-
MAXIMUM_DENSITY
static final double MAXIMUM_DENSITY
Default maximum link density in pcu/km- See Also:
- Constant Field Values
-
-
Method Detail
-
getLinkSegmentIdClass
default Class<? extends LinkSegment> getLinkSegmentIdClass()
Return class used to generate unique link ids via the id generator- Returns:
- class type
-
getLinkSegmentId
long getLinkSegmentId()
Return id of this instance. This id is expected to be generated using the org.planit.utils.misc.IdGenerator- Returns:
- link segment id
-
getNumberOfLanes
int getNumberOfLanes()
Collect the number of lanes of this segment- Returns:
- number of lanes
-
setNumberOfLanes
void setNumberOfLanes(int numberOfLanes)
Set the number of lanes- Parameters:
numberOfLanes- to set
-
setPhysicalSpeedLimitKmH
void setPhysicalSpeedLimitKmH(double maximumSpeedKmH)
This is the maximum speed that is physically present and a driver can observe from the signs on the road (km/h)- Parameters:
maximumSpeedKmH- to set
-
getPhysicalSpeedLimitKmH
double getPhysicalSpeedLimitKmH()
This is the maximum speed (Km/h) that is physically present and a driver can observe from the signs on the road- Returns:
- maximumSpeedKmH
-
getParentEdge
Link getParentEdge()
Collect the parent edge of the segment- Specified by:
getParentEdgein interfaceEdgeSegment- Returns:
- parentEdge
-
getUpstreamVertex
Node getUpstreamVertex()
Get the segment's upstream vertex- Specified by:
getUpstreamVertexin interfaceEdgeSegment- Returns:
- upstream vertex
-
getDownstreamVertex
Node getDownstreamVertex()
Get the segment's downstream vertex- Specified by:
getDownstreamVertexin interfaceEdgeSegment- Returns:
- downstream vertex
-
getParentLink
default Link getParentLink()
Return the parent link of this link segment- Returns:
- Link object which is the parent of this link segment
-
getUpstreamNode
default Node getUpstreamNode()
Collect upstream vertex as node- Returns:
- upstream node
-
getDownstreamNode
default Node getDownstreamNode()
Collect downstream vertex as node- Returns:
- downstream node
-
-