コード例 #1
0
ファイル: test_version.py プロジェクト: secondmover/pyidf
    def test_create_version(self):

        pyidf.validation_level = ValidationLevel.error

        obj = Version()
        # alpha
        var_version_identifier = "Version Identifier"
        obj.version_identifier = var_version_identifier

        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.versions[0].version_identifier, var_version_identifier)
コード例 #2
0
from pyidf.location_and_climate import SizingPeriodDesignDay
from pyidf.zone_hvac_controls_and_thermostats import ZoneControlThermostat
from pyidf.schedules import ScheduleTypeLimits
from pyidf.zone_hvac_equipment_connections import ZoneHvacEquipmentList
from pyidf.zone_hvac_controls_and_thermostats import ThermostatSetpointDualSetpoint

idf_file_path = r"Exercise1A.idf"


if __name__ == '__main__':

    logging.info("start")
    pyidf.validation_level = ValidationLevel.transition
    idf = IDF()

    obj1 = Version()
    obj1.version_identifier = "8.4"
    idf.add(obj1)

    obj2 = Building()
    obj2.name = "Exercise 1A"
    obj2.north_axis = 0.0
    obj2.terrain = "Country"
    obj2.loads_convergence_tolerance_value = 0.04
    obj2.temperature_convergence_tolerance_value = 0.4
    obj2.solar_distribution = "FullInteriorAndExterior"
    obj2.maximum_number_of_warmup_days = None
    obj2.minimum_number_of_warmup_days = 6
    idf.add(obj2)

    obj3 = Timestep()
コード例 #3
0
from pyidf.schedules import ScheduleCompact
from pyidf.location_and_climate import SizingPeriodDesignDay
from pyidf.zone_hvac_controls_and_thermostats import ZoneControlThermostat
from pyidf.schedules import ScheduleTypeLimits
from pyidf.zone_hvac_equipment_connections import ZoneHvacEquipmentList
from pyidf.zone_hvac_controls_and_thermostats import ThermostatSetpointDualSetpoint

idf_file_path = r"Exercise1A.idf"

if __name__ == '__main__':

    logging.info("start")
    pyidf.validation_level = ValidationLevel.transition
    idf = IDF()

    obj1 = Version()
    obj1.version_identifier = "8.4"
    idf.add(obj1)

    obj2 = Building()
    obj2.name = "Exercise 1A"
    obj2.north_axis = 0.0
    obj2.terrain = "Country"
    obj2.loads_convergence_tolerance_value = 0.04
    obj2.temperature_convergence_tolerance_value = 0.4
    obj2.solar_distribution = "FullInteriorAndExterior"
    obj2.maximum_number_of_warmup_days = None
    obj2.minimum_number_of_warmup_days = 6
    idf.add(obj2)

    obj3 = Timestep()