mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Debugging references in making funding paths
This commit is contained in:
parent
e3066fbd76
commit
aa0c4fd3e9
1 changed files with 5 additions and 1 deletions
|
|
@ -502,7 +502,7 @@ def _make_generic_eco4_funding_paths(p, input_measures, funding_paths, remaining
|
||||||
heating_control_description=p.main_heating_controls["clean_description"]
|
heating_control_description=p.main_heating_controls["clean_description"]
|
||||||
)
|
)
|
||||||
|
|
||||||
if has_eligible_heating_system:
|
if has_eligible_heating_system and _find_measure(input_measures, "solar_pv"):
|
||||||
single_solar_template = [{"AND": ["solar_pv"], "reference": None}]
|
single_solar_template = [{"AND": ["solar_pv"], "reference": None}]
|
||||||
# We now look to pair this with any lingering insulation measures
|
# We now look to pair this with any lingering insulation measures
|
||||||
solar_paths = []
|
solar_paths = []
|
||||||
|
|
@ -667,14 +667,18 @@ def make_funding_paths(p, input_measures, tenure):
|
||||||
# 1) The package must include EWI or IWI if the property is privately owned
|
# 1) The package must include EWI or IWI if the property is privately owned
|
||||||
# We check if we have any EWI or IWI measures available
|
# We check if we have any EWI or IWI measures available
|
||||||
ewi_or_iwi = [{"OR": []}]
|
ewi_or_iwi = [{"OR": []}]
|
||||||
|
reference_measures = []
|
||||||
# If we have EWI we add it in
|
# If we have EWI we add it in
|
||||||
if _find_measure(input_measures, "external_wall_insulation"):
|
if _find_measure(input_measures, "external_wall_insulation"):
|
||||||
ewi_or_iwi[0]["OR"].append("external_wall_insulation")
|
ewi_or_iwi[0]["OR"].append("external_wall_insulation")
|
||||||
|
reference_measures.append("ewi")
|
||||||
|
|
||||||
if _find_measure(input_measures, "internal_wall_insulation"):
|
if _find_measure(input_measures, "internal_wall_insulation"):
|
||||||
ewi_or_iwi[0]["OR"].append("internal_wall_insulation")
|
ewi_or_iwi[0]["OR"].append("internal_wall_insulation")
|
||||||
|
reference_measures.append("iwi")
|
||||||
|
|
||||||
if ewi_or_iwi[0]["OR"]:
|
if ewi_or_iwi[0]["OR"]:
|
||||||
|
ewi_or_iwi[0]["reference"] = "+".join(reference_measures) + ":eco4"
|
||||||
funding_paths.append(ewi_or_iwi)
|
funding_paths.append(ewi_or_iwi)
|
||||||
|
|
||||||
funding_paths = _make_generic_eco4_funding_paths(
|
funding_paths = _make_generic_eco4_funding_paths(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue