Spaces:
Sleeping
Sleeping
Commit
·
0c2f6ed
1
Parent(s):
f2d59f7
test
Browse files
app.py
CHANGED
@@ -55,7 +55,7 @@ def total_consumption(
|
|
55 |
def solar_production(panels: int) -> float:
|
56 |
"""Monthly solar production with losses"""
|
57 |
daily_production = (
|
58 |
-
panels * SOLAR_PANEL_RATING *
|
59 |
) # 5 sun hours
|
60 |
return daily_production * 30 # Monthly kWh
|
61 |
|
@@ -80,10 +80,7 @@ def financial_analysis(
|
|
80 |
grid_offset = min(grid_purchased, storage)
|
81 |
grid_purchased -= grid_offset
|
82 |
|
83 |
-
monthly_savings = (
|
84 |
-
(consumption - common_area) * st.session_state.grid_price / 100
|
85 |
-
) - (grid_purchased * st.session_state.grid_price / 100)
|
86 |
-
|
87 |
total_investment = (
|
88 |
st.session_state.solar_panels * st.session_state.panel_price
|
89 |
+ st.session_state.batteries * st.session_state.battery_price
|
|
|
55 |
def solar_production(panels: int) -> float:
|
56 |
"""Monthly solar production with losses"""
|
57 |
daily_production = (
|
58 |
+
panels * SOLAR_PANEL_RATING * 6 * (1 - SYSTEM_LOSSES) / 1000
|
59 |
) # 5 sun hours
|
60 |
return daily_production * 30 # Monthly kWh
|
61 |
|
|
|
80 |
grid_offset = min(grid_purchased, storage)
|
81 |
grid_purchased -= grid_offset
|
82 |
|
83 |
+
monthly_savings = (consumption - common_area) * st.session_state.grid_price / 100
|
|
|
|
|
|
|
84 |
total_investment = (
|
85 |
st.session_state.solar_panels * st.session_state.panel_price
|
86 |
+ st.session_state.batteries * st.session_state.battery_price
|