commonpower.extensions.network_import.PandaPowerImporter
- class PandaPowerImporter(bus_type: ~commonpower.core.Bus = <class 'commonpower.core.Bus'>)[source]
Bases:
objectThis class can be used to import pandapower networks into CommonPower. It specifies a mapping between pandapower and CommonPower elements and outputs the converted system. At the moment, this importer only imports busses, lines, and trafos (as high admittance lines) and does not consider any components or data sources.
- Parameters:
node_type (Node) – (Sub-)Class of Node to be mapped to pandapower busses. Defaults to Node.
Methods
get_bus_node_mappingImports the given pandapowerNet as commonpower net and, if given, generates busses with components based on the passed factory.
- import_net(net: pandapowerNet, power_flow_model: PowerFlowModel, node_factory: None | Factory = None, restrict_factory_to: str = '') System[source]
Imports the given pandapowerNet as commonpower net and, if given, generates busses with components based on the passed factory.
- Parameters:
net (pandapowerNet) – Network to import.
power_flow_model (PowerFlowModel) – Power flow model instance to be used.
node_factory (Union[None, Factory], optional) – Factory to generate nodes and their sub-components. Defaults to None.
restrict_factory_to (str, optional) – Restricts the use of the factory to nodes containing this string in their pandapowerNet name. All other nodes are generated purely based on the Importer’s mapping. Defaults to “”.
- Returns:
System – Generated system.