Spaces:
Sleeping
Sleeping
Update app/internal_loads.py
Browse files- app/internal_loads.py +115 -69
app/internal_loads.py
CHANGED
@@ -62,88 +62,134 @@ DEFAULT_BUILDING_INTERNALS = {
|
|
62 |
"radiant": data[5]
|
63 |
},
|
64 |
"ventilation_rate": data[6], # L/s·person or L/s·m²
|
65 |
-
"air_change_rate": data[7]
|
|
|
66 |
} for name, data in [
|
67 |
-
("Residential - Single-Family Detached", [8.0, 0.7, 3.5, 1.5, 2.0, 1.5, 7.5, 0.35]),
|
68 |
-
("Residential - Single-Family Attached", [8.0, 0.7, 3.5, 1.5, 2.0, 1.5, 7.5, 0.35]),
|
69 |
-
("Residential - Multifamily (Low-rise and High-rise)", [8.0, 0.75, 4.0, 2.0, 2.5, 1.5, 8.0, 0.35]),
|
70 |
-
("Residential - Dormitories", [10.0, 0.8, 5.0, 2.0, 3.0, 2.0, 10.0, 0.5]),
|
71 |
-
("Residential - Hotels and Motels", [12.0, 0.85, 6.0, 2.5, 3.5, 2.5, 10.0, 0.5]),
|
72 |
-
("Commercial/Retail - Strip Mall", [15.0, 0.9, 12.0, 2.0, 6.0, 6.0, 10.0, 1.0]),
|
73 |
-
("Commercial/Retail - Enclosed Mall", [18.0, 0.9, 15.0, 2.0, 8.0, 7.0, 10.0, 1.2]),
|
74 |
-
("Commercial/Retail - Department Store", [16.0, 0.9, 14.0, 2.0, 7.0, 7.0, 10.0, 1.0]),
|
75 |
-
("Commercial/Retail - Supermarket", [18.0, 0.95, 18.0, 3.0, 10.0, 8.0, 12.0, 1.2]),
|
76 |
-
("Commercial/Retail - Convenience Store", [20.0, 0.95, 20.0, 4.0, 12.0, 8.0, 12.0, 1.5]),
|
77 |
-
("Commercial/Retail - Fast Food Restaurant", [14.0, 0.85, 18.0, 6.0, 10.0, 8.0, 15.0, 1.5]),
|
78 |
-
("Commercial/Retail - Full-Service Restaurant", [14.0, 0.85, 16.0, 5.0, 9.0, 7.0, 15.0, 1.5]),
|
79 |
-
("Office - Small Office (<1,000 m²)", [12.0, 0.8, 10.0, 1.0, 5.0, 5.0, 10.0, 0.9]),
|
80 |
-
("Office - Medium Office (≈5,000 m²)", [12.0, 0.8, 10.0, 1.0, 5.0, 5.0, 10.0, 1.0]),
|
81 |
-
("Office - Large Office (>10,000 m²)", [12.0, 0.8, 10.0, 1.0, 5.0, 5.0, 10.0, 1.0]),
|
82 |
-
("Office - Call Centre", [13.0, 0.85, 12.0, 1.5, 6.0, 6.0, 12.0, 1.2]),
|
83 |
-
("Educational - Primary School", [14.0, 0.85, 6.0, 2.0, 3.0, 3.0, 10.0, 1.0]),
|
84 |
-
("Educational - Secondary School", [14.0, 0.85, 6.5, 2.0, 3.5, 3.0, 10.0, 1.0]),
|
85 |
-
("Educational - University/College Classroom", [14.0, 0.85, 7.0, 2.0, 4.0, 3.0, 10.0, 1.0]),
|
86 |
-
("Educational - Lecture Hall", [15.0, 0.85, 8.0, 2.0, 4.0, 4.0, 10.0, 1.0]),
|
87 |
-
("Educational - Laboratory", [16.0, 0.9, 20.0, 4.0, 12.0, 8.0, 15.0, 2.5]),
|
88 |
-
("Educational - Library", [13.0, 0.8, 5.0, 1.0, 2.5, 2.5, 8.0, 0.7]),
|
89 |
-
("Healthcare - Hospital (Inpatient)", [15.0, 0.95, 20.0, 5.0, 10.0, 10.0, 20.0, 2.0]),
|
90 |
-
("Healthcare - Outpatient Clinic/Medical Office", [14.0, 0.9, 15.0, 3.0, 8.0, 7.0, 15.0, 1.5]),
|
91 |
-
("Healthcare - Nursing Home/Aged Care", [13.0, 0.85, 10.0, 3.0, 5.0, 5.0, 12.0, 1.0]),
|
92 |
-
("Assembly - Auditorium", [12.0, 0.9, 8.0, 2.0, 4.0, 4.0, 10.0, 1.0]),
|
93 |
-
("Assembly - Theatre/Performing Arts", [12.0, 0.9, 10.0, 2.0, 5.0, 5.0, 10.0, 1.0]),
|
94 |
-
("Assembly - Convention Centre", [14.0, 0.9, 12.0, 3.0, 6.0, 6.0, 12.0, 1.2]),
|
95 |
-
("Assembly - Gymnasium/Sports Arena", [15.0, 0.9, 14.0, 4.0, 8.0, 6.0, 12.0, 1.5]),
|
96 |
-
("Assembly - Religious Building", [12.0, 0.85, 6.0, 1.5, 3.0, 3.0, 10.0, 1.0]),
|
97 |
-
("Industrial - Light Manufacturing", [13.0, 0.9, 20.0, 2.0, 10.0, 10.0, 15.0, 1.5]),
|
98 |
-
("Industrial - Heavy Manufacturing", [13.0, 0.95, 30.0, 3.0, 15.0, 15.0, 20.0, 2.0]),
|
99 |
-
("Industrial - Warehouse (Unconditioned or Semi-conditioned)", [10.0, 0.7, 8.0, 1.0, 4.0, 4.0, 6.0, 0.5]),
|
100 |
-
("Industrial - Data Centre/Server Room", [15.0, 1.0, 80.0, 0.0, 80.0, 0.0, 20.0, 2.0]),
|
101 |
-
("Public and Institutional - Courthouse", [14.0, 0.85, 8.0, 2.0, 4.0, 4.0, 10.0, 1.0]),
|
102 |
-
("Public and Institutional - Police Station", [13.0, 0.85, 8.0, 2.0, 4.0, 4.0, 10.0, 1.0]),
|
103 |
-
("Public and Institutional - Fire Station", [13.0, 0.85, 8.0, 2.0, 4.0, 4.0, 10.0, 1.0]),
|
104 |
-
("Public and Institutional - Post Office", [14.0, 0.85, 10.0, 2.0, 5.0, 5.0, 10.0, 1.0]),
|
105 |
-
("Public and Institutional - Museum", [15.0, 0.9, 12.0, 2.0, 6.0, 6.0, 12.0, 1.2]),
|
106 |
-
("Lodging - Hotel (Full-Service, Midscale, or Economy)", [12.0, 0.85, 6.0, 2.0, 3.0, 3.0, 10.0, 0.8]),
|
107 |
-
("Lodging - Motel", [12.0, 0.85, 5.0, 2.0, 3.0, 2.0, 8.0, 0.8]),
|
108 |
-
("Lodging - Resort", [12.0, 0.85, 7.0, 2.5, 3.5, 3.5, 10.0, 0.8]),
|
109 |
-
("Transportation - Airport Terminal", [14.0, 0.95, 10.0, 3.0, 6.0, 4.0, 15.0, 1.5]),
|
110 |
-
("Transportation - Train/Bus Station", [14.0, 0.9, 9.0, 2.0, 5.0, 4.0, 12.0, 1.2]),
|
111 |
-
("Transportation - Car Park (Enclosed)", [8.0, 0.7, 2.0, 0.0, 2.0, 0.0, 5.0, 0.5]),
|
112 |
-
("Other", [12.0, 0.85, 10.0, 2.0, 5.0, 5.0, 10.0, 1.0])
|
|
|
|
|
113 |
]
|
114 |
}
|
115 |
|
|
|
116 |
# Default schedule templates
|
117 |
DEFAULT_SCHEDULE_TEMPLATES = {
|
118 |
-
"
|
119 |
-
"description": "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
"weekday": [1.0] * 24,
|
121 |
"weekend": [1.0] * 24
|
122 |
},
|
123 |
-
"
|
124 |
-
"description": "
|
125 |
-
"weekday": [0.
|
126 |
-
"weekend": [0.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
},
|
128 |
-
"
|
129 |
-
"description": "
|
130 |
-
"weekday": [0.
|
131 |
-
"weekend": [0.
|
132 |
},
|
133 |
-
"
|
134 |
-
"description": "
|
135 |
-
"weekday": [0.
|
136 |
-
|
|
|
|
|
|
|
|
|
137 |
},
|
138 |
-
"
|
139 |
-
"description": "
|
140 |
-
"weekday": [
|
141 |
-
"weekend": [
|
142 |
},
|
143 |
-
"
|
144 |
-
"description": "
|
145 |
-
"weekday": [0.
|
146 |
-
"weekend": [0.
|
147 |
}
|
148 |
}
|
149 |
|
|
|
62 |
"radiant": data[5]
|
63 |
},
|
64 |
"ventilation_rate": data[6], # L/s·person or L/s·m²
|
65 |
+
"air_change_rate": data[7], # ACH
|
66 |
+
"schedule_type": data[8]
|
67 |
} for name, data in [
|
68 |
+
("Residential - Single-Family Detached", [8.0, 0.7, 3.5, 1.5, 2.0, 1.5, 7.5, 0.35, "residential"]),
|
69 |
+
("Residential - Single-Family Attached", [8.0, 0.7, 3.5, 1.5, 2.0, 1.5, 7.5, 0.35, "residential"]),
|
70 |
+
("Residential - Multifamily (Low-rise and High-rise)", [8.0, 0.75, 4.0, 2.0, 2.5, 1.5, 8.0, 0.35, "residential"]),
|
71 |
+
("Residential - Dormitories", [10.0, 0.8, 5.0, 2.0, 3.0, 2.0, 10.0, 0.5, "residential"]),
|
72 |
+
("Residential - Hotels and Motels", [12.0, 0.85, 6.0, 2.5, 3.5, 2.5, 10.0, 0.5, "hotel"]),
|
73 |
+
("Commercial/Retail - Strip Mall", [15.0, 0.9, 12.0, 2.0, 6.0, 6.0, 10.0, 1.0, "retail"]),
|
74 |
+
("Commercial/Retail - Enclosed Mall", [18.0, 0.9, 15.0, 2.0, 8.0, 7.0, 10.0, 1.2, "retail"]),
|
75 |
+
("Commercial/Retail - Department Store", [16.0, 0.9, 14.0, 2.0, 7.0, 7.0, 10.0, 1.0, "retail"]),
|
76 |
+
("Commercial/Retail - Supermarket", [18.0, 0.95, 18.0, 3.0, 10.0, 8.0, 12.0, 1.2, "retail"]),
|
77 |
+
("Commercial/Retail - Convenience Store", [20.0, 0.95, 20.0, 4.0, 12.0, 8.0, 12.0, 1.5, "retail"]),
|
78 |
+
("Commercial/Retail - Fast Food Restaurant", [14.0, 0.85, 18.0, 6.0, 10.0, 8.0, 15.0, 1.5, "retail"]),
|
79 |
+
("Commercial/Retail - Full-Service Restaurant", [14.0, 0.85, 16.0, 5.0, 9.0, 7.0, 15.0, 1.5, "retail"]),
|
80 |
+
("Office - Small Office (<1,000 m²)", [12.0, 0.8, 10.0, 1.0, 5.0, 5.0, 10.0, 0.9, "office"]),
|
81 |
+
("Office - Medium Office (≈5,000 m²)", [12.0, 0.8, 10.0, 1.0, 5.0, 5.0, 10.0, 1.0, "office"]),
|
82 |
+
("Office - Large Office (>10,000 m²)", [12.0, 0.8, 10.0, 1.0, 5.0, 5.0, 10.0, 1.0, "office"]),
|
83 |
+
("Office - Call Centre", [13.0, 0.85, 12.0, 1.5, 6.0, 6.0, 12.0, 1.2, "office"]),
|
84 |
+
("Educational - Primary School", [14.0, 0.85, 6.0, 2.0, 3.0, 3.0, 10.0, 1.0, "school"]),
|
85 |
+
("Educational - Secondary School", [14.0, 0.85, 6.5, 2.0, 3.5, 3.0, 10.0, 1.0, "school"]),
|
86 |
+
("Educational - University/College Classroom", [14.0, 0.85, 7.0, 2.0, 4.0, 3.0, 10.0, 1.0, "school"]),
|
87 |
+
("Educational - Lecture Hall", [15.0, 0.85, 8.0, 2.0, 4.0, 4.0, 10.0, 1.0, "school"]),
|
88 |
+
("Educational - Laboratory", [16.0, 0.9, 20.0, 4.0, 12.0, 8.0, 15.0, 2.5, "school"]),
|
89 |
+
("Educational - Library", [13.0, 0.8, 5.0, 1.0, 2.5, 2.5, 8.0, 0.7, "school"]),
|
90 |
+
("Healthcare - Hospital (Inpatient)", [15.0, 0.95, 20.0, 5.0, 10.0, 10.0, 20.0, 2.0, "hospital"]),
|
91 |
+
("Healthcare - Outpatient Clinic/Medical Office", [14.0, 0.9, 15.0, 3.0, 8.0, 7.0, 15.0, 1.5, "hospital"]),
|
92 |
+
("Healthcare - Nursing Home/Aged Care", [13.0, 0.85, 10.0, 3.0, 5.0, 5.0, 12.0, 1.0, "hospital"]),
|
93 |
+
("Assembly - Auditorium", [12.0, 0.9, 8.0, 2.0, 4.0, 4.0, 10.0, 1.0, "assembly"]),
|
94 |
+
("Assembly - Theatre/Performing Arts", [12.0, 0.9, 10.0, 2.0, 5.0, 5.0, 10.0, 1.0, "assembly"]),
|
95 |
+
("Assembly - Convention Centre", [14.0, 0.9, 12.0, 3.0, 6.0, 6.0, 12.0, 1.2, "assembly"]),
|
96 |
+
("Assembly - Gymnasium/Sports Arena", [15.0, 0.9, 14.0, 4.0, 8.0, 6.0, 12.0, 1.5, "assembly"]),
|
97 |
+
("Assembly - Religious Building", [12.0, 0.85, 6.0, 1.5, 3.0, 3.0, 10.0, 1.0, "assembly"]),
|
98 |
+
("Industrial - Light Manufacturing", [13.0, 0.9, 20.0, 2.0, 10.0, 10.0, 15.0, 1.5, "industrial"]),
|
99 |
+
("Industrial - Heavy Manufacturing", [13.0, 0.95, 30.0, 3.0, 15.0, 15.0, 20.0, 2.0, "industrial"]),
|
100 |
+
("Industrial - Warehouse (Unconditioned or Semi-conditioned)", [10.0, 0.7, 8.0, 1.0, 4.0, 4.0, 6.0, 0.5, "industrial"]),
|
101 |
+
("Industrial - Data Centre/Server Room", [15.0, 1.0, 80.0, 0.0, 80.0, 0.0, 20.0, 2.0, "industrial"]),
|
102 |
+
("Public and Institutional - Courthouse", [14.0, 0.85, 8.0, 2.0, 4.0, 4.0, 10.0, 1.0, "office"]),
|
103 |
+
("Public and Institutional - Police Station", [13.0, 0.85, 8.0, 2.0, 4.0, 4.0, 10.0, 1.0, "office"]),
|
104 |
+
("Public and Institutional - Fire Station", [13.0, 0.85, 8.0, 2.0, 4.0, 4.0, 10.0, 1.0, "office"]),
|
105 |
+
("Public and Institutional - Post Office", [14.0, 0.85, 10.0, 2.0, 5.0, 5.0, 10.0, 1.0, "office"]),
|
106 |
+
("Public and Institutional - Museum", [15.0, 0.9, 12.0, 2.0, 6.0, 6.0, 12.0, 1.2, "office"]),
|
107 |
+
("Lodging - Hotel (Full-Service, Midscale, or Economy)", [12.0, 0.85, 6.0, 2.0, 3.0, 3.0, 10.0, 0.8, "hotel"]),
|
108 |
+
("Lodging - Motel", [12.0, 0.85, 5.0, 2.0, 3.0, 2.0, 8.0, 0.8, "hotel"]),
|
109 |
+
("Lodging - Resort", [12.0, 0.85, 7.0, 2.5, 3.5, 3.5, 10.0, 0.8, "hotel"]),
|
110 |
+
("Transportation - Airport Terminal", [14.0, 0.95, 10.0, 3.0, 6.0, 4.0, 15.0, 1.5, "transport"]),
|
111 |
+
("Transportation - Train/Bus Station", [14.0, 0.9, 9.0, 2.0, 5.0, 4.0, 12.0, 1.2, "transport"]),
|
112 |
+
("Transportation - Car Park (Enclosed)", [8.0, 0.7, 2.0, 0.0, 2.0, 0.0, 5.0, 0.5, "transport"]),
|
113 |
+
("Other", [12.0, 0.85, 10.0, 2.0, 5.0, 5.0, 10.0, 1.0, "default"]),
|
114 |
+
("Continuous", [0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, "continuous"]),
|
115 |
+
("Custom", [0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, "custom"])
|
116 |
]
|
117 |
}
|
118 |
|
119 |
+
|
120 |
# Default schedule templates
|
121 |
DEFAULT_SCHEDULE_TEMPLATES = {
|
122 |
+
"residential": {
|
123 |
+
"description": "Typical residential usage (peaks morning and evening)",
|
124 |
+
"weekday": [0.3, 0.3, 0.3, 0.3, 0.4, 0.5, 0.6, 0.7, 0.4, 0.3, 0.3, 0.4,
|
125 |
+
0.5, 0.5, 0.6, 0.8, 0.9, 1.0, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3],
|
126 |
+
"weekend": [0.4, 0.4, 0.4, 0.4, 0.5, 0.6, 0.7, 0.9, 0.8, 0.7, 0.7, 0.6,
|
127 |
+
0.7, 0.8, 0.9, 1.0, 1.0, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.4]
|
128 |
+
},
|
129 |
+
"office": {
|
130 |
+
"description": "Standard office hours (8 AM - 6 PM)",
|
131 |
+
"weekday": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.2, 0.5, 1.0, 1.0, 1.0, 1.0,
|
132 |
+
0.8, 1.0, 1.0, 1.0, 1.0, 1.0, 0.5, 0.3, 0.2, 0.1, 0.1, 0.1],
|
133 |
+
"weekend": [0.1] * 24
|
134 |
+
},
|
135 |
+
"commercial": {
|
136 |
+
"description": "Retail hours (9 AM - 9 PM)",
|
137 |
+
"weekday": [0.1, 0.1, 0.1, 0.1, 0.1, 0.2, 0.4, 0.7, 1.0, 1.0, 1.0, 1.0,
|
138 |
+
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.7, 0.5, 0.3, 0.2, 0.1, 0.1],
|
139 |
+
"weekend": [0.1, 0.1, 0.1, 0.1, 0.2, 0.4, 0.7, 1.0, 1.0, 1.0, 1.0, 1.0,
|
140 |
+
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.8, 0.6, 0.4, 0.2, 0.1, 0.1]
|
141 |
+
},
|
142 |
+
"educational": {
|
143 |
+
"description": "School schedule (8 AM - 3 PM)",
|
144 |
+
"weekday": [0.1, 0.1, 0.1, 0.1, 0.2, 0.5, 0.9, 1.0, 1.0, 1.0, 1.0, 1.0,
|
145 |
+
0.8, 0.7, 0.4, 0.2, 0.1] + [0.1]*7,
|
146 |
+
"weekend": [0.05] * 24
|
147 |
+
},
|
148 |
+
"healthcare": {
|
149 |
+
"description": "24/7 full operation (hospitals)",
|
150 |
"weekday": [1.0] * 24,
|
151 |
"weekend": [1.0] * 24
|
152 |
},
|
153 |
+
"assembly": {
|
154 |
+
"description": "Intermittent use with afternoon and evening peak",
|
155 |
+
"weekday": [0.05]*8 + [0.2, 0.3, 0.4, 0.5, 0.6, 0.8, 1.0, 1.0, 0.8, 0.5] + [0.3, 0.2, 0.1, 0.1],
|
156 |
+
"weekend": [0.1]*8 + [0.3, 0.5, 0.6, 0.7, 0.8, 1.0, 1.0, 1.0, 0.8, 0.5] + [0.4, 0.3, 0.2, 0.1]
|
157 |
+
},
|
158 |
+
"industrial": {
|
159 |
+
"description": "Two shifts (6 AM - 10 PM)",
|
160 |
+
"weekday": [0.1]*5 + [0.6, 0.8, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
|
161 |
+
1.0, 1.0, 0.8, 0.6] + [0.4, 0.3, 0.2, 0.1, 0.1],
|
162 |
+
"weekend": [0.1]*6 + [0.4]*8 + [0.2]*10
|
163 |
+
},
|
164 |
+
"public_institutional": {
|
165 |
+
"description": "Standard institutional hours (8 AM - 6 PM)",
|
166 |
+
"weekday": [0.1]*6 + [0.5, 0.8, 1.0, 1.0, 1.0, 1.0, 0.8, 0.7,
|
167 |
+
0.5, 0.3] + [0.2]*8,
|
168 |
+
"weekend": [0.1]*24
|
169 |
},
|
170 |
+
"lodging": {
|
171 |
+
"description": "Lodging facilities (moderate usage all day)",
|
172 |
+
"weekday": [0.6]*6 + [0.7]*6 + [0.8]*6 + [0.9]*6,
|
173 |
+
"weekend": [0.7]*6 + [0.8]*6 + [0.9]*6 + [1.0]*6
|
174 |
},
|
175 |
+
"transport": {
|
176 |
+
"description": "Transport hubs (early start, taper late night)",
|
177 |
+
"weekday": [0.3, 0.4, 0.6, 0.8, 1.0, 1.0, 0.9, 0.9, 0.8, 0.7,
|
178 |
+
0.6, 0.6, 0.5, 0.5, 0.6, 0.7, 0.8, 1.0, 0.8, 0.6,
|
179 |
+
0.5, 0.4, 0.3, 0.2],
|
180 |
+
"weekend": [0.2, 0.3, 0.4, 0.6, 0.8, 0.8, 0.7, 0.7, 0.6, 0.6,
|
181 |
+
0.5, 0.5, 0.6, 0.7, 0.8, 0.9, 0.9, 1.0, 0.8, 0.6,
|
182 |
+
0.4, 0.3, 0.2, 0.1]
|
183 |
},
|
184 |
+
"continuous": {
|
185 |
+
"description": "Continuous operation 24/7 (e.g., data centre)",
|
186 |
+
"weekday": [1.0] * 24,
|
187 |
+
"weekend": [1.0] * 24
|
188 |
},
|
189 |
+
"custom": {
|
190 |
+
"description": "Custom schedule – user-defined",
|
191 |
+
"weekday": [0.0] * 24,
|
192 |
+
"weekend": [0.0] * 24
|
193 |
}
|
194 |
}
|
195 |
|