-
-
Notifications
You must be signed in to change notification settings - Fork 32
Intro to Rules Engine
Thad Kerosky edited this page Aug 30, 2023
·
8 revisions
- billing period: For a given bill that a homeowner is charged for their heating usage, the billing period is the time range (defined by a start date and an end date) for which they are being billed. On the HEAT app, users will upload their heating usage data for multiple billing periods.
- BTU: British Thermal Units - a common measuring unit for heat
- UA: also known as the whole-home heat transfer rate, UA is a measurement of how quickly a home loses heat (units are BTU per hour per degree F)
- Thermostat set point: the average interior temperature that is desired by the homeowner - what they program their thermostat to
- Balance point: the outside temperature above which no heating is required for a given home to maintain its thermostat set point. By definition, the balance point is less than or equal to the thermostat set point.
- Heating Degree-Days (HDD): For a single day, HDD refers to the number of degrees between the average outside temperature and the balance point. HDD is non-zero only when the outside temperature is colder than the balance point - if the outside temp is >= balance point, no heating is required, which by definition means HDD = 0. For a multi-day time period, the total HDD is the sum of the single-day HDDs.
- Average heat load: the amount of energy that a heating system needs to produce in order to maintain a desired thermostat set point within a given home on an average day
- Max heat load: the amount of energy that a heating system needs to produce in order to maintain the design set point within a given home when the outside temperature is the design temperature
- Design set point: a standard internal temperature / thermostat set point - different from the preferred set point of an individual homeowner
- Design temperature: an outside temperature that represents one of the coldest days of the year for the given location of a home. Heating systems are designed to this standard to ensure that they're powerful enough to handle some of the worst cold, not just the average cold
- Read in the billing periods data and categorize them by season.
- Calculate the average daily non-heating usage (if fuel type is gas, this is the average daily summer-month usage. Otherwise, it's 0)
- Calculate the average daily heating usage (average daily total usage in winter months minus average daily non-heating usage)
- Calculate the UA and the balance point. This is a semi-iterative process
- Calculate average indoor temp: ((24 - setback hrs per day) * tstat setting + setback hrs per day * setback temp)/24
- Calculate avg heat load: (design set point - (avg indoor temp - balance point) - design temp) * UA
- Calculate max heat load: (design set point - design temp) * UA
- What is needed to unblock Weather API usage: if we use DegreeDays.net, we can send postcodes.
- Relying on Postcodes might make the weather data less cachable. We might want to do our own geocoding in that case and point-in-polygon to the weather stations.
- Cache weather data in localstorage or remix backend sql database and cache.
- What method or functions should be called for the API?
- Test reference: https://github.com/codeforboston/home-energy-analysis-tool/blob/main/rules-engine/tests/rules_engine/test_engine.py#L48-L57