bug fix with augmentation object

This commit is contained in:
lisazeyen 2022-04-12 10:45:11 +02:00
parent 9322f90318
commit 408b494612

View File

@ -1178,9 +1178,9 @@ def add_storage_and_grids(n, costs):
# apply k_edge_augmentation weighted by length of complement edges # apply k_edge_augmentation weighted by length of complement edges
k_edge = options.get("gas_network_connectivity_upgrade", 3) k_edge = options.get("gas_network_connectivity_upgrade", 3)
augmentation = k_edge_augmentation(G, k_edge, avail=complement_edges.values) augmentation = list(k_edge_augmentation(G, k_edge, avail=complement_edges.values))
if list(augmentation): if augmentation:
new_gas_pipes = pd.DataFrame(augmentation, columns=["bus0", "bus1"]) new_gas_pipes = pd.DataFrame(augmentation, columns=["bus0", "bus1"])
new_gas_pipes["length"] = new_gas_pipes.apply(haversine, axis=1) new_gas_pipes["length"] = new_gas_pipes.apply(haversine, axis=1)