correct schedule setters
This commit is contained in:
parent
351081993a
commit
2a6313bedf
|
@ -24,17 +24,26 @@ class IdfHelper:
|
|||
self._idf.newidfobject(key='ZONE', Name=building_name, Ceiling_Height='autocalculate', Volume='autocalculate',
|
||||
Floor_Area='autocalculate', Part_of_Total_Floor_Area='yes', )
|
||||
|
||||
def add_surface(self, surface, building_name):
|
||||
self._idf.newidfobject('BUILDINGSURFACE:DETAILED', Name=surface.name, Surface_Type=surface.type,
|
||||
Zone_Name=building_name, )
|
||||
# Why is this thing here?
|
||||
# self.wall.setcoords(surface.points_list.toList())
|
||||
@staticmethod
|
||||
def _matrix_to_list(points):
|
||||
points_list = []
|
||||
for point in points:
|
||||
point_tuple = (point[0], point[1], point[2])
|
||||
points_list.append(point_tuple)
|
||||
return points_list
|
||||
|
||||
def run(self, window_ratio=0.35):
|
||||
def add_surface(self, surface, building_name):
|
||||
wall = self._idf.newidfobject('BUILDINGSURFACE:DETAILED', Name=surface.name, Surface_Type=surface.type,
|
||||
Zone_Name=building_name, )
|
||||
self._matrix_to_list(surface.points)
|
||||
wall.setcoords(IdfHelper._matrix_to_list(surface.points))
|
||||
|
||||
def run(self, window_ratio=0.35, display_render=False):
|
||||
self._idf.set_default_constructions()
|
||||
self._idf.intersect_match()
|
||||
self._idf.set_wwr(window_ratio)
|
||||
self._idf.translate_to_origin()
|
||||
if display_render:
|
||||
self._idf.view_model()
|
||||
self._idf.newidfobject("HVACTEMPLATE:THERMOSTAT", Name="Zone Stat", Constant_Heating_Setpoint=20,
|
||||
Constant_Cooling_Setpoint=24, )
|
||||
|
@ -47,4 +56,5 @@ class IdfHelper:
|
|||
list_values = [v for v in data.values()]
|
||||
heating = [(float(x)) / 3600000.0 for x in list_values[0]]
|
||||
cooling = [(float(x)) / 3600000.0 for x in list_values[1]]
|
||||
print("text")
|
||||
return heating, cooling
|
||||
|
|
|
@ -40,6 +40,5 @@ class TestIdf(TestCase):
|
|||
_idf.add_zone(building.name)
|
||||
for surface in building.surfaces:
|
||||
_idf.add_surface(surface, building.name)
|
||||
|
||||
_idf.run()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user