Spaces:
Sleeping
Sleeping
Commit
·
302550c
1
Parent(s):
b8c329d
test4
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ def calculate_appliance_consumption(
|
|
50 |
) -> float:
|
51 |
"""Calculate daily appliance consumption by subtracting the lighting usage from the average total consumption for each house type"""
|
52 |
return (
|
53 |
-
occupancy_1br * ONE_BR_UNITS * (
|
54 |
) + (
|
55 |
occupancy_2br * TWO_BR_UNITS * (3 - (LIGHTS_2BR * LIGHT_POWER * 6 / 1000))
|
56 |
) # Daily kWh
|
@@ -95,7 +95,7 @@ def financial_analysis(
|
|
95 |
# Battery can offset some grid purchases
|
96 |
grid_offset = min(grid_purchased, storage)
|
97 |
grid_purchased -= grid_offset
|
98 |
-
#Money paid to owner if client used this instead o
|
99 |
monthly_savings = (
|
100 |
consumption - (common_area_consumption * 30) * st.session_state.grid_price / 100
|
101 |
)
|
@@ -250,7 +250,7 @@ def main():
|
|
250 |
scenarios = {}
|
251 |
|
252 |
# Common area consumption remains constant
|
253 |
-
common_area_consumption =
|
254 |
|
255 |
# Generate scenarios with different occupancy combinations
|
256 |
occupancy_levels = [0.0, 0.25, 0.50, 0.75, 1.0]
|
|
|
50 |
) -> float:
|
51 |
"""Calculate daily appliance consumption by subtracting the lighting usage from the average total consumption for each house type"""
|
52 |
return (
|
53 |
+
occupancy_1br * ONE_BR_UNITS * (1.7 - (LIGHTS_1BR * LIGHT_POWER * 6 / 1000))
|
54 |
) + (
|
55 |
occupancy_2br * TWO_BR_UNITS * (3 - (LIGHTS_2BR * LIGHT_POWER * 6 / 1000))
|
56 |
) # Daily kWh
|
|
|
95 |
# Battery can offset some grid purchases
|
96 |
grid_offset = min(grid_purchased, storage)
|
97 |
grid_purchased -= grid_offset
|
98 |
+
# Money paid to owner if client used this instead o
|
99 |
monthly_savings = (
|
100 |
consumption - (common_area_consumption * 30) * st.session_state.grid_price / 100
|
101 |
)
|
|
|
250 |
scenarios = {}
|
251 |
|
252 |
# Common area consumption remains constant
|
253 |
+
common_area_consumption = 1.974 # kWh per day
|
254 |
|
255 |
# Generate scenarios with different occupancy combinations
|
256 |
occupancy_levels = [0.0, 0.25, 0.50, 0.75, 1.0]
|