Skip to content

Commit

Permalink
Merge pull request #809 from yerbol-akhmetov/fix_f_weighting
Browse files Browse the repository at this point in the history
fix f weighting for retro cost
  • Loading branch information
martacki authored Dec 21, 2023
2 parents 7d64a73 + 20b847c commit 81041aa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/prepare_sector_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -1988,7 +1988,12 @@ def add_heat(n, costs):
ct = pop_layout.loc[node, "ct"]

# weighting 'f' depending on the size of the population at the node
f = urban_fraction[node] if "urban" in name else (1 - urban_fraction[node])
if "urban central" in name:
f = dist_fraction[node]
elif "urban decentral" in name:
f = urban_fraction[node] - dist_fraction[node]
else:
f = 1 - urban_fraction[node]
if f == 0:
continue
# get sector name ("residential"/"services"/or both "tot" for urban central)
Expand Down

0 comments on commit 81041aa

Please sign in to comment.