Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -14,6 +14,7 @@ import logging
|
|
14 |
import os
|
15 |
import sys
|
16 |
from typing import Dict, List, Any, Optional, Tuple
|
|
|
17 |
|
18 |
# Configure logging
|
19 |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
@@ -119,9 +120,16 @@ class BuildSustain:
|
|
119 |
"climate_zone": "",
|
120 |
"hourly_data": [],
|
121 |
"epw_filename": "",
|
122 |
-
"typical_extreme_periods": {
|
|
|
|
|
|
|
|
|
|
|
123 |
"ground_temperatures": {
|
124 |
-
"0.5": [20.0] * 12
|
|
|
|
|
125 |
},
|
126 |
"ground_reflectivity": 0.2
|
127 |
},
|
@@ -152,6 +160,13 @@ class BuildSustain:
|
|
152 |
"ventilation": [],
|
153 |
"infiltration": []
|
154 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
"hvac_loads": {
|
156 |
"cooling": {
|
157 |
"hourly": [],
|
@@ -165,8 +180,10 @@ class BuildSustain:
|
|
165 |
"conduction": 0.0,
|
166 |
"solar": 0.0,
|
167 |
"internal": 0.0,
|
168 |
-
"
|
169 |
-
"
|
|
|
|
|
170 |
}
|
171 |
},
|
172 |
"heating": {
|
@@ -191,8 +208,8 @@ class BuildSustain:
|
|
191 |
},
|
192 |
"sim_period": {
|
193 |
"type": "Full Year",
|
194 |
-
"start_date":
|
195 |
-
"end_date":
|
196 |
"base_temp": 18.3
|
197 |
},
|
198 |
"indoor_conditions": {
|
@@ -409,8 +426,14 @@ class BuildSustain:
|
|
409 |
"hvac_cooling_rh",
|
410 |
"hvac_heating_temp",
|
411 |
"hvac_heating_rh",
|
412 |
-
"adaptive_acceptability"
|
413 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
414 |
for key in keys_to_clear:
|
415 |
if key in st.session_state:
|
416 |
st.session_state.pop(key, None)
|
|
|
14 |
import os
|
15 |
import sys
|
16 |
from typing import Dict, List, Any, Optional, Tuple
|
17 |
+
from datetime import datetime
|
18 |
|
19 |
# Configure logging
|
20 |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
|
|
120 |
"climate_zone": "",
|
121 |
"hourly_data": [],
|
122 |
"epw_filename": "",
|
123 |
+
"typical_extreme_periods": {
|
124 |
+
"summer_extreme": {"start": {"month": 7, "day": 1}, "end": {"month": 7, "day": 7}},
|
125 |
+
"summer_typical": {"start": {"month": 6, "day": 1}, "end": {"month": 6, "day": 7}},
|
126 |
+
"winter_extreme": {"start": {"month": 1, "day": 1}, "end": {"month": 1, "day": 7}},
|
127 |
+
"winter_typical": {"start": {"month": 12, "day": 1}, "end": {"month": 12, "day": 7}}
|
128 |
+
},
|
129 |
"ground_temperatures": {
|
130 |
+
"0.5": [20.0] * 12,
|
131 |
+
"2": [18.0] * 12,
|
132 |
+
"4": [16.0] * 12
|
133 |
},
|
134 |
"ground_reflectivity": 0.2
|
135 |
},
|
|
|
160 |
"ventilation": [],
|
161 |
"infiltration": []
|
162 |
},
|
163 |
+
"internal_loads_conditions": {
|
164 |
+
"air_velocity": 0.1,
|
165 |
+
"lighting_convective_fraction": 0.5,
|
166 |
+
"lighting_radiative_fraction": 0.5,
|
167 |
+
"equipment_convective_fraction": 0.5,
|
168 |
+
"equipment_radiative_fraction": 0.5
|
169 |
+
},
|
170 |
"hvac_loads": {
|
171 |
"cooling": {
|
172 |
"hourly": [],
|
|
|
180 |
"conduction": 0.0,
|
181 |
"solar": 0.0,
|
182 |
"internal": 0.0,
|
183 |
+
"ventilation_sensible": 0.0,
|
184 |
+
"ventilation_latent": 0.0,
|
185 |
+
"infiltration_sensible": 0.0,
|
186 |
+
"infiltration_latent": 0.0
|
187 |
}
|
188 |
},
|
189 |
"heating": {
|
|
|
208 |
},
|
209 |
"sim_period": {
|
210 |
"type": "Full Year",
|
211 |
+
"start_date": datetime(2025, 1, 1),
|
212 |
+
"end_date": datetime(2025, 12, 31),
|
213 |
"base_temp": 18.3
|
214 |
},
|
215 |
"indoor_conditions": {
|
|
|
426 |
"hvac_cooling_rh",
|
427 |
"hvac_heating_temp",
|
428 |
"hvac_heating_rh",
|
429 |
+
"adaptive_acceptability",
|
430 |
+
"hvac_air_velocity",
|
431 |
+
"hvac_lighting_convective",
|
432 |
+
"hvac_lighting_radiative",
|
433 |
+
"hvac_equipment_convective",
|
434 |
+
"hvac_equipment_radiative",
|
435 |
+
"ground_temp_depth"
|
436 |
+
] + [f"ground_temp_{depth}_{month}" for depth in ["0.5", "2", "4"] for month in ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]]
|
437 |
for key in keys_to_clear:
|
438 |
if key in st.session_state:
|
439 |
st.session_state.pop(key, None)
|