From f8082a6b20c73092a02ac63778e5153ad7d18803 Mon Sep 17 00:00:00 2001 From: Joe Robertson Date: Wed, 6 Sep 2023 15:21:49 -0700 Subject: [PATCH] Append in.schedules.csv int only for 2+ buildings. --- HPXMLtoOpenStudio/measure.rb | 6 +++++- HPXMLtoOpenStudio/measure.xml | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/HPXMLtoOpenStudio/measure.rb b/HPXMLtoOpenStudio/measure.rb index 2ecdc09184..e3410c20e8 100644 --- a/HPXMLtoOpenStudio/measure.rb +++ b/HPXMLtoOpenStudio/measure.rb @@ -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 diff --git a/HPXMLtoOpenStudio/measure.xml b/HPXMLtoOpenStudio/measure.xml index c94fce8a88..6db5550c06 100644 --- a/HPXMLtoOpenStudio/measure.xml +++ b/HPXMLtoOpenStudio/measure.xml @@ -3,8 +3,8 @@ 3.1 hpxm_lto_openstudio b1543b30-9465-45ff-ba04-1d1f85e763bc - 44a8c879-a715-47b0-9ba3-1198364ac7a7 - 2023-09-06T16:34:24Z + 4b5d38e3-9a0d-49c7-8a63-1a3a61a22983 + 2023-09-06T22:21:20Z D8922A73 HPXMLtoOpenStudio HPXML to OpenStudio Translator @@ -130,7 +130,7 @@ measure.rb rb script - C67F4C5A + 98E3DC35 airflow.rb