Merge pull request #809 from yerbol-akhmetov/fix_f_weighting

fix f weighting for retro cost
This commit is contained in:
Martha Frysztacki 2023-12-21 15:04:06 +01:00 committed by GitHub
commit 81041aa10e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)