revrt.routing.cli.point_to_point.PointToPointRouteDefinitionConverter#
- class PointToPointRouteDefinitionConverter(cost_fpath, route_points, out_fp, routing_options, transmission_config=None, drivers=None, transition_costs=None)[source]#
Bases:
RouteToDefinitionConverterConvert route points DataFrame to route definition for Rust
- Parameters:
cost_fpath (path-like) – Path to layered Zarr file containing cost and other required routing layers.
route_points (
pandas.DataFrame) – DataFrame defining the points to be routed. This DataFrame should contain route definitions to be transformed and passed down to the Rust routing algorithm. Provide route values for polarity and voltage when cost multipliers or transition costs depend on them. Values may be supplied as one sharedpolarity/voltagepair or as a full per-option set ofpolarity_<option>/voltage_<option>columns.out_fp (path-like) – Path to output file where computed routes will be saved. This file will be checked for existing routes to avoid recomputation.
routing_options (
dict) – Mapping of routing-option names to dictionaries describing the cost, friction, and barrier layers for each option. SeeRoutingOptionConfig.transmission_config (path-like or
dict, optional) – Dictionary of transmission cost configuration values, or path to JSON/JSON5 file containing this dictionary. See the description ofrevrt.routing.cli.point_to_point.compute_lcp_routes()for more details. By default,None.drivers (
dict, optional) – Optional driver-rule configuration keyed by routing option. By default,None.transition_costs (
dict, optional) – Optional transition-cost configuration between routing options. A voltage/polarity-dependent cost requires matching values for every affected routing option. By default,None.
Methods
Attributes
Metadata from cost file (CRS, transform, shape)
Already computed routes in the output file
Number of routes to be computed
Validated routing points
- property route_points#
Validated routing points
- Type: