Package org.goplanit.output.adapter
Class MacroscopicLinkOutputTypeAdapterImpl
- java.lang.Object
-
- org.goplanit.output.adapter.OutputTypeAdapterImpl
-
- org.goplanit.output.adapter.UntypedLinkOutputTypeAdapterImpl<MacroscopicLinkSegment>
-
- org.goplanit.output.adapter.MacroscopicLinkOutputTypeAdapterImpl
-
- All Implemented Interfaces:
MacroscopicLinkOutputTypeAdapter,OutputTypeAdapter,UntypedLinkOutputTypeAdapter<MacroscopicLinkSegment>
- Direct Known Subclasses:
StaticLtmLinkOutputTypeAdapter,TraditionalStaticAssignmentLinkOutputTypeAdapter
public abstract class MacroscopicLinkOutputTypeAdapterImpl extends UntypedLinkOutputTypeAdapterImpl<MacroscopicLinkSegment> implements MacroscopicLinkOutputTypeAdapter
Top-level abstract class which defines the common methods required by macroscopic link output type adapters. Specifically designed for adoption of networks with macroscopic link segments.- Author:
- gman6028, markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.output.adapter.OutputTypeAdapterImpl
outputType
-
-
Constructor Summary
Constructors Constructor Description MacroscopicLinkOutputTypeAdapterImpl(OutputType outputType, TrafficAssignment trafficAssignment)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<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 segment The DENSITY case should never be called for TraditionalStaticAssignment.MacroscopicLinkSegmentsgetPhysicalLinkSegments(long infrastructureLayerId)Provide access to the macroscopic link segments-
Methods inherited from class org.goplanit.output.adapter.UntypedLinkOutputTypeAdapterImpl
getLinkSegmentOutputPropertyValue
-
Methods inherited from class org.goplanit.output.adapter.OutputTypeAdapterImpl
createConvertedUnitsValue, getAssignment, 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, isFlowPositive
-
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
-
MacroscopicLinkOutputTypeAdapterImpl
public MacroscopicLinkOutputTypeAdapterImpl(OutputType outputType, TrafficAssignment trafficAssignment)
Constructor- Parameters:
outputType- the OutputType this adapter corresponds totrafficAssignment- TrafficAssignment object which this adapter wraps
-
-
Method Detail
-
getInfrastructureLayerIdForMode
public Optional<Long> getInfrastructureLayerIdForMode(Mode mode)
collect the infrastructure layer id this mode resides on- Specified by:
getInfrastructureLayerIdForModein interfaceMacroscopicLinkOutputTypeAdapter- Parameters:
mode- to collect layer id for- Returns:
- infrastructure layer id, null if not found
-
getPhysicalLinkSegments
public MacroscopicLinkSegments getPhysicalLinkSegments(long infrastructureLayerId)
Provide access to the macroscopic link segments- Specified by:
getPhysicalLinkSegmentsin interfaceUntypedLinkOutputTypeAdapter<MacroscopicLinkSegment>- Parameters:
infrastructureLayerId- to use- Returns:
- a List of link segments for this assignment
-
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:
getLinkSegmentOutputPropertyValuein interfaceMacroscopicLinkOutputTypeAdapter- 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)
-
-