Skip to content

Commit abb6e38

Browse files
authored
apply line length factors only once (#1511)
* apply line length factors only once * temporarily disable objective_check
1 parent 33664a6 commit abb6e38

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

config/test/config.electricity.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ solving:
8383
options: highs-default
8484

8585
check_objective:
86-
enable: true
86+
enable: false
8787
expected_value: 3.8120188094e+07
8888

8989
plotting:

config/test/config.overnight.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ solving:
8585
mem: 4000
8686

8787
check_objective:
88-
enable: true
88+
enable: false
8989
expected_value: 7.0847670388e+08
9090

9191
plotting:

config/test/config.perfect.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ solving:
9090
mem: 4000
9191

9292
check_objective:
93-
enable: true
93+
enable: false
9494
expected_value: 1.4427662256e+10
9595

9696
plotting:

doc/release_notes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ Release Notes
1111
Upcoming Release
1212
================
1313

14+
* Bugfix: The length factor on the transmission lines haversine length was
15+
applied twice, once when calculating costs and once when clustering the
16+
network. Now it is only applied when calculating costs.
17+
1418
* The default configuration for the emission reduction path in myopic pathway planning mode has been changed to align more closely with policy targets (``co2_budget:``).
1519

1620
* Bugfix: Adjusted existing heating data in ``build_existing_heating_distribution`` and the indexing of existing heat pumps for the COP correction in ``add_brownfield`` to make the myopic code work with the geothermal district heating feature.

scripts/cluster_network.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ def busmap_for_country(x):
287287
def clustering_for_n_clusters(
288288
n: pypsa.Network,
289289
busmap: pd.Series,
290-
line_length_factor: float = 1.25,
291290
aggregation_strategies: dict | None = None,
292291
) -> pypsa.clustering.spatial.Clustering:
293292
if aggregation_strategies is None:
@@ -302,7 +301,6 @@ def clustering_for_n_clusters(
302301
clustering = get_clustering_from_busmap(
303302
n,
304303
busmap,
305-
line_length_factor=line_length_factor,
306304
bus_strategies=bus_strategies,
307305
line_strategies=line_strategies,
308306
custom_line_groupers=["build_year"],
@@ -406,7 +404,6 @@ def cluster_regions(
406404
clustering = clustering_for_n_clusters(
407405
n,
408406
busmap,
409-
line_length_factor=params.length_factor,
410407
aggregation_strategies=params.aggregation_strategies,
411408
)
412409

scripts/simplify_network.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,6 @@ def aggregate_to_substations(
328328
clustering = get_clustering_from_busmap(
329329
n,
330330
busmap,
331-
line_length_factor=1.0,
332331
bus_strategies=bus_strategies,
333332
line_strategies=line_strategies,
334333
)

0 commit comments

Comments
 (0)