.overwrite_capacity_max_density_defaults(+)
Description
Override the default capacity (pcu/h/lane) and maximum density (pcu/km/lane) for the given OSM railway type. It is unlikely that these values are utilised in public transport assignment since they generally do not rely on capacity and maximum density of the infrastructure. Still, they are available analogous to road based infrastructure.
Original defaults are country specific and when no country is provided to the reader, the global defaults will be in place.
The provided types need to be in line with the OSM railwaytypes’ name as outlined by Open Street Maps, see also https://wiki.openstreetmap.org/wiki/Key:railway
Signature
.overwrite_capacity_max_density_defaults(railway_type:str, capacity:float, max_density:float)
with
Parameter | Type | Unit | Default | Description |
---|---|---|---|---|
railway_type |
String |
None |
N/A | OSM railway type to set the new defaults for |
capacity |
Float |
pcu/h/lane |
N/A | New capacity to use |
max_density |
Float |
pcu/km/lane |
N/A | New maximum density to use |
Return type
N/A
Example 1
from planit import *
# create a network converter
planit_instance = Planit()
network_converter = planit_instance.converter_factory.create(ConverterType.NETWORK)
# Open Street Map (OSM) network reader
osm_reader = network_converter.create_reader(NetworkReaderType.OSM, "<country_name>")
osm_reader.settings.set_input_file("<path_to_input_file>")
# set new defaults for capacity and max density on regular rail (just an example, likely no suitable for any assignment)
osm_reader.settings.activate_railway_parser(True)
osm_reader.settings.railway_settings.overwrite_capacity_max_density_defaults("rail", 10000, 2)
See also
N/A
Source code
Class OsmRailwaySettingsWrapper
in converterwrappers.py