Skip to content

Commit

Permalink
make targets 0 when query return nan
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosEpia committed Dec 19, 2024
1 parent 1b22e42 commit 2e4ef02
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/egon/data/datasets/heat_supply/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ class GeothermalPotentialGermany(Dataset):
def __init__(self, dependencies):
super().__init__(
name="GeothermalPotentialGermany",
version="0.0.1",
version="0.0.2",
dependencies=dependencies,
tasks=(
potential_germany,
Expand Down
3 changes: 3 additions & 0 deletions src/egon/data/datasets/heat_supply/district_heating.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,9 @@ def backup_resistive_heaters(scenario):
"""
).capacity[0]

if not distributed:
distributed = 0

if target_value > distributed:
df = gpd.GeoDataFrame(
data={
Expand Down
3 changes: 3 additions & 0 deletions src/egon/data/datasets/heat_supply/individual_heating.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,9 @@ def cascade_per_technology(
"""
)

if not target:
target = 0

heat_per_mv["share"] = (
heat_per_mv.remaining_demand
/ heat_per_mv.remaining_demand.sum()
Expand Down

0 comments on commit 2e4ef02

Please sign in to comment.