Package org.goplanit.matsim.converter
Class MatsimPtServicesWriterSettings
- java.lang.Object
-
- org.goplanit.converter.FileBasedConverterWriterSettings
-
- org.goplanit.converter.SingleFileBasedConverterWriterSettings
-
- org.goplanit.matsim.util.PlanitMatsimWriterSettings
-
- org.goplanit.matsim.util.PlanitMatsimWriterModeMappingSettings
-
- org.goplanit.matsim.converter.MatsimPtServicesWriterSettings
-
- All Implemented Interfaces:
ConverterWriterSettings
public class MatsimPtServicesWriterSettings extends PlanitMatsimWriterModeMappingSettings
Settings specific to writing the routed services and related output in MATSim format (pt), including the service network information- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
AWAIT_DEPARTURE_DEFAULT
default value aligned with MATSim default-
Fields inherited from class org.goplanit.matsim.util.PlanitMatsimWriterModeMappingSettings
activatedPlanitModes, DEFAULT_ACTIVATED_MODES, DEFAULT_PLANIT2MATSIM_MODE_MAPPING, DEFAULT_PRIVATE_TRANSPORT_MODE, DEFAULT_PUBLIC_TRANSPORT_MODE, DEFAULT_RESTRICT_SPEED_LIMIT_BY_SUPPORTED_MODE, planit2MatsimModeMapping
-
Fields inherited from class org.goplanit.matsim.util.PlanitMatsimWriterSettings
decimalFormat, DEFAULT_NETWORK_FILE_NAME, DEFAULT_TRANSIT_SCHEDULE_FILE_NAME
-
Fields inherited from class org.goplanit.converter.FileBasedConverterWriterSettings
DEFAULT_COUNTRY, destinationCoordinateReferenceSystem
-
-
Constructor Summary
Constructors Constructor Description MatsimPtServicesWriterSettings()
Default constructor using default output file name and Global country nameMatsimPtServicesWriterSettings(String countryName)
Default constructorMatsimPtServicesWriterSettings(String outputDirectory, String countryName)
ConstructorMatsimPtServicesWriterSettings(String outputDirectory, String outputFileName, String countryName)
ConstructorMatsimPtServicesWriterSettings(PlanitMatsimWriterModeMappingSettings settings)
Copy Constructor based on PlanitMatsimWriterModeMappingSettings
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isAwaitDepartures()
protected void
logSettingsWithoutModeMapping()
Log settings but do not use parent class log settings as it is assumed this writer is always used in conjunction with MATsim network writer and we shared the mode mapping with these settings which will already be logged.void
reset()
Reset contentvoid
setAwaitDepartures(boolean awaitDepartures)
when set to true all transit lines by default will be flagged to await departure based on their schedule-
Methods inherited from class org.goplanit.matsim.util.PlanitMatsimWriterModeMappingSettings
activatePredefinedMode, collectActivatedPlanitModeToMatsimModeMapping, createDefaultActivatedPlanitModes, createDefaultPredefinedModeMappings, deactivateAllModes, deactivatePredefinedMode, getDefaultPredefinedModeMappings, logSettings, updatePredefinedModeMapping
-
Methods inherited from class org.goplanit.matsim.util.PlanitMatsimWriterSettings
getDecimalFormat, setDecimalFormat
-
Methods inherited from class org.goplanit.converter.SingleFileBasedConverterWriterSettings
getFileName, logSettings, setFileName, validate
-
Methods inherited from class org.goplanit.converter.FileBasedConverterWriterSettings
getCountry, getDestinationCoordinateReferenceSystem, getOutputDirectory, setCountry, setDestinationCoordinateReferenceSystem, setOutputDirectory
-
-
-
-
Field Detail
-
AWAIT_DEPARTURE_DEFAULT
public static final boolean AWAIT_DEPARTURE_DEFAULT
default value aligned with MATSim default- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MatsimPtServicesWriterSettings
public MatsimPtServicesWriterSettings()
Default constructor using default output file name and Global country name
-
MatsimPtServicesWriterSettings
public MatsimPtServicesWriterSettings(String countryName)
Default constructor- Parameters:
countryName
- to use
-
MatsimPtServicesWriterSettings
public MatsimPtServicesWriterSettings(String outputDirectory, String countryName)
Constructor- Parameters:
outputDirectory
- to usecountryName
- to use
-
MatsimPtServicesWriterSettings
public MatsimPtServicesWriterSettings(String outputDirectory, String outputFileName, String countryName)
Constructor- Parameters:
outputDirectory
- to useoutputFileName
- to usecountryName
- to use
-
MatsimPtServicesWriterSettings
public MatsimPtServicesWriterSettings(PlanitMatsimWriterModeMappingSettings settings)
Copy Constructor based on PlanitMatsimWriterModeMappingSettings- Parameters:
settings
- to apply
-
-
Method Detail
-
logSettingsWithoutModeMapping
protected void logSettingsWithoutModeMapping()
Log settings but do not use parent class log settings as it is assumed this writer is always used in conjunction with MATsim network writer and we shared the mode mapping with these settings which will already be logged. todo: in future if there is a use case for the pt services to be persisted stand alone, then we can because we already have the mode mapping as part of its settings, but then we would want to log this mapping to the user in which case this method needs adjusting to be configurable, either do or do not log the mode mapping depending on the use case. Currently this mapping is simply not logged.
-
reset
public void reset()
Reset content- Specified by:
reset
in interfaceConverterWriterSettings
- Overrides:
reset
in classPlanitMatsimWriterModeMappingSettings
-
isAwaitDepartures
public boolean isAwaitDepartures()
- Returns:
- await departures flag
-
setAwaitDepartures
public void setAwaitDepartures(boolean awaitDepartures)
when set to true all transit lines by default will be flagged to await departure based on their schedule- Parameters:
awaitDepartures
- set await departures flag
-
-