npap.AggregationProfile#

class npap.AggregationProfile[source]#

Bases: object

Configure aggregation separating physical from statistical operations.

This profile distinguishes between:

  1. Topology: How the graph structure is reduced

  2. Physical: Electrical laws that must be preserved (coupled properties)

  3. Statistical: Simple operations on independent properties

topology_strategy#

Strategy for graph structure reduction (“simple”, “electrical”).

Type:

str

physical_strategy#

Physical aggregation strategy (“kron_reduction”, “equivalent_impedance”).

Type:

str or None

physical_properties#

Properties handled by physical strategy (e.g., [“reactance”, “resistance”]).

Type:

list[str]

physical_parameters#

Additional parameters for physical strategies.

Type:

dict[str, Any]

node_properties#

Mapping of node property names to aggregation strategies.

Type:

dict[str, str]

edge_properties#

Mapping of edge property names to aggregation strategies.

Type:

dict[str, str]

edge_type_properties#

Per-edge-type strategy overrides. Maps edge type values (from the edge_type_attribute attribute on edges) to per-type property strategy dicts. When populated, edges are aggregated separately per type and the result graph is a MultiDiGraph with one edge per type per cluster pair. Falls back to edge_properties for edges whose type is not listed here.

Type:

dict[str, dict[str, str]]

edge_type_attribute#

Name of the edge attribute that stores the type label. Only used when edge_type_properties is populated. Defaults to "type".

Type:

str

default_node_strategy#

Default strategy for unspecified node properties.

Type:

str

default_edge_strategy#

Default strategy for unspecified edge properties.

Type:

str

warn_on_defaults#

Whether to warn when using default strategies.

Type:

bool

mode#

Indicator of which pre-defined mode is being used.

Type:

AggregationMode

Attributes:
physical_strategy
__init__(topology_strategy='simple', physical_strategy=None, physical_properties=<factory>, physical_parameters=<factory>, node_properties=<factory>, edge_properties=<factory>, edge_type_properties=<factory>, edge_type_attribute='type', default_node_strategy='average', default_edge_strategy='sum', warn_on_defaults=True, mode=AggregationMode.CUSTOM)#
Parameters:
Return type:

None

Methods

__init__([topology_strategy, ...])

Attributes

topology_strategy: str = 'simple'#
physical_strategy: str | None = None#
physical_properties: list[str]#
physical_parameters: dict[str, Any]#
node_properties: dict[str, str]#
edge_properties: dict[str, str]#
edge_type_properties: dict[str, dict[str, str]]#
edge_type_attribute: str = 'type'#
default_node_strategy: str = 'average'#
default_edge_strategy: str = 'sum'#
warn_on_defaults: bool = True#
mode: AggregationMode = 'custom'#
__init__(topology_strategy='simple', physical_strategy=None, physical_properties=<factory>, physical_parameters=<factory>, node_properties=<factory>, edge_properties=<factory>, edge_type_properties=<factory>, edge_type_attribute='type', default_node_strategy='average', default_edge_strategy='sum', warn_on_defaults=True, mode=AggregationMode.CUSTOM)#
Parameters:
Return type:

None