Skip to content

Commit

Permalink
Append in.schedules.csv int only for 2+ buildings.
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-robertson committed Sep 6, 2023
1 parent 7b84afc commit f8082a6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion HPXMLtoOpenStudio/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,15 @@ def run(model, runner, user_arguments)
hpxml_sch_map = {}
hpxml.buildings.each_with_index do |hpxml_bldg, i|
check_schedule_references(hpxml.header, hpxml_bldg.header, hpxml_path)
in_schedules_csv = 'in.schedules.csv'
if i > 0
in_schedules_csv = "in.schedules#{i + 1}.csv"
end
schedules_file = SchedulesFile.new(runner: runner, model: model,
schedules_paths: hpxml.header.schedules_filepaths + hpxml_bldg.header.schedules_filepaths,
year: Location.get_sim_calendar_year(hpxml.header.sim_calendar_year, epw_file),
unavailable_periods: hpxml.header.unavailable_periods,
output_path: File.join(output_dir, "in.schedules#{i + 1}.csv"))
output_path: File.join(output_dir, in_schedules_csv))
HPXMLDefaults.apply(runner, hpxml, hpxml_bldg, eri_version, weather, epw_file: epw_file, schedules_file: schedules_file)
hpxml_sch_map[hpxml_bldg] = schedules_file
end
Expand Down
6 changes: 3 additions & 3 deletions HPXMLtoOpenStudio/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>hpxm_lto_openstudio</name>
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
<version_id>44a8c879-a715-47b0-9ba3-1198364ac7a7</version_id>
<version_modified>2023-09-06T16:34:24Z</version_modified>
<version_id>4b5d38e3-9a0d-49c7-8a63-1a3a61a22983</version_id>
<version_modified>2023-09-06T22:21:20Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -130,7 +130,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>C67F4C5A</checksum>
<checksum>98E3DC35</checksum>
</file>
<file>
<filename>airflow.rb</filename>
Expand Down

0 comments on commit f8082a6

Please sign in to comment.