create a bus for every unique coordinate, not only substations (closes #699)
This commit is contained in:
parent
e0dafc50b3
commit
4b6199de42
@ -45,7 +45,7 @@ if config["foresight"] != "perfect":
|
||||
(
|
||||
LOGS
|
||||
+ "plot_power_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log"
|
||||
)
|
||||
),
|
||||
benchmark:
|
||||
(
|
||||
BENCHMARKS
|
||||
@ -74,7 +74,7 @@ if config["foresight"] != "perfect":
|
||||
(
|
||||
LOGS
|
||||
+ "plot_hydrogen_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log"
|
||||
)
|
||||
),
|
||||
benchmark:
|
||||
(
|
||||
BENCHMARKS
|
||||
@ -102,7 +102,7 @@ if config["foresight"] != "perfect":
|
||||
(
|
||||
LOGS
|
||||
+ "plot_gas_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log"
|
||||
)
|
||||
),
|
||||
benchmark:
|
||||
(
|
||||
BENCHMARKS
|
||||
|
@ -555,6 +555,7 @@ def _set_countries_and_substations(n, config, country_shapes, offshore_shapes):
|
||||
for b, df in product(("bus0", "bus1"), (n.lines, n.links)):
|
||||
has_connections_b |= ~df.groupby(b).under_construction.min()
|
||||
|
||||
buses["onshore_bus"] = onshore_b
|
||||
buses["substation_lv"] = (
|
||||
lv_b & onshore_b & (~buses["under_construction"]) & has_connections_b
|
||||
)
|
||||
|
@ -135,7 +135,13 @@ if __name__ == "__main__":
|
||||
c_b = n.buses.country == country
|
||||
|
||||
onshore_shape = country_shapes[country]
|
||||
onshore_locs = n.buses.loc[c_b & n.buses.substation_lv, ["x", "y"]]
|
||||
onshore_locs = (
|
||||
n.buses.loc[c_b & n.buses.onshore_bus]
|
||||
.sort_values(
|
||||
by="substation_lv", ascending=False
|
||||
) # preference for substations
|
||||
.drop_duplicates(subset=["x", "y"], keep="first")[["x", "y"]]
|
||||
)
|
||||
onshore_regions.append(
|
||||
gpd.GeoDataFrame(
|
||||
{
|
||||
|
@ -611,6 +611,7 @@ if __name__ == "__main__":
|
||||
"symbol",
|
||||
"tags",
|
||||
"under_construction",
|
||||
"onshore_bus",
|
||||
"substation_lv",
|
||||
"substation_off",
|
||||
"geometry",
|
||||
|
Loading…
Reference in New Issue
Block a user