From cca5c80a0048d2a0b20d4a380161abdaf3134c4c Mon Sep 17 00:00:00 2001 From: Scott Horowitz Date: Thu, 12 Dec 2024 15:22:19 -0700 Subject: [PATCH 01/10] Bugfix for when a detailed schedule is used with higher resolution (e.g., 10-min data) than the simulation timestep (e.g., 60-min). --- HPXMLtoOpenStudio/resources/model.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/HPXMLtoOpenStudio/resources/model.rb b/HPXMLtoOpenStudio/resources/model.rb index 5e2ba31032..946760878b 100644 --- a/HPXMLtoOpenStudio/resources/model.rb +++ b/HPXMLtoOpenStudio/resources/model.rb @@ -677,6 +677,7 @@ def self.add_schedule_file(model, name:, file_path:, col_num:, rows_to_skip:, nu sch.setNumberofHoursofData(num_hours) sch.setMinutesperItem(mins_per_item) sch.setTranslateFileWithRelativePath(true) + sch.setInterpolatetoTimestep(true) add_schedule_type_limits(model, schedule: sch, limits: limits) return sch end From 2f42aaba48977580bad6b19a1aee8ab7afb92022 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 12 Dec 2024 23:16:55 +0000 Subject: [PATCH 02/10] Latest results. --- workflow/tests/base_results/results_simulations_bills.csv | 2 +- workflow/tests/base_results/results_simulations_energy.csv | 2 +- workflow/tests/base_results/results_simulations_loads.csv | 2 +- workflow/tests/base_results/results_simulations_misc.csv | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/workflow/tests/base_results/results_simulations_bills.csv b/workflow/tests/base_results/results_simulations_bills.csv index efd5712afc..0f5bf8b40a 100644 --- a/workflow/tests/base_results/results_simulations_bills.csv +++ b/workflow/tests/base_results/results_simulations_bills.csv @@ -420,7 +420,7 @@ base-residents-5-5.xml,1486.07,144.0,1589.28,-737.14,996.14,144.0,345.93,489.93, base-schedules-detailed-all-10-mins.xml,1847.61,144.0,1312.78,0.0,1456.78,144.0,246.83,390.83,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,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,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 diff --git a/workflow/tests/base_results/results_simulations_energy.csv b/workflow/tests/base_results/results_simulations_energy.csv index f231923ff7..85f0dba77e 100644 --- a/workflow/tests/base_results/results_simulations_energy.csv +++ b/workflow/tests/base_results/results_simulations_energy.csv @@ -420,7 +420,7 @@ base-residents-5-5.xml,76.709,56.458,43.662,23.411,33.047,0.0,0.0,0.0,0.0,0.0,0. base-schedules-detailed-all-10-mins.xml,59.645,59.645,36.066,36.066,23.579,0.0,0.0,0.0,0.0,0.0,0.0,0.585,0.0,0.0,4.619,0.698,9.022,0.0,0.0,4.51,0.0,0.334,0.0,0.0,0.0,0.0,2.073,0.0,0.0,0.319,0.365,1.513,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,23.579,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 base-schedules-detailed-mixed-timesteps-power-outage.xml,33.223,33.223,28.263,28.263,4.96,0.0,0.0,0.0,0.0,0.0,0.0,0.123,0.0,0.0,3.201,0.431,7.326,0.0,0.0,3.619,0.0,0.267,0.0,0.0,0.0,0.0,1.687,0.0,0.0,0.267,0.304,1.259,1.258,0.0,1.714,6.807,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,4.96,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 base-schedules-detailed-mixed-timesteps.xml,42.085,42.085,33.933,33.933,8.153,0.0,0.0,0.0,0.0,0.0,0.0,0.202,0.0,0.0,3.214,0.433,9.053,0.0,0.0,4.51,0.0,0.334,0.0,0.0,0.0,0.0,1.962,0.0,0.0,0.319,0.365,1.513,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,8.153,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 -base-schedules-detailed-occupancy-stochastic-10-mins.xml,59.034,59.034,35.91,35.91,23.123,0.0,0.0,0.0,0.0,0.0,0.0,0.574,0.0,0.0,4.501,0.681,8.936,0.0,0.0,4.482,0.0,0.334,0.0,0.0,0.0,0.0,2.073,0.0,0.0,0.323,0.356,1.504,1.664,0.0,2.092,8.391,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,23.123,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +base-schedules-detailed-occupancy-stochastic-10-mins.xml,59.008,59.008,35.899,35.899,23.109,0.0,0.0,0.0,0.0,0.0,0.0,0.573,0.0,0.0,4.491,0.679,9.015,0.0,0.0,4.51,0.0,0.334,0.0,0.0,0.0,0.0,2.073,0.0,0.0,0.319,0.365,1.513,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,23.109,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 base-schedules-detailed-occupancy-stochastic-no-space-cooling.xml,57.243,57.243,34.167,34.167,23.076,0.0,0.0,0.0,0.0,0.0,0.0,0.573,0.0,0.0,3.005,0.417,9.005,0.0,0.0,4.51,0.0,0.334,0.0,0.0,0.0,0.0,2.1,0.0,0.0,0.319,0.365,1.513,1.529,0.0,2.115,8.384,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,23.076,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 base-schedules-detailed-occupancy-stochastic-no-space-heating.xml,55.986,55.986,35.809,35.809,20.177,0.0,0.0,0.0,0.0,0.0,0.0,0.501,0.0,0.0,4.488,0.679,9.017,0.0,0.0,4.51,0.0,0.334,0.0,0.0,0.0,0.0,2.058,0.0,0.0,0.319,0.365,1.513,1.529,0.0,2.115,8.384,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,20.177,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 base-schedules-detailed-occupancy-stochastic-power-outage.xml,44.705,44.705,30.057,30.057,14.648,0.0,0.0,0.0,0.0,0.0,0.0,0.363,0.0,0.0,4.468,0.675,7.293,0.0,0.0,3.627,0.0,0.267,0.0,0.0,0.0,0.0,1.751,0.0,0.0,0.267,0.304,1.259,1.258,0.0,1.716,6.807,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,14.648,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 diff --git a/workflow/tests/base_results/results_simulations_loads.csv b/workflow/tests/base_results/results_simulations_loads.csv index fe9e046176..758a4bd9b8 100644 --- a/workflow/tests/base_results/results_simulations_loads.csv +++ b/workflow/tests/base_results/results_simulations_loads.csv @@ -420,7 +420,7 @@ base-residents-5-5.xml,31.207,0.0,6.681,19.689,0.642,0.0,12.225,0.0,4.268,4.009, base-schedules-detailed-all-10-mins.xml,22.277,0.0,14.405,9.052,0.639,0.0,0.0,0.0,3.853,3.926,0.552,7.665,0.697,10.89,-13.524,0.0,0.0,0.0,8.387,-0.096,5.738,0.0,0.813,0.0,5.316,-9.591,-2.673,0.0,0.046,-0.205,-0.017,2.835,0.029,-0.654,10.824,0.0,0.0,0.0,-6.168,-0.091,-0.911,-3.756,-0.146,0.0,3.366,7.54,1.836 base-schedules-detailed-mixed-timesteps-power-outage.xml,4.688,0.0,8.963,7.299,0.563,0.0,0.0,0.0,2.703,2.543,0.355,4.288,0.355,6.718,-13.043,0.0,0.0,0.0,3.932,-0.083,3.532,0.0,0.427,0.0,1.074,-6.689,-1.691,0.0,-0.15,-0.439,-0.05,2.559,-0.026,-1.348,11.31,0.0,0.0,0.0,-7.072,-0.038,-1.168,-6.399,-0.172,0.0,2.194,7.967,1.928 base-schedules-detailed-mixed-timesteps.xml,7.702,0.0,9.01,9.052,0.673,0.0,0.0,0.0,3.005,2.897,0.405,5.414,0.442,7.764,-13.032,0.0,0.0,0.0,5.769,-0.039,4.019,0.0,0.626,0.0,1.815,-9.083,-2.581,0.0,-0.153,-0.441,-0.05,2.563,-0.027,-1.356,11.316,0.0,0.0,0.0,-7.016,-0.037,-1.171,-6.417,-0.172,0.0,2.203,7.971,1.929 -base-schedules-detailed-occupancy-stochastic-10-mins.xml,21.843,0.0,14.048,8.986,0.616,0.0,0.0,0.0,3.84,3.896,0.547,7.622,0.683,10.784,-13.606,0.0,0.0,0.0,8.382,-0.103,5.729,0.0,0.8,0.0,5.177,-9.597,-2.664,0.0,0.03,-0.185,-0.013,2.843,0.032,-0.64,10.802,0.0,0.0,0.0,-6.17,-0.099,-0.938,-3.924,-0.148,0.0,3.167,7.599,1.818 +base-schedules-detailed-occupancy-stochastic-10-mins.xml,21.831,0.0,14.008,9.073,0.615,0.0,0.0,0.0,3.831,3.89,0.547,7.619,0.682,10.775,-13.569,0.0,0.0,0.0,8.388,-0.103,5.674,0.0,0.815,0.0,5.173,-9.567,-2.674,0.0,0.021,-0.192,-0.014,2.837,0.032,-0.651,10.839,0.0,0.0,0.0,-6.166,-0.099,-0.933,-3.927,-0.145,0.0,3.155,7.539,1.836 base-schedules-detailed-occupancy-stochastic-no-space-cooling.xml,21.8,0.0,8.74,9.07,0.607,0.0,0.0,0.0,3.829,3.887,0.546,7.61,0.683,10.768,-13.551,0.0,0.0,0.0,8.355,-0.103,5.67,0.0,0.815,0.0,5.165,-9.558,-2.666,0.0,-0.097,-0.381,-0.042,2.287,-0.014,-1.226,10.857,0.0,0.0,0.0,-6.897,-0.099,-1.105,-5.561,-0.175,0.0,1.886,7.555,1.844 base-schedules-detailed-occupancy-stochastic-no-space-heating.xml,19.079,0.0,13.998,9.07,0.62,0.0,0.0,0.0,3.764,3.783,0.532,7.211,0.658,10.473,-13.556,0.0,0.0,0.0,7.514,-0.167,5.477,0.0,0.793,0.0,4.486,-9.555,-2.669,0.0,0.019,-0.194,-0.015,2.834,0.033,-0.65,10.852,0.0,0.0,0.0,-6.168,-0.102,-0.933,-3.927,-0.145,0.0,3.15,7.529,1.841 base-schedules-detailed-occupancy-stochastic-power-outage.xml,13.843,0.0,13.92,7.312,0.518,0.0,0.0,0.0,3.376,3.305,0.463,5.781,0.538,9.025,-13.587,0.0,0.0,0.0,5.228,-0.197,4.745,0.0,0.551,0.0,3.197,-7.147,-1.788,0.0,0.026,-0.188,-0.014,2.827,0.033,-0.643,10.826,0.0,0.0,0.0,-6.235,-0.099,-0.93,-3.911,-0.145,0.0,3.135,7.52,1.84 diff --git a/workflow/tests/base_results/results_simulations_misc.csv b/workflow/tests/base_results/results_simulations_misc.csv index a942301e78..fa283b54ea 100644 --- a/workflow/tests/base_results/results_simulations_misc.csv +++ b/workflow/tests/base_results/results_simulations_misc.csv @@ -420,7 +420,7 @@ base-residents-5-5.xml,0.0,0.0,2432.4,2087.7,23985.6,5811.5,3227.0,3781.0,3781.0 base-schedules-detailed-all-10-mins.xml,0.333,0.833,1354.7,998.0,11252.4,2582.1,9419.9,11054.4,11054.4,37.577,21.976,0.0 base-schedules-detailed-mixed-timesteps-power-outage.xml,1.667,0.0,1141.2,883.5,9207.2,2112.8,9366.1,10786.8,10786.8,47.12,21.538,0.0 base-schedules-detailed-mixed-timesteps.xml,0.0,0.0,1354.7,998.0,11253.6,2582.4,9360.3,10789.9,10789.9,34.057,21.541,0.0 -base-schedules-detailed-occupancy-stochastic-10-mins.xml,0.0,0.0,1002.6,945.2,11359.4,2606.6,6640.1,7193.9,9249.8,32.249,20.659,0.0 +base-schedules-detailed-occupancy-stochastic-10-mins.xml,0.0,0.0,1354.7,998.0,11169.8,2563.1,4797.0,5594.5,5594.5,31.634,18.819,0.0 base-schedules-detailed-occupancy-stochastic-no-space-cooling.xml,0.0,7.0,1354.7,998.0,11168.6,2562.9,4789.6,6233.3,6233.3,31.629,22.999,0.0 base-schedules-detailed-occupancy-stochastic-no-space-heating.xml,1.0,0.0,1354.7,998.0,11168.6,2562.9,4696.5,5577.7,5577.7,33.934,18.805,0.0 base-schedules-detailed-occupancy-stochastic-power-outage.xml,19.0,0.0,1141.2,883.5,9132.4,2095.6,6334.9,5571.2,6334.9,42.337,18.751,0.0 From 88c827785eaeb4363ffc3d7c9184df5cf1c04a5e Mon Sep 17 00:00:00 2001 From: Scott Horowitz Date: Thu, 12 Dec 2024 18:06:06 -0700 Subject: [PATCH 03/10] Update changelog and measure.xml [ci skip] --- Changelog.md | 1 + HPXMLtoOpenStudio/measure.xml | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Changelog.md b/Changelog.md index fe1aa6a5b7..9103c2ec7d 100644 --- a/Changelog.md +++ b/Changelog.md @@ -3,6 +3,7 @@ __New Features__ __Bugfixes__ +- Bugfix for when detailed schedules are used with higher resolution (e.g., 10-min data) than the simulation timestep (e.g., 60-min). ## OpenStudio-HPXML v1.9.1 diff --git a/HPXMLtoOpenStudio/measure.xml b/HPXMLtoOpenStudio/measure.xml index 3869fb75a3..86e671195a 100644 --- a/HPXMLtoOpenStudio/measure.xml +++ b/HPXMLtoOpenStudio/measure.xml @@ -3,8 +3,8 @@ 3.1 hpxm_lto_openstudio b1543b30-9465-45ff-ba04-1d1f85e763bc - a96e00a3-319b-4f82-a104-9013094367f5 - 2024-12-09T23:44:23Z + 46857481-52a7-45eb-8b03-355d10898dac + 2024-12-13T01:05:41Z D8922A73 HPXMLtoOpenStudio HPXML to OpenStudio Translator @@ -447,7 +447,7 @@ model.rb rb resource - 56A086CD + 87A7EB64 output.rb @@ -647,6 +647,12 @@ resource 93120E27 + + in.schedules.csv + csv + test + C0FA4D6F + test_airflow.rb rb From 01b93fb883cb2883c7d17746f017ad4c83ef6d3a Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Tue, 17 Dec 2024 22:11:31 +0000 Subject: [PATCH 04/10] Latest results. --- workflow/tests/base_results/results_simulations_bills.csv | 1 - workflow/tests/base_results/results_simulations_energy.csv | 1 - workflow/tests/base_results/results_simulations_hvac.csv | 1 - workflow/tests/base_results/results_simulations_loads.csv | 1 - workflow/tests/base_results/results_simulations_misc.csv | 1 - 5 files changed, 5 deletions(-) diff --git a/workflow/tests/base_results/results_simulations_bills.csv b/workflow/tests/base_results/results_simulations_bills.csv index efd5712afc..342ba17740 100644 --- a/workflow/tests/base_results/results_simulations_bills.csv +++ b/workflow/tests/base_results/results_simulations_bills.csv @@ -411,7 +411,6 @@ base-pv-generators-battery-scheduled.xml,955.78,144.0,1068.19,-978.65,233.54,144 base-pv-generators-battery.xml,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0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 diff --git a/workflow/tests/base_results/results_simulations_energy.csv b/workflow/tests/base_results/results_simulations_energy.csv index f231923ff7..c33851605c 100644 --- a/workflow/tests/base_results/results_simulations_energy.csv +++ b/workflow/tests/base_results/results_simulations_energy.csv @@ -411,7 +411,6 @@ base-pv-generators-battery-scheduled.xml,78.352,43.276,37.536,2.46,32.316,8.5,0. base-pv-generators-battery.xml,77.491,42.415,36.675,1.599,32.316,8.5,0.0,0.0,0.0,0.0,0.0,0.591,0.0,0.0,4.398,0.662,9.013,0.0,0.0,4.507,0.0,0.334,0.0,0.0,0.0,0.0,2.072,0.0,0.0,0.319,0.365,1.513,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,-26.886,-8.189,0.874,23.816,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,8.5,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,8.5,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 base-pv-generators.xml,76.617,41.541,35.801,0.725,32.316,8.5,0.0,0.0,0.0,0.0,0.0,0.591,0.0,0.0,4.398,0.662,9.013,0.0,0.0,4.507,0.0,0.334,0.0,0.0,0.0,0.0,2.072,0.0,0.0,0.319,0.365,1.513,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,-26.886,-8.189,0.0,23.816,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,8.5,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,8.5,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 base-pv.xml,59.617,32.73,35.801,8.914,23.816,0.0,0.0,0.0,0.0,0.0,0.0,0.591,0.0,0.0,4.398,0.662,9.013,0.0,0.0,4.507,0.0,0.334,0.0,0.0,0.0,0.0,2.072,0.0,0.0,0.319,0.365,1.513,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,-26.886,0.0,0.0,23.816,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 -base-residents-0-runperiod-1-month.xml,8.8797,8.8797,0.504,0.504,8.3757,0.0,0.0,0.0,0.0,0.0,0.0,0.2078,0.0,0.0,0.1034,0.0,0.0468,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.146,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,8.3757,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 base-residents-0.xml,41.664,41.664,7.363,7.363,34.301,0.0,0.0,0.0,0.0,0.0,0.0,0.851,0.0,0.0,3.398,0.481,0.577,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,2.056,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,34.301,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 base-residents-1-misc-loads-large-uncommon.xml,99.944,99.944,49.922,49.922,42.362,0.0,2.527,5.133,0.0,0.0,0.0,0.565,0.0,0.0,4.562,0.695,3.75,0.0,0.0,4.507,0.0,0.334,0.0,0.0,0.0,0.0,4.293,1.024,0.0,0.2,0.221,0.917,1.115,0.0,2.007,6.55,5.687,1.15,0.0,6.508,2.937,2.899,0.0,0.0,0.0,22.778,0.0,0.0,0.0,0.0,0.0,18.039,0.0,0.0,1.544,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,2.527,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,5.133,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 base-residents-1-misc-loads-large-uncommon2.xml,79.555,79.555,47.572,47.572,24.322,2.527,0.0,0.0,5.133,0.0,0.0,0.565,0.0,0.0,4.562,0.695,3.75,0.0,0.0,4.507,0.0,0.334,0.0,0.0,0.0,0.0,4.293,1.024,0.0,0.2,0.221,0.917,1.115,0.0,2.007,6.55,5.687,1.15,0.0,6.508,0.587,2.899,0.0,0.0,0.0,22.778,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.544,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,2.527,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,5.133,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 diff --git a/workflow/tests/base_results/results_simulations_hvac.csv b/workflow/tests/base_results/results_simulations_hvac.csv index 0377e4c151..d85488c244 100644 --- a/workflow/tests/base_results/results_simulations_hvac.csv +++ b/workflow/tests/base_results/results_simulations_hvac.csv @@ -411,7 +411,6 @@ base-pv-generators-battery-scheduled.xml,6.8,91.76,36000.0,24000.0,0.0,32239.0,8 base-pv-generators-battery.xml,6.8,91.76,36000.0,24000.0,0.0,32239.0,8709.0,7508.0,0.0,575.0,6918.0,0.0,0.0,1738.0,2171.0,4620.0,0.0,0.0,20039.0,6112.0,7037.0,0.0,207.0,448.0,0.0,0.0,0.0,2293.0,622.0,0.0,3320.0,0.0,0.0,139.0,0.0,-661.0,0.0,800.0 base-pv-generators.xml,6.8,91.76,36000.0,24000.0,0.0,32239.0,8709.0,7508.0,0.0,575.0,6918.0,0.0,0.0,1738.0,2171.0,4620.0,0.0,0.0,20039.0,6112.0,7037.0,0.0,207.0,448.0,0.0,0.0,0.0,2293.0,622.0,0.0,3320.0,0.0,0.0,139.0,0.0,-661.0,0.0,800.0 base-pv.xml,6.8,91.76,36000.0,24000.0,0.0,32239.0,8709.0,7508.0,0.0,575.0,6918.0,0.0,0.0,1738.0,2171.0,4620.0,0.0,0.0,20039.0,6112.0,7037.0,0.0,207.0,448.0,0.0,0.0,0.0,2293.0,622.0,0.0,3320.0,0.0,0.0,139.0,0.0,-661.0,0.0,800.0 -base-residents-0-runperiod-1-month.xml,6.8,91.76,36000.0,24000.0,0.0,32239.0,8709.0,7508.0,0.0,575.0,6918.0,0.0,0.0,1738.0,2171.0,4620.0,0.0,0.0,20039.0,6112.0,7037.0,0.0,207.0,448.0,0.0,0.0,0.0,2293.0,622.0,0.0,3320.0,0.0,0.0,139.0,0.0,-661.0,0.0,800.0 base-residents-0.xml,6.8,91.76,36000.0,24000.0,0.0,32239.0,8709.0,7508.0,0.0,575.0,6918.0,0.0,0.0,1738.0,2171.0,4620.0,0.0,0.0,20039.0,6112.0,7037.0,0.0,207.0,448.0,0.0,0.0,0.0,2293.0,622.0,0.0,3320.0,0.0,0.0,139.0,0.0,-661.0,0.0,800.0 base-residents-1-misc-loads-large-uncommon.xml,6.8,91.76,36000.0,24000.0,0.0,33431.0,8742.0,7508.0,0.0,575.0,6918.0,0.0,0.0,1738.0,2171.0,5779.0,0.0,0.0,21277.0,6150.0,7037.0,0.0,207.0,448.0,0.0,0.0,0.0,2293.0,622.0,0.0,4520.0,0.0,0.0,139.0,0.0,-661.0,0.0,800.0 base-residents-1-misc-loads-large-uncommon2.xml,6.8,91.76,36000.0,24000.0,0.0,33431.0,8742.0,7508.0,0.0,575.0,6918.0,0.0,0.0,1738.0,2171.0,5779.0,0.0,0.0,21277.0,6150.0,7037.0,0.0,207.0,448.0,0.0,0.0,0.0,2293.0,622.0,0.0,4520.0,0.0,0.0,139.0,0.0,-661.0,0.0,800.0 diff --git a/workflow/tests/base_results/results_simulations_loads.csv b/workflow/tests/base_results/results_simulations_loads.csv index fe9e046176..7e033826de 100644 --- a/workflow/tests/base_results/results_simulations_loads.csv +++ b/workflow/tests/base_results/results_simulations_loads.csv @@ -411,7 +411,6 @@ base-pv-generators-battery-scheduled.xml,22.503,0.0,13.745,9.07,0.615,0.0,0.0,0. base-pv-generators-battery.xml,22.503,0.0,13.745,9.07,0.615,0.0,0.0,0.0,3.819,3.882,0.545,7.57,0.682,10.76,-13.571,0.0,0.0,0.0,8.363,-0.116,5.259,0.0,0.77,0.0,5.323,-8.475,-2.662,0.0,0.029,-0.188,-0.014,2.827,0.035,-0.632,10.837,0.0,0.0,0.0,-6.138,-0.112,-0.847,-3.884,-0.117,0.0,3.113,7.106,1.845 base-pv-generators.xml,22.503,0.0,13.745,9.07,0.615,0.0,0.0,0.0,3.819,3.882,0.545,7.57,0.682,10.76,-13.571,0.0,0.0,0.0,8.363,-0.116,5.259,0.0,0.77,0.0,5.323,-8.475,-2.662,0.0,0.029,-0.188,-0.014,2.827,0.035,-0.632,10.837,0.0,0.0,0.0,-6.138,-0.112,-0.847,-3.884,-0.117,0.0,3.113,7.106,1.845 base-pv.xml,22.503,0.0,13.745,9.07,0.615,0.0,0.0,0.0,3.819,3.882,0.545,7.57,0.682,10.76,-13.571,0.0,0.0,0.0,8.363,-0.116,5.259,0.0,0.77,0.0,5.323,-8.475,-2.662,0.0,0.029,-0.188,-0.014,2.827,0.035,-0.632,10.837,0.0,0.0,0.0,-6.138,-0.112,-0.847,-3.884,-0.117,0.0,3.113,7.106,1.845 -base-residents-0-runperiod-1-month.xml,7.9107,0.0,0.0,0.0,0.0511,0.0,0.0,0.0,0.5914,0.643,0.0909,1.746,0.1095,1.7781,-1.988,0.0,0.0,0.0,2.2357,-0.0004,1.0461,0.0,0.0,0.0,1.8131,-0.1971,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 base-residents-0.xml,32.415,0.0,10.561,0.0,0.62,0.0,0.0,0.0,3.761,3.912,0.547,7.099,0.683,10.947,-14.892,0.0,0.0,0.0,8.358,-0.174,6.026,0.0,0.0,0.0,7.39,-1.573,0.0,0.0,0.311,0.056,0.019,3.03,0.087,0.17,9.539,0.0,0.0,0.0,-5.202,-0.169,-0.644,0.0,0.0,0.0,2.393,1.102,0.0 base-residents-1-misc-loads-large-uncommon.xml,21.522,0.0,14.588,3.416,0.614,0.0,0.0,0.0,3.822,3.877,0.545,7.617,0.681,10.741,-13.462,0.0,0.0,0.0,8.416,-0.111,5.233,0.0,0.766,0.0,5.114,-9.432,-2.643,0.0,-0.024,-0.232,-0.02,2.761,0.024,-0.764,10.946,0.0,0.0,0.0,-6.251,-0.107,-0.887,-4.03,-0.122,0.0,3.256,8.291,1.864 base-residents-1-misc-loads-large-uncommon2.xml,21.522,0.0,14.588,3.416,0.614,0.0,0.0,0.0,3.822,3.877,0.545,7.617,0.681,10.741,-13.462,0.0,0.0,0.0,8.416,-0.111,5.233,0.0,0.766,0.0,5.114,-9.432,-2.643,0.0,-0.024,-0.232,-0.02,2.761,0.024,-0.764,10.946,0.0,0.0,0.0,-6.251,-0.107,-0.887,-4.03,-0.122,0.0,3.256,8.291,1.864 diff --git a/workflow/tests/base_results/results_simulations_misc.csv b/workflow/tests/base_results/results_simulations_misc.csv index a942301e78..7babdf768c 100644 --- a/workflow/tests/base_results/results_simulations_misc.csv +++ b/workflow/tests/base_results/results_simulations_misc.csv @@ -411,7 +411,6 @@ base-pv-generators-battery-scheduled.xml,0.0,0.0,1354.7,998.0,11171.6,2563.5,208 base-pv-generators-battery.xml,0.0,0.0,1354.7,998.0,11171.6,2563.5,2125.8,3715.9,3715.9,23.71,18.744,80.224 base-pv-generators.xml,0.0,0.0,1354.7,998.0,11171.6,2563.5,2082.5,3612.6,3612.6,23.71,18.744,0.0 base-pv.xml,0.0,0.0,1354.7,998.0,11171.6,2563.5,2082.5,3612.6,3612.6,23.71,18.744,0.0 -base-residents-0-runperiod-1-month.xml,0.0,0.0,0.0,0.0,0.0,0.0,627.96,0.0,627.96,27.1458,0.0,0.0 base-residents-0.xml,0.0,0.0,0.0,0.0,0.0,0.0,609.5,1840.9,1840.9,25.712,14.806,0.0 base-residents-1-misc-loads-large-uncommon.xml,0.0,0.0,821.3,625.4,3446.7,1167.8,2361.4,4228.7,4228.7,23.649,19.133,0.0 base-residents-1-misc-loads-large-uncommon2.xml,0.0,0.0,821.3,625.4,3446.7,1167.8,2242.3,4045.5,4045.5,23.649,19.133,0.0 From 2ca07befda73ab346738df93f01e63262e748b94 Mon Sep 17 00:00:00 2001 From: Scott Horowitz Date: Wed, 18 Dec 2024 15:01:26 -0700 Subject: [PATCH 05/10] Bugfixes and more tests. --- HPXMLtoOpenStudio/measure.xml | 14 +++--- HPXMLtoOpenStudio/resources/airflow.rb | 6 +-- HPXMLtoOpenStudio/resources/defaults.rb | 8 ++-- HPXMLtoOpenStudio/resources/misc_loads.rb | 10 ++++ HPXMLtoOpenStudio/tests/test_airflow.rb | 10 +++- HPXMLtoOpenStudio/tests/test_miscloads.rb | 58 ++++++++++++++++++----- 6 files changed, 79 insertions(+), 27 deletions(-) diff --git a/HPXMLtoOpenStudio/measure.xml b/HPXMLtoOpenStudio/measure.xml index bd36e2924f..b29acf72ee 100644 --- a/HPXMLtoOpenStudio/measure.xml +++ b/HPXMLtoOpenStudio/measure.xml @@ -3,8 +3,8 @@ 3.1 hpxm_lto_openstudio b1543b30-9465-45ff-ba04-1d1f85e763bc - f6215039-69e4-4cc9-a911-32c6e2db4759 - 2024-12-17T21:18:42Z + 7501d101-5f21-4eea-82f1-a443717c2359 + 2024-12-18T22:00:21Z D8922A73 HPXMLtoOpenStudio HPXML to OpenStudio Translator @@ -189,7 +189,7 @@ airflow.rb rb resource - 06E4A131 + 14A94278 battery.rb @@ -327,7 +327,7 @@ defaults.rb rb resource - CADAF9FE + 7EE4828A energyplus.rb @@ -441,7 +441,7 @@ misc_loads.rb rb resource - 039B0042 + 5A23B058 model.rb @@ -651,7 +651,7 @@ test_airflow.rb rb test - 6BDC58E4 + FAED863F test_battery.rb @@ -711,7 +711,7 @@ test_miscloads.rb rb test - 784CC382 + 52ADD231 test_pv.rb diff --git a/HPXMLtoOpenStudio/resources/airflow.rb b/HPXMLtoOpenStudio/resources/airflow.rb index 8709970c39..c4f4056ad3 100644 --- a/HPXMLtoOpenStudio/resources/airflow.rb +++ b/HPXMLtoOpenStudio/resources/airflow.rb @@ -38,10 +38,8 @@ def self.apply(runner, model, weather, spaces, hpxml_bldg, hpxml_header, schedul elsif f.used_for_seasonal_cooling_load_reduction vent_fans[:whf] << f elsif f.used_for_local_ventilation - if hpxml_bldg.building_occupancy.number_of_residents == 0 - # Operational calculation w/ zero occupants, zero out energy use - continue - end + next if hpxml_bldg.building_occupancy.number_of_residents == 0 # Operational calculation w/ zero occupants, zero out energy use + if f.fan_location == HPXML::LocationKitchen vent_fans[:kitchen] << f elsif f.fan_location == HPXML::LocationBath diff --git a/HPXMLtoOpenStudio/resources/defaults.rb b/HPXMLtoOpenStudio/resources/defaults.rb index 841bc497d1..2f5a4ca339 100644 --- a/HPXMLtoOpenStudio/resources/defaults.rb +++ b/HPXMLtoOpenStudio/resources/defaults.rb @@ -5763,7 +5763,7 @@ def self.get_pool_heater_annual_energy(cfa, nbeds, n_occ, unit_type, type) load_units = HPXML::UnitsKwhPerYear if n_occ == 0 # Operational calculation w/ zero occupants, zero out energy use - return load_type, 0.0 + return load_units, 0.0 end load_value = 8.3 / 0.004 * (0.5 + 0.25 * nbeds_eq / 3.0 + 0.25 * cfa / 1920.0) # kWh/yr @@ -5774,7 +5774,7 @@ def self.get_pool_heater_annual_energy(cfa, nbeds, n_occ, unit_type, type) load_units = HPXML::UnitsThermPerYear if n_occ == 0 # Operational calculation w/ zero occupants, zero out energy use - return load_type, 0.0 + return load_units, 0.0 end load_value = 3.0 / 0.014 * (0.5 + 0.25 * nbeds_eq / 3.0 + 0.25 * cfa / 1920.0) # therm/yr @@ -5817,7 +5817,7 @@ def self.get_permanent_spa_heater_annual_energy(cfa, nbeds, n_occ, unit_type, ty load_units = HPXML::UnitsKwhPerYear if n_occ == 0 # Operational calculation w/ zero occupants, zero out energy use - return load_type, 0.0 + return load_units, 0.0 end load_value = 49.0 / 0.048 * (0.5 + 0.25 * nbeds_eq / 3.0 + 0.25 * cfa / 1920.0) # kWh/yr @@ -5828,7 +5828,7 @@ def self.get_permanent_spa_heater_annual_energy(cfa, nbeds, n_occ, unit_type, ty load_units = HPXML::UnitsThermPerYear if n_occ == 0 # Operational calculation w/ zero occupants, zero out energy use - return load_type, 0.0 + return load_units, 0.0 end load_value = 0.87 / 0.011 * (0.5 + 0.25 * nbeds_eq / 3.0 + 0.25 * cfa / 1920.0) # therm/yr diff --git a/HPXMLtoOpenStudio/resources/misc_loads.rb b/HPXMLtoOpenStudio/resources/misc_loads.rb index 53aa99f416..1b16344f16 100644 --- a/HPXMLtoOpenStudio/resources/misc_loads.rb +++ b/HPXMLtoOpenStudio/resources/misc_loads.rb @@ -117,6 +117,11 @@ def self.apply_plug_load(runner, model, plug_load, obj_name, spaces, schedules_f # @param schedules_file [SchedulesFile] SchedulesFile wrapper class instance of detailed schedule files # @return [nil] def self.apply_fuel_loads(runner, model, spaces, hpxml_bldg, hpxml_header, schedules_file) + if hpxml_bldg.building_occupancy.number_of_residents == 0 + # Operational calculation w/ zero occupants, zero out energy use + return + end + hpxml_bldg.fuel_loads.each do |fuel_load| case fuel_load.fuel_load_type when HPXML::FuelLoadTypeGrill @@ -206,6 +211,11 @@ def self.apply_fuel_load(runner, model, fuel_load, obj_name, spaces, schedules_f # @param schedules_file [SchedulesFile] SchedulesFile wrapper class instance of detailed schedule files # @return [nil] def self.apply_pools_and_permanent_spas(runner, model, spaces, hpxml_bldg, hpxml_header, schedules_file) + if hpxml_bldg.building_occupancy.number_of_residents == 0 + # Operational calculation w/ zero occupants, zero out energy use + return + end + (hpxml_bldg.pools + hpxml_bldg.permanent_spas).each do |pool_or_spa| next if pool_or_spa.type == HPXML::TypeNone diff --git a/HPXMLtoOpenStudio/tests/test_airflow.rb b/HPXMLtoOpenStudio/tests/test_airflow.rb index da1c90dbb8..fa26004a0b 100644 --- a/HPXMLtoOpenStudio/tests/test_airflow.rb +++ b/HPXMLtoOpenStudio/tests/test_airflow.rb @@ -930,7 +930,15 @@ def test_duct_effective_r_values def test_operational_0_occupants args_hash = {} - args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, 'base-residents-0.xml')) + args_hash['hpxml_path'] = @tmp_hpxml_path + hpxml, hpxml_bldg = _create_hpxml('base-residents-0.xml') + hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}", + fan_location: HPXML::LocationBath, + used_for_local_ventilation: true) + hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}", + fan_location: HPXML::LocationKitchen, + used_for_local_ventilation: true) + XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path) model, _hpxml, _hpxml_bldg = _test_measure(args_hash) # Check no natural ventilation or whole house fan diff --git a/HPXMLtoOpenStudio/tests/test_miscloads.rb b/HPXMLtoOpenStudio/tests/test_miscloads.rb index 66e03f7376..39c25df13d 100644 --- a/HPXMLtoOpenStudio/tests/test_miscloads.rb +++ b/HPXMLtoOpenStudio/tests/test_miscloads.rb @@ -8,15 +8,18 @@ require_relative '../resources/util.rb' class HPXMLtoOpenStudioMiscLoadsTest < Minitest::Test + def setup + @root_path = File.absolute_path(File.join(File.dirname(__FILE__), '..', '..')) + @sample_files_path = File.join(@root_path, 'workflow', 'sample_files') + @tmp_hpxml_path = File.join(@sample_files_path, 'tmp.xml') + end + def teardown + File.delete(@tmp_hpxml_path) if File.exist? @tmp_hpxml_path File.delete(File.join(File.dirname(__FILE__), 'results_annual.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_annual.csv') File.delete(File.join(File.dirname(__FILE__), 'results_design_load_details.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_design_load_details.csv') end - def sample_files_dir - return File.join(File.dirname(__FILE__), '..', '..', 'workflow', 'sample_files') - end - def get_kwh_therm_per_year(model, name) kwh_yr = 0.0 therm_yr = 0.0 @@ -43,7 +46,7 @@ def get_kwh_therm_per_year(model, name) def test_misc_loads args_hash = {} - args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base.xml')) + args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, 'base.xml')) model, _hpxml, _hpxml_bldg = _test_measure(args_hash) # Check misc plug loads @@ -75,7 +78,7 @@ def test_misc_loads def test_large_uncommon_loads args_hash = {} - args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base-misc-loads-large-uncommon.xml')) + args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, 'base-misc-loads-large-uncommon.xml')) model, _hpxml, _hpxml_bldg = _test_measure(args_hash) # Check misc plug loads @@ -136,7 +139,7 @@ def test_large_uncommon_loads def test_large_uncommon_loads2 args_hash = {} - args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base-misc-loads-large-uncommon2.xml')) + args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, 'base-misc-loads-large-uncommon2.xml')) model, _hpxml, _hpxml_bldg = _test_measure(args_hash) # Check misc plug loads @@ -197,7 +200,35 @@ def test_large_uncommon_loads2 def test_operational_0_occupants args_hash = {} - args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base-residents-0.xml')) + args_hash['hpxml_path'] = @tmp_hpxml_path + hpxml, hpxml_bldg = _create_hpxml('base-residents-0.xml') + [HPXML::PlugLoadTypeElectricVehicleCharging, + HPXML::PlugLoadTypeWellPump].each do |plug_load_type| + hpxml_bldg.plug_loads.add(id: "PlugLoad#{hpxml_bldg.plug_loads.size + 1}", + plug_load_type: plug_load_type) + end + [HPXML::FuelLoadTypeFireplace, + HPXML::FuelLoadTypeGrill, + HPXML::FuelLoadTypeLighting].each do |fuel_load_type| + hpxml_bldg.fuel_loads.add(id: "FuelLoad#{hpxml_bldg.fuel_loads.size + 1}", + fuel_type: HPXML::FuelTypeNaturalGas, + fuel_load_type: fuel_load_type, + therm_per_year: 100) + end + hpxml_bldg.pools.add(id: "Pool#{hpxml_bldg.pools.size + 1}", + type: HPXML::TypeUnknown, + pump_type: HPXML::TypeUnknown, + heater_type: HPXML::HeaterTypeGas, + heater_load_units: HPXML::UnitsThermPerYear) + hpxml_bldg.permanent_spas.add(id: "PermanentSpa#{hpxml_bldg.permanent_spas.size + 1}", + type: HPXML::TypeUnknown, + pump_type: HPXML::TypeUnknown, + pump_kwh_per_year: 100, + heater_type: HPXML::HeaterTypeElectricResistance, + heater_load_units: HPXML::UnitsKwhPerYear, + heater_load_value: 100) + + XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path) model, _hpxml, _hpxml_bldg = _test_measure(args_hash) # Check misc plug loads @@ -258,7 +289,7 @@ def test_operational_0_occupants def test_operational_5_5_occupants args_hash = {} - args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base-residents-5-5.xml')) + args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, 'base-residents-5-5.xml')) model, _hpxml, _hpxml_bldg = _test_measure(args_hash) # Check misc plug loads @@ -319,7 +350,7 @@ def test_operational_5_5_occupants def test_operational_large_uncommon_loads args_hash = {} - args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base-residents-1-misc-loads-large-uncommon.xml')) + args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, 'base-residents-1-misc-loads-large-uncommon.xml')) model, _hpxml, _hpxml_bldg = _test_measure(args_hash) # Check misc plug loads @@ -380,7 +411,7 @@ def test_operational_large_uncommon_loads def test_operational_large_uncommon_loads2 args_hash = {} - args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base-residents-1-misc-loads-large-uncommon2.xml')) + args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, 'base-residents-1-misc-loads-large-uncommon2.xml')) model, _hpxml, _hpxml_bldg = _test_measure(args_hash) # Check misc plug loads @@ -476,4 +507,9 @@ def _test_measure(args_hash) return model, hpxml, hpxml.buildings[0] end + + def _create_hpxml(hpxml_name) + hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, hpxml_name)) + return hpxml, hpxml.buildings[0] + end end From 4616266ebf490f5275fdf4b0f59550b8e88030e4 Mon Sep 17 00:00:00 2001 From: Scott Horowitz Date: Thu, 19 Dec 2024 11:30:11 -0700 Subject: [PATCH 06/10] Exclude pool/spa and include ceiling fan to match previous implementation. --- HPXMLtoOpenStudio/measure.xml | 44 +++++++++---------- HPXMLtoOpenStudio/resources/defaults.rb | 30 ------------- HPXMLtoOpenStudio/resources/hvac.rb | 12 +++-- HPXMLtoOpenStudio/resources/misc_loads.rb | 5 --- HPXMLtoOpenStudio/tests/test_airflow.rb | 1 + HPXMLtoOpenStudio/tests/test_battery.rb | 1 + HPXMLtoOpenStudio/tests/test_defaults.rb | 1 + HPXMLtoOpenStudio/tests/test_enclosure.rb | 1 + HPXMLtoOpenStudio/tests/test_generator.rb | 1 + .../tests/test_hotwater_appliance.rb | 1 + HPXMLtoOpenStudio/tests/test_hvac.rb | 27 ++++++++++++ HPXMLtoOpenStudio/tests/test_hvac_sizing.rb | 3 +- HPXMLtoOpenStudio/tests/test_lighting.rb | 39 +++++++++++----- HPXMLtoOpenStudio/tests/test_location.rb | 1 + HPXMLtoOpenStudio/tests/test_miscloads.rb | 9 ++-- HPXMLtoOpenStudio/tests/test_pv.rb | 1 + HPXMLtoOpenStudio/tests/test_schedules.rb | 1 + HPXMLtoOpenStudio/tests/test_simcontrols.rb | 1 + HPXMLtoOpenStudio/tests/test_validation.rb | 1 + HPXMLtoOpenStudio/tests/test_water_heater.rb | 1 + HPXMLtoOpenStudio/tests/test_weather.rb | 1 + 21 files changed, 105 insertions(+), 77 deletions(-) diff --git a/HPXMLtoOpenStudio/measure.xml b/HPXMLtoOpenStudio/measure.xml index b29acf72ee..05e680e9c3 100644 --- a/HPXMLtoOpenStudio/measure.xml +++ b/HPXMLtoOpenStudio/measure.xml @@ -3,8 +3,8 @@ 3.1 hpxm_lto_openstudio b1543b30-9465-45ff-ba04-1d1f85e763bc - 7501d101-5f21-4eea-82f1-a443717c2359 - 2024-12-18T22:00:21Z + 0bff6a77-c10a-4a70-bb9b-4b1efdb32682 + 2024-12-19T18:29:02Z D8922A73 HPXMLtoOpenStudio HPXML to OpenStudio Translator @@ -327,7 +327,7 @@ defaults.rb rb resource - 7EE4828A + F2AE9AD3 energyplus.rb @@ -387,7 +387,7 @@ hvac.rb rb resource - 0F2DDAA0 + 759FC93A hvac_sizing.rb @@ -441,7 +441,7 @@ misc_loads.rb rb resource - 5A23B058 + F66475DC model.rb @@ -651,103 +651,103 @@ test_airflow.rb rb test - FAED863F + AF85CB1C test_battery.rb rb test - 3DF46EDF + E8640271 test_defaults.rb rb test - 1004443C + D57EF59F test_enclosure.rb rb test - A5253262 + 2DA78F4F test_generator.rb rb test - 67DD47BA + F540F8F8 test_hotwater_appliance.rb rb test - 27A0085A + B02084FA test_hvac.rb rb test - 994A2553 + 7954392A test_hvac_sizing.rb rb test - E1BC3865 + E018D108 test_lighting.rb rb test - 5300BCE3 + 8CC5D6BC test_location.rb rb test - 1BABD0AE + 733BB792 test_miscloads.rb rb test - 52ADD231 + CBD61753 test_pv.rb rb test - EC9BA2EB + 48F8F1FF test_schedules.rb rb test - 62B8CE90 + BDA04315 test_simcontrols.rb rb test - 914A44BF + B15BFB90 test_validation.rb rb test - 95476C6B + 86EC5703 test_water_heater.rb rb test - A293B678 + 60CD4A1F test_weather.rb rb test - 7DCA4233 + AD9AB5EC util.rb diff --git a/HPXMLtoOpenStudio/resources/defaults.rb b/HPXMLtoOpenStudio/resources/defaults.rb index 2f5a4ca339..696b614e4d 100644 --- a/HPXMLtoOpenStudio/resources/defaults.rb +++ b/HPXMLtoOpenStudio/resources/defaults.rb @@ -5736,11 +5736,6 @@ def self.get_televisions_values(cfa, nbeds, n_occ = nil, unit_type = nil) # @param unit_type [String] Type of dwelling unit (HXPML::ResidentialTypeXXX) # @return [Double] Annual energy use (kWh/yr) def self.get_pool_pump_annual_energy(cfa, nbeds, n_occ, unit_type) - if n_occ == 0 - # Operational calculation w/ zero occupants, zero out energy use - return 0.0 - end - nbeds_eq = Defaults.get_equivalent_nbeds(nbeds, n_occ, unit_type) return 158.6 / 0.070 * (0.5 + 0.25 * nbeds_eq / 3.0 + 0.25 * cfa / 1920.0) @@ -5761,22 +5756,12 @@ def self.get_pool_heater_annual_energy(cfa, nbeds, n_occ, unit_type, type) load_value = nil if [HPXML::HeaterTypeElectricResistance, HPXML::HeaterTypeHeatPump].include? type load_units = HPXML::UnitsKwhPerYear - if n_occ == 0 - # Operational calculation w/ zero occupants, zero out energy use - return load_units, 0.0 - end - load_value = 8.3 / 0.004 * (0.5 + 0.25 * nbeds_eq / 3.0 + 0.25 * cfa / 1920.0) # kWh/yr if type == HPXML::HeaterTypeHeatPump load_value /= 5.0 # Assume seasonal COP of 5.0 per https://www.energy.gov/energysaver/heat-pump-swimming-pool-heaters end elsif type == HPXML::HeaterTypeGas load_units = HPXML::UnitsThermPerYear - if n_occ == 0 - # Operational calculation w/ zero occupants, zero out energy use - return load_units, 0.0 - end - load_value = 3.0 / 0.014 * (0.5 + 0.25 * nbeds_eq / 3.0 + 0.25 * cfa / 1920.0) # therm/yr end return load_units, load_value @@ -5790,11 +5775,6 @@ def self.get_pool_heater_annual_energy(cfa, nbeds, n_occ, unit_type, type) # @param unit_type [String] Type of dwelling unit (HXPML::ResidentialTypeXXX) # @return [Double] Annual energy use (kWh/yr) def self.get_permanent_spa_pump_annual_energy(cfa, nbeds, n_occ, unit_type) - if n_occ == 0 - # Operational calculation w/ zero occupants, zero out energy use - return 0.0 - end - nbeds_eq = Defaults.get_equivalent_nbeds(nbeds, n_occ, unit_type) return 59.5 / 0.059 * (0.5 + 0.25 * nbeds_eq / 3.0 + 0.25 * cfa / 1920.0) # kWh/yr @@ -5815,22 +5795,12 @@ def self.get_permanent_spa_heater_annual_energy(cfa, nbeds, n_occ, unit_type, ty load_value = nil if [HPXML::HeaterTypeElectricResistance, HPXML::HeaterTypeHeatPump].include? type load_units = HPXML::UnitsKwhPerYear - if n_occ == 0 - # Operational calculation w/ zero occupants, zero out energy use - return load_units, 0.0 - end - load_value = 49.0 / 0.048 * (0.5 + 0.25 * nbeds_eq / 3.0 + 0.25 * cfa / 1920.0) # kWh/yr if type == HPXML::HeaterTypeHeatPump load_value /= 5.0 # Assume seasonal COP of 5.0 per https://www.energy.gov/energysaver/heat-pump-swimming-pool-heaters end elsif type == HPXML::HeaterTypeGas load_units = HPXML::UnitsThermPerYear - if n_occ == 0 - # Operational calculation w/ zero occupants, zero out energy use - return load_units, 0.0 - end - load_value = 0.87 / 0.011 * (0.5 + 0.25 * nbeds_eq / 3.0 + 0.25 * cfa / 1920.0) # therm/yr end return load_units, load_value diff --git a/HPXMLtoOpenStudio/resources/hvac.rb b/HPXMLtoOpenStudio/resources/hvac.rb index 6e91052f60..61b3939cce 100644 --- a/HPXMLtoOpenStudio/resources/hvac.rb +++ b/HPXMLtoOpenStudio/resources/hvac.rb @@ -1284,6 +1284,10 @@ def self.apply_dehumidifiers(runner, model, spaces, hpxml_bldg, hpxml_header) # @param schedules_file [SchedulesFile] SchedulesFile wrapper class instance of detailed schedule files # @return [nil] def self.apply_ceiling_fans(runner, model, spaces, weather, hpxml_bldg, hpxml_header, schedules_file) + if hpxml_bldg.building_occupancy.number_of_residents == 0 + # Operational calculation w/ zero occupants, zero out energy use + return + end return if hpxml_bldg.ceiling_fans.size == 0 ceiling_fan = hpxml_bldg.ceiling_fans[0] @@ -1382,7 +1386,7 @@ def self.apply_setpoints(model, runner, weather, spaces, hpxml_bldg, hpxml_heade end if cooling_sch.nil? - clg_wd_setpoints, clg_we_setpoints = get_cooling_setpoints(hvac_control, has_ceiling_fan, year, weather, onoff_thermostat_ddb) + clg_wd_setpoints, clg_we_setpoints = get_cooling_setpoints(hpxml_bldg, hvac_control, has_ceiling_fan, year, weather, onoff_thermostat_ddb) else runner.registerWarning("Both '#{SchedulesFile::Columns[:CoolingSetpoint].name}' schedule file and cooling setpoint temperature provided; the latter will be ignored.") if !hvac_control.cooling_setpoint_temp.nil? end @@ -1511,13 +1515,14 @@ def self.get_heating_setpoints(hvac_control, year, offset_db) # TODO # + # @param hpxml_bldg [HPXML::Building] HPXML Building object representing an individual dwelling unit # @param [HPXML::HVACControl] The HPXML HVAC control of interest # @param has_ceiling_fan [TODO] TODO # @param year [Integer] the calendar year # @param weather [WeatherFile] Weather object containing EPW information # @param offset_db [Double] On-off thermostat deadband (F) # @return [TODO] TODO - def self.get_cooling_setpoints(hvac_control, has_ceiling_fan, year, weather, offset_db) + def self.get_cooling_setpoints(hpxml_bldg, hvac_control, has_ceiling_fan, year, weather, offset_db) num_days = Calendar.num_days_in_year(year) if hvac_control.weekday_cooling_setpoints.nil? || hvac_control.weekend_cooling_setpoints.nil? @@ -1543,8 +1548,9 @@ def self.get_cooling_setpoints(hvac_control, has_ceiling_fan, year, weather, off clg_we_setpoints = hvac_control.weekend_cooling_setpoints.split(',').map { |i| Float(i) } clg_we_setpoints = [clg_we_setpoints] * num_days end + # Apply cooling setpoint offset due to ceiling fan? - if has_ceiling_fan + if has_ceiling_fan && hpxml_bldg.building_occupancy.number_of_residents != 0 # If operational calculation w/ zero occupants, exclude ceiling fan setpoint adjustment clg_ceiling_fan_offset = hvac_control.ceiling_fan_cooling_setpoint_temp_offset if not clg_ceiling_fan_offset.nil? months = Defaults.get_ceiling_fan_months(weather) diff --git a/HPXMLtoOpenStudio/resources/misc_loads.rb b/HPXMLtoOpenStudio/resources/misc_loads.rb index 1b16344f16..e30ce386cc 100644 --- a/HPXMLtoOpenStudio/resources/misc_loads.rb +++ b/HPXMLtoOpenStudio/resources/misc_loads.rb @@ -211,11 +211,6 @@ def self.apply_fuel_load(runner, model, fuel_load, obj_name, spaces, schedules_f # @param schedules_file [SchedulesFile] SchedulesFile wrapper class instance of detailed schedule files # @return [nil] def self.apply_pools_and_permanent_spas(runner, model, spaces, hpxml_bldg, hpxml_header, schedules_file) - if hpxml_bldg.building_occupancy.number_of_residents == 0 - # Operational calculation w/ zero occupants, zero out energy use - return - end - (hpxml_bldg.pools + hpxml_bldg.permanent_spas).each do |pool_or_spa| next if pool_or_spa.type == HPXML::TypeNone diff --git a/HPXMLtoOpenStudio/tests/test_airflow.rb b/HPXMLtoOpenStudio/tests/test_airflow.rb index fa26004a0b..3937c41ad3 100644 --- a/HPXMLtoOpenStudio/tests/test_airflow.rb +++ b/HPXMLtoOpenStudio/tests/test_airflow.rb @@ -17,6 +17,7 @@ def setup def teardown File.delete(@tmp_hpxml_path) if File.exist? @tmp_hpxml_path + File.delete(File.join(File.dirname(__FILE__), 'in.schedules.csv')) if File.exist? File.join(File.dirname(__FILE__), 'in.schedules.csv') File.delete(File.join(File.dirname(__FILE__), 'results_annual.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_annual.csv') File.delete(File.join(File.dirname(__FILE__), 'results_design_load_details.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_design_load_details.csv') end diff --git a/HPXMLtoOpenStudio/tests/test_battery.rb b/HPXMLtoOpenStudio/tests/test_battery.rb index 0b8c52bd7e..549c4e5f21 100644 --- a/HPXMLtoOpenStudio/tests/test_battery.rb +++ b/HPXMLtoOpenStudio/tests/test_battery.rb @@ -9,6 +9,7 @@ class HPXMLtoOpenStudioBatteryTest < Minitest::Test def teardown + File.delete(File.join(File.dirname(__FILE__), 'in.schedules.csv')) if File.exist? File.join(File.dirname(__FILE__), 'in.schedules.csv') File.delete(File.join(File.dirname(__FILE__), 'results_annual.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_annual.csv') File.delete(File.join(File.dirname(__FILE__), 'results_design_load_details.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_design_load_details.csv') end diff --git a/HPXMLtoOpenStudio/tests/test_defaults.rb b/HPXMLtoOpenStudio/tests/test_defaults.rb index 6ad226279d..1b341429f9 100644 --- a/HPXMLtoOpenStudio/tests/test_defaults.rb +++ b/HPXMLtoOpenStudio/tests/test_defaults.rb @@ -29,6 +29,7 @@ def setup def teardown File.delete(@tmp_hpxml_path) if File.exist? @tmp_hpxml_path FileUtils.rm_rf(@tmp_output_path) + File.delete(File.join(File.dirname(__FILE__), 'in.schedules.csv')) if File.exist? File.join(File.dirname(__FILE__), 'in.schedules.csv') File.delete(File.join(File.dirname(__FILE__), 'results_annual.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_annual.csv') File.delete(File.join(File.dirname(__FILE__), 'results_design_load_details.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_design_load_details.csv') end diff --git a/HPXMLtoOpenStudio/tests/test_enclosure.rb b/HPXMLtoOpenStudio/tests/test_enclosure.rb index d84a3e6041..9d805b7fbc 100644 --- a/HPXMLtoOpenStudio/tests/test_enclosure.rb +++ b/HPXMLtoOpenStudio/tests/test_enclosure.rb @@ -17,6 +17,7 @@ def setup def teardown File.delete(@tmp_hpxml_path) if File.exist? @tmp_hpxml_path + File.delete(File.join(File.dirname(__FILE__), 'in.schedules.csv')) if File.exist? File.join(File.dirname(__FILE__), 'in.schedules.csv') File.delete(File.join(File.dirname(__FILE__), 'results_annual.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_annual.csv') File.delete(File.join(File.dirname(__FILE__), 'results_design_load_details.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_design_load_details.csv') end diff --git a/HPXMLtoOpenStudio/tests/test_generator.rb b/HPXMLtoOpenStudio/tests/test_generator.rb index fe451d318c..b4ad564f3d 100644 --- a/HPXMLtoOpenStudio/tests/test_generator.rb +++ b/HPXMLtoOpenStudio/tests/test_generator.rb @@ -9,6 +9,7 @@ class HPXMLtoOpenStudioGeneratorTest < Minitest::Test def teardown + File.delete(File.join(File.dirname(__FILE__), 'in.schedules.csv')) if File.exist? File.join(File.dirname(__FILE__), 'in.schedules.csv') File.delete(File.join(File.dirname(__FILE__), 'results_annual.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_annual.csv') File.delete(File.join(File.dirname(__FILE__), 'results_design_load_details.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_design_load_details.csv') end diff --git a/HPXMLtoOpenStudio/tests/test_hotwater_appliance.rb b/HPXMLtoOpenStudio/tests/test_hotwater_appliance.rb index 619be06570..79c31f885f 100644 --- a/HPXMLtoOpenStudio/tests/test_hotwater_appliance.rb +++ b/HPXMLtoOpenStudio/tests/test_hotwater_appliance.rb @@ -9,6 +9,7 @@ class HPXMLtoOpenStudioHotWaterApplianceTest < Minitest::Test def teardown + File.delete(File.join(File.dirname(__FILE__), 'in.schedules.csv')) if File.exist? File.join(File.dirname(__FILE__), 'in.schedules.csv') File.delete(File.join(File.dirname(__FILE__), 'results_annual.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_annual.csv') File.delete(File.join(File.dirname(__FILE__), 'results_design_load_details.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_design_load_details.csv') end diff --git a/HPXMLtoOpenStudio/tests/test_hvac.rb b/HPXMLtoOpenStudio/tests/test_hvac.rb index 87ddb1f7dd..12b41f8837 100644 --- a/HPXMLtoOpenStudio/tests/test_hvac.rb +++ b/HPXMLtoOpenStudio/tests/test_hvac.rb @@ -1663,6 +1663,33 @@ def test_ceiling_fan assert_in_epsilon(cooling_setpoint_temp + ceiling_fan_cooling_setpoint_temp_offset, UnitConversions.convert(values[0], 'C', 'F'), 0.01) end + def test_operational_0_occupants + args_hash = {} + args_hash['hpxml_path'] = @tmp_hpxml_path + hpxml, hpxml_bldg = _create_hpxml('base-residents-0.xml') + hpxml_bldg.ceiling_fans.add(id: "CeilingFan#{hpxml_bldg.ceiling_fans.size + 1}") + hpxml_bldg.hvac_controls[0].ceiling_fan_cooling_setpoint_temp_offset = 2.0 + XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path) + model, _hpxml, _hpxml_bldg = _test_measure(args_hash) + + # Get HPXML values + hvac_control = hpxml_bldg.hvac_controls[0] + cooling_setpoint_temp = hvac_control.cooling_setpoint_temp + + # Check ceiling fan months + assert_equal(1, model.getThermostatSetpointDualSetpoints.size) + thermostat = model.getThermostatSetpointDualSetpoints[0] + + cooling_schedule = thermostat.coolingSetpointTemperatureSchedule.get.to_ScheduleRuleset.get + assert_equal(1, cooling_schedule.scheduleRules.size) + + rule = cooling_schedule.scheduleRules[0] # year-round setpoints + day_schedule = rule.daySchedule + values = day_schedule.values + assert_equal(1, values.size) + assert_in_epsilon(cooling_setpoint_temp, UnitConversions.convert(values[0], 'C', 'F'), 0.01) + end + def _test_measure(args_hash) # create an instance of the measure measure = HPXMLtoOpenStudio.new diff --git a/HPXMLtoOpenStudio/tests/test_hvac_sizing.rb b/HPXMLtoOpenStudio/tests/test_hvac_sizing.rb index b04bbcb7f1..3460baeb1d 100644 --- a/HPXMLtoOpenStudio/tests/test_hvac_sizing.rb +++ b/HPXMLtoOpenStudio/tests/test_hvac_sizing.rb @@ -20,10 +20,11 @@ def setup def teardown File.delete(@tmp_hpxml_path) if File.exist? @tmp_hpxml_path + File.delete(File.join(File.dirname(__FILE__), 'in.schedules.csv')) if File.exist? File.join(File.dirname(__FILE__), 'in.schedules.csv') File.delete(File.join(File.dirname(__FILE__), 'results_annual.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_annual.csv') File.delete(File.join(File.dirname(__FILE__), 'results_annual.json')) if File.exist? File.join(File.dirname(__FILE__), 'results_annual.json') + File.delete(File.join(File.dirname(__FILE__), 'results_annual.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_annual.csv') File.delete(File.join(File.dirname(__FILE__), 'results_design_load_details.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_design_load_details.csv') - File.delete(File.join(File.dirname(__FILE__), 'results_design_load_details.json')) if File.exist? File.join(File.dirname(__FILE__), 'results_design_load_details.json') end def test_hvac_configurations diff --git a/HPXMLtoOpenStudio/tests/test_lighting.rb b/HPXMLtoOpenStudio/tests/test_lighting.rb index 467f8acc41..042c4893ab 100644 --- a/HPXMLtoOpenStudio/tests/test_lighting.rb +++ b/HPXMLtoOpenStudio/tests/test_lighting.rb @@ -8,15 +8,19 @@ require_relative '../resources/util.rb' class HPXMLtoOpenStudioLightingTest < Minitest::Test + def setup + @root_path = File.absolute_path(File.join(File.dirname(__FILE__), '..', '..')) + @sample_files_path = File.join(@root_path, 'workflow', 'sample_files') + @tmp_hpxml_path = File.join(@sample_files_path, 'tmp.xml') + end + def teardown + File.delete(@tmp_hpxml_path) if File.exist? @tmp_hpxml_path + File.delete(File.join(File.dirname(__FILE__), 'in.schedules.csv')) if File.exist? File.join(File.dirname(__FILE__), 'in.schedules.csv') File.delete(File.join(File.dirname(__FILE__), 'results_annual.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_annual.csv') File.delete(File.join(File.dirname(__FILE__), 'results_design_load_details.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_design_load_details.csv') end - def sample_files_dir - return File.join(File.dirname(__FILE__), '..', '..', 'workflow', 'sample_files') - end - def get_kwh_per_year(model, name) model.getLightss.each do |ltg| next unless ltg.name.to_s == name @@ -44,7 +48,7 @@ def get_kwh_per_year(model, name) def test_lighting args_hash = {} - args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base.xml')) + args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, 'base.xml')) model, _hpxml, _hpxml_bldg = _test_measure(args_hash) # Check interior lighting @@ -56,7 +60,7 @@ def test_lighting def test_lighting_garage args_hash = {} - args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base-enclosure-2stories-garage.xml')) + args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, 'base-enclosure-2stories-garage.xml')) model, _hpxml, _hpxml_bldg = _test_measure(args_hash) # Check interior lighting @@ -74,7 +78,7 @@ def test_exterior_holiday_lighting 'base-misc-defaults.xml', 'base-lighting-holiday.xml'].each do |hpxml_name| args_hash = {} - args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, hpxml_name)) + args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, hpxml_name)) model, _hpxml, hpxml_bldg = _test_measure(args_hash) if hpxml_name == 'base-lighting-holiday.xml' @@ -88,7 +92,7 @@ def test_exterior_holiday_lighting def test_lighting_kwh_per_year args_hash = {} - args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base-lighting-kwh-per-year.xml')) + args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, 'base-lighting-kwh-per-year.xml')) model, _hpxml, hpxml_bldg = _test_measure(args_hash) # Check interior lighting @@ -104,7 +108,7 @@ def test_lighting_kwh_per_year def test_lighting_none args_hash = {} - args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base-lighting-none.xml')) + args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, 'base-lighting-none.xml')) model, _hpxml, _hpxml_bldg = _test_measure(args_hash) # Check interior lighting @@ -120,14 +124,14 @@ def test_lighting_none def test_ceiling_fan # Efficiency args_hash = {} - args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base-lighting-ceiling-fans.xml')) + args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, 'base-lighting-ceiling-fans.xml')) model, _hpxml, _hpxml_bldg = _test_measure(args_hash) assert_in_delta(154, get_kwh_per_year(model, Constants::ObjectTypeCeilingFan), 1.0) # Label energy use args_hash = {} - args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base-lighting-ceiling-fans-label-energy-use.xml')) + args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, 'base-lighting-ceiling-fans-label-energy-use.xml')) model, _hpxml, _hpxml_bldg = _test_measure(args_hash) assert_in_delta(200, get_kwh_per_year(model, Constants::ObjectTypeCeilingFan), 1.0) @@ -135,7 +139,10 @@ def test_ceiling_fan def test_operational_0_occupants args_hash = {} - args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base-residents-0.xml')) + args_hash['hpxml_path'] = @tmp_hpxml_path + hpxml, hpxml_bldg = _create_hpxml('base-residents-0.xml') + hpxml_bldg.ceiling_fans.add(id: "CeilingFan#{hpxml_bldg.ceiling_fans.size + 1}") + XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path) model, _hpxml, _hpxml_bldg = _test_measure(args_hash) # Check interior lighting @@ -146,6 +153,9 @@ def test_operational_0_occupants # Check exterior lighting assert_equal(0.0, get_kwh_per_year(model, Constants::ObjectTypeLightingExterior)) + + # Check ceiling fan + assert_equal(0.0, get_kwh_per_year(model, Constants::ObjectTypeCeilingFan)) end def _test_measure(args_hash) @@ -185,4 +195,9 @@ def _test_measure(args_hash) return model, hpxml, hpxml.buildings[0] end + + def _create_hpxml(hpxml_name) + hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, hpxml_name)) + return hpxml, hpxml.buildings[0] + end end diff --git a/HPXMLtoOpenStudio/tests/test_location.rb b/HPXMLtoOpenStudio/tests/test_location.rb index 5fc9b1e138..f87bf27a26 100644 --- a/HPXMLtoOpenStudio/tests/test_location.rb +++ b/HPXMLtoOpenStudio/tests/test_location.rb @@ -9,6 +9,7 @@ class HPXMLtoOpenStudioLocationTest < Minitest::Test def teardown + File.delete(File.join(File.dirname(__FILE__), 'in.schedules.csv')) if File.exist? File.join(File.dirname(__FILE__), 'in.schedules.csv') File.delete(File.join(File.dirname(__FILE__), 'results_annual.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_annual.csv') File.delete(File.join(File.dirname(__FILE__), 'results_design_load_details.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_design_load_details.csv') end diff --git a/HPXMLtoOpenStudio/tests/test_miscloads.rb b/HPXMLtoOpenStudio/tests/test_miscloads.rb index 39c25df13d..8abb175436 100644 --- a/HPXMLtoOpenStudio/tests/test_miscloads.rb +++ b/HPXMLtoOpenStudio/tests/test_miscloads.rb @@ -16,6 +16,7 @@ def setup def teardown File.delete(@tmp_hpxml_path) if File.exist? @tmp_hpxml_path + File.delete(File.join(File.dirname(__FILE__), 'in.schedules.csv')) if File.exist? File.join(File.dirname(__FILE__), 'in.schedules.csv') File.delete(File.join(File.dirname(__FILE__), 'results_annual.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_annual.csv') File.delete(File.join(File.dirname(__FILE__), 'results_design_load_details.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_design_load_details.csv') end @@ -263,13 +264,13 @@ def test_operational_0_occupants # Check permanent spa pump kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants::ObjectTypeMiscPermanentSpaPump) - assert_equal(0, kwh_yr) - assert_equal(0, therm_yr) + refute_equal(0, kwh_yr) + refute_equal(0, therm_yr) # Check permanent spa heater kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants::ObjectTypeMiscPermanentSpaHeater) - assert_equal(0, kwh_yr) - assert_equal(0, therm_yr) + refute_equal(0, kwh_yr) + refute_equal(0, therm_yr) # Check grill kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants::ObjectTypeMiscGrill) diff --git a/HPXMLtoOpenStudio/tests/test_pv.rb b/HPXMLtoOpenStudio/tests/test_pv.rb index 55b6ac82d3..e79f784b6b 100644 --- a/HPXMLtoOpenStudio/tests/test_pv.rb +++ b/HPXMLtoOpenStudio/tests/test_pv.rb @@ -9,6 +9,7 @@ class HPXMLtoOpenStudioPVTest < Minitest::Test def teardown + File.delete(File.join(File.dirname(__FILE__), 'in.schedules.csv')) if File.exist? File.join(File.dirname(__FILE__), 'in.schedules.csv') File.delete(File.join(File.dirname(__FILE__), 'results_annual.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_annual.csv') File.delete(File.join(File.dirname(__FILE__), 'results_design_load_details.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_design_load_details.csv') end diff --git a/HPXMLtoOpenStudio/tests/test_schedules.rb b/HPXMLtoOpenStudio/tests/test_schedules.rb index aab2621538..b8314a470b 100644 --- a/HPXMLtoOpenStudio/tests/test_schedules.rb +++ b/HPXMLtoOpenStudio/tests/test_schedules.rb @@ -23,6 +23,7 @@ def setup def teardown File.delete(@tmp_hpxml_path) if File.exist? @tmp_hpxml_path File.delete(@tmp_schedule_file_path) if File.exist? @tmp_schedule_file_path + File.delete(File.join(File.dirname(__FILE__), 'in.schedules.csv')) if File.exist? File.join(File.dirname(__FILE__), 'in.schedules.csv') File.delete(File.join(File.dirname(__FILE__), 'results_annual.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_annual.csv') File.delete(File.join(File.dirname(__FILE__), 'results_design_load_details.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_design_load_details.csv') end diff --git a/HPXMLtoOpenStudio/tests/test_simcontrols.rb b/HPXMLtoOpenStudio/tests/test_simcontrols.rb index 7713b171a4..d8ef769f49 100644 --- a/HPXMLtoOpenStudio/tests/test_simcontrols.rb +++ b/HPXMLtoOpenStudio/tests/test_simcontrols.rb @@ -9,6 +9,7 @@ class HPXMLtoOpenStudioSimControlsTest < Minitest::Test def teardown + File.delete(File.join(File.dirname(__FILE__), 'in.schedules.csv')) if File.exist? File.join(File.dirname(__FILE__), 'in.schedules.csv') File.delete(File.join(File.dirname(__FILE__), 'results_annual.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_annual.csv') File.delete(File.join(File.dirname(__FILE__), 'results_design_load_details.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_design_load_details.csv') end diff --git a/HPXMLtoOpenStudio/tests/test_validation.rb b/HPXMLtoOpenStudio/tests/test_validation.rb index 21f4bf08e0..1f9f807f1d 100644 --- a/HPXMLtoOpenStudio/tests/test_validation.rb +++ b/HPXMLtoOpenStudio/tests/test_validation.rb @@ -30,6 +30,7 @@ def teardown File.delete(@tmp_hpxml_path) if File.exist? @tmp_hpxml_path File.delete(@tmp_csv_path) if File.exist? @tmp_csv_path FileUtils.rm_rf(@tmp_output_path) + File.delete(File.join(File.dirname(__FILE__), 'in.schedules.csv')) if File.exist? File.join(File.dirname(__FILE__), 'in.schedules.csv') File.delete(File.join(File.dirname(__FILE__), 'results_annual.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_annual.csv') File.delete(File.join(File.dirname(__FILE__), 'results_design_load_details.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_design_load_details.csv') end diff --git a/HPXMLtoOpenStudio/tests/test_water_heater.rb b/HPXMLtoOpenStudio/tests/test_water_heater.rb index 50677c78d3..734e3e410f 100644 --- a/HPXMLtoOpenStudio/tests/test_water_heater.rb +++ b/HPXMLtoOpenStudio/tests/test_water_heater.rb @@ -8,6 +8,7 @@ class HPXMLtoOpenStudioWaterHeaterTest < Minitest::Test def teardown + File.delete(File.join(File.dirname(__FILE__), 'in.schedules.csv')) if File.exist? File.join(File.dirname(__FILE__), 'in.schedules.csv') File.delete(File.join(File.dirname(__FILE__), 'results_annual.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_annual.csv') File.delete(File.join(File.dirname(__FILE__), 'results_design_load_details.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_design_load_details.csv') end diff --git a/HPXMLtoOpenStudio/tests/test_weather.rb b/HPXMLtoOpenStudio/tests/test_weather.rb index 712354c381..1b70c0e136 100644 --- a/HPXMLtoOpenStudio/tests/test_weather.rb +++ b/HPXMLtoOpenStudio/tests/test_weather.rb @@ -18,6 +18,7 @@ class HPXMLtoOpenStudioWeatherTest < Minitest::Test def teardown + File.delete(File.join(File.dirname(__FILE__), 'in.schedules.csv')) if File.exist? File.join(File.dirname(__FILE__), 'in.schedules.csv') File.delete(File.join(File.dirname(__FILE__), 'results_annual.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_annual.csv') File.delete(File.join(File.dirname(__FILE__), 'results_design_load_details.csv')) if File.exist? File.join(File.dirname(__FILE__), 'results_design_load_details.csv') end From 934ddf42a9312b80fb59f8502a34ef32f5c2b1a0 Mon Sep 17 00:00:00 2001 From: Scott Horowitz Date: Thu, 19 Dec 2024 13:36:30 -0700 Subject: [PATCH 07/10] Fix test. --- HPXMLtoOpenStudio/measure.xml | 6 +++--- HPXMLtoOpenStudio/tests/test_miscloads.rb | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/HPXMLtoOpenStudio/measure.xml b/HPXMLtoOpenStudio/measure.xml index 05e680e9c3..92e8bf0c7f 100644 --- a/HPXMLtoOpenStudio/measure.xml +++ b/HPXMLtoOpenStudio/measure.xml @@ -3,8 +3,8 @@ 3.1 hpxm_lto_openstudio b1543b30-9465-45ff-ba04-1d1f85e763bc - 0bff6a77-c10a-4a70-bb9b-4b1efdb32682 - 2024-12-19T18:29:02Z + e40bba9f-1d2a-4724-8e09-2e9fe9c75e87 + 2024-12-19T20:14:45Z D8922A73 HPXMLtoOpenStudio HPXML to OpenStudio Translator @@ -711,7 +711,7 @@ test_miscloads.rb rb test - CBD61753 + 4E0D3190 test_pv.rb diff --git a/HPXMLtoOpenStudio/tests/test_miscloads.rb b/HPXMLtoOpenStudio/tests/test_miscloads.rb index 8abb175436..65fd7d012b 100644 --- a/HPXMLtoOpenStudio/tests/test_miscloads.rb +++ b/HPXMLtoOpenStudio/tests/test_miscloads.rb @@ -254,23 +254,23 @@ def test_operational_0_occupants # Check pool pump kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants::ObjectTypeMiscPoolPump) - assert_equal(0, kwh_yr) + refute_equal(0, kwh_yr) assert_equal(0, therm_yr) # Check pool heater kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants::ObjectTypeMiscPoolHeater) assert_equal(0, kwh_yr) - assert_equal(0, therm_yr) + refute_equal(0, therm_yr) # Check permanent spa pump kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants::ObjectTypeMiscPermanentSpaPump) refute_equal(0, kwh_yr) - refute_equal(0, therm_yr) + assert_equal(0, therm_yr) # Check permanent spa heater kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants::ObjectTypeMiscPermanentSpaHeater) refute_equal(0, kwh_yr) - refute_equal(0, therm_yr) + assert_equal(0, therm_yr) # Check grill kwh_yr, therm_yr = get_kwh_therm_per_year(model, Constants::ObjectTypeMiscGrill) From c38762eb90a5b4b0879a03df7904c44fb3374ccd Mon Sep 17 00:00:00 2001 From: Scott Horowitz Date: Thu, 19 Dec 2024 18:28:33 -0700 Subject: [PATCH 08/10] Clarify CFIS definition [ci skip] --- docs/source/workflow_inputs.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/workflow_inputs.rst b/docs/source/workflow_inputs.rst index 4b996f0805..d58fb01cc3 100644 --- a/docs/source/workflow_inputs.rst +++ b/docs/source/workflow_inputs.rst @@ -3802,7 +3802,7 @@ Central Fan Integrated Supply (CFIS) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Each central fan integrated supply (CFIS) system is entered as a ``/HPXML/Building/BuildingDetails/Systems/MechanicalVentilation/VentilationFans/VentilationFan``. -A CFIS system is a supply ventilation system that provides outdoor air to the return duct of a forced-air HVAC system. +A CFIS system is a supply ventilation system with an outdoor air inlet duct on the return side of a forced-air HVAC system. ============================================================================================= ======== ======= ============================= ======== =============== ========================================= Element Type Units Constraints Required Default Notes From 627e9dcfa0375bea1ec53b8c28d1e2cdd14f6049 Mon Sep 17 00:00:00 2001 From: Scott Horowitz Date: Fri, 20 Dec 2024 12:31:32 -0700 Subject: [PATCH 09/10] Ensure BuildResidentialHPXML measure.xml and README.md are updated when the OS-HPXML version is bumped. --- BuildResidentialHPXML/measure.xml | 12 +++++-- BuildResidentialHPXML/resources/version.rb | 33 +++++++++++++++++++ .../tests/test_build_residential_hpxml.rb | 16 --------- HPXMLtoOpenStudio/measure.xml | 4 +-- tasks.rb | 8 +++++ 5 files changed, 52 insertions(+), 21 deletions(-) create mode 100644 BuildResidentialHPXML/resources/version.rb diff --git a/BuildResidentialHPXML/measure.xml b/BuildResidentialHPXML/measure.xml index 154e205c1e..88a1d6cbf0 100644 --- a/BuildResidentialHPXML/measure.xml +++ b/BuildResidentialHPXML/measure.xml @@ -3,8 +3,8 @@ 3.1 build_residential_hpxml a13a8983-2b01-4930-8af2-42030b6e4233 - 32bd49ca-09dc-40ec-b676-f01d76e98566 - 2024-12-09T21:40:28Z + 93dc4841-b906-4729-af04-d06113ca221a + 2024-12-20T19:30:23Z 2C38F48B BuildResidentialHPXML HPXML Builder @@ -7558,11 +7558,17 @@ resource 425682E4 + + version.rb + rb + resource + FB92922A + test_build_residential_hpxml.rb rb test - CCBB49E7 + 71348C9A diff --git a/BuildResidentialHPXML/resources/version.rb b/BuildResidentialHPXML/resources/version.rb new file mode 100644 index 0000000000..b56875f660 --- /dev/null +++ b/BuildResidentialHPXML/resources/version.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +# Collection of methods related to software versions. +module Version + OS_HPXML_Version = '1.10.0' # Version of the OS-HPXML workflow + OS_Version = '3.9.0' # Required version of OpenStudio (can be 'X.X' or 'X.X.X') + HPXML_Version = '4.0' # HPXML schemaVersion + + # Checks whether the version of OpenStudio that is running OpenStudio-HPXML + # meets the version requirements; throws an error if not. + # + # @return [nil] + def self.check_openstudio_version + if not OpenStudio.openStudioVersion.start_with? OS_Version + if OS_Version.count('.') == 2 + fail "OpenStudio version #{OS_Version} is required. Found version: #{OpenStudio.openStudioVersion}" + else + fail "OpenStudio version #{OS_Version}.X is required. Found version: #{OpenStudio.openStudioVersion}" + end + end + end + + # Checks whether the version of the HPXML file running through OpenStudio-HPXML + # meets the version requirements; throws an error if not. + # + # @param hpxml_version [String] Version of HPXML input file + # @return [nil] + def self.check_hpxml_version(hpxml_version) + if hpxml_version != HPXML_Version + fail "HPXML version #{HPXML_Version} is required." + end + end +end diff --git a/BuildResidentialHPXML/tests/test_build_residential_hpxml.rb b/BuildResidentialHPXML/tests/test_build_residential_hpxml.rb index 06a9471fff..1e4e7b282b 100644 --- a/BuildResidentialHPXML/tests/test_build_residential_hpxml.rb +++ b/BuildResidentialHPXML/tests/test_build_residential_hpxml.rb @@ -386,22 +386,6 @@ def test_workflows assert_equal(31, hvac_control.seasons_cooling_end_day) end - def test_version - found_match = false - measure_xml_path = File.join(File.dirname(__FILE__), '..', 'measure.xml') - File.readlines(measure_xml_path).each do |xml_line| - next unless xml_line.include? '' - next unless xml_line.include? 'https://openstudio-hpxml.readthedocs.io' - - found_match = true - if not xml_line.include? Version::OS_HPXML_Version - puts "ERROR: Found incorrect OS-HPXML version. Manually edit the BuildResidentialHPXML/measure.rb and run 'openstudio tasks.rb update_measures' to force the measure.xml to be regenerated." - end - assert(xml_line.include? Version::OS_HPXML_Version) - end - assert(found_match) - end - private def _set_measure_argument_values(hpxml_file, args) diff --git a/HPXMLtoOpenStudio/measure.xml b/HPXMLtoOpenStudio/measure.xml index 95df08d3ba..609909ff14 100644 --- a/HPXMLtoOpenStudio/measure.xml +++ b/HPXMLtoOpenStudio/measure.xml @@ -3,8 +3,8 @@ 3.1 hpxm_lto_openstudio b1543b30-9465-45ff-ba04-1d1f85e763bc - 771dde81-1742-4c4a-90f5-ca41ad0afad4 - 2024-12-20T19:16:39Z + bb00b805-aa43-4e04-b562-97c217476b33 + 2024-12-20T19:30:24Z D8922A73 HPXMLtoOpenStudio HPXML to OpenStudio Translator diff --git a/tasks.rb b/tasks.rb index 008d2ef4ee..44f9a75e24 100644 --- a/tasks.rb +++ b/tasks.rb @@ -2624,6 +2624,14 @@ def display_usage(command_list) puts 'Applying rubocop auto-correct to measures...' system(command) + # Copy HPXMLtoOpenStudio/resources/version.rb into BuildResidentialHPXML measure. + # This will ensure that the BuildResidentialHPXML measure.xml updates below when + # there is a version change. Without this, the BuildResidentialHPXML measure has + # no differences and so OpenStudio would skip updating it. + src_path = File.join(File.dirname(__FILE__), 'HPXMLtoOpenStudio/resources/version.rb') + dst_path = File.join(File.dirname(__FILE__), 'BuildResidentialHPXML/resources/version.rb') + FileUtils.cp(src_path, dst_path) + # Update measures XMLs puts 'Updating measure.xmls...' Dir['**/measure.xml'].each do |measure_xml| From 0d18829ab6263bb7b6eedc90178dc45beaec29fd Mon Sep 17 00:00:00 2001 From: Scott Horowitz Date: Fri, 20 Dec 2024 13:08:04 -0700 Subject: [PATCH 10/10] Use an md5hash instead to prevent confusion of having two version.rb files. --- BuildResidentialHPXML/measure.xml | 10 +++---- BuildResidentialHPXML/resources/version.rb | 33 --------------------- BuildResidentialHPXML/resources/version.txt | 1 + HPXMLtoOpenStudio/measure.xml | 4 +-- tasks.rb | 14 ++++----- 5 files changed, 15 insertions(+), 47 deletions(-) delete mode 100644 BuildResidentialHPXML/resources/version.rb create mode 100644 BuildResidentialHPXML/resources/version.txt diff --git a/BuildResidentialHPXML/measure.xml b/BuildResidentialHPXML/measure.xml index 88a1d6cbf0..825d48dc41 100644 --- a/BuildResidentialHPXML/measure.xml +++ b/BuildResidentialHPXML/measure.xml @@ -3,8 +3,8 @@ 3.1 build_residential_hpxml a13a8983-2b01-4930-8af2-42030b6e4233 - 93dc4841-b906-4729-af04-d06113ca221a - 2024-12-20T19:30:23Z + df4fe828-a827-4cc2-8a4d-9c8daf649202 + 2024-12-20T20:07:27Z 2C38F48B BuildResidentialHPXML HPXML Builder @@ -7559,10 +7559,10 @@ 425682E4 - version.rb - rb + version.txt + txt resource - FB92922A + 93016553 test_build_residential_hpxml.rb diff --git a/BuildResidentialHPXML/resources/version.rb b/BuildResidentialHPXML/resources/version.rb deleted file mode 100644 index b56875f660..0000000000 --- a/BuildResidentialHPXML/resources/version.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -# Collection of methods related to software versions. -module Version - OS_HPXML_Version = '1.10.0' # Version of the OS-HPXML workflow - OS_Version = '3.9.0' # Required version of OpenStudio (can be 'X.X' or 'X.X.X') - HPXML_Version = '4.0' # HPXML schemaVersion - - # Checks whether the version of OpenStudio that is running OpenStudio-HPXML - # meets the version requirements; throws an error if not. - # - # @return [nil] - def self.check_openstudio_version - if not OpenStudio.openStudioVersion.start_with? OS_Version - if OS_Version.count('.') == 2 - fail "OpenStudio version #{OS_Version} is required. Found version: #{OpenStudio.openStudioVersion}" - else - fail "OpenStudio version #{OS_Version}.X is required. Found version: #{OpenStudio.openStudioVersion}" - end - end - end - - # Checks whether the version of the HPXML file running through OpenStudio-HPXML - # meets the version requirements; throws an error if not. - # - # @param hpxml_version [String] Version of HPXML input file - # @return [nil] - def self.check_hpxml_version(hpxml_version) - if hpxml_version != HPXML_Version - fail "HPXML version #{HPXML_Version} is required." - end - end -end diff --git a/BuildResidentialHPXML/resources/version.txt b/BuildResidentialHPXML/resources/version.txt new file mode 100644 index 0000000000..77d776be80 --- /dev/null +++ b/BuildResidentialHPXML/resources/version.txt @@ -0,0 +1 @@ +237a7a19483db8aae3195ccffb40336c \ No newline at end of file diff --git a/HPXMLtoOpenStudio/measure.xml b/HPXMLtoOpenStudio/measure.xml index 609909ff14..2aab86bf4b 100644 --- a/HPXMLtoOpenStudio/measure.xml +++ b/HPXMLtoOpenStudio/measure.xml @@ -3,8 +3,8 @@ 3.1 hpxm_lto_openstudio b1543b30-9465-45ff-ba04-1d1f85e763bc - bb00b805-aa43-4e04-b562-97c217476b33 - 2024-12-20T19:30:24Z + f5059b5f-8030-497a-bab2-94f90354de7e + 2024-12-20T20:07:28Z D8922A73 HPXMLtoOpenStudio HPXML to OpenStudio Translator diff --git a/tasks.rb b/tasks.rb index 44f9a75e24..2f9fca5f3b 100644 --- a/tasks.rb +++ b/tasks.rb @@ -2624,13 +2624,13 @@ def display_usage(command_list) puts 'Applying rubocop auto-correct to measures...' system(command) - # Copy HPXMLtoOpenStudio/resources/version.rb into BuildResidentialHPXML measure. - # This will ensure that the BuildResidentialHPXML measure.xml updates below when - # there is a version change. Without this, the BuildResidentialHPXML measure has - # no differences and so OpenStudio would skip updating it. - src_path = File.join(File.dirname(__FILE__), 'HPXMLtoOpenStudio/resources/version.rb') - dst_path = File.join(File.dirname(__FILE__), 'BuildResidentialHPXML/resources/version.rb') - FileUtils.cp(src_path, dst_path) + # Update a BuildResidentialHPXML/resources file when the OS-HPXML version changes. + # This will ensure that the BuildResidentialHPXML measure.xml is appropriately updated. + # Without this, the BuildResidentialHPXML measure has no differences and so OpenStudio + # would skip updating it. + version_rb_path = File.join(File.dirname(__FILE__), 'HPXMLtoOpenStudio/resources/version.rb') + version_txt_path = File.join(File.dirname(__FILE__), 'BuildResidentialHPXML/resources/version.txt') + File.write(version_txt_path, Digest::MD5.file(version_rb_path).hexdigest) # Update measures XMLs puts 'Updating measure.xmls...'