Class TntpNetworkReader
- java.lang.Object
-
- org.goplanit.converter.BaseReaderImpl<LayeredNetwork<?,?>>
-
- org.goplanit.tntp.converter.network.TntpNetworkReader
-
- All Implemented Interfaces:
ConverterEntity
,ConverterReader<LayeredNetwork<?,?>>
,NetworkReader
public class TntpNetworkReader extends BaseReaderImpl<LayeredNetwork<?,?>> implements NetworkReader
Network reader component for TNTP data format- Author:
- gman, markr
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_LANE_CAPACITY_PCUH
static int
ONE_WAY_AB
static int
ONE_WAY_BA
static int
TWO_WAY
-
Fields inherited from class org.goplanit.converter.BaseReaderImpl
sourceIdTracker
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TntpNetworkReader(TntpNetworkReaderSettings settings, LayeredNetwork<?,?> network)
Constructorprotected
TntpNetworkReader(TntpNetworkReaderSettings networkSettings, IdGroupingToken idToken)
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)TntpNetworkReaderSettings
getSettings()
any settings to configure the reader can be configured by collecting these settingsLayeredNetwork<?,?>
read()
parse the network based on the configuration of the implementing class to yield a PLANit networkvoid
reset()
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
-
DEFAULT_LANE_CAPACITY_PCUH
public static final int DEFAULT_LANE_CAPACITY_PCUH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TntpNetworkReader
protected TntpNetworkReader(TntpNetworkReaderSettings networkSettings, IdGroupingToken idToken)
Constructor- Parameters:
networkSettings
- to useidToken
- to use for to be created network
-
TntpNetworkReader
protected TntpNetworkReader(TntpNetworkReaderSettings settings, LayeredNetwork<?,?> network)
Constructor- Parameters:
settings
- to usenetwork
- to use
-
-
Method Detail
-
getSettings
public TntpNetworkReaderSettings getSettings()
any settings to configure the reader can be configured by collecting these settings- Specified by:
getSettings
in interfaceConverterReader<LayeredNetwork<?,?>>
- Returns:
- the settings to configrue the reader
-
read
public LayeredNetwork<?,?> read()
parse the network based on the configuration of the implementing class to yield a PLANit network- Specified by:
read
in interfaceConverterReader<LayeredNetwork<?,?>>
- Returns:
- parsed network
-
reset
public void reset()
reset the reader to allow for marking unnecessary resources for garbage collection- Specified by:
reset
in interfaceConverterEntity
- Overrides:
reset
in classBaseReaderImpl<LayeredNetwork<?,?>>
-
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
-
-