revrt.routing.base.RoutingScenario#

class RoutingScenario(cost_fpath, routing_options, tracked_layers=None, drivers=None, transition_costs=None, invalid_costs_block_routing=True, algorithm='bidirectional_long_range_dijkstra')[source]#

Bases: object

Container for routing scenario configuration

Parameters:
  • cost_fpath (path-like) – Path to the cost layer Zarr store used for routing.

  • tracked_layers (list, optional) – List of dictionaries defining layers to summarize along the route after applying optional multiplier inputs. See TrackedLayer for the canonical schema.

  • routing_options (dict) – Mapping of routing-option names to dictionaries containing cost, friction, and barrier definitions. See RoutingOptionConfig for the canonical schema that is serialized for the Rust routing core.

  • drivers (dict, optional) – Optional driver-rule configuration keyed by routing option. See DriverConfig and DriverZoneConfig.

  • transition_costs (dict, optional) – Optional transition-cost configuration between routing options. See TransitionCostsConfig and TransitionCostRule.

  • invalid_costs_block_routing (bool, optional) – Flag indicating whether non-positive costs block traversal.

  • algorithm (str, default "bidirectional_long_range_dijkstra") – Routing algorithm implementation to use. Supported values are "astar", "long_range_astar", "long_range_dijkstra", "bidirectional_long_range_dijkstra", and "dijkstra". "astar" and "dijkstra" are in-memory implementations that do not respect the memory limit. Prefer a long-range option unless you know for a fact that your route computations will not need much memory and speed is very important to you. By default, "bidirectional_long_range_dijkstra".

Methods

Attributes

cost_function_json

JSON string describing configured cost layers

routing_option_names

Routing option names in solver index order

property routing_option_names#

Routing option names in solver index order

Type:

list

property cost_function_json[source]#

JSON string describing configured cost layers

Type:

str