diff --git a/simulation/agents.py b/simulation/agents.py index 276c130..08e37f5 100644 --- a/simulation/agents.py +++ b/simulation/agents.py @@ -686,3 +686,6 @@ def make_decisions(self, model): self.heating_system_costs_subsidies = costs_subsidies self.heating_system_costs_insulation = costs_insulation self.insulation_element_upgrade_costs = chosen_insulation_costs + + if self.is_heat_pump_aware: + model.households_heat_pump_aware_at_current_step += 1 diff --git a/simulation/collectors.py b/simulation/collectors.py index 1f09ff0..866eb2b 100644 --- a/simulation/collectors.py +++ b/simulation/collectors.py @@ -277,6 +277,10 @@ def model_heat_pump_installations_at_current_step(model) -> int: return model.heat_pump_installations_at_current_step +def model_heat_pump_awareness(model) -> int: + return model.heat_pump_awareness + + def is_first_timestep(model: "DomesticHeatingABM") -> bool: return model.current_datetime == model.start_datetime + model.step_interval @@ -352,6 +356,7 @@ def get_model_collectors( model_heat_pump_installers, model_heat_pump_installation_capacity_per_step, model_heat_pump_installations_at_current_step, + model_heat_pump_awareness, collect_when(model, is_first_timestep)(model_price_gbp_per_kwh_gas), collect_when(model, is_first_timestep)(model_price_gbp_per_kwh_electricity), collect_when(model, is_first_timestep)(model_price_gbp_per_kwh_oil), diff --git a/simulation/model.py b/simulation/model.py index d4c0e2a..e518a91 100644 --- a/simulation/model.py +++ b/simulation/model.py @@ -73,6 +73,7 @@ def __init__( heat_pump_installer_annual_growth_rate ) self.heat_pump_installations_at_current_step = 0 + self.households_heat_pump_aware_at_current_step = 0 self.annual_new_builds = annual_new_builds super().__init__(UnorderedSpace()) @@ -81,6 +82,10 @@ def __init__( def household_count(self) -> int: return len(self.space.agents) + @property + def heat_pump_awareness(self) -> float: + return self.households_heat_pump_aware_at_current_step / self.household_count + @property def heat_pump_installers(self) -> int: @@ -199,6 +204,7 @@ def increment_timestep(self): self.boiler_upgrade_scheme_spend_gbp ) self.heat_pump_installations_at_current_step = 0 + self.households_heat_pump_aware_at_current_step = 0 def create_household_agents(