# We assume that the ASHP efficiency is 280%, which is the minimum that Cotswolds Energy Group achieves, as
# they target this
PESSIMISTIC_ASHP_EFFICIENCY = 200
AVERAGE_ASHP_EFFICIENCY = 280

# Conservative estimate of the proportion of electricity that will be consumed, whereas the rest will
# be exported. These are averages based on Google research. E.g
# https://www.nea.org.uk/who-we-are/innovation-technical-evaluation/solarpv/solarpv-batteries
SOLAR_CONSUMPTION_PROPORTION = 0.5
SOLAR_CONSUMPTION_WITH_BATTERY_PROPORTION = 0.7

# Typically, each solar panel takes up around 3.4 m2 of roof space under RdSAP. This was been verified in Elmhurst
RDSAP_AREA_PER_PANEL = 3.4
# This is a median based on a sample of properties
MEDIAN_WATTAGE_TO_AC = 0.965
MEDIAN_WATTAGE_TO_DC = 0.99

SOCIAL_TENURES = ["Rented (social)", "rental (social)"]

# Carbon intensity of electricity, as of 16th Jan 2025
ELECTRICITY_CARBON_INTENSITY = 0.232

DESCRIPTIONS_TO_FUEL_TYPES = {
    "Air source heat pump, radiators, electric": {
        "fuel": "Electricity", "cop": AVERAGE_ASHP_EFFICIENCY / 100
    },
    "Boiler and radiators, mains gas": {"fuel": 'Natural Gas', "cop": 0.85},
    'Electric storage heaters': {"fuel": 'Electricity', "cop": 1},
    "Electric immersion, off-peak": {"fuel": 'Electricity', "cop": 1},
    "Electric storage heaters, radiators": {"fuel": 'Electricity', "cop": 1},
    "Room heaters, electric": {"fuel": 'Electricity', "cop": 1},
    "Electric immersion, standard tariff": {"fuel": 'Electricity', "cop": 1},
    "Portable electric heaters assumed for most rooms": {"fuel": 'Electricity', "cop": 1},
    "Boiler and radiators, LPG": {"fuel": 'LPG', "cop": 0.85},
    "Room heaters, dual fuel (mineral and wood)": {"fuel": 'Wood Logs', "cop": 1},
    "Room heaters, mains gas": {"fuel": 'Natural Gas', "cop": 0.85},
    "Warm air, mains gas": {"fuel": 'Natural Gas', "cop": 0.85},
    "Boiler, mains gas": {"fuel": 'Natural Gas', "cop": 0.85},
    "Gas multipoint": {"fuel": "Natural Gas", "cop": 0.85},
    "Warm air, Electricaire": {"fuel": "Electricity", "cop": 1},
    "Gas boiler/circulator": {"fuel": "Natural Gas", "cop": 0.85},
    "Boiler and underfloor heating, mains gas": {"fuel": "Natural Gas", "cop": 0.85},
    "No system present: electric heaters assumed": {"fuel": "Electricity", "cop": 1},
    "Electric instantaneous at point of use": {"fuel": "Electricity", "cop": 1},
    "Boiler and radiators, oil": {"fuel": "Oil", "cop": 0.85},
    "Electric storage heaters, Electric storage heaters": {"fuel": "Electricity", "cop": 1},
    "Boiler and radiators, electric": {"fuel": "Electricity", "cop": 0.85},
    "Gas boiler/circulator, no cylinder thermostat": {"fuel": "Natural Gas", "cop": 0.85},
    "Boiler and radiators, dual fuel (mineral and wood)": {"fuel": "Wood Logs", "cop": 0.85},
    "Electric immersion, standard tariff, plus solar": {"fuel": "Electricity + Solar Thermal", "cop": 1},
    "From main system, flue gas heat recovery": {"fuel": "Natural Gas", "cop": 0.85},
    "Electric underfloor heating": {"fuel": "Electricity", "cop": 1},
    "No system present: electric immersion assumed": {"fuel": "Electricity", "cop": 1},
    "Air source heat pump, underfloor, electric": {
        "fuel": "Electricity", "cop": AVERAGE_ASHP_EFFICIENCY / 100
    },
    "Gas instantaneous at point of use": {"fuel": "Natural Gas", "cop": 0.85},
    "Room heaters, wood logs": {"fuel": "Wood Logs", "cop": 1},
    "Boiler and radiators, coal": {"fuel": "Coal", "cop": 0.85},
    "From main system, no cylinderstat": {"fuel": "Natural Gas", "cop": 0.85},
    "Room heaters, coal": {"fuel": "Coal", "cop": 0.85},
    "Electric underfloor heating, Electric storage heaters": {"fuel": "Electricity", "cop": 1},
    'Room heaters, electric, Boiler and radiators, mains gas': {"fuel": "Natural Gas", "cop": 0.85},
    'Boiler and radiators, mains gas, Boiler and radiators, mains gas': {"fuel": "Natural Gas", "cop": 0.85},
    'Room heaters, electric, Electric storage heaters': {"fuel": "Electricity", "cop": 1},
    "Boiler and radiators, mains gas, Electric storage heaters": {"fuel": "Natural Gas", "cop": 0.85},
    "Boiler and radiators, anthracite": {"fuel": "Anthracite", "cop": 0.85},
    'Electric immersion, off-peak, plus solar': {"fuel": "Electricity + Solar Thermal", "cop": 1},
    'Ground source heat pump, radiators, electric': {
        "fuel": "Electricity", "cop": AVERAGE_ASHP_EFFICIENCY / 100
    },
    'Electric instantaneous at point of use, plus solar': {"fuel": "Electricity + Solar Thermal", "cop": 1},
    "Electric storage heaters, Room heaters, electric": {"fuel": "Electricity", "cop": 1},
    'Boiler and underfloor heating, oil': {"fuel": "Oil", "cop": 0.85},
    "Boiler and radiators, smokeless fuel": {"fuel": "Smokeless Fuel", "cop": 0.85},
    "Boiler and radiators, mains gas, Boiler and underfloor heating, mains gas": {"fuel": "Natural Gas", "cop": 0.85},
    "Electric ceiling heating, electric": {"fuel": "Electricity", "cop": 1},
    "Air source heat pump, warm air, electric": {
        "fuel": "Electricity", "cop": AVERAGE_ASHP_EFFICIENCY / 100
    },
    "Electric heat pump for water heating only": {"fuel": "Electricity", "cop": 1},
    "Ground source heat pump, warm air, electric": {"fuel": "Electricity", "cop": AVERAGE_ASHP_EFFICIENCY / 100},
    "Room heaters, mains gas, Electric storage heaters": {"fuel": "Natural Gas", "cop": 0.85},
    "Water source heat pump, radiators, electric": {"fuel": "Electricity", "cop": AVERAGE_ASHP_EFFICIENCY / 100},
    "Air source heat pump, Systems with radiators, electric": {"fuel": "Electricity",
                                                               "cop": AVERAGE_ASHP_EFFICIENCY / 100},
    "Ground source heat pump, underfloor, electric": {"fuel": "Electricity", "cop": AVERAGE_ASHP_EFFICIENCY / 100},
    "Electric ceiling heating": {"fuel": "Electricity", "cop": 1},
    "Boiler and radiators, wood chips": {"fuel": "Wood Logs", "cop": 0.85},
    "Oil range cooker, no cylinder thermostat": {"fuel": "Oil", "cop": 0.85},
    "Air source heat pump, Warm air, electric": {"fuel": "Electricity", "cop": AVERAGE_ASHP_EFFICIENCY / 100},
    "Boiler and underfloor heating, electric": {"fuel": "Electricity", "cop": 1},
    "Community scheme with CHP, mains gas": {"fuel": "Natural Gas", "cop": 0.85},
    "Air source heat pump, radiators and underfloor, electric": {"fuel": "Electricity",
                                                                 "cop": AVERAGE_ASHP_EFFICIENCY / 100},
    "Electric ceiling heating, radiators, electric": {"fuel": "Electricity", "cop": 1},
    "Boiler and underfloor heating, mains gas, Boiler and radiators, mains gas": {"fuel": "Natural Gas", "cop": 0.85},
}

# These are the measure types where if there is a ventilation recommendation, we force the inclusion of it
# if one of these has been recommended.
measures_needing_ventilation = [
    "internal_wall_insulation", "external_wall_insulation", "cavity_wall_insulation"
]

# If we have a property beyond this size, we assume it's likely large enough to have an ASHP
ASHP_FLOOR_AREA_THRESHOLD = 120  # m2

# Is a placeholder, used for cleaning data. Is a flat average based on the estimated
AVERAGE_LIGHTING_COST = 100

# Average bill, based on british gas is #1,838.71. Subtract 100 for lighting, 228 for hot water. This will include
# appliances so appliances should be removed when this is used
AVERAGE_HEATING_AND_APPLIANCE_COST = 1510.71
# Based on https://energysavingtrust.org.uk/sites/default/files/reports/AtHomewithWater%287%29.pdf
AVERAGE_HOT_WATER_COST = 228
