def test_create_zonehvacequipmentconnections(self): pyidf.validation_level = ValidationLevel.error obj = ZoneHvacEquipmentConnections() # object-list var_zone_name = "object-list|Zone Name" obj.zone_name = var_zone_name # object-list var_zone_conditioning_equipment_list_name = "object-list|Zone Conditioning Equipment List Name" obj.zone_conditioning_equipment_list_name = var_zone_conditioning_equipment_list_name # node var_zone_air_inlet_node_or_nodelist_name = "node|Zone Air Inlet Node or NodeList Name" obj.zone_air_inlet_node_or_nodelist_name = var_zone_air_inlet_node_or_nodelist_name # node var_zone_air_exhaust_node_or_nodelist_name = "node|Zone Air Exhaust Node or NodeList Name" obj.zone_air_exhaust_node_or_nodelist_name = var_zone_air_exhaust_node_or_nodelist_name # node var_zone_air_node_name = "node|Zone Air Node Name" obj.zone_air_node_name = var_zone_air_node_name # node var_zone_return_air_node_name = "node|Zone Return Air Node Name" obj.zone_return_air_node_name = var_zone_return_air_node_name # object-list var_zone_return_air_flow_rate_fraction_schedule_name = "object-list|Zone Return Air Flow Rate Fraction Schedule Name" obj.zone_return_air_flow_rate_fraction_schedule_name = var_zone_return_air_flow_rate_fraction_schedule_name # node var_zone_return_air_flow_rate_basis_node_or_nodelist_name = "node|Zone Return Air Flow Rate Basis Node or NodeList Name" obj.zone_return_air_flow_rate_basis_node_or_nodelist_name = var_zone_return_air_flow_rate_basis_node_or_nodelist_name idf = IDF() idf.add(obj) idf.save(self.path, check=False) with open(self.path, mode='r') as f: for line in f: log.debug(line.strip()) idf2 = IDF(self.path) self.assertEqual(idf2.zonehvacequipmentconnectionss[0].zone_name, var_zone_name) self.assertEqual(idf2.zonehvacequipmentconnectionss[0].zone_conditioning_equipment_list_name, var_zone_conditioning_equipment_list_name) self.assertEqual(idf2.zonehvacequipmentconnectionss[0].zone_air_inlet_node_or_nodelist_name, var_zone_air_inlet_node_or_nodelist_name) self.assertEqual(idf2.zonehvacequipmentconnectionss[0].zone_air_exhaust_node_or_nodelist_name, var_zone_air_exhaust_node_or_nodelist_name) self.assertEqual(idf2.zonehvacequipmentconnectionss[0].zone_air_node_name, var_zone_air_node_name) self.assertEqual(idf2.zonehvacequipmentconnectionss[0].zone_return_air_node_name, var_zone_return_air_node_name) self.assertEqual(idf2.zonehvacequipmentconnectionss[0].zone_return_air_flow_rate_fraction_schedule_name, var_zone_return_air_flow_rate_fraction_schedule_name) self.assertEqual(idf2.zonehvacequipmentconnectionss[0].zone_return_air_flow_rate_basis_node_or_nodelist_name, var_zone_return_air_flow_rate_basis_node_or_nodelist_name)
obj33.add_extensible("Through: 12/31") obj33.add_extensible("For: AllDays") obj33.add_extensible("Until: 24:00") obj33.add_extensible("20") idf.add(obj33) obj34 = ScheduleCompact() obj34.name = "ALWAYS 24" obj34.schedule_type_limits_name = "Any Number" obj34.add_extensible("Through: 12/31") obj34.add_extensible("For: AllDays") obj34.add_extensible("Until: 24:00") obj34.add_extensible("24") idf.add(obj34) obj35 = ZoneHvacEquipmentConnections() obj35.zone_name = "ZONE ONE" obj35.zone_conditioning_equipment_list_name = "ZONE ONE Equipment" obj35.zone_air_inlet_node_or_nodelist_name = "ZONE ONE Supply Inlet" obj35.zone_air_exhaust_node_or_nodelist_name = None obj35.zone_air_node_name = "ZONE ONE Zone Air Node" obj35.zone_return_air_node_name = "ZONE ONE Return Outlet" idf.add(obj35) obj36 = ZoneHvacEquipmentList() obj36.name = "ZONE ONE Equipment" obj36.add_extensible("ZoneHVAC:IdealLoadsAirSystem", "ZONE ONE Purchased Air", 1, 1) idf.add(obj36) obj37 = ZoneHvacIdealLoadsAirSystem()
obj33.add_extensible("Through: 12/31") obj33.add_extensible("For: AllDays") obj33.add_extensible("Until: 24:00") obj33.add_extensible("20") idf.add(obj33) obj34 = ScheduleCompact() obj34.name = "ALWAYS 24" obj34.schedule_type_limits_name = "Any Number" obj34.add_extensible("Through: 12/31") obj34.add_extensible("For: AllDays") obj34.add_extensible("Until: 24:00") obj34.add_extensible("24") idf.add(obj34) obj35 = ZoneHvacEquipmentConnections() obj35.zone_name = "ZONE ONE" obj35.zone_conditioning_equipment_list_name = "ZONE ONE Equipment" obj35.zone_air_inlet_node_or_nodelist_name = "ZONE ONE Supply Inlet" obj35.zone_air_exhaust_node_or_nodelist_name = None obj35.zone_air_node_name = "ZONE ONE Zone Air Node" obj35.zone_return_air_node_name = "ZONE ONE Return Outlet" idf.add(obj35) obj36 = ZoneHvacEquipmentList() obj36.name = "ZONE ONE Equipment" obj36.add_extensible( "ZoneHVAC:IdealLoadsAirSystem", "ZONE ONE Purchased Air", 1, 1)
def test_create_zonehvacequipmentconnections(self): pyidf.validation_level = ValidationLevel.error obj = ZoneHvacEquipmentConnections() # object-list var_zone_name = "object-list|Zone Name" obj.zone_name = var_zone_name # object-list var_zone_conditioning_equipment_list_name = "object-list|Zone Conditioning Equipment List Name" obj.zone_conditioning_equipment_list_name = var_zone_conditioning_equipment_list_name # node var_zone_air_inlet_node_or_nodelist_name = "node|Zone Air Inlet Node or NodeList Name" obj.zone_air_inlet_node_or_nodelist_name = var_zone_air_inlet_node_or_nodelist_name # node var_zone_air_exhaust_node_or_nodelist_name = "node|Zone Air Exhaust Node or NodeList Name" obj.zone_air_exhaust_node_or_nodelist_name = var_zone_air_exhaust_node_or_nodelist_name # node var_zone_air_node_name = "node|Zone Air Node Name" obj.zone_air_node_name = var_zone_air_node_name # node var_zone_return_air_node_name = "node|Zone Return Air Node Name" obj.zone_return_air_node_name = var_zone_return_air_node_name # object-list var_zone_return_air_flow_rate_fraction_schedule_name = "object-list|Zone Return Air Flow Rate Fraction Schedule Name" obj.zone_return_air_flow_rate_fraction_schedule_name = var_zone_return_air_flow_rate_fraction_schedule_name # node var_zone_return_air_flow_rate_basis_node_or_nodelist_name = "node|Zone Return Air Flow Rate Basis Node or NodeList Name" obj.zone_return_air_flow_rate_basis_node_or_nodelist_name = var_zone_return_air_flow_rate_basis_node_or_nodelist_name idf = IDF() idf.add(obj) idf.save(self.path, check=False) with open(self.path, mode='r') as f: for line in f: log.debug(line.strip()) idf2 = IDF(self.path) self.assertEqual(idf2.zonehvacequipmentconnectionss[0].zone_name, var_zone_name) self.assertEqual( idf2.zonehvacequipmentconnectionss[0]. zone_conditioning_equipment_list_name, var_zone_conditioning_equipment_list_name) self.assertEqual( idf2.zonehvacequipmentconnectionss[0]. zone_air_inlet_node_or_nodelist_name, var_zone_air_inlet_node_or_nodelist_name) self.assertEqual( idf2.zonehvacequipmentconnectionss[0]. zone_air_exhaust_node_or_nodelist_name, var_zone_air_exhaust_node_or_nodelist_name) self.assertEqual( idf2.zonehvacequipmentconnectionss[0].zone_air_node_name, var_zone_air_node_name) self.assertEqual( idf2.zonehvacequipmentconnectionss[0].zone_return_air_node_name, var_zone_return_air_node_name) self.assertEqual( idf2.zonehvacequipmentconnectionss[0]. zone_return_air_flow_rate_fraction_schedule_name, var_zone_return_air_flow_rate_fraction_schedule_name) self.assertEqual( idf2.zonehvacequipmentconnectionss[0]. zone_return_air_flow_rate_basis_node_or_nodelist_name, var_zone_return_air_flow_rate_basis_node_or_nodelist_name)