From 5daec8335c96110b05e75a56d31abb16d5fa7397 Mon Sep 17 00:00:00 2001 From: Charlotte Avery Date: Wed, 20 Nov 2024 14:29:47 +0000 Subject: [PATCH] Add user inputs for heat pump awareness campaign --- simulation/__main__.py | 19 +++++++++++++++++++ simulation/constants.py | 1 + 2 files changed, 20 insertions(+) diff --git a/simulation/__main__.py b/simulation/__main__.py index ff7d1b0..ff19543 100644 --- a/simulation/__main__.py +++ b/simulation/__main__.py @@ -178,6 +178,18 @@ def check_string_is_isoformat_datetime(string) -> str: parser.add_argument("--price-gbp-per-kwh-electricity", type=float, default=0.245) parser.add_argument("--price-gbp-per-kwh-oil", type=float, default=0.068) + parser.add_argument( + "--heat-pump-awareness-campaign-date", + default=datetime.datetime(2028, 1, 1), + type=convert_to_datetime, + ) + + parser.add_argument( + "--campaign-target-heat-pump-awareness", + default=0.8, + type=float_between_0_and_1, + ) + return parser.parse_args(args) @@ -187,6 +199,11 @@ def validate_args(args): f"Boiler ban announcement date must be on or before ban date, got gas_oil_boiler_ban_date:{args.gas_oil_boiler_ban_date}, gas_oil_boiler_ban_announce_date:{args.gas_oil_boiler_ban_announce_date}" ) + if args.campaign_target_heat_pump_awareness < args.heat_pump_awareness: + raise ValueError( + f"Campaign target awareness must be greater than or equal to the population heat pump awareness, got campaign_target_heat_pump_awareness:{args.campaign_target_heat_pump_awareness}, heat_pump_awareness:{args.heat_pump_awareness}" + ) + if __name__ == "__main__": @@ -226,6 +243,8 @@ def validate_args(args): args.heat_pump_installer_count, args.heat_pump_installer_annual_growth_rate, ENGLAND_WALES_ANNUAL_NEW_BUILDS if args.include_new_builds else None, + args.campaign_target_heat_pump_awareness, + args.heat_pump_awareness_campaign_date, ) with smart_open.open(args.history_file, "w") as file: diff --git a/simulation/constants.py b/simulation/constants.py index 6335079..12b73d7 100644 --- a/simulation/constants.py +++ b/simulation/constants.py @@ -206,6 +206,7 @@ class InterventionType(enum.Enum): BOILER_UPGRADE_SCHEME = 1 GAS_OIL_BOILER_BAN = 2 EXTENDED_BOILER_UPGRADE_SCHEME = 3 + HEAT_PUMP_CAMPAIGN = 4 # Source: https://www.ons.gov.uk/peoplepopulationandcommunity/birthsdeathsandmarriages/families/datasets/householdsbytypeofhouseholdandfamilyregionsofenglandandukconstituentcountries