本文整理汇总了Python中pyidf.idf.IDF._create_datadict方法的典型用法代码示例。如果您正苦于以下问题:Python IDF._create_datadict方法的具体用法?Python IDF._create_datadict怎么用?Python IDF._create_datadict使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyidf.idf.IDF
的用法示例。
在下文中一共展示了IDF._create_datadict方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: IDF
# 需要导入模块: from pyidf.idf import IDF [as 别名]
# 或者: from pyidf.idf.IDF import _create_datadict [as 别名]
import logging
from pyidf import ValidationLevel
import pyidf
from pyidf.idf import IDF
idf_file_path = r"Exercise1A.idf"
if __name__ == '__main__':
logging.info("start")
pyidf.validation_level = ValidationLevel.transition
idf = IDF()
{%- for obj in objs %}
{% set outer_loop = loop %}
obj{{loop.index}} = IDF._create_datadict("{{obj.dd_name}}")
{%- for field in obj['dd-fields'] %}
obj{{outer_loop.index}}["{{field[0]}}"] = {{ field[1] }}
{%- endfor %}
{%- for ext in obj['extensible-fields'] %}
{%- if ext|count > 0 %}
obj{{outer_loop.index}}.add_extensible({{ext}})
{%- endif %}
{%- endfor %}
idf.add(obj{{outer_loop.index}})
{% endfor %}
idf.save(idf_file_path)
示例2: IDF
# 需要导入模块: from pyidf.idf import IDF [as 别名]
# 或者: from pyidf.idf.IDF import _create_datadict [as 别名]
import logging
from pyidf import ValidationLevel
import pyidf
from pyidf.idf import IDF
idf_file_path = r"Exercise1A.idf"
if __name__ == '__main__':
logging.info("start")
pyidf.validation_level = ValidationLevel.transition
idf = IDF()
obj1 = IDF._create_datadict("Version")
obj1["Version Identifier"] = "8.4"
idf.add(obj1)
obj2 = IDF._create_datadict("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 = IDF._create_datadict("Timestep")
obj3["Number of Timesteps per Hour"] = 4