Package org.goplanit.output.adapter
Interface MacroscopicLinkOutputTypeAdapter
-
- All Superinterfaces:
OutputTypeAdapter
,UntypedLinkOutputTypeAdapter<MacroscopicLinkSegment>
- All Known Implementing Classes:
MacroscopicLinkOutputTypeAdapterImpl
,StaticLtmLinkOutputTypeAdapter
,TraditionalStaticAssignmentLinkOutputTypeAdapter
public interface MacroscopicLinkOutputTypeAdapter extends UntypedLinkOutputTypeAdapter<MacroscopicLinkSegment>
Interface defining the methods required for a macroscopic link (segment) output adapter- Author:
- gman6028, markr
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Optional<Double>
getCapacityPerLanePcuHour(MacroscopicLinkSegment linkSegment)
Returns the value of the capacity per lanedefault Optional<String>
getDownstreamNodeExternalId(MacroscopicLinkSegment linkSegment)
Returns the external Id of the downstream nodeOptional<Long>
getInfrastructureLayerIdForMode(Mode mode)
collect the infrastructure layer id this mode resides onOptional<?>
getLinkSegmentOutputPropertyValue(OutputProperty outputProperty, MacroscopicLinkSegment linkSegment, Mode mode, TimePeriod timePeriod)
Return the value of a specified output property of a link segmentdefault Optional<Long>
getLinkSegmentTypeId(MacroscopicLinkSegment linkSegment)
Return the link segment type id of the current link segmentdefault Optional<String>
getLinkSegmentTypeName(MacroscopicLinkSegment linkSegment)
Return the link segment type name of the current link segmentdefault Optional<String>
getLinkSegmentTypeXmlId(MacroscopicLinkSegment linkSegment)
Return the link segment type xml id of the current link segmentdefault Optional<Double>
getMaximumDensity(MacroscopicLinkSegment linkSegment)
Returns the flow density of the current linkdefault Optional<Double>
getMaximumSpeed(MacroscopicLinkSegment linkSegment, Mode mode)
Returns the maximum speed through the current link segmentOptional<Boolean>
isFlowPositive(MacroscopicLinkSegment linkSegment, Mode mode)
Returns true if there is a flow through the current specified link segment for the specified mode-
Methods inherited from interface org.goplanit.output.adapter.OutputTypeAdapter
getIterationIndexForSubOutputType, getOutputType
-
Methods inherited from interface org.goplanit.output.adapter.UntypedLinkOutputTypeAdapter
getDownstreamNodeId, getDownstreamNodeLocation, getDownstreamNodeXmlId, getLength, getLinkSegmentExternalId, getLinkSegmentId, getLinkSegmentOutputPropertyValue, getLinkSegmentXmlId, getNumberOfLanes, getPhysicalLinkSegments, getUpstreamNodeExternalId, getUpstreamNodeId, getUpstreamNodeLocation, getUpstreamNodeXmlId
-
-
-
-
Method Detail
-
getCapacityPerLanePcuHour
default Optional<Double> getCapacityPerLanePcuHour(MacroscopicLinkSegment linkSegment) throws PlanItException
Returns the value of the capacity per lane- Parameters:
linkSegment
- LinkSegment containing data which may be required- Returns:
- the capacity per lane across this link segment
- Throws:
PlanItException
- thrown if there is an error
-
getLinkSegmentTypeName
default Optional<String> getLinkSegmentTypeName(MacroscopicLinkSegment linkSegment) throws PlanItException
Return the link segment type name of the current link segment- Parameters:
linkSegment
- the current link segment- Returns:
- the link segment type name
- Throws:
PlanItException
- thrown if there is an error
-
getLinkSegmentTypeId
default Optional<Long> getLinkSegmentTypeId(MacroscopicLinkSegment linkSegment) throws PlanItException
Return the link segment type id of the current link segment- Parameters:
linkSegment
- the current link segment- Returns:
- the link segment type id
- Throws:
PlanItException
- thrown if there is an error
-
getLinkSegmentTypeXmlId
default Optional<String> getLinkSegmentTypeXmlId(MacroscopicLinkSegment linkSegment) throws PlanItException
Return the link segment type xml id of the current link segment- Parameters:
linkSegment
- the current link segment- Returns:
- the link segment type xml id
- Throws:
PlanItException
- thrown if there is an error
-
getMaximumDensity
default Optional<Double> getMaximumDensity(MacroscopicLinkSegment linkSegment) throws PlanItException
Returns the flow density of the current link- Parameters:
linkSegment
- LinkSegment containing data which may be required- Returns:
- the flow density of the current link
- Throws:
PlanItException
- thrown if there is an error
-
getDownstreamNodeExternalId
default Optional<String> getDownstreamNodeExternalId(MacroscopicLinkSegment linkSegment) throws PlanItException
Returns the external Id of the downstream node- Specified by:
getDownstreamNodeExternalId
in interfaceUntypedLinkOutputTypeAdapter<MacroscopicLinkSegment>
- Parameters:
linkSegment
- LinkSegment object containing the required data- Returns:
- he external Id of the downstream node
- Throws:
PlanItException
- thrown if there is an error
-
getMaximumSpeed
default Optional<Double> getMaximumSpeed(MacroscopicLinkSegment linkSegment, Mode mode) throws PlanItException
Returns the maximum speed through the current link segment- Parameters:
linkSegment
- MacroscopicLinkSegment object containing the required datamode
- current mode- Returns:
- the maximum speed through the current link segment
- Throws:
PlanItException
- thrown if there is an error
-
getInfrastructureLayerIdForMode
Optional<Long> getInfrastructureLayerIdForMode(Mode mode)
collect the infrastructure layer id this mode resides on- Parameters:
mode
- to collect layer id for- Returns:
- infrastructure layer id, null if not found
-
isFlowPositive
Optional<Boolean> isFlowPositive(MacroscopicLinkSegment linkSegment, Mode mode)
Returns true if there is a flow through the current specified link segment for the specified mode- Parameters:
linkSegment
- specified link segmentmode
- specified mode- Returns:
- true is there is flow through this link segment, false if the flow is zero
-
getLinkSegmentOutputPropertyValue
Optional<?> getLinkSegmentOutputPropertyValue(OutputProperty outputProperty, MacroscopicLinkSegment linkSegment, Mode mode, TimePeriod timePeriod)
Return the value of a specified output property of a link segment- Parameters:
outputProperty
- the specified output propertylinkSegment
- the specified link segmentmode
- the current modetimePeriod
- the current time period- Returns:
- the value of the specified output property (or an Exception if an error occurs)
-
-