mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Tweaking simulations in recommendation engine
This commit is contained in:
parent
456d0892c0
commit
59271a5009
3 changed files with 8 additions and 4 deletions
|
|
@ -165,6 +165,7 @@ async def trigger_plan(body: PlanTriggerRequest):
|
|||
model_api = ModelApi(portfolio_id=body.portfolio_id, timestamp=created_at)
|
||||
|
||||
# recommendations_scoring_data.loc[17, 'photo_supply_ending'] = 50
|
||||
recommendations_scoring_data.loc[5, 'walls_thermal_transmittance_ending'] = 0.25
|
||||
|
||||
all_predictions = model_api.predict_all(
|
||||
df=recommendations_scoring_data,
|
||||
|
|
@ -239,7 +240,7 @@ async def trigger_plan(body: PlanTriggerRequest):
|
|||
]
|
||||
recommendations[property_id] = final_recommendations
|
||||
|
||||
# impact_df = pd.DataFrame(recommendations[input_properties[0].id])
|
||||
impact_df = pd.DataFrame(recommendations[input_properties[0].id])
|
||||
|
||||
# This is a temporary step, to estimate the impact of the measured on heat demand and carbon
|
||||
# TODO: This needs to be cleaned up, if it happens to be kept
|
||||
|
|
|
|||
|
|
@ -75,10 +75,10 @@ class AnnualBillSavings:
|
|||
|
||||
# This should be negative
|
||||
consumption_difference = gradient * epc_energy_consumption + intercept
|
||||
if consumption_difference > 0:
|
||||
raise ValueError("consumption_difference should be negative")
|
||||
|
||||
adjusted_consumption = (epc_energy_consumption + consumption_difference)
|
||||
if adjusted_consumption < 0:
|
||||
raise ValueError("consumption_difference should be negative")
|
||||
|
||||
return adjusted_consumption
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@ class SolarPvRecommendations:
|
|||
number_solar_panels = np.floor(self.property.solar_pv_roof_area / self.SOLAR_PANEL_AREA)
|
||||
solar_panel_wattage = number_solar_panels * self.SOLAR_PANEL_WATTAGE
|
||||
|
||||
roof_coverage_percent = round(self.property.solar_pv_percentage * 100)
|
||||
|
||||
# Given the wattage, we estimate the cost of the solar PV system. This is based on the MCS database
|
||||
# of solar PV installations
|
||||
cost_result = self.costs.solar_pv(wattage=solar_panel_wattage)
|
||||
|
|
@ -53,7 +55,8 @@ class SolarPvRecommendations:
|
|||
{
|
||||
"parts": [],
|
||||
"type": "solar_pv",
|
||||
"description": f"Install a {kw} kilowatt-peak (kWp) solar photovoltaic (PV) panel system on the roof",
|
||||
"description": f"Install a {kw} kilowatt-peak (kWp) solar photovoltaic (PV) panel system on "
|
||||
f"{roof_coverage_percent}% the roof",
|
||||
"starting_u_value": None,
|
||||
"new_u_value": None,
|
||||
"sap_points": None,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue