Class TntpNetworkReader
- java.lang.Object
-
- org.goplanit.converter.BaseReaderImpl<TransportLayerNetwork<?,?>>
-
- org.goplanit.tntp.converter.network.TntpNetworkReader
-
- All Implemented Interfaces:
ConverterEntity,ConverterReader<TransportLayerNetwork<?,?>>,NetworkReader
public class TntpNetworkReader extends BaseReaderImpl<TransportLayerNetwork<?,?>> implements NetworkReader
Network reader component for TNTP data format- Author:
- gman, markr
-
-
Field Summary
Fields Modifier and Type Field Description static intONE_WAY_ABstatic intONE_WAY_BAstatic intTWO_WAY-
Fields inherited from class org.goplanit.converter.BaseReaderImpl
sourceIdTrackerMap
-
-
Constructor Summary
Constructors Constructor Description TntpNetworkReader(String networkFileLocation, String nodeCoordinateFileLocation)ConstructorTntpNetworkReader(String networkFileLocation, String nodeCoordinateFileLocation, TntpNetworkReaderSettings networkSettings)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<LinkSegment,Pair<Double,Double>>getParsedBprParameters()Provide read access to parsed bpr parameters of links (only available after parsing)TntpNetworkReaderSettingsgetSettings()any settings to configure the reader can be configured by collecting these settingsTransportLayerNetwork<?,?>read()parse the network based on the configuration of the implementing class to yield a PLANit networkvoidreset()reset the reader to allow for marking unnecessary resources for garbage collection-
Methods inherited from class org.goplanit.converter.BaseReaderImpl
getBySourceId, getSourceIdContainer, initialiseSourceIdMap, initialiseSourceIdMap, registerBySourceId, registerBySourceId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.converter.network.NetworkReader
getTypeDescription
-
-
-
-
Field Detail
-
ONE_WAY_AB
public static final int ONE_WAY_AB
- See Also:
- Constant Field Values
-
ONE_WAY_BA
public static final int ONE_WAY_BA
- See Also:
- Constant Field Values
-
TWO_WAY
public static final int TWO_WAY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TntpNetworkReader
public TntpNetworkReader(String networkFileLocation, String nodeCoordinateFileLocation) throws PlanItException
Constructor- Parameters:
networkFileLocation- to usenodeCoordinateFileLocation- to use- Throws:
PlanItException- thrown if error
-
TntpNetworkReader
public TntpNetworkReader(String networkFileLocation, String nodeCoordinateFileLocation, TntpNetworkReaderSettings networkSettings) throws PlanItException
Constructor- Parameters:
networkFileLocation- to usenodeCoordinateFileLocation- to usenetworkSettings- to use, when null new instance is created- Throws:
PlanItException- thrown if error
-
-
Method Detail
-
getSettings
public TntpNetworkReaderSettings getSettings()
any settings to configure the reader can be configured by collecting these settings- Specified by:
getSettingsin interfaceConverterReader<TransportLayerNetwork<?,?>>- Returns:
- the settings to configrue the reader
-
read
public TransportLayerNetwork<?,?> read() throws PlanItException
parse the network based on the configuration of the implementing class to yield a PLANit network- Specified by:
readin interfaceConverterReader<TransportLayerNetwork<?,?>>- Returns:
- parsed network
- Throws:
PlanItException- thrown if error
-
reset
public void reset()
reset the reader to allow for marking unnecessary resources for garbage collection- Specified by:
resetin interfaceConverterEntity
-
getParsedBprParameters
public Map<LinkSegment,Pair<Double,Double>> getParsedBprParameters()
Provide read access to parsed bpr parameters of links (only available after parsing)- Returns:
- parsed bpr parameters
-
-