• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python idf.IDF类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中pyidf.idf.IDF的典型用法代码示例。如果您正苦于以下问题:Python IDF类的具体用法?Python IDF怎么用?Python IDF使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了IDF类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: test_create_surfacepropertyheattransferalgorithmconstruction

    def test_create_surfacepropertyheattransferalgorithmconstruction(self):

        pyidf.validation_level = ValidationLevel.error

        obj = SurfacePropertyHeatTransferAlgorithmConstruction()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # alpha
        var_algorithm = "ConductionTransferFunction"
        obj.algorithm = var_algorithm
        # object-list
        var_construction_name = "object-list|Construction Name"
        obj.construction_name = var_construction_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.surfacepropertyheattransferalgorithmconstructions[0].name, var_name)
        self.assertEqual(idf2.surfacepropertyheattransferalgorithmconstructions[0].algorithm, var_algorithm)
        self.assertEqual(idf2.surfacepropertyheattransferalgorithmconstructions[0].construction_name, var_construction_name)
开发者ID:rbuffat,项目名称:pyidf,代码行数:27,代码来源:test_surfacepropertyheattransferalgorithmconstruction.py


示例2: test_create_exteriorwaterequipment

    def test_create_exteriorwaterequipment(self):

        pyidf.validation_level = ValidationLevel.error

        obj = ExteriorWaterEquipment()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # alpha
        var_fuel_use_type = "Water"
        obj.fuel_use_type = var_fuel_use_type
        # object-list
        var_schedule_name = "object-list|Schedule Name"
        obj.schedule_name = var_schedule_name
        # real
        var_design_level = 0.0
        obj.design_level = var_design_level
        # alpha
        var_enduse_subcategory = "End-Use Subcategory"
        obj.enduse_subcategory = var_enduse_subcategory

        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.exteriorwaterequipments[0].name, var_name)
        self.assertEqual(idf2.exteriorwaterequipments[0].fuel_use_type, var_fuel_use_type)
        self.assertEqual(idf2.exteriorwaterequipments[0].schedule_name, var_schedule_name)
        self.assertAlmostEqual(idf2.exteriorwaterequipments[0].design_level, var_design_level)
        self.assertEqual(idf2.exteriorwaterequipments[0].enduse_subcategory, var_enduse_subcategory)
开发者ID:rbuffat,项目名称:pyidf,代码行数:35,代码来源:test_exteriorwaterequipment.py


示例3: test_create_scheduletypelimits

    def test_create_scheduletypelimits(self):

        pyidf.validation_level = ValidationLevel.error

        obj = ScheduleTypeLimits()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # real
        var_lower_limit_value = 2.2
        obj.lower_limit_value = var_lower_limit_value
        # real
        var_upper_limit_value = 3.3
        obj.upper_limit_value = var_upper_limit_value
        # alpha
        var_numeric_type = "Continuous"
        obj.numeric_type = var_numeric_type
        # alpha
        var_unit_type = "Dimensionless"
        obj.unit_type = var_unit_type

        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.scheduletypelimitss[0].name, var_name)
        self.assertAlmostEqual(idf2.scheduletypelimitss[0].lower_limit_value, var_lower_limit_value)
        self.assertAlmostEqual(idf2.scheduletypelimitss[0].upper_limit_value, var_upper_limit_value)
        self.assertEqual(idf2.scheduletypelimitss[0].numeric_type, var_numeric_type)
        self.assertEqual(idf2.scheduletypelimitss[0].unit_type, var_unit_type)
开发者ID:rbuffat,项目名称:pyidf,代码行数:35,代码来源:test_scheduletypelimits.py


示例4: test_create_setpointmanagersinglezoneonestageheating

    def test_create_setpointmanagersinglezoneonestageheating(self):

        pyidf.validation_level = ValidationLevel.error

        obj = SetpointManagerSingleZoneOneStageHeating()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # real
        var_heating_stage_on_supply_air_setpoint_temperature = 2.2
        obj.heating_stage_on_supply_air_setpoint_temperature = var_heating_stage_on_supply_air_setpoint_temperature
        # real
        var_heating_stage_off_supply_air_setpoint_temperature = 3.3
        obj.heating_stage_off_supply_air_setpoint_temperature = var_heating_stage_off_supply_air_setpoint_temperature
        # object-list
        var_control_zone_name = "object-list|Control Zone Name"
        obj.control_zone_name = var_control_zone_name
        # node
        var_setpoint_node_or_nodelist_name = "node|Setpoint Node or NodeList Name"
        obj.setpoint_node_or_nodelist_name = var_setpoint_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.setpointmanagersinglezoneonestageheatings[0].name, var_name)
        self.assertAlmostEqual(idf2.setpointmanagersinglezoneonestageheatings[0].heating_stage_on_supply_air_setpoint_temperature, var_heating_stage_on_supply_air_setpoint_temperature)
        self.assertAlmostEqual(idf2.setpointmanagersinglezoneonestageheatings[0].heating_stage_off_supply_air_setpoint_temperature, var_heating_stage_off_supply_air_setpoint_temperature)
        self.assertEqual(idf2.setpointmanagersinglezoneonestageheatings[0].control_zone_name, var_control_zone_name)
        self.assertEqual(idf2.setpointmanagersinglezoneonestageheatings[0].setpoint_node_or_nodelist_name, var_setpoint_node_or_nodelist_name)
开发者ID:rbuffat,项目名称:pyidf,代码行数:35,代码来源:test_setpointmanagersinglezoneonestageheating.py


示例5: test_create_shadingpropertyreflectance

    def test_create_shadingpropertyreflectance(self):

        pyidf.validation_level = ValidationLevel.error

        obj = ShadingPropertyReflectance()
        # object-list
        var_shading_surface_name = "object-list|Shading Surface Name"
        obj.shading_surface_name = var_shading_surface_name
        # real
        var_diffuse_solar_reflectance_of_unglazed_part_of_shading_surface = 0.5
        obj.diffuse_solar_reflectance_of_unglazed_part_of_shading_surface = var_diffuse_solar_reflectance_of_unglazed_part_of_shading_surface
        # real
        var_diffuse_visible_reflectance_of_unglazed_part_of_shading_surface = 0.5
        obj.diffuse_visible_reflectance_of_unglazed_part_of_shading_surface = var_diffuse_visible_reflectance_of_unglazed_part_of_shading_surface
        # real
        var_fraction_of_shading_surface_that_is_glazed = 0.5
        obj.fraction_of_shading_surface_that_is_glazed = var_fraction_of_shading_surface_that_is_glazed
        # alpha
        var_glazing_construction_name = "Glazing Construction Name"
        obj.glazing_construction_name = var_glazing_construction_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.shadingpropertyreflectances[0].shading_surface_name, var_shading_surface_name)
        self.assertAlmostEqual(idf2.shadingpropertyreflectances[0].diffuse_solar_reflectance_of_unglazed_part_of_shading_surface, var_diffuse_solar_reflectance_of_unglazed_part_of_shading_surface)
        self.assertAlmostEqual(idf2.shadingpropertyreflectances[0].diffuse_visible_reflectance_of_unglazed_part_of_shading_surface, var_diffuse_visible_reflectance_of_unglazed_part_of_shading_surface)
        self.assertAlmostEqual(idf2.shadingpropertyreflectances[0].fraction_of_shading_surface_that_is_glazed, var_fraction_of_shading_surface_that_is_glazed)
        self.assertEqual(idf2.shadingpropertyreflectances[0].glazing_construction_name, var_glazing_construction_name)
开发者ID:rbuffat,项目名称:pyidf,代码行数:35,代码来源:test_shadingpropertyreflectance.py


示例6: test_create_zonecontaminantsourceandsinkgenericcutoffmodel

    def test_create_zonecontaminantsourceandsinkgenericcutoffmodel(self):

        pyidf.validation_level = ValidationLevel.error

        obj = ZoneContaminantSourceAndSinkGenericCutoffModel()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # object-list
        var_zone_name = "object-list|Zone Name"
        obj.zone_name = var_zone_name
        # real
        var_design_generation_rate_coefficient = 0.0
        obj.design_generation_rate_coefficient = var_design_generation_rate_coefficient
        # object-list
        var_schedule_name = "object-list|Schedule Name"
        obj.schedule_name = var_schedule_name
        # real
        var_cutoff_generic_contaminant_at_which_emission_ceases = 0.0001
        obj.cutoff_generic_contaminant_at_which_emission_ceases = var_cutoff_generic_contaminant_at_which_emission_ceases

        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.zonecontaminantsourceandsinkgenericcutoffmodels[0].name, var_name)
        self.assertEqual(idf2.zonecontaminantsourceandsinkgenericcutoffmodels[0].zone_name, var_zone_name)
        self.assertAlmostEqual(idf2.zonecontaminantsourceandsinkgenericcutoffmodels[0].design_generation_rate_coefficient, var_design_generation_rate_coefficient)
        self.assertEqual(idf2.zonecontaminantsourceandsinkgenericcutoffmodels[0].schedule_name, var_schedule_name)
        self.assertAlmostEqual(idf2.zonecontaminantsourceandsinkgenericcutoffmodels[0].cutoff_generic_contaminant_at_which_emission_ceases, var_cutoff_generic_contaminant_at_which_emission_ceases)
开发者ID:rbuffat,项目名称:pyidf,代码行数:35,代码来源:test_zonecontaminantsourceandsinkgenericcutoffmodel.py


示例7: test_create_weatherpropertyskytemperature

    def test_create_weatherpropertyskytemperature(self):

        pyidf.validation_level = ValidationLevel.error

        obj = WeatherPropertySkyTemperature()
        # object-list
        var_name = "object-list|Name"
        obj.name = var_name
        # alpha
        var_calculation_type = "ScheduleValue"
        obj.calculation_type = var_calculation_type
        # object-list
        var_schedule_name = "object-list|Schedule Name"
        obj.schedule_name = var_schedule_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.weatherpropertyskytemperatures[0].name, var_name)
        self.assertEqual(idf2.weatherpropertyskytemperatures[0].calculation_type, var_calculation_type)
        self.assertEqual(idf2.weatherpropertyskytemperatures[0].schedule_name, var_schedule_name)
开发者ID:rbuffat,项目名称:pyidf,代码行数:27,代码来源:test_weatherpropertyskytemperature.py


示例8: test_create_airflownetworkintrazonelinkage

    def test_create_airflownetworkintrazonelinkage(self):

        pyidf.validation_level = ValidationLevel.error

        obj = AirflowNetworkIntraZoneLinkage()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # alpha
        var_node_1_name = "Node 1 Name"
        obj.node_1_name = var_node_1_name
        # alpha
        var_node_2_name = "Node 2 Name"
        obj.node_2_name = var_node_2_name
        # object-list
        var_component_name = "object-list|Component Name"
        obj.component_name = var_component_name
        # object-list
        var_airflownetworkmultizonesurface_name = "object-list|AirflowNetwork:MultiZone:Surface Name"
        obj.airflownetworkmultizonesurface_name = var_airflownetworkmultizonesurface_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.airflownetworkintrazonelinkages[0].name, var_name)
        self.assertEqual(idf2.airflownetworkintrazonelinkages[0].node_1_name, var_node_1_name)
        self.assertEqual(idf2.airflownetworkintrazonelinkages[0].node_2_name, var_node_2_name)
        self.assertEqual(idf2.airflownetworkintrazonelinkages[0].component_name, var_component_name)
        self.assertEqual(idf2.airflownetworkintrazonelinkages[0].airflownetworkmultizonesurface_name, var_airflownetworkmultizonesurface_name)
开发者ID:rbuffat,项目名称:pyidf,代码行数:35,代码来源:test_airflownetworkintrazonelinkage.py


示例9: test_create_heatbalancesettingsconductionfinitedifference

    def test_create_heatbalancesettingsconductionfinitedifference(self):

        pyidf.validation_level = ValidationLevel.error

        obj = HeatBalanceSettingsConductionFiniteDifference()
        # alpha
        var_difference_scheme = "CrankNicholsonSecondOrder"
        obj.difference_scheme = var_difference_scheme
        # real
        var_space_discretization_constant = 2.2
        obj.space_discretization_constant = var_space_discretization_constant
        # real
        var_relaxation_factor = 0.505
        obj.relaxation_factor = var_relaxation_factor
        # real
        var_inside_face_surface_temperature_convergence_criteria = 0.00500005
        obj.inside_face_surface_temperature_convergence_criteria = var_inside_face_surface_temperature_convergence_criteria

        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.heatbalancesettingsconductionfinitedifferences[0].difference_scheme, var_difference_scheme)
        self.assertAlmostEqual(idf2.heatbalancesettingsconductionfinitedifferences[0].space_discretization_constant, var_space_discretization_constant)
        self.assertAlmostEqual(idf2.heatbalancesettingsconductionfinitedifferences[0].relaxation_factor, var_relaxation_factor)
        self.assertAlmostEqual(idf2.heatbalancesettingsconductionfinitedifferences[0].inside_face_surface_temperature_convergence_criteria, var_inside_face_surface_temperature_convergence_criteria)
开发者ID:rbuffat,项目名称:pyidf,代码行数:31,代码来源:test_heatbalancesettingsconductionfinitedifference.py


示例10: test_create_surfacecontrolmovableinsulation

    def test_create_surfacecontrolmovableinsulation(self):

        pyidf.validation_level = ValidationLevel.error

        obj = SurfaceControlMovableInsulation()
        # alpha
        var_insulation_type = "Outside"
        obj.insulation_type = var_insulation_type
        # object-list
        var_surface_name = "object-list|Surface Name"
        obj.surface_name = var_surface_name
        # object-list
        var_material_name = "object-list|Material Name"
        obj.material_name = var_material_name
        # object-list
        var_schedule_name = "object-list|Schedule Name"
        obj.schedule_name = var_schedule_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.surfacecontrolmovableinsulations[0].insulation_type, var_insulation_type)
        self.assertEqual(idf2.surfacecontrolmovableinsulations[0].surface_name, var_surface_name)
        self.assertEqual(idf2.surfacecontrolmovableinsulations[0].material_name, var_material_name)
        self.assertEqual(idf2.surfacecontrolmovableinsulations[0].schedule_name, var_schedule_name)
开发者ID:rbuffat,项目名称:pyidf,代码行数:31,代码来源:test_surfacecontrolmovableinsulation.py


示例11: test_create_outputtablemonthly

    def test_create_outputtablemonthly(self):

        pyidf.validation_level = ValidationLevel.error

        obj = OutputTableMonthly()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # integer
        var_digits_after_decimal = 5
        obj.digits_after_decimal = var_digits_after_decimal
        paras = []
        var_variable_or_meter_1_name = "external-list|Variable or Meter 1 Name"
        paras.append(var_variable_or_meter_1_name)
        var_aggregation_type_for_variable_or_meter_1 = "SumOrAverage"
        paras.append(var_aggregation_type_for_variable_or_meter_1)
        obj.add_extensible(*paras)
        

        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.outputtablemonthlys[0].name, var_name)
        self.assertEqual(idf2.outputtablemonthlys[0].digits_after_decimal, var_digits_after_decimal)
        index = obj.extensible_field_index("Variable or Meter 1 Name")
        self.assertEqual(idf2.outputtablemonthlys[0].extensibles[0][index], var_variable_or_meter_1_name)
        index = obj.extensible_field_index("Aggregation Type for Variable or Meter 1")
        self.assertEqual(idf2.outputtablemonthlys[0].extensibles[0][index], var_aggregation_type_for_variable_or_meter_1)
开发者ID:rbuffat,项目名称:pyidf,代码行数:34,代码来源:test_outputtablemonthly.py


示例12: test_create_roomairsettingsonenodedisplacementventilation

    def test_create_roomairsettingsonenodedisplacementventilation(self):

        pyidf.validation_level = ValidationLevel.error

        obj = RoomAirSettingsOneNodeDisplacementVentilation()
        # object-list
        var_zone_name = "object-list|Zone Name"
        obj.zone_name = var_zone_name
        # real
        var_fraction_of_convective_internal_loads_added_to_floor_air = 0.5
        obj.fraction_of_convective_internal_loads_added_to_floor_air = var_fraction_of_convective_internal_loads_added_to_floor_air
        # real
        var_fraction_of_infiltration_internal_loads_added_to_floor_air = 0.5
        obj.fraction_of_infiltration_internal_loads_added_to_floor_air = var_fraction_of_infiltration_internal_loads_added_to_floor_air

        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.roomairsettingsonenodedisplacementventilations[0].zone_name, var_zone_name)
        self.assertAlmostEqual(idf2.roomairsettingsonenodedisplacementventilations[0].fraction_of_convective_internal_loads_added_to_floor_air, var_fraction_of_convective_internal_loads_added_to_floor_air)
        self.assertAlmostEqual(idf2.roomairsettingsonenodedisplacementventilations[0].fraction_of_infiltration_internal_loads_added_to_floor_air, var_fraction_of_infiltration_internal_loads_added_to_floor_air)
开发者ID:rbuffat,项目名称:pyidf,代码行数:27,代码来源:test_roomairsettingsonenodedisplacementventilation.py


示例13: test_create_fluidpropertiesglycolconcentration

    def test_create_fluidpropertiesglycolconcentration(self):

        pyidf.validation_level = ValidationLevel.error

        obj = FluidPropertiesGlycolConcentration()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # alpha
        var_glycol_type = "EthyleneGlycol"
        obj.glycol_type = var_glycol_type
        # object-list
        var_user_defined_glycol_name = "object-list|User Defined Glycol Name"
        obj.user_defined_glycol_name = var_user_defined_glycol_name
        # real
        var_glycol_concentration = 0.5
        obj.glycol_concentration = var_glycol_concentration

        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.fluidpropertiesglycolconcentrations[0].name, var_name)
        self.assertEqual(idf2.fluidpropertiesglycolconcentrations[0].glycol_type, var_glycol_type)
        self.assertEqual(idf2.fluidpropertiesglycolconcentrations[0].user_defined_glycol_name, var_user_defined_glycol_name)
        self.assertAlmostEqual(idf2.fluidpropertiesglycolconcentrations[0].glycol_concentration, var_glycol_concentration)
开发者ID:rbuffat,项目名称:pyidf,代码行数:31,代码来源:test_fluidpropertiesglycolconcentration.py


示例14: test_create_groundheattransferslabinsulation

    def test_create_groundheattransferslabinsulation(self):

        pyidf.validation_level = ValidationLevel.error

        obj = GroundHeatTransferSlabInsulation()
        # real
        var_rins_r_value_of_under_slab_insulation = 1.1
        obj.rins_r_value_of_under_slab_insulation = var_rins_r_value_of_under_slab_insulation
        # real
        var_dins_width_of_strip_of_under_slab_insulation = 2.2
        obj.dins_width_of_strip_of_under_slab_insulation = var_dins_width_of_strip_of_under_slab_insulation
        # real
        var_rvins_r_value_of_vertical_insulation = 3.3
        obj.rvins_r_value_of_vertical_insulation = var_rvins_r_value_of_vertical_insulation
        # real
        var_zvins_depth_of_vertical_insulation = 4.4
        obj.zvins_depth_of_vertical_insulation = var_zvins_depth_of_vertical_insulation
        # integer
        var_ivins_flag_is_there_vertical_insulation = 0
        obj.ivins_flag_is_there_vertical_insulation = var_ivins_flag_is_there_vertical_insulation

        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.assertAlmostEqual(idf2.groundheattransferslabinsulations[0].rins_r_value_of_under_slab_insulation, var_rins_r_value_of_under_slab_insulation)
        self.assertAlmostEqual(idf2.groundheattransferslabinsulations[0].dins_width_of_strip_of_under_slab_insulation, var_dins_width_of_strip_of_under_slab_insulation)
        self.assertAlmostEqual(idf2.groundheattransferslabinsulations[0].rvins_r_value_of_vertical_insulation, var_rvins_r_value_of_vertical_insulation)
        self.assertAlmostEqual(idf2.groundheattransferslabinsulations[0].zvins_depth_of_vertical_insulation, var_zvins_depth_of_vertical_insulation)
        self.assertEqual(idf2.groundheattransferslabinsulations[0].ivins_flag_is_there_vertical_insulation, var_ivins_flag_is_there_vertical_insulation)
开发者ID:rbuffat,项目名称:pyidf,代码行数:35,代码来源:test_groundheattransferslabinsulation.py


示例15: test_create_airflownetworkmultizoneexternalnode

    def test_create_airflownetworkmultizoneexternalnode(self):

        pyidf.validation_level = ValidationLevel.error

        obj = AirflowNetworkMultiZoneExternalNode()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # real
        var_external_node_height = 2.2
        obj.external_node_height = var_external_node_height
        # object-list
        var_wind_pressure_coefficient_values_object_name = "object-list|Wind Pressure Coefficient Values Object Name"
        obj.wind_pressure_coefficient_values_object_name = var_wind_pressure_coefficient_values_object_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.airflownetworkmultizoneexternalnodes[0].name, var_name)
        self.assertAlmostEqual(idf2.airflownetworkmultizoneexternalnodes[0].external_node_height, var_external_node_height)
        self.assertEqual(idf2.airflownetworkmultizoneexternalnodes[0].wind_pressure_coefficient_values_object_name, var_wind_pressure_coefficient_values_object_name)
开发者ID:rbuffat,项目名称:pyidf,代码行数:27,代码来源:test_airflownetworkmultizoneexternalnode.py


示例16: test_create_setpointmanagersinglezonehumiditymaximum

    def test_create_setpointmanagersinglezonehumiditymaximum(self):

        pyidf.validation_level = ValidationLevel.error

        obj = SetpointManagerSingleZoneHumidityMaximum()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # alpha
        var_control_variable = "Control Variable"
        obj.control_variable = var_control_variable
        # alpha
        var_schedule_name = "Schedule Name"
        obj.schedule_name = var_schedule_name
        # node
        var_setpoint_node_or_nodelist_name = "node|Setpoint Node or NodeList Name"
        obj.setpoint_node_or_nodelist_name = var_setpoint_node_or_nodelist_name
        # node
        var_control_zone_air_node_name = "node|Control Zone Air Node Name"
        obj.control_zone_air_node_name = var_control_zone_air_node_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.setpointmanagersinglezonehumiditymaximums[0].name, var_name)
        self.assertEqual(idf2.setpointmanagersinglezonehumiditymaximums[0].control_variable, var_control_variable)
        self.assertEqual(idf2.setpointmanagersinglezonehumiditymaximums[0].schedule_name, var_schedule_name)
        self.assertEqual(idf2.setpointmanagersinglezonehumiditymaximums[0].setpoint_node_or_nodelist_name, var_setpoint_node_or_nodelist_name)
        self.assertEqual(idf2.setpointmanagersinglezonehumiditymaximums[0].control_zone_air_node_name, var_control_zone_air_node_name)
开发者ID:rbuffat,项目名称:pyidf,代码行数:35,代码来源:test_setpointmanagersinglezonehumiditymaximum.py


示例17: test_create_roomairnodeairflownetworkadjacentsurfacelist

    def test_create_roomairnodeairflownetworkadjacentsurfacelist(self):

        pyidf.validation_level = ValidationLevel.error

        obj = RoomAirNodeAirflowNetworkAdjacentSurfaceList()
        # Alpha
        var_name = "Alpha|Name"
        obj.name = var_name
        paras = []
        var_surface_1_name = "object-list|Surface 1 Name"
        paras.append(var_surface_1_name)
        obj.add_extensible(*paras)
        

        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.roomairnodeairflownetworkadjacentsurfacelists[0].name, var_name)
        index = obj.extensible_field_index("Surface 1 Name")
        self.assertEqual(idf2.roomairnodeairflownetworkadjacentsurfacelists[0].extensibles[0][index], var_surface_1_name)
开发者ID:rbuffat,项目名称:pyidf,代码行数:26,代码来源:test_roomairnodeairflownetworkadjacentsurfacelist.py


示例18: test_create_constructioncfactorundergroundwall

    def test_create_constructioncfactorundergroundwall(self):

        pyidf.validation_level = ValidationLevel.error

        obj = ConstructionCfactorUndergroundWall()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # real
        var_cfactor = 0.0001
        obj.cfactor = var_cfactor
        # real
        var_height = 0.0001
        obj.height = var_height

        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.constructioncfactorundergroundwalls[0].name, var_name)
        self.assertAlmostEqual(idf2.constructioncfactorundergroundwalls[0].cfactor, var_cfactor)
        self.assertAlmostEqual(idf2.constructioncfactorundergroundwalls[0].height, var_height)
开发者ID:rbuffat,项目名称:pyidf,代码行数:27,代码来源:test_constructioncfactorundergroundwall.py


示例19: test_create_airflownetworkdistributionnode

    def test_create_airflownetworkdistributionnode(self):

        pyidf.validation_level = ValidationLevel.error

        obj = AirflowNetworkDistributionNode()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # alpha
        var_component_name_or_node_name = "Component Name or Node Name"
        obj.component_name_or_node_name = var_component_name_or_node_name
        # alpha
        var_component_object_type_or_node_type = "AirLoopHVAC:ZoneMixer"
        obj.component_object_type_or_node_type = var_component_object_type_or_node_type
        # real
        var_node_height = 4.4
        obj.node_height = var_node_height

        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.airflownetworkdistributionnodes[0].name, var_name)
        self.assertEqual(idf2.airflownetworkdistributionnodes[0].component_name_or_node_name, var_component_name_or_node_name)
        self.assertEqual(idf2.airflownetworkdistributionnodes[0].component_object_type_or_node_type, var_component_object_type_or_node_type)
        self.assertAlmostEqual(idf2.airflownetworkdistributionnodes[0].node_height, var_node_height)
开发者ID:rbuffat,项目名称:pyidf,代码行数:31,代码来源:test_airflownetworkdistributionnode.py


示例20: test_create_energymanagementsystemcurveortableindexvariable

    def test_create_energymanagementsystemcurveortableindexvariable(self):

        pyidf.validation_level = ValidationLevel.error

        obj = EnergyManagementSystemCurveOrTableIndexVariable()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # object-list
        var_curve_or_table_object_name = "object-list|Curve or Table Object Name"
        obj.curve_or_table_object_name = var_curve_or_table_object_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.energymanagementsystemcurveortableindexvariables[0].name, var_name)
        self.assertEqual(
            idf2.energymanagementsystemcurveortableindexvariables[0].curve_or_table_object_name,
            var_curve_or_table_object_name,
        )
开发者ID:secondmover,项目名称:pyidf,代码行数:26,代码来源:test_energymanagementsystemcurveortableindexvariable.py



注:本文中的pyidf.idf.IDF类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python datatypes.speed函数代码示例发布时间:2022-05-25
下一篇:
Python core.Cluster类代码示例发布时间:2022-05-25
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap