revrt.models.routing.RoutingCostLayer#
- class RoutingCostLayer(*, layer_name: str, multiplier_layer: str | None = None, multiplier_scalar: float = 1, is_invariant: bool = False, include_in_final_cost: bool = True, include_in_report: bool = True, apply_row_mult: bool = False, apply_polarity_mult: bool = False)[source]#
Bases:
BaseModelConfig for one cost layer in a routing option
Cost layers are summed to build the routing cost surface for an option. Each layer may be rescaled before aggregation and may also opt out of final-cost reporting while still influencing routing.
The rest of this docstring is inserted by Pydantic and can be ignored.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Methods
Attributes
Name of layer in layered file containing cost data
Optional layer of spatial multipliers applied before summation
Optional scalar multiplier applied before summation
Skip path-length scaling when
TrueInclude this layer in final route cost output when
TrueReport this layer's cost and distance outputs if
TrueApply the transmission
row_widthmultiplier whenTrueApply the voltage and polarity multiplier when
True- is_invariant: bool#
Skip path-length scaling when
TrueUse this for layers whose values are already lump-sum route costs, such as fixed-dollar costs to cross into a region.
- apply_row_mult: bool#
Apply the transmission
row_widthmultiplier whenTrueThe routing table input should resolve a voltage value for each routing option, either from the shared voltage column or from voltage_<option> column. Every resolved voltage value must be given in the “row_width” dictionary in the transmission config, otherwise an error will be thrown.
- apply_polarity_mult: bool#
Apply the voltage and polarity multiplier when
TrueThe routing table input should resolve both a voltage and a polarity value for each routing option, either from shared columns or from voltage_<option> / polarity_<option> columns, and the transmission config must provide each combination in
voltage_polarity_mult. For example, a valid “voltage_polarity_mult” dictionary in the transmission config might be{"138": {"ac": 1.15, "dc": 2}}.Important
The configured multiplier is assumed to be in million dollars per mile and is converted to dollars per pixel before being applied.