Package org.goplanit.assignment.ltm.sltm
Class StaticLtmLinkOutputTypeAdapter
- java.lang.Object
-
- org.goplanit.output.adapter.OutputTypeAdapterImpl
-
- org.goplanit.output.adapter.UntypedLinkOutputTypeAdapterImpl<MacroscopicLinkSegment>
-
- org.goplanit.output.adapter.MacroscopicLinkOutputTypeAdapterImpl
-
- org.goplanit.assignment.ltm.sltm.StaticLtmLinkOutputTypeAdapter
-
- All Implemented Interfaces:
MacroscopicLinkOutputTypeAdapter
,OutputTypeAdapter
,UntypedLinkOutputTypeAdapter<MacroscopicLinkSegment>
public class StaticLtmLinkOutputTypeAdapter extends MacroscopicLinkOutputTypeAdapterImpl
Adapter providing access to the data of the StaticLtm class relevant for link outputs without exposing the internals of the traffic assignment class itself- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.output.adapter.OutputTypeAdapterImpl
outputType
-
-
Constructor Summary
Constructors Constructor Description StaticLtmLinkOutputTypeAdapter(OutputType outputType, TrafficAssignment trafficAssignment)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StaticLtm
getAssignment()
Access the assignmentOptional<?>
getLinkSegmentOutputPropertyValue(OutputProperty outputProperty, MacroscopicLinkSegment linkSegment, Mode mode, TimePeriod timePeriod)
Return the value of a specified output property of a link segment The DENSITY case should never be called for TraditionalStaticAssignment.Optional<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 class org.goplanit.output.adapter.MacroscopicLinkOutputTypeAdapterImpl
getInfrastructureLayerIdForMode, getPhysicalLinkSegments
-
Methods inherited from class org.goplanit.output.adapter.UntypedLinkOutputTypeAdapterImpl
getLinkSegmentOutputPropertyValue
-
Methods inherited from class org.goplanit.output.adapter.OutputTypeAdapterImpl
createConvertedUnitsValue, getIterationIndexForSubOutputType, getOutputType, getOutputTypeIndependentPropertyValue
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.output.adapter.MacroscopicLinkOutputTypeAdapter
getCapacityPerLanePcuHour, getDownstreamNodeExternalId, getLinkSegmentTypeId, getLinkSegmentTypeName, getLinkSegmentTypeXmlId, getMaximumDensity, getMaximumSpeed
-
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, getUpstreamNodeExternalId, getUpstreamNodeId, getUpstreamNodeLocation, getUpstreamNodeXmlId
-
-
-
-
Constructor Detail
-
StaticLtmLinkOutputTypeAdapter
public StaticLtmLinkOutputTypeAdapter(OutputType outputType, TrafficAssignment trafficAssignment)
Constructor- Parameters:
outputType
- the output type for the current persistencetrafficAssignment
- the traffic assignment used to provide the data
-
-
Method Detail
-
getAssignment
protected StaticLtm getAssignment()
Access the assignment- Overrides:
getAssignment
in classOutputTypeAdapterImpl
- Returns:
- the assignment
-
isFlowPositive
public 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
public Optional<?> getLinkSegmentOutputPropertyValue(OutputProperty outputProperty, MacroscopicLinkSegment linkSegment, Mode mode, TimePeriod timePeriod)
Return the value of a specified output property of a link segment The DENSITY case should never be called for TraditionalStaticAssignment.- Specified by:
getLinkSegmentOutputPropertyValue
in interfaceMacroscopicLinkOutputTypeAdapter
- Overrides:
getLinkSegmentOutputPropertyValue
in classMacroscopicLinkOutputTypeAdapterImpl
- 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 message if an error occurs)
-
-