Interface LinkSegment
-
- All Superinterfaces:
Comparable<Idable>,EdgeSegment,ExternalIdable,Idable,Serializable
- All Known Subinterfaces:
MacroscopicLinkSegment
- All Known Implementing Classes:
LinkSegmentImpl,MacroscopicLinkSegmentImpl
public interface LinkSegment extends EdgeSegment
Interface for direction link segment part of non-directional link.- 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 doubleMAXIMUM_DENSITYDefault maximum link density in pcu/km
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetLinkSegmentId()Return id of this instance.intgetNumberOfLanes()Collect the number of lanes of this segmentLinkgetParentLink()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 roadvoidsetNumberOfLanes(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.planit.utils.graph.EdgeSegment
clone, getDownstreamVertex, getParentEdge, getUpstreamVertex, isDirectionAb, remove, removeParentEdge, replace, setDownstreamVertex, setParentEdge, setUpstreamVertex, validate
-
Methods inherited from interface org.planit.utils.id.ExternalIdable
getExternalId, getXmlId, hasExternalId, hasXmlId, setExternalId, setXmlId
-
Methods inherited from interface org.planit.utils.id.Idable
compareTo, getId, idEquals, idHashCode
-
-
-
-
Field Detail
-
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
-
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
-
getParentLink
Link getParentLink()
Return the parent link of this link segment- Returns:
- Link object which is the parent of this link segment
-
-