Network¶
This module provides functions to load power grid networks from various sources.
load_net_from_pp
¶
Loads a network from the pandapower library.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
grid_name
|
str
|
Name of the grid case file in pandapower library. |
required |
Returns:
Name | Type | Description |
---|---|---|
pandapowerNet |
pandapowerNet
|
Loaded power network configuration. |
Source code in gridfm_datakit/network.py
10 11 12 13 14 15 16 17 18 19 20 |
|
load_net_from_file
¶
Loads a network from a matpower file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
network_path
|
str
|
Path to the matpower file (without extension). |
required |
Returns:
Name | Type | Description |
---|---|---|
pandapowerNet |
pandapowerNet
|
Loaded power network configuration with reindexed buses. |
Source code in gridfm_datakit/network.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
|
load_net_from_pglib
¶
Loads a power grid network from PGLib.
Downloads the network file if not locally available and loads it into a pandapower network. The buses are reindexed to ensure continuous indices.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
grid_name
|
str
|
Name of the grid file without the prefix 'pglib_opf_' (e.g., 'case14_ieee', 'case118_ieee'). |
required |
Returns:
Name | Type | Description |
---|---|---|
pandapowerNet |
pandapowerNet
|
Loaded power network configuration with reindexed buses. |
Raises:
Type | Description |
---|---|
RequestException
|
If download fails. |
Source code in gridfm_datakit/network.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
|