Phase Mappers#
- class shift.BasePhaseMapper(graph: DistributionGraph)#
Abstract class for getting phase mappings for nodes and assets.
Subclasses must implement following methods. * node_phase_mapping * asset_phase_mapping
- Parameters:
graph (DistributionGraph) – Instance of DistributionGraph for which to implement phase mapping.
- abstract property node_phase_mapping: dict[str, set[Phase]]#
Returns node to phase mapping dictionary.
- Returns:
Dictionary mapping node name to set of phases.
- Return type:
dict[str, set[Phase]]
- abstract property asset_phase_mapping: dict[str, dict[Annotated[Type[DistributionLoad] | Type[DistributionSolar] | Type[DistributionCapacitor] | Type[DistributionVoltageSource], FieldInfo(annotation=NoneType, required=True, description='Possible node types.')], set[Phase]]]#
Returns asset to phase mapping.
- Returns:
Dict of dicts mapping nodename to asset type to list of phases.
- Return type:
dict[str, dict[VALID_NODE_TYPES, set[Phase]]]
- abstract property transformer_phase_mapping: dict[str, set[Phase]]#
Returns transformer phase mapping.
- Return type:
dict[str, set[Phase]]