Skip to content

Commit

Permalink
Added user input models.
Browse files Browse the repository at this point in the history
Co-authored-by: Erika Nesse <erika-n@users.noreply.github.com>
Co-authored-by: Alan Pinkert <alanisaac@users.noreply.github.com>
Co-authored-by: Debajyoti Debnath <debajyotid2@users.noreply.github.com>
Co-authored-by: harry <harryzhu626@users.noreply.github.com>
  • Loading branch information
5 people committed Sep 20, 2023
1 parent e228b95 commit 2324b98
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion rules-engine/src/rules_engine/engine.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,49 @@
from __future__ import annotations

import statistics as sts
from datetime import date
from enum import Enum
from typing import List
from typing import List, Optional

import numpy as np
from pydantic import BaseModel, Field


class SummaryInput(BaseModel):
# From Summary Tab
name: str = Field(description="Summary!B4")
address: str = Field(description="Summary!B5")
design_temperature_override: Optional[float] = Field(description="Summary!B7")
living_area: float = Field(description="Summary!B10")
fuel_type: FuelType = Field(description="Summary!B11")
heat_sys_efficiency: float = Field(description="Summary!B12")
other_fuel_usage_override: Optional[float] = Field(description="Summary!B16")
thermostat_set_point: float = Field(description="Summary!B17")
setback_temp: float = Field(description="Summary!B18")
setback_hours_per_day: float = Field(description="Summary!B19")

# we will calculate these:
# initial_balance_point: float
# balance_point_sensitivity: float


class DhwInput(BaseModel):
# From DHW Tab
number_of_occupants: int = Field(description="DHW!B4")
estimated_water_heating_efficiency: float = Field(description="DHW!B5")
stand_by_losses: float = Field(description="DHW!B6")


class OilPropaneBillingInput(BaseModel):
# From Oil-Propane tab
period_end_date: date = Field(description="Oil-Propane!B")
gallons: float = Field(description="Oil-Propane!C")


class NaturalGasBillingInput(BaseModel):
# From Natural Gas tab
period_end_date: date = Field(description="Natural Gas!B")
usage_therms: float = Field(description="Natural Gas!D")


def hdd(avg_temp: float, balance_point: float) -> float:
Expand Down

0 comments on commit 2324b98

Please sign in to comment.