Class TntpZoningReader
- java.lang.Object
-
- org.goplanit.converter.BaseReaderImpl<Zoning>
-
- org.goplanit.tntp.converter.zoning.TntpZoningReader
-
- All Implemented Interfaces:
ConverterEntity
,ConverterReader<Zoning>
,ZoningReader
public class TntpZoningReader extends BaseReaderImpl<Zoning> implements ZoningReader
Zoning reader component for TNTP data format. Note that zones are implicitly defined with a single connector in this format, meaning that the first X entries of the links in the network file represent the connector links to X zones (in metadata). to still accomodate this in PLANit, we treat the connector links as physical links (as often they are given a physical capacity in TNTP), and in front of it create a connectoid with a zero length connectoid segment. This also requires one to use a fixed cost connectoid setup since the connectoid has no length in TNTP.- Author:
- gman, markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.converter.BaseReaderImpl
sourceIdTracker
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TntpZoningReader(TntpZoningReaderSettings zoningSettings, NetworkReader referenceNetworkReader)
Constructorprotected
TntpZoningReader(TntpZoningReaderSettings zoningSettings, MacroscopicNetwork referenceNetwork, Zoning zoningToPopulate)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MacroscopicNetwork
getReferenceNetwork()
TntpZoningReaderSettings
getSettings()
any settings to configure the reader can be configured by collecting these settingsZoning
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.zoning.ZoningReader
getTypeDescription
-
-
-
-
Constructor Detail
-
TntpZoningReader
protected TntpZoningReader(TntpZoningReaderSettings zoningSettings, NetworkReader referenceNetworkReader)
Constructor- Parameters:
zoningSettings
- to usereferenceNetworkReader
- to use
-
TntpZoningReader
protected TntpZoningReader(TntpZoningReaderSettings zoningSettings, MacroscopicNetwork referenceNetwork, Zoning zoningToPopulate)
Constructor- Parameters:
zoningSettings
- to usereferenceNetwork
- to usezoningToPopulate
- to use
-
-
Method Detail
-
getSettings
public TntpZoningReaderSettings getSettings()
any settings to configure the reader can be configured by collecting these settings- Specified by:
getSettings
in interfaceConverterReader<Zoning>
- Returns:
- the settings to configrue the reader
-
read
public Zoning read()
parse the network based on the configuration of the implementing class to yield a PLANit network- Specified by:
read
in interfaceConverterReader<Zoning>
- Returns:
- parsed network
-
getReferenceNetwork
public MacroscopicNetwork getReferenceNetwork()
-
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<Zoning>
-
-