iduedu.TransportRegistry

class iduedu.TransportRegistry(specs=None)[source]

Registry of available public-transport modes and their specifications.

The registry stores TransportSpec objects indexed by normalized transport type names (lowercase). It provides utilities for validating transport types, updating parameters, and ensuring that unknown types encountered during parsing are assigned reasonable defaults.

The registry is used throughout graph construction to compute per-edge travel times consistently across different transport modes.

Parameters:

specs (dict[str, TransportSpec] | None)

__init__(specs=None)[source]
Parameters:

specs (dict[str, TransportSpec] | None)

Methods

__init__([specs])

add(spec, *[, overwrite])

ensure(name, *[, defaults])

get(name)

list_types()

remove(name)

try_get(name)

update(transport_type, **fields)