You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add colors for resources
* Fix arbitrary radius calculation bug
* Fix issue when topology is not defined properly
* Fix missing investments in transmission modes in the investment overview
* Fix formatting, update NEWS.md and figures.
Copy file name to clipboardExpand all lines: NEWS.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,17 @@
1
1
# Release notes
2
2
3
+
## Version 0.7.1 (2026-04-24)
4
+
5
+
### Bugfix
6
+
7
+
* Fix bug that resulted in arbitrary evaluated lat-lon coordinates for children of `Area`s due to the arbitrary default radius of 1.0 if not provided by the design `.yml` input files. The bug is resolved by first computing minimal distance between areas and letting the new radius be a third of this distance.
8
+
* Fix issue when the transmissions/links is not properly defined (e.g., `from` or `to` objects not sharing resource).
9
+
* Fix missing investments in transmission modes in the Investment overview.
Get the objects for which investment information should be stored for a given `AbstractElement`.
508
+
By default, this is just the element itself, but for some elements (e.g., `Transmission`) it can
509
+
be relevant to also store the investment information of related objects (e.g., its modes).
510
+
"""
511
+
get_inv_objs(obj::AbstractElement) = [obj]
512
+
504
513
"""
505
514
get_investment_times(gui::GUI, max_inst::Float64)
506
515
@@ -516,29 +525,32 @@ function get_investment_times(gui::GUI, max_inst::Float64)
516
525
period_labels =get_var(gui, :periods_labels)
517
526
model =get_model(gui)
518
527
for component ∈get_root_design(gui)
519
-
element =get_element(component)
528
+
# Ensure to include both the component itself and its modes (in case of a transmission) when checking for investments
529
+
elements =get_inv_objs(get_element(component))
520
530
investment_times = String[]
521
531
investment_capex = Float64[]
522
-
for (i, t) ∈enumerate(𝒯ᴵⁿᵛ)
523
-
for investment_indicator ∈ investment_indicators # important not to use shorthand loop syntax here due to the break command (exiting both loops in that case)
524
-
sym =Symbol(investment_indicator)
525
-
ifhaskey(model, sym) &&
526
-
!isempty(model[sym]) &&
527
-
element ∈axes(model[sym])[1]
528
-
val =value(model[sym][element, t])
529
-
if val >get_var(gui, :tol) * max_inst
530
-
capex::Float64=0.0
531
-
for capex_field ∈ capex_fields
532
-
capex_key =Symbol(capex_field[1])
533
-
ifhaskey(model, capex_key) &&
534
-
element ∈axes(model[capex_key])[1]
535
-
capex +=value(model[capex_key][element, t])
532
+
for element ∈ elements
533
+
for (i, t) ∈enumerate(𝒯ᴵⁿᵛ)
534
+
for investment_indicator ∈ investment_indicators # important not to use shorthand loop syntax here due to the break command (exiting both loops in that case)
535
+
sym =Symbol(investment_indicator)
536
+
ifhaskey(model, sym) &&
537
+
!isempty(model[sym]) &&
538
+
element ∈axes(model[sym])[1]
539
+
val =value(model[sym][element, t])
540
+
if val >get_var(gui, :tol) * max_inst
541
+
capex::Float64=0.0
542
+
for capex_field ∈ capex_fields
543
+
capex_key =Symbol(capex_field[1])
544
+
ifhaskey(model, capex_key) &&
545
+
element ∈axes(model[capex_key])[1]
546
+
capex +=value(model[capex_key][element, t])
547
+
end
536
548
end
549
+
t_str =split(period_labels[i], "")[1]
550
+
push!(investment_times, t_str)
551
+
push!(investment_capex, capex)
552
+
break# Do not add the capex again for other elements in investment_indicators
537
553
end
538
-
t_str =split(period_labels[i], "")[1]
539
-
push!(investment_times, t_str)
540
-
push!(investment_capex, capex)
541
-
break# Do not add the capex again for other elements in investment_indicators
0 commit comments