Asset Topology#
The Asset Topology is a central object for the Topology optimizer. It holds the topological information mapped from the node-breaker to the bus-branch model and back, enabling translation of topological actions between models using real switches.
Asset Topology is essential when bus groups do not allow free assignment of lines to busbars. It helps track valid assignments and ensures correct topology application.
Class Structure#
MasterAssetTopology
Stores the master bus-group structure used across import, preprocess, action storage, and postprocess. It containsMasterBusGrouprecords with topology-owned busbars, couplers, branch assets, injection assets, and asset bays, but no runtime switch state.
RuntimeAssetTopologyGroups the runtimeRuntimeBusGroupsnapshots for one topology view. Productive code often works directly on the pairMasterAssetTopology + list[RuntimeBusGroup].
MasterBusGroupRepresents the master bus-group view. Itsbus_group_idis the stable bus-group identity and is unique within a topology. Structural split groups use deterministic suffixes such as_a,_b,_c. A bus group is a group of busbars that are in some way connected by disconnectors or breakers, even if they are open
RuntimeBusGroup
Contains lists ofBusbar,BusbarCoupler, andSwitchableAsset.
Includesbranch_switching_tableandinjection_switching_tablefor the current switch connection layout, plusbranch_connectivityandinjection_connectivityfor physically allowed selections. The runtime bus group keeps the canonicalbus_group_idand may additionally expose activebus_branch_bus_idsthat identify the currently energized bus-branch buses belonging to that view.
RuntimeAssetConnectionAligns one runtime asset payload and optionalAssetBaywith one switching-table column inside aRuntimeBusGroup.
Busbar
Represents a single busbar in a bus group.
BusbarCoupler
Represents a coupler connecting twoBusbar. Note: the current implementation only supports a busbar connection between two busbars. It is planned to add an asset bay for both connection sides.
SwitchableAsset
Represents an asset (line, transformer, generator, etc.) that can be switched. You may leave out non-switchable assets or assign them to a single busbar to have a complete representation of the physicalRuntimeBusGroup.
-
AssetBay
Describes the physical connection (switches) between an asset and busbars. It may contain breaker and disconnector switches.The AssetBay class currently supports a bay setup with a Disconnector on
SwitchableAsset- Breaker - multiple Disconnectors onBusbar.Its switch identifiers are exposed as
asset_disconnector_grid_model_id,breaker_grid_model_id, andbusbar_disconnector_grid_model_idfor the asset disconnector, breaker, and busbar disconnectors respectively.- The Disconnector on the line side (example Line1) is supported, as this is commonly found in CGMES data, but is not further used in the current implementation.
- The Breaker of a branch is expected to be the one that connects and disconnects a line. Setups like T1 should have a selection process to decide which breaker will be written into the AssetBay class.
- The Disconnectors on
Busbarare selector switches, where only one of them should be closed at any time. Any preprocessing should find double connections, as this will break the later assumption that aBusbarsplit can be performed by opening theBusbarCoupler.

Note: An AssetBay expects that one Asset has its own bay. Combinations where two assets use shared switches are not supported.

Example: AssetBay configuration with two assets sharing switches (not supported).
AssetSetpoint
Represents an asset with a setpoint (e.g., PST or HVDC).
AppliedStationDeprecated compatibility wrapper around one applied runtime bus group and its diff.
RealizedTopology
Deprecated compatibility wrapper that combines runtime bus groups with diff information for older postprocessing paths.
API Reference#
See the Asset Topology Reference for full class and method documentation.
How to use / Implementation#
Bus-Group Identity And Asset Scope#
The current bus-group contract separates master structure from runtime state:
MasterBusGroup.bus_group_idis the master bus-group identity.RuntimeBusGroup.bus_group_idrefers to the same canonical bus group and carries the runtime switch state for that view.RuntimeBusGroup.bus_branch_bus_idscontains the active bus-branch bus ids currently materialized for that bus group.- Bus-group-local asset arrays and switching tables describe the runtime-local assets visible in that view and how they attach locally.
Master grouping is structural:
- Structural bus groups are derived independently of the current open or closed switch state.
- Open busbar couplers therefore stay inside the same canonical
bus_group_idwhen they are structurally part of the same bus group. - If one physical substation contains multiple structural groups, the importer assigns deterministic suffix ids such as
bus_group_a,bus_group_b,bus_group_c.
Runtime grouping is electrical:
- Runtime bus-group materialization maps the master bus group to the currently energized bus-branch buses.
- A runtime bus-group may expose fewer active bus ids than its canonical structure if parts of the group are disconnected.
- Preprocess and action generation must therefore distinguish between canonical grouping and runtime connectivity instead of deriving identity from legacy bus-group ids.
The current importer implementations are not fully uniform yet:
- The bus-breaker powsybl helper narrows busbars and assets to the selected runtime bus view before building the bus-group snapshot.
- Node-breaker and pandapower importers both build canonical
bus_group_idvalues first and then derive runtime bus-group views from the current network state.
For backend APIs, the intended split is:
get_master_data_asset_topology(...)returns the master structural bus-group data.get_runtime_asset_topology(...)returns the runtime materialized bus-group snapshots aligned to that canonical structure.
To populate Asset Topology data from grid models, use the Network Graph module.
A Pandapower to Asset Topology implementation is found in the grid helpers: get_master_asset_topology_from_network
Note: the Pandapower version does not currently use the Network Graph module.
A PyPowSyBl to Asset Topology implementation is found in the grid helpers Network Graph module: get_topology