From cf99e6096f33b717df79a71c245a4d7aa4ccb7a6 Mon Sep 17 00:00:00 2001 From: Nicholas Long <1907354+nllong@users.noreply.github.com> Date: Fri, 4 Mar 2022 10:15:35 -0700 Subject: [PATCH 01/25] typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a88aa4..acabad2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ OpenStudio::Workflow Change Log Version 2.3.1 ------------- -* Forward tranlsation when !@run_options.get.forwardTranslateOptions().empty? +* Forward translation when !@run_options.get.forwardTranslateOptions().empty? Version 2.3.0 ------------- From a7c0a421c4166831f67636bdd4f56889d2511a02 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Thu, 9 Mar 2023 09:40:33 +0100 Subject: [PATCH 02/25] Avoid a Warn due to deprecation of forwardTranslateOptions --- .../workflow/adapters/input/local.rb | 44 ++++++++++++------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/lib/openstudio/workflow/adapters/input/local.rb b/lib/openstudio/workflow/adapters/input/local.rb index c908bd2..1855e9d 100644 --- a/lib/openstudio/workflow/adapters/input/local.rb +++ b/lib/openstudio/workflow/adapters/input/local.rb @@ -363,24 +363,36 @@ def ft_options(user_options, default, logger) # try to read from OSW - if @run_options.is_initialized && @run_options.get.respond_to?(:forwardTranslateOptions) && !@run_options.get.forwardTranslateOptions().empty? - ft_opts = {} - JSON.parse(@run_options.get.forwardTranslateOptions, symbolize_names: true).each do |opt_flag_name, opt_flag| - unless known_ft_opts.key?(opt_flag_name) - log_message = "'ft_options' suboption '#{opt_flag_name}' is not recognized, ignoring it." - logger.warn log_message - next - end - min_version = known_ft_opts[opt_flag_name.to_sym][:min_version] - if !min_version.nil? && os_version < min_version - log_message = "'ft_options' suboption '#{opt_flag_name}' is only supported for OpenStudio Version >= #{min_version.str}, ignoring it." - logger.warn log_message - next - end - ft_opts[opt_flag_name] = { method_name: known_ft_opts[opt_flag_name][:method_name], value: opt_flag } + if @run_options.is_initialized + jsonOpts = "" + if @run_options.get.respond_to?(:forwardTranslatorOptions) + # 3.6.0 and above. It still defines forwardTranslateOptions for + # backward compatibility but trying to avoid a Warn in the log + ftOpts = @run_options.get.forwardTranslatorOptions().string() + elsif @run_options.get.respond_to?(:forwardTranslateOptions) + ftOpts = @run_options.get.forwardTranslateOptions() end + if !ftOpts.empty? + jsonOpts = JSON.parse(ftOpts, symbolize_names: true) + + ft_opts = {} + jsonOpts.each do |opt_flag_name, opt_flag| + unless known_ft_opts.key?(opt_flag_name) + log_message = "'ft_options' suboption '#{opt_flag_name}' is not recognized, ignoring it." + logger.warn log_message + next + end + min_version = known_ft_opts[opt_flag_name.to_sym][:min_version] + if !min_version.nil? && os_version < min_version + log_message = "'ft_options' suboption '#{opt_flag_name}' is only supported for OpenStudio Version >= #{min_version.str}, ignoring it." + logger.warn log_message + next + end + ft_opts[opt_flag_name] = { method_name: known_ft_opts[opt_flag_name][:method_name], value: opt_flag } + end - return ft_opts + return ft_opts + end end return default From d29a310b9b99a983e57ac20ef7e78302d7c411ec Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Thu, 9 Mar 2023 09:47:00 +0100 Subject: [PATCH 03/25] Shouldn't return early, but merge the user_options (CLI) and the Workflow Options --- .../workflow/adapters/input/local.rb | 47 +++++++++---------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/lib/openstudio/workflow/adapters/input/local.rb b/lib/openstudio/workflow/adapters/input/local.rb index 1855e9d..e93fc21 100644 --- a/lib/openstudio/workflow/adapters/input/local.rb +++ b/lib/openstudio/workflow/adapters/input/local.rb @@ -339,30 +339,9 @@ def ft_options(user_options, default, logger) no_space_translation: { method_name: :setExcludeSpaceTranslation, min_version: os330 } } - # user option trumps all others - if user_options[:ft_options] - ft_opts = {} - user_options[:ft_options].each do |opt_flag_name, opt_flag| - puts "#{opt_flag_name} = #{opt_flag}" - unless known_ft_opts.key?(opt_flag_name) - log_message = "'ft_options' suboption '#{opt_flag_name}' is not recognized, ignoring it." - logger.warn log_message - next - end - min_version = known_ft_opts[opt_flag_name][:min_version] - if !min_version.nil? && os_version < min_version - log_message = "'ft_options' suboption '#{opt_flag_name}' is only supported for OpenStudio Version >= #{min_version.str}, ignoring it." - logger.warn log_message - next - end - ft_opts[opt_flag_name] = { method_name: known_ft_opts[opt_flag_name][:method_name], value: opt_flag } - end - - return ft_opts - end + ft_opts = {} # try to read from OSW - if @run_options.is_initialized jsonOpts = "" if @run_options.get.respond_to?(:forwardTranslatorOptions) @@ -375,7 +354,6 @@ def ft_options(user_options, default, logger) if !ftOpts.empty? jsonOpts = JSON.parse(ftOpts, symbolize_names: true) - ft_opts = {} jsonOpts.each do |opt_flag_name, opt_flag| unless known_ft_opts.key?(opt_flag_name) log_message = "'ft_options' suboption '#{opt_flag_name}' is not recognized, ignoring it." @@ -390,11 +368,32 @@ def ft_options(user_options, default, logger) end ft_opts[opt_flag_name] = { method_name: known_ft_opts[opt_flag_name][:method_name], value: opt_flag } end + end + end - return ft_opts + # user option trumps all others, so do it last + if user_options[:ft_options] + user_options[:ft_options].each do |opt_flag_name, opt_flag| + puts "#{opt_flag_name} = #{opt_flag}" + unless known_ft_opts.key?(opt_flag_name) + log_message = "'ft_options' suboption '#{opt_flag_name}' is not recognized, ignoring it." + logger.warn log_message + next + end + min_version = known_ft_opts[opt_flag_name][:min_version] + if !min_version.nil? && os_version < min_version + log_message = "'ft_options' suboption '#{opt_flag_name}' is only supported for OpenStudio Version >= #{min_version.str}, ignoring it." + logger.warn log_message + next + end + ft_opts[opt_flag_name] = { method_name: known_ft_opts[opt_flag_name][:method_name], value: opt_flag } end end + if !ft_opts.empty? + return ft_opts + end + return default end From 0a2f17e05e3ed4b1e6c69abbb6759430fd951333 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Thu, 9 Mar 2023 10:46:24 +0100 Subject: [PATCH 04/25] typo --- lib/openstudio/workflow/adapters/input/local.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/openstudio/workflow/adapters/input/local.rb b/lib/openstudio/workflow/adapters/input/local.rb index e93fc21..0fac77a 100644 --- a/lib/openstudio/workflow/adapters/input/local.rb +++ b/lib/openstudio/workflow/adapters/input/local.rb @@ -343,7 +343,7 @@ def ft_options(user_options, default, logger) # try to read from OSW if @run_options.is_initialized - jsonOpts = "" + ftOpts = "" if @run_options.get.respond_to?(:forwardTranslatorOptions) # 3.6.0 and above. It still defines forwardTranslateOptions for # backward compatibility but trying to avoid a Warn in the log From a15f817baf2360abfe905f322ae2dc912f95d5d9 Mon Sep 17 00:00:00 2001 From: kflemin <2205659+kflemin@users.noreply.github.com> Date: Fri, 2 Jun 2023 15:09:53 -0600 Subject: [PATCH 05/25] update licenses --- LICENSE.txt | 28 ++----- README.md | 2 +- Rakefile | 5 ++ lib/openstudio-workflow.rb | 34 +------- .../workflow/adapters/input/local.rb | 34 +------- .../workflow/adapters/output/local.rb | 34 +------- .../workflow/adapters/output/socket.rb | 34 +------- .../workflow/adapters/output/web.rb | 34 +------- .../workflow/adapters/output_adapter.rb | 34 +------- lib/openstudio/workflow/job.rb | 34 +------- .../workflow/jobs/run_energyplus.rb | 34 +------- .../workflow/jobs/run_ep_measures.rb | 34 +------- .../workflow/jobs/run_initialization.rb | 34 +------- .../workflow/jobs/run_os_measures.rb | 34 +------- .../workflow/jobs/run_postprocess.rb | 34 +------- .../workflow/jobs/run_preprocess.rb | 34 +------- .../workflow/jobs/run_reporting_measures.rb | 34 +------- .../workflow/jobs/run_translation.rb | 34 +------- lib/openstudio/workflow/multi_delegator.rb | 34 +------- lib/openstudio/workflow/registry.rb | 34 +------- lib/openstudio/workflow/run.rb | 34 +------- lib/openstudio/workflow/time_logger.rb | 34 +------- lib/openstudio/workflow/util.rb | 34 +------- lib/openstudio/workflow/util/energyplus.rb | 34 +------- lib/openstudio/workflow/util/io.rb | 34 +------- lib/openstudio/workflow/util/measure.rb | 34 +------- lib/openstudio/workflow/util/model.rb | 34 +------- lib/openstudio/workflow/util/post_process.rb | 34 +------- lib/openstudio/workflow/util/weather_file.rb | 34 +------- lib/openstudio/workflow/version.rb | 34 +------- lib/openstudio/workflow_json.rb | 34 +------- lib/openstudio/workflow_runner.rb | 34 +------- spec/list_registry_options.rb | 34 +------- .../workflow/schema_validation_spec.rb | 34 +------- spec/openstudio/workflow/time_logger_spec.rb | 34 +------- .../workflow/util_energyplus_spec.rb | 34 +------- .../workflow/workflow_analysis_epjson_spec.rb | 34 +------- .../workflow_analysis_ft_options_spec.rb | 34 +------- .../workflow/workflow_analysis_spec.rb | 34 +------- spec/spec_helper.rb | 34 +------- update_license.rb | 78 +++---------------- 41 files changed, 96 insertions(+), 1275 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 452af8f..f1603f6 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,27 +1,13 @@ -OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved. +OpenStudio(R), Copyright (c) 2008, 2023 Alliance for Sustainable Energy, LLC. -Redistribution and use in source and binary forms, with or without modification, are permitted -provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -(1) Redistributions of source code must retain the above copyright notice, this list of conditions -and the following disclaimer. +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -(2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions -and the following disclaimer in the documentation and/or other materials provided with the distribution. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -(3) Neither the name of the copyright holder nor the names of any contributors may be used to endorse -or promote products derived from this software without specific prior written permission from the -respective party. +3. Redistribution of this software, without modification, must refer to the software by the same designation. Redistribution of a modified version of this software (i) may not refer to the modified version by the same designation, or by any confusingly similar designation, and (ii) must refer to the underlying software originally provided by Alliance as “OpenStudio®”. Except to comply with the foregoing, the term “OpenStudio®”, or any confusingly similar designation may not be used to refer to any modified version of this software or any modified version of the underlying software originally provided by Alliance without the prior written consent of Alliance. -(4) Other than as required in clauses (1) and (2), distributions in any form of modifications or other -derivative works may not use the "OpenStudio" trademark, "OS", "os", or any other confusingly similar -designation without specific prior written permission from Alliance for Sustainable Energy, LLC. +4. The name of the copyright holder(s), any contributors, the United States Government, the United States Department of Energy, or any of their employees may not be used to endorse or promote products derived from this software without specific prior written permission from the respective party. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES GOVERNMENT, -OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index 0e03700..6770120 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Dependency Status](https://www.versioneye.com/user/projects/5531fb7b10e714121100102e/badge.svg?style=flat)](https://www.versioneye.com/user/projects/5531fb7b10e714121100102e) -## OpenStudio Workflow Gem +## OpenStudio(R) Workflow Gem This branch is the development branch for the OpenStudio workflow gem. ## Installation diff --git a/Rakefile b/Rakefile index 9e43509..c0e2dd0 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,10 @@ # frozen_string_literal: true +# ******************************************************************************* +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license +# ******************************************************************************* + require 'bundler' Bundler.setup diff --git a/lib/openstudio-workflow.rb b/lib/openstudio-workflow.rb index 064b21d..fe2b660 100644 --- a/lib/openstudio-workflow.rb +++ b/lib/openstudio-workflow.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* require 'fileutils' diff --git a/lib/openstudio/workflow/adapters/input/local.rb b/lib/openstudio/workflow/adapters/input/local.rb index c908bd2..7044f38 100644 --- a/lib/openstudio/workflow/adapters/input/local.rb +++ b/lib/openstudio/workflow/adapters/input/local.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* require 'openstudio/workflow_json' diff --git a/lib/openstudio/workflow/adapters/output/local.rb b/lib/openstudio/workflow/adapters/output/local.rb index 23888c5..7b9adb1 100644 --- a/lib/openstudio/workflow/adapters/output/local.rb +++ b/lib/openstudio/workflow/adapters/output/local.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* require 'openstudio/workflow/adapters/output_adapter' diff --git a/lib/openstudio/workflow/adapters/output/socket.rb b/lib/openstudio/workflow/adapters/output/socket.rb index 64684b0..b3deb3b 100644 --- a/lib/openstudio/workflow/adapters/output/socket.rb +++ b/lib/openstudio/workflow/adapters/output/socket.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* require_relative 'local' diff --git a/lib/openstudio/workflow/adapters/output/web.rb b/lib/openstudio/workflow/adapters/output/web.rb index 90fbcf6..30729c1 100644 --- a/lib/openstudio/workflow/adapters/output/web.rb +++ b/lib/openstudio/workflow/adapters/output/web.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* require_relative 'local' diff --git a/lib/openstudio/workflow/adapters/output_adapter.rb b/lib/openstudio/workflow/adapters/output_adapter.rb index 00b52ca..2325916 100644 --- a/lib/openstudio/workflow/adapters/output_adapter.rb +++ b/lib/openstudio/workflow/adapters/output_adapter.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* module OpenStudio diff --git a/lib/openstudio/workflow/job.rb b/lib/openstudio/workflow/job.rb index 701010f..0f95ed4 100644 --- a/lib/openstudio/workflow/job.rb +++ b/lib/openstudio/workflow/job.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* module OpenStudio diff --git a/lib/openstudio/workflow/jobs/run_energyplus.rb b/lib/openstudio/workflow/jobs/run_energyplus.rb index 75a9734..6c15077 100644 --- a/lib/openstudio/workflow/jobs/run_energyplus.rb +++ b/lib/openstudio/workflow/jobs/run_energyplus.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* # This class runs the EnergyPlus simulation diff --git a/lib/openstudio/workflow/jobs/run_ep_measures.rb b/lib/openstudio/workflow/jobs/run_ep_measures.rb index ffab1c8..282b02a 100644 --- a/lib/openstudio/workflow/jobs/run_ep_measures.rb +++ b/lib/openstudio/workflow/jobs/run_ep_measures.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* # This class runs all EnergyPlus measures defined in the OSW diff --git a/lib/openstudio/workflow/jobs/run_initialization.rb b/lib/openstudio/workflow/jobs/run_initialization.rb index 346fd5e..d0f5553 100644 --- a/lib/openstudio/workflow/jobs/run_initialization.rb +++ b/lib/openstudio/workflow/jobs/run_initialization.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* # Run the initialization job to run validations and initializations diff --git a/lib/openstudio/workflow/jobs/run_os_measures.rb b/lib/openstudio/workflow/jobs/run_os_measures.rb index 437b99c..8cfe041 100644 --- a/lib/openstudio/workflow/jobs/run_os_measures.rb +++ b/lib/openstudio/workflow/jobs/run_os_measures.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* # Run any OpenStudio measures contained in the OSW diff --git a/lib/openstudio/workflow/jobs/run_postprocess.rb b/lib/openstudio/workflow/jobs/run_postprocess.rb index e2f84e2..c654878 100644 --- a/lib/openstudio/workflow/jobs/run_postprocess.rb +++ b/lib/openstudio/workflow/jobs/run_postprocess.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* # Clean up the run directory. Currently this class does nothing else, although eventually cleanup should become driven diff --git a/lib/openstudio/workflow/jobs/run_preprocess.rb b/lib/openstudio/workflow/jobs/run_preprocess.rb index fc48846..531e084 100644 --- a/lib/openstudio/workflow/jobs/run_preprocess.rb +++ b/lib/openstudio/workflow/jobs/run_preprocess.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* # Prepares the directory for the EnergyPlus simulation diff --git a/lib/openstudio/workflow/jobs/run_reporting_measures.rb b/lib/openstudio/workflow/jobs/run_reporting_measures.rb index dbeec83..11f4585 100644 --- a/lib/openstudio/workflow/jobs/run_reporting_measures.rb +++ b/lib/openstudio/workflow/jobs/run_reporting_measures.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* # Run reporting measures and execute scripts to post-process objective functions and results on the filesystem diff --git a/lib/openstudio/workflow/jobs/run_translation.rb b/lib/openstudio/workflow/jobs/run_translation.rb index d4fc00b..1586f13 100644 --- a/lib/openstudio/workflow/jobs/run_translation.rb +++ b/lib/openstudio/workflow/jobs/run_translation.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* # Run the initialization job to validate the directory and initialize the adapters. diff --git a/lib/openstudio/workflow/multi_delegator.rb b/lib/openstudio/workflow/multi_delegator.rb index 66ed0b0..4a0ad02 100644 --- a/lib/openstudio/workflow/multi_delegator.rb +++ b/lib/openstudio/workflow/multi_delegator.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* require 'logger' diff --git a/lib/openstudio/workflow/registry.rb b/lib/openstudio/workflow/registry.rb index 12095ae..f52dd0d 100644 --- a/lib/openstudio/workflow/registry.rb +++ b/lib/openstudio/workflow/registry.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* module OpenStudio diff --git a/lib/openstudio/workflow/run.rb b/lib/openstudio/workflow/run.rb index 5763157..e4325e6 100644 --- a/lib/openstudio/workflow/run.rb +++ b/lib/openstudio/workflow/run.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* require_relative 'registry' diff --git a/lib/openstudio/workflow/time_logger.rb b/lib/openstudio/workflow/time_logger.rb index e7e9fbe..2f6bcea 100644 --- a/lib/openstudio/workflow/time_logger.rb +++ b/lib/openstudio/workflow/time_logger.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* # Class to store run times in a useful structure. Data are stored in a hash based on a the channel name diff --git a/lib/openstudio/workflow/util.rb b/lib/openstudio/workflow/util.rb index 7d31527..bfbb3d5 100644 --- a/lib/openstudio/workflow/util.rb +++ b/lib/openstudio/workflow/util.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* module OpenStudio diff --git a/lib/openstudio/workflow/util/energyplus.rb b/lib/openstudio/workflow/util/energyplus.rb index 206db62..8752707 100644 --- a/lib/openstudio/workflow/util/energyplus.rb +++ b/lib/openstudio/workflow/util/energyplus.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* module OpenStudio diff --git a/lib/openstudio/workflow/util/io.rb b/lib/openstudio/workflow/util/io.rb index 295214d..8fdb8a9 100644 --- a/lib/openstudio/workflow/util/io.rb +++ b/lib/openstudio/workflow/util/io.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* module OpenStudio diff --git a/lib/openstudio/workflow/util/measure.rb b/lib/openstudio/workflow/util/measure.rb index 46cfdba..67891a7 100644 --- a/lib/openstudio/workflow/util/measure.rb +++ b/lib/openstudio/workflow/util/measure.rb @@ -1,36 +1,6 @@ # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* module OpenStudio diff --git a/lib/openstudio/workflow/util/model.rb b/lib/openstudio/workflow/util/model.rb index 86ae0bc..14a041d 100644 --- a/lib/openstudio/workflow/util/model.rb +++ b/lib/openstudio/workflow/util/model.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* module OpenStudio diff --git a/lib/openstudio/workflow/util/post_process.rb b/lib/openstudio/workflow/util/post_process.rb index 663a959..afc583e 100644 --- a/lib/openstudio/workflow/util/post_process.rb +++ b/lib/openstudio/workflow/util/post_process.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* module OpenStudio diff --git a/lib/openstudio/workflow/util/weather_file.rb b/lib/openstudio/workflow/util/weather_file.rb index c0e48c9..9247459 100644 --- a/lib/openstudio/workflow/util/weather_file.rb +++ b/lib/openstudio/workflow/util/weather_file.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* module OpenStudio diff --git a/lib/openstudio/workflow/version.rb b/lib/openstudio/workflow/version.rb index 5431566..08ef7c9 100644 --- a/lib/openstudio/workflow/version.rb +++ b/lib/openstudio/workflow/version.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* module OpenStudio diff --git a/lib/openstudio/workflow_json.rb b/lib/openstudio/workflow_json.rb index ae765c4..2cb1e34 100644 --- a/lib/openstudio/workflow_json.rb +++ b/lib/openstudio/workflow_json.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* require 'pathname' diff --git a/lib/openstudio/workflow_runner.rb b/lib/openstudio/workflow_runner.rb index 7cd0a9e..8c9b860 100644 --- a/lib/openstudio/workflow_runner.rb +++ b/lib/openstudio/workflow_runner.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* require_relative 'workflow_json' diff --git a/spec/list_registry_options.rb b/spec/list_registry_options.rb index 69a547a..6e4b6c2 100644 --- a/spec/list_registry_options.rb +++ b/spec/list_registry_options.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* registry = [] diff --git a/spec/openstudio/workflow/schema_validation_spec.rb b/spec/openstudio/workflow/schema_validation_spec.rb index 9bcb938..26b3e13 100644 --- a/spec/openstudio/workflow/schema_validation_spec.rb +++ b/spec/openstudio/workflow/schema_validation_spec.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* require_relative './../../spec_helper' diff --git a/spec/openstudio/workflow/time_logger_spec.rb b/spec/openstudio/workflow/time_logger_spec.rb index 6ee496d..29a336d 100644 --- a/spec/openstudio/workflow/time_logger_spec.rb +++ b/spec/openstudio/workflow/time_logger_spec.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* require 'spec_helper' diff --git a/spec/openstudio/workflow/util_energyplus_spec.rb b/spec/openstudio/workflow/util_energyplus_spec.rb index 801ff55..7483034 100644 --- a/spec/openstudio/workflow/util_energyplus_spec.rb +++ b/spec/openstudio/workflow/util_energyplus_spec.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* require_relative './../../spec_helper' diff --git a/spec/openstudio/workflow/workflow_analysis_epjson_spec.rb b/spec/openstudio/workflow/workflow_analysis_epjson_spec.rb index 971710e..2a9fba9 100644 --- a/spec/openstudio/workflow/workflow_analysis_epjson_spec.rb +++ b/spec/openstudio/workflow/workflow_analysis_epjson_spec.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* require_relative './../../spec_helper' diff --git a/spec/openstudio/workflow/workflow_analysis_ft_options_spec.rb b/spec/openstudio/workflow/workflow_analysis_ft_options_spec.rb index 4244db1..29faa77 100644 --- a/spec/openstudio/workflow/workflow_analysis_ft_options_spec.rb +++ b/spec/openstudio/workflow/workflow_analysis_ft_options_spec.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* require_relative './../../spec_helper' diff --git a/spec/openstudio/workflow/workflow_analysis_spec.rb b/spec/openstudio/workflow/workflow_analysis_spec.rb index 1ce1274..7e2ce4b 100644 --- a/spec/openstudio/workflow/workflow_analysis_spec.rb +++ b/spec/openstudio/workflow/workflow_analysis_spec.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* require_relative './../../spec_helper' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 878a9de..24dfa81 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,38 +1,8 @@ # frozen_string_literal: true # ******************************************************************************* -# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# (1) Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# (2) Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# (3) Neither the name of the copyright holder nor the names of any contributors -# may be used to endorse or promote products derived from this software without -# specific prior written permission from the respective party. -# -# (4) Other than as required in clauses (1) and (2), distributions in any form -# of modifications or other derivative works may not use the "OpenStudio" -# trademark, "OS", "os", or any other confusingly similar designation without -# specific prior written permission from Alliance for Sustainable Energy, LLC. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES -# GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license # ******************************************************************************* require 'simplecov' diff --git a/update_license.rb b/update_license.rb index 929c52f..9b4dcf5 100755 --- a/update_license.rb +++ b/update_license.rb @@ -2,90 +2,30 @@ ruby_regex = /^#.\*{79}.*#.\*{79}$/m erb_regex = /^<%.*#.\*{79}.*#.\*{79}.%>$/m -js_regex = %r{^/\* @preserve.*Copyright.*license.{2}\*/}m +js_regex = %r{^/\* @preserve.*Copyright.*#.\*/}m ruby_header_text = <<~EOT # ******************************************************************************* - # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. - # All rights reserved. - # Redistribution and use in source and binary forms, with or without - # modification, are permitted provided that the following conditions are met: - # - # (1) Redistributions of source code must retain the above copyright notice, - # this list of conditions and the following disclaimer. - # - # (2) Redistributions in binary form must reproduce the above copyright notice, - # this list of conditions and the following disclaimer in the documentation - # and/or other materials provided with the distribution. - # - # (3) Neither the name of the copyright holder nor the names of any contributors - # may be used to endorse or promote products derived from this software without - # specific prior written permission from the respective party. - # - # (4) Other than as required in clauses (1) and (2), distributions in any form - # of modifications or other derivative works may not use the "OpenStudio" - # trademark, "OS", "os", or any other confusingly similar designation without - # specific prior written permission from Alliance for Sustainable Energy, LLC. - # - # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES - # GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. + # See also https://openstudio.net/license # ******************************************************************************* EOT ruby_header_text.strip! erb_header_text = <<~EOT <% - # ******************************************************************************* - # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. - # All rights reserved. - # Redistribution and use in source and binary forms, with or without - # modification, are permitted provided that the following conditions are met: - # - # (1) Redistributions of source code must retain the above copyright notice, - # this list of conditions and the following disclaimer. - # - # (2) Redistributions in binary form must reproduce the above copyright notice, - # this list of conditions and the following disclaimer in the documentation - # and/or other materials provided with the distribution. - # - # (3) Neither the name of the copyright holder nor the names of any contributors - # may be used to endorse or promote products derived from this software without - # specific prior written permission from the respective party. - # - # (4) Other than as required in clauses (1) and (2), distributions in any form - # of modifications or other derivative works may not use the "OpenStudio" - # trademark, "OS", "os", or any other confusingly similar designation without - # specific prior written permission from Alliance for Sustainable Energy, LLC. - # - # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES - # GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # ******************************************************************************* + # ******************************************************************************* + # OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. + # See also https://openstudio.net/license + # ******************************************************************************* %> EOT erb_header_text.strip! js_header_text = <<~EOT /* @preserve - * OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be found at openstudio.net/license. + * OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. reserved. + * See also https://openstudio.net/license */ EOT js_header_text.strip! From aafa6187cdeb42e1b549e496b6dd3faf86116aa2 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Thu, 1 Feb 2024 11:08:44 +0100 Subject: [PATCH 06/25] remove required_ruby_version --- openstudio-workflow.gemspec | 2 -- 1 file changed, 2 deletions(-) diff --git a/openstudio-workflow.gemspec b/openstudio-workflow.gemspec index c856ec7..eb4c4b2 100644 --- a/openstudio-workflow.gemspec +++ b/openstudio-workflow.gemspec @@ -16,8 +16,6 @@ Gem::Specification.new do |s| s.homepage = 'https://github.com/NREL/OpenStudio-workflow-gem' s.license = 'BSD' - s.required_ruby_version = '~> 2.7.0' - s.files = Dir.glob('lib/**/*') + ['README.md', 'CHANGELOG.md', 'Rakefile'] s.require_path = 'lib' From 72b3abc6782d3b904461050fff4bf03e180af5af Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Tue, 12 Mar 2024 10:37:52 +0100 Subject: [PATCH 07/25] Update style and comments only for easier diffing --- .../jobs/resources/monthly_report.idf | 413 +++++++++--------- lib/openstudio/workflow/util/energyplus.rb | 412 ++++++++--------- 2 files changed, 412 insertions(+), 413 deletions(-) diff --git a/lib/openstudio/workflow/jobs/resources/monthly_report.idf b/lib/openstudio/workflow/jobs/resources/monthly_report.idf index f5228d0..bec548d 100644 --- a/lib/openstudio/workflow/jobs/resources/monthly_report.idf +++ b/lib/openstudio/workflow/jobs/resources/monthly_report.idf @@ -1,224 +1,223 @@ Version,9.4; Output:Table:Monthly, - Building Energy Performance - Electricity, !- Name - 2, !- Digits After Decimal - InteriorLights:Electricity, !- Variable or Meter 1 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:Electricity, !- Variable or Meter 2 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:Electricity, !- Variable or Meter 3 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:Electricity, !- Variable or Meter 4 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 4 - Fans:Electricity, !- Variable or Meter 5 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 5 - Pumps:Electricity, !- Variable or Meter 6 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 6 - Heating:Electricity, !- Variable or Meter 7 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 7 - Cooling:Electricity, !- Variable or Meter 8 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 8 - HeatRejection:Electricity, !- Variable or Meter 9 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 9 - Humidifier:Electricity, !- Variable or Meter 10 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:Electricity,!- Variable or Meter 11 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 11 - WaterSystems:Electricity,!- Variable or Meter 12 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 12 - Cogeneration:Electricity,!- Variable or Meter 13 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 13 - Refrigeration:Electricity,!- Variable or Meter 14 Name - SumOrAverage; !- Aggregation Type for Variable or Meter 14 + Building Energy Performance - Electricity, !- Name + 2, !- Digits After Decimal + InteriorLights:Electricity, !- Variable or Meter Name 1 + SumOrAverage, !- Aggregation Type for Variable or Meter 1 + ExteriorLights:Electricity, !- Variable or Meter Name 2 + SumOrAverage, !- Aggregation Type for Variable or Meter 2 + InteriorEquipment:Electricity, !- Variable or Meter Name 3 + SumOrAverage, !- Aggregation Type for Variable or Meter 3 + ExteriorEquipment:Electricity, !- Variable or Meter Name 4 + SumOrAverage, !- Aggregation Type for Variable or Meter 4 + Fans:Electricity, !- Variable or Meter Name 5 + SumOrAverage, !- Aggregation Type for Variable or Meter 5 + Pumps:Electricity, !- Variable or Meter Name 6 + SumOrAverage, !- Aggregation Type for Variable or Meter 6 + Heating:Electricity, !- Variable or Meter Name 7 + SumOrAverage, !- Aggregation Type for Variable or Meter 7 + Cooling:Electricity, !- Variable or Meter Name 8 + SumOrAverage, !- Aggregation Type for Variable or Meter 8 + HeatRejection:Electricity, !- Variable or Meter Name 9 + SumOrAverage, !- Aggregation Type for Variable or Meter 9 + Humidifier:Electricity, !- Variable or Meter Name 10 + SumOrAverage, !- Aggregation Type for Variable or Meter 10 + HeatRecovery:Electricity, !- Variable or Meter Name 11 + SumOrAverage, !- Aggregation Type for Variable or Meter 11 + WaterSystems:Electricity, !- Variable or Meter Name 12 + SumOrAverage, !- Aggregation Type for Variable or Meter 12 + Cogeneration:Electricity, !- Variable or Meter Name 13 + SumOrAverage, !- Aggregation Type for Variable or Meter 13 + Refrigeration:Electricity, !- Variable or Meter Name 14 + SumOrAverage; !- Aggregation Type for Variable or Meter 14 Output:Table:Monthly, - Building Energy Performance - Natural Gas, !- Name - 2, !- Digits After Decimal - InteriorEquipment:NaturalGas, !- Variable or Meter 1 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 1 - ExteriorEquipment:NaturalGas, !- Variable or Meter 2 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 2 - Heating:NaturalGas, !- Variable or Meter 3 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 3 - Cooling:NaturalGas, !- Variable or Meter 4 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 4 - WaterSystems:NaturalGas, !- Variable or Meter 5 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 5 - Cogeneration:NaturalGas, !- Variable or Meter 6 Name - SumOrAverage; !- Aggregation Type for Variable or Meter 6 + Building Energy Performance - Natural Gas, !- Name + 2, !- Digits After Decimal + InteriorEquipment:NaturalGas, !- Variable or Meter Name 1 + SumOrAverage, !- Aggregation Type for Variable or Meter 1 + ExteriorEquipment:NaturalGas, !- Variable or Meter Name 2 + SumOrAverage, !- Aggregation Type for Variable or Meter 2 + Heating:NaturalGas, !- Variable or Meter Name 3 + SumOrAverage, !- Aggregation Type for Variable or Meter 3 + Cooling:NaturalGas, !- Variable or Meter Name 4 + SumOrAverage, !- Aggregation Type for Variable or Meter 4 + WaterSystems:NaturalGas, !- Variable or Meter Name 5 + SumOrAverage, !- Aggregation Type for Variable or Meter 5 + Cogeneration:NaturalGas, !- Variable or Meter Name 6 + SumOrAverage; !- Aggregation Type for Variable or Meter 6 Output:Table:Monthly, - Building Energy Performance - District Heating, !- Name - 2, !- Digits After Decimal - InteriorLights:DistrictHeating, !- Variable or Meter 1 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:DistrictHeating, !- Variable or Meter 2 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:DistrictHeating, !- Variable or Meter 3 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:DistrictHeating, !- Variable or Meter 4 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 4 - Fans:DistrictHeating, !- Variable or Meter 5 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 5 - Pumps:DistrictHeating, !- Variable or Meter 6 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 6 - Heating:DistrictHeating, !- Variable or Meter 7 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 7 - Cooling:DistrictHeating, !- Variable or Meter 8 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 8 - HeatRejection:DistrictHeating, !- Variable or Meter 9 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 9 - Humidifier:DistrictHeating, !- Variable or Meter 10 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:DistrictHeating,!- Variable or Meter 11 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 11 - WaterSystems:DistrictHeating,!- Variable or Meter 12 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 12 - Cogeneration:DistrictHeating,!- Variable or Meter 13 Name - SumOrAverage; !- Aggregation Type for Variable or Meter 13 + Building Energy Performance - District Heating, !- Name + 2, !- Digits After Decimal + InteriorLights:DistrictHeating, !- Variable or Meter Name 1 + SumOrAverage, !- Aggregation Type for Variable or Meter 1 + ExteriorLights:DistrictHeating, !- Variable or Meter Name 2 + SumOrAverage, !- Aggregation Type for Variable or Meter 2 + InteriorEquipment:DistrictHeating, !- Variable or Meter Name 3 + SumOrAverage, !- Aggregation Type for Variable or Meter 3 + ExteriorEquipment:DistrictHeating, !- Variable or Meter Name 4 + SumOrAverage, !- Aggregation Type for Variable or Meter 4 + Fans:DistrictHeating, !- Variable or Meter Name 5 + SumOrAverage, !- Aggregation Type for Variable or Meter 5 + Pumps:DistrictHeating, !- Variable or Meter Name 6 + SumOrAverage, !- Aggregation Type for Variable or Meter 6 + Heating:DistrictHeating, !- Variable or Meter Name 7 + SumOrAverage, !- Aggregation Type for Variable or Meter 7 + Cooling:DistrictHeating, !- Variable or Meter Name 8 + SumOrAverage, !- Aggregation Type for Variable or Meter 8 + HeatRejection:DistrictHeating, !- Variable or Meter Name 9 + SumOrAverage, !- Aggregation Type for Variable or Meter 9 + Humidifier:DistrictHeating, !- Variable or Meter Name 10 + SumOrAverage, !- Aggregation Type for Variable or Meter 10 + HeatRecovery:DistrictHeating, !- Variable or Meter Name 11 + SumOrAverage, !- Aggregation Type for Variable or Meter 11 + WaterSystems:DistrictHeating, !- Variable or Meter Name 12 + SumOrAverage, !- Aggregation Type for Variable or Meter 12 + Cogeneration:DistrictHeating, !- Variable or Meter Name 13 + SumOrAverage; !- Aggregation Type for Variable or Meter 13 Output:Table:Monthly, - Building Energy Performance - District Cooling, !- Name - 2, !- Digits After Decimal - InteriorLights:DistrictCooling, !- Variable or Meter 1 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:DistrictCooling, !- Variable or Meter 2 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:DistrictCooling, !- Variable or Meter 3 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:DistrictCooling, !- Variable or Meter 4 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 4 - Fans:DistrictCooling, !- Variable or Meter 5 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 5 - Pumps:DistrictCooling, !- Variable or Meter 6 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 6 - Heating:DistrictCooling, !- Variable or Meter 7 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 7 - Cooling:DistrictCooling, !- Variable or Meter 8 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 8 - HeatRejection:DistrictCooling, !- Variable or Meter 9 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 9 - Humidifier:DistrictCooling, !- Variable or Meter 10 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:DistrictCooling,!- Variable or Meter 11 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 11 - WaterSystems:DistrictCooling,!- Variable or Meter 12 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 12 - Cogeneration:DistrictCooling,!- Variable or Meter 13 Name - SumOrAverage; !- Aggregation Type for Variable or Meter 13 + Building Energy Performance - District Cooling, !- Name + 2, !- Digits After Decimal + InteriorLights:DistrictCooling, !- Variable or Meter Name 1 + SumOrAverage, !- Aggregation Type for Variable or Meter 1 + ExteriorLights:DistrictCooling, !- Variable or Meter Name 2 + SumOrAverage, !- Aggregation Type for Variable or Meter 2 + InteriorEquipment:DistrictCooling, !- Variable or Meter Name 3 + SumOrAverage, !- Aggregation Type for Variable or Meter 3 + ExteriorEquipment:DistrictCooling, !- Variable or Meter Name 4 + SumOrAverage, !- Aggregation Type for Variable or Meter 4 + Fans:DistrictCooling, !- Variable or Meter Name 5 + SumOrAverage, !- Aggregation Type for Variable or Meter 5 + Pumps:DistrictCooling, !- Variable or Meter Name 6 + SumOrAverage, !- Aggregation Type for Variable or Meter 6 + Heating:DistrictCooling, !- Variable or Meter Name 7 + SumOrAverage, !- Aggregation Type for Variable or Meter 7 + Cooling:DistrictCooling, !- Variable or Meter Name 8 + SumOrAverage, !- Aggregation Type for Variable or Meter 8 + HeatRejection:DistrictCooling, !- Variable or Meter Name 9 + SumOrAverage, !- Aggregation Type for Variable or Meter 9 + Humidifier:DistrictCooling, !- Variable or Meter Name 10 + SumOrAverage, !- Aggregation Type for Variable or Meter 10 + HeatRecovery:DistrictCooling, !- Variable or Meter Name 11 + SumOrAverage, !- Aggregation Type for Variable or Meter 11 + WaterSystems:DistrictCooling, !- Variable or Meter Name 12 + SumOrAverage, !- Aggregation Type for Variable or Meter 12 + Cogeneration:DistrictCooling, !- Variable or Meter Name 13 + SumOrAverage; !- Aggregation Type for Variable or Meter 13 Output:Table:Monthly, - Building Energy Performance - Electricity Peak Demand, !- Name - 2, !- Digits After Decimal - Electricity:Facility, !- Variable or Meter 1 Name - Maximum, !- Aggregation Type for Variable or Meter 1 - InteriorLights:Electricity, !- Variable or Meter 1 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:Electricity, !- Variable or Meter 2 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:Electricity, !- Variable or Meter 3 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:Electricity, !- Variable or Meter 4 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 - Fans:Electricity, !- Variable or Meter 5 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 - Pumps:Electricity, !- Variable or Meter 6 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 - Heating:Electricity, !- Variable or Meter 7 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 - Cooling:Electricity, !- Variable or Meter 8 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 - HeatRejection:Electricity, !- Variable or Meter 9 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 - Humidifier:Electricity, !- Variable or Meter 10 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:Electricity,!- Variable or Meter 11 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 - WaterSystems:Electricity,!- Variable or Meter 12 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 - Cogeneration:Electricity,!- Variable or Meter 13 Name - ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 13 + Building Energy Performance - Electricity Peak Demand, !- Name + 2, !- Digits After Decimal + Electricity:Facility, !- Variable or Meter Name 1 + Maximum, !- Aggregation Type for Variable or Meter 1 + InteriorLights:Electricity, !- Variable or Meter Name 1 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 + ExteriorLights:Electricity, !- Variable or Meter Name 2 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 + InteriorEquipment:Electricity, !- Variable or Meter Name 3 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 + ExteriorEquipment:Electricity, !- Variable or Meter Name 4 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 + Fans:Electricity, !- Variable or Meter Name 5 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 + Pumps:Electricity, !- Variable or Meter Name 6 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 + Heating:Electricity, !- Variable or Meter Name 7 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 + Cooling:Electricity, !- Variable or Meter Name 8 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 + HeatRejection:Electricity, !- Variable or Meter Name 9 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 + Humidifier:Electricity, !- Variable or Meter Name 10 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 + HeatRecovery:Electricity, !- Variable or Meter Name 11 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 + WaterSystems:Electricity, !- Variable or Meter Name 12 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 + Cogeneration:Electricity, !- Variable or Meter Name 13 + ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 13 Output:Table:Monthly, - Building Energy Performance - Natural Gas Peak Demand, !- Name - 2, !- Digits After Decimal - NaturalGas:Facility, !- Variable or Meter 1 Name - Maximum, !- Aggregation Type for Variable or Meter 1 - InteriorEquipment:NaturalGas, !- Variable or Meter 1 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 - ExteriorEquipment:NaturalGas, !- Variable or Meter 2 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 - Heating:NaturalGas, !- Variable or Meter 3 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 - Cooling:NaturalGas, !- Variable or Meter 4 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 - WaterSystems:NaturalGas, !- Variable or Meter 5 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 - Cogeneration:NaturalGas, !- Variable or Meter 6 Name - ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 6 + Building Energy Performance - Natural Gas Peak Demand, !- Name + 2, !- Digits After Decimal + NaturalGas:Facility, !- Variable or Meter Name 1 + Maximum, !- Aggregation Type for Variable or Meter 1 + InteriorEquipment:NaturalGas, !- Variable or Meter Name 1 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 + ExteriorEquipment:NaturalGas, !- Variable or Meter Name 2 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 + Heating:NaturalGas, !- Variable or Meter Name 3 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 + Cooling:NaturalGas, !- Variable or Meter Name 4 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 + WaterSystems:NaturalGas, !- Variable or Meter Name 5 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 + Cogeneration:NaturalGas, !- Variable or Meter Name 6 + ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 6 Output:Table:Monthly, - Building Energy Performance - District Heating Peak Demand, !- Name - 2, !- Digits After Decimal - DistrictHeating:Facility, !- Variable or Meter 1 Name - Maximum, !- Aggregation Type for Variable or Meter 1 - InteriorLights:DistrictHeating, !- Variable or Meter 1 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:DistrictHeating, !- Variable or Meter 2 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:DistrictHeating, !- Variable or Meter 3 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:DistrictHeating, !- Variable or Meter 4 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 - Fans:DistrictHeating, !- Variable or Meter 5 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 - Pumps:DistrictHeating, !- Variable or Meter 6 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 - Heating:DistrictHeating, !- Variable or Meter 7 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 - Cooling:DistrictHeating, !- Variable or Meter 8 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 - HeatRejection:DistrictHeating, !- Variable or Meter 9 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 - Humidifier:DistrictHeating, !- Variable or Meter 10 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:DistrictHeating,!- Variable or Meter 11 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 - WaterSystems:DistrictHeating,!- Variable or Meter 12 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 - Cogeneration:DistrictHeating,!- Variable or Meter 13 Name - ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 13 + Building Energy Performance - District Heating Peak Demand, !- Name + 2, !- Digits After Decimal + DistrictHeating:Facility, !- Variable or Meter Name 1 + Maximum, !- Aggregation Type for Variable or Meter 1 + InteriorLights:DistrictHeating, !- Variable or Meter Name 1 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 + ExteriorLights:DistrictHeating, !- Variable or Meter Name 2 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 + InteriorEquipment:DistrictHeating, !- Variable or Meter Name 3 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 + ExteriorEquipment:DistrictHeating, !- Variable or Meter Name 4 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 + Fans:DistrictHeating, !- Variable or Meter Name 5 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 + Pumps:DistrictHeating, !- Variable or Meter Name 6 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 + Heating:DistrictHeating, !- Variable or Meter Name 7 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 + Cooling:DistrictHeating, !- Variable or Meter Name 8 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 + HeatRejection:DistrictHeating, !- Variable or Meter Name 9 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 + Humidifier:DistrictHeating, !- Variable or Meter Name 10 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 + HeatRecovery:DistrictHeating, !- Variable or Meter Name 11 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 + WaterSystems:DistrictHeating, !- Variable or Meter Name 12 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 + Cogeneration:DistrictHeating, !- Variable or Meter Name 13 + ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 13 Output:Table:Monthly, - Building Energy Performance - District Cooling Peak Demand, !- Name - 2, !- Digits After Decimal - DistrictCooling:Facility, !- Variable or Meter 1 Name - Maximum, !- Aggregation Type for Variable or Meter 1 - InteriorLights:DistrictCooling, !- Variable or Meter 1 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:DistrictCooling, !- Variable or Meter 2 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:DistrictCooling, !- Variable or Meter 3 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:DistrictCooling, !- Variable or Meter 4 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 - Fans:DistrictCooling, !- Variable or Meter 5 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 - Pumps:DistrictCooling, !- Variable or Meter 6 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 - Heating:DistrictCooling, !- Variable or Meter 7 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 - Cooling:DistrictCooling, !- Variable or Meter 8 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 - HeatRejection:DistrictCooling, !- Variable or Meter 9 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 - Humidifier:DistrictCooling, !- Variable or Meter 10 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:DistrictCooling,!- Variable or Meter 11 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 - WaterSystems:DistrictCooling,!- Variable or Meter 12 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 - Cogeneration:DistrictCooling,!- Variable or Meter 13 Name - ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 13 - + Building Energy Performance - District Cooling Peak Demand, !- Name + 2, !- Digits After Decimal + DistrictCooling:Facility, !- Variable or Meter Name 1 + Maximum, !- Aggregation Type for Variable or Meter 1 + InteriorLights:DistrictCooling, !- Variable or Meter Name 1 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 + ExteriorLights:DistrictCooling, !- Variable or Meter Name 2 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 + InteriorEquipment:DistrictCooling, !- Variable or Meter Name 3 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 + ExteriorEquipment:DistrictCooling, !- Variable or Meter Name 4 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 + Fans:DistrictCooling, !- Variable or Meter Name 5 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 + Pumps:DistrictCooling, !- Variable or Meter Name 6 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 + Heating:DistrictCooling, !- Variable or Meter Name 7 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 + Cooling:DistrictCooling, !- Variable or Meter Name 8 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 + HeatRejection:DistrictCooling, !- Variable or Meter Name 9 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 + Humidifier:DistrictCooling, !- Variable or Meter Name 10 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 + HeatRecovery:DistrictCooling, !- Variable or Meter Name 11 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 + WaterSystems:DistrictCooling, !- Variable or Meter Name 12 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 + Cogeneration:DistrictCooling, !- Variable or Meter Name 13 + ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 13 diff --git a/lib/openstudio/workflow/util/energyplus.rb b/lib/openstudio/workflow/util/energyplus.rb index 8752707..ba8e30f 100644 --- a/lib/openstudio/workflow/util/energyplus.rb +++ b/lib/openstudio/workflow/util/energyplus.rb @@ -352,226 +352,226 @@ def self.merge_output_table_summary_reports(current_object, new_object) def self.monthly_report_idf_text <<~HEREDOC Output:Table:Monthly, - Building Energy Performance - Electricity, !- Name - 2, !- Digits After Decimal - InteriorLights:Electricity, !- Variable or Meter 1 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:Electricity, !- Variable or Meter 2 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:Electricity, !- Variable or Meter 3 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:Electricity, !- Variable or Meter 4 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 4 - Fans:Electricity, !- Variable or Meter 5 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 5 - Pumps:Electricity, !- Variable or Meter 6 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 6 - Heating:Electricity, !- Variable or Meter 7 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 7 - Cooling:Electricity, !- Variable or Meter 8 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 8 - HeatRejection:Electricity, !- Variable or Meter 9 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 9 - Humidifier:Electricity, !- Variable or Meter 10 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:Electricity,!- Variable or Meter 11 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 11 - WaterSystems:Electricity,!- Variable or Meter 12 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 12 - Cogeneration:Electricity,!- Variable or Meter 13 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 13 - Refrigeration:Electricity,!- Variable or Meter 14 Name - SumOrAverage; !- Aggregation Type for Variable or Meter 14 + Building Energy Performance - Electricity, !- Name + 2, !- Digits After Decimal + InteriorLights:Electricity, !- Variable or Meter Name 1 + SumOrAverage, !- Aggregation Type for Variable or Meter 1 + ExteriorLights:Electricity, !- Variable or Meter Name 2 + SumOrAverage, !- Aggregation Type for Variable or Meter 2 + InteriorEquipment:Electricity, !- Variable or Meter Name 3 + SumOrAverage, !- Aggregation Type for Variable or Meter 3 + ExteriorEquipment:Electricity, !- Variable or Meter Name 4 + SumOrAverage, !- Aggregation Type for Variable or Meter 4 + Fans:Electricity, !- Variable or Meter Name 5 + SumOrAverage, !- Aggregation Type for Variable or Meter 5 + Pumps:Electricity, !- Variable or Meter Name 6 + SumOrAverage, !- Aggregation Type for Variable or Meter 6 + Heating:Electricity, !- Variable or Meter Name 7 + SumOrAverage, !- Aggregation Type for Variable or Meter 7 + Cooling:Electricity, !- Variable or Meter Name 8 + SumOrAverage, !- Aggregation Type for Variable or Meter 8 + HeatRejection:Electricity, !- Variable or Meter Name 9 + SumOrAverage, !- Aggregation Type for Variable or Meter 9 + Humidifier:Electricity, !- Variable or Meter Name 10 + SumOrAverage, !- Aggregation Type for Variable or Meter 10 + HeatRecovery:Electricity, !- Variable or Meter Name 11 + SumOrAverage, !- Aggregation Type for Variable or Meter 11 + WaterSystems:Electricity, !- Variable or Meter Name 12 + SumOrAverage, !- Aggregation Type for Variable or Meter 12 + Cogeneration:Electricity, !- Variable or Meter Name 13 + SumOrAverage, !- Aggregation Type for Variable or Meter 13 + Refrigeration:Electricity, !- Variable or Meter Name 14 + SumOrAverage; !- Aggregation Type for Variable or Meter 14 Output:Table:Monthly, - Building Energy Performance - Natural Gas, !- Name - 2, !- Digits After Decimal - InteriorEquipment:NaturalGas, !- Variable or Meter 1 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 1 - ExteriorEquipment:NaturalGas, !- Variable or Meter 2 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 2 - Heating:NaturalGas, !- Variable or Meter 3 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 3 - Cooling:NaturalGas, !- Variable or Meter 4 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 4 - WaterSystems:NaturalGas, !- Variable or Meter 5 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 5 - Cogeneration:NaturalGas, !- Variable or Meter 6 Name - SumOrAverage; !- Aggregation Type for Variable or Meter 6 + Building Energy Performance - Natural Gas, !- Name + 2, !- Digits After Decimal + InteriorEquipment:NaturalGas, !- Variable or Meter Name 1 + SumOrAverage, !- Aggregation Type for Variable or Meter 1 + ExteriorEquipment:NaturalGas, !- Variable or Meter Name 2 + SumOrAverage, !- Aggregation Type for Variable or Meter 2 + Heating:NaturalGas, !- Variable or Meter Name 3 + SumOrAverage, !- Aggregation Type for Variable or Meter 3 + Cooling:NaturalGas, !- Variable or Meter Name 4 + SumOrAverage, !- Aggregation Type for Variable or Meter 4 + WaterSystems:NaturalGas, !- Variable or Meter Name 5 + SumOrAverage, !- Aggregation Type for Variable or Meter 5 + Cogeneration:NaturalGas, !- Variable or Meter Name 6 + SumOrAverage; !- Aggregation Type for Variable or Meter 6 Output:Table:Monthly, - Building Energy Performance - District Heating, !- Name - 2, !- Digits After Decimal - InteriorLights:DistrictHeating, !- Variable or Meter 1 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:DistrictHeating, !- Variable or Meter 2 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:DistrictHeating, !- Variable or Meter 3 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:DistrictHeating, !- Variable or Meter 4 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 4 - Fans:DistrictHeating, !- Variable or Meter 5 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 5 - Pumps:DistrictHeating, !- Variable or Meter 6 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 6 - Heating:DistrictHeating, !- Variable or Meter 7 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 7 - Cooling:DistrictHeating, !- Variable or Meter 8 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 8 - HeatRejection:DistrictHeating, !- Variable or Meter 9 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 9 - Humidifier:DistrictHeating, !- Variable or Meter 10 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:DistrictHeating,!- Variable or Meter 11 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 11 - WaterSystems:DistrictHeating,!- Variable or Meter 12 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 12 - Cogeneration:DistrictHeating,!- Variable or Meter 13 Name - SumOrAverage; !- Aggregation Type for Variable or Meter 13 + Building Energy Performance - District Heating, !- Name + 2, !- Digits After Decimal + InteriorLights:DistrictHeating, !- Variable or Meter Name 1 + SumOrAverage, !- Aggregation Type for Variable or Meter 1 + ExteriorLights:DistrictHeating, !- Variable or Meter Name 2 + SumOrAverage, !- Aggregation Type for Variable or Meter 2 + InteriorEquipment:DistrictHeating, !- Variable or Meter Name 3 + SumOrAverage, !- Aggregation Type for Variable or Meter 3 + ExteriorEquipment:DistrictHeating, !- Variable or Meter Name 4 + SumOrAverage, !- Aggregation Type for Variable or Meter 4 + Fans:DistrictHeating, !- Variable or Meter Name 5 + SumOrAverage, !- Aggregation Type for Variable or Meter 5 + Pumps:DistrictHeating, !- Variable or Meter Name 6 + SumOrAverage, !- Aggregation Type for Variable or Meter 6 + Heating:DistrictHeating, !- Variable or Meter Name 7 + SumOrAverage, !- Aggregation Type for Variable or Meter 7 + Cooling:DistrictHeating, !- Variable or Meter Name 8 + SumOrAverage, !- Aggregation Type for Variable or Meter 8 + HeatRejection:DistrictHeating, !- Variable or Meter Name 9 + SumOrAverage, !- Aggregation Type for Variable or Meter 9 + Humidifier:DistrictHeating, !- Variable or Meter Name 10 + SumOrAverage, !- Aggregation Type for Variable or Meter 10 + HeatRecovery:DistrictHeating, !- Variable or Meter Name 11 + SumOrAverage, !- Aggregation Type for Variable or Meter 11 + WaterSystems:DistrictHeating, !- Variable or Meter Name 12 + SumOrAverage, !- Aggregation Type for Variable or Meter 12 + Cogeneration:DistrictHeating, !- Variable or Meter Name 13 + SumOrAverage; !- Aggregation Type for Variable or Meter 13 Output:Table:Monthly, - Building Energy Performance - District Cooling, !- Name - 2, !- Digits After Decimal - InteriorLights:DistrictCooling, !- Variable or Meter 1 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:DistrictCooling, !- Variable or Meter 2 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:DistrictCooling, !- Variable or Meter 3 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:DistrictCooling, !- Variable or Meter 4 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 4 - Fans:DistrictCooling, !- Variable or Meter 5 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 5 - Pumps:DistrictCooling, !- Variable or Meter 6 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 6 - Heating:DistrictCooling, !- Variable or Meter 7 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 7 - Cooling:DistrictCooling, !- Variable or Meter 8 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 8 - HeatRejection:DistrictCooling, !- Variable or Meter 9 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 9 - Humidifier:DistrictCooling, !- Variable or Meter 10 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:DistrictCooling,!- Variable or Meter 11 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 11 - WaterSystems:DistrictCooling,!- Variable or Meter 12 Name - SumOrAverage, !- Aggregation Type for Variable or Meter 12 - Cogeneration:DistrictCooling,!- Variable or Meter 13 Name - SumOrAverage; !- Aggregation Type for Variable or Meter 13 + Building Energy Performance - District Cooling, !- Name + 2, !- Digits After Decimal + InteriorLights:DistrictCooling, !- Variable or Meter Name 1 + SumOrAverage, !- Aggregation Type for Variable or Meter 1 + ExteriorLights:DistrictCooling, !- Variable or Meter Name 2 + SumOrAverage, !- Aggregation Type for Variable or Meter 2 + InteriorEquipment:DistrictCooling, !- Variable or Meter Name 3 + SumOrAverage, !- Aggregation Type for Variable or Meter 3 + ExteriorEquipment:DistrictCooling, !- Variable or Meter Name 4 + SumOrAverage, !- Aggregation Type for Variable or Meter 4 + Fans:DistrictCooling, !- Variable or Meter Name 5 + SumOrAverage, !- Aggregation Type for Variable or Meter 5 + Pumps:DistrictCooling, !- Variable or Meter Name 6 + SumOrAverage, !- Aggregation Type for Variable or Meter 6 + Heating:DistrictCooling, !- Variable or Meter Name 7 + SumOrAverage, !- Aggregation Type for Variable or Meter 7 + Cooling:DistrictCooling, !- Variable or Meter Name 8 + SumOrAverage, !- Aggregation Type for Variable or Meter 8 + HeatRejection:DistrictCooling, !- Variable or Meter Name 9 + SumOrAverage, !- Aggregation Type for Variable or Meter 9 + Humidifier:DistrictCooling, !- Variable or Meter Name 10 + SumOrAverage, !- Aggregation Type for Variable or Meter 10 + HeatRecovery:DistrictCooling, !- Variable or Meter Name 11 + SumOrAverage, !- Aggregation Type for Variable or Meter 11 + WaterSystems:DistrictCooling, !- Variable or Meter Name 12 + SumOrAverage, !- Aggregation Type for Variable or Meter 12 + Cogeneration:DistrictCooling, !- Variable or Meter Name 13 + SumOrAverage; !- Aggregation Type for Variable or Meter 13 Output:Table:Monthly, - Building Energy Performance - Electricity Peak Demand, !- Name - 2, !- Digits After Decimal - Electricity:Facility, !- Variable or Meter 1 Name - Maximum, !- Aggregation Type for Variable or Meter 1 - InteriorLights:Electricity, !- Variable or Meter 1 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:Electricity, !- Variable or Meter 2 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:Electricity, !- Variable or Meter 3 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:Electricity, !- Variable or Meter 4 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 - Fans:Electricity, !- Variable or Meter 5 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 - Pumps:Electricity, !- Variable or Meter 6 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 - Heating:Electricity, !- Variable or Meter 7 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 - Cooling:Electricity, !- Variable or Meter 8 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 - HeatRejection:Electricity, !- Variable or Meter 9 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 - Humidifier:Electricity, !- Variable or Meter 10 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:Electricity,!- Variable or Meter 11 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 - WaterSystems:Electricity,!- Variable or Meter 12 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 - Cogeneration:Electricity,!- Variable or Meter 13 Name - ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 13 + Building Energy Performance - Electricity Peak Demand, !- Name + 2, !- Digits After Decimal + Electricity:Facility, !- Variable or Meter Name 1 + Maximum, !- Aggregation Type for Variable or Meter 1 + InteriorLights:Electricity, !- Variable or Meter Name 1 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 + ExteriorLights:Electricity, !- Variable or Meter Name 2 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 + InteriorEquipment:Electricity, !- Variable or Meter Name 3 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 + ExteriorEquipment:Electricity, !- Variable or Meter Name 4 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 + Fans:Electricity, !- Variable or Meter Name 5 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 + Pumps:Electricity, !- Variable or Meter Name 6 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 + Heating:Electricity, !- Variable or Meter Name 7 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 + Cooling:Electricity, !- Variable or Meter Name 8 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 + HeatRejection:Electricity, !- Variable or Meter Name 9 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 + Humidifier:Electricity, !- Variable or Meter Name 10 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 + HeatRecovery:Electricity, !- Variable or Meter Name 11 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 + WaterSystems:Electricity, !- Variable or Meter Name 12 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 + Cogeneration:Electricity, !- Variable or Meter Name 13 + ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 13 Output:Table:Monthly, - Building Energy Performance - Natural Gas Peak Demand, !- Name - 2, !- Digits After Decimal - NaturalGas:Facility, !- Variable or Meter 1 Name - Maximum, !- Aggregation Type for Variable or Meter 1 - InteriorEquipment:NaturalGas, !- Variable or Meter 1 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 - ExteriorEquipment:NaturalGas, !- Variable or Meter 2 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 - Heating:NaturalGas, !- Variable or Meter 3 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 - Cooling:NaturalGas, !- Variable or Meter 4 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 - WaterSystems:NaturalGas, !- Variable or Meter 5 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 - Cogeneration:NaturalGas, !- Variable or Meter 6 Name - ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 6 + Building Energy Performance - Natural Gas Peak Demand, !- Name + 2, !- Digits After Decimal + NaturalGas:Facility, !- Variable or Meter Name 1 + Maximum, !- Aggregation Type for Variable or Meter 1 + InteriorEquipment:NaturalGas, !- Variable or Meter Name 1 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 + ExteriorEquipment:NaturalGas, !- Variable or Meter Name 2 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 + Heating:NaturalGas, !- Variable or Meter Name 3 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 + Cooling:NaturalGas, !- Variable or Meter Name 4 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 + WaterSystems:NaturalGas, !- Variable or Meter Name 5 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 + Cogeneration:NaturalGas, !- Variable or Meter Name 6 + ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 6 Output:Table:Monthly, - Building Energy Performance - District Heating Peak Demand, !- Name - 2, !- Digits After Decimal - DistrictHeating:Facility, !- Variable or Meter 1 Name - Maximum, !- Aggregation Type for Variable or Meter 1 - InteriorLights:DistrictHeating, !- Variable or Meter 1 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:DistrictHeating, !- Variable or Meter 2 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:DistrictHeating, !- Variable or Meter 3 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:DistrictHeating, !- Variable or Meter 4 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 - Fans:DistrictHeating, !- Variable or Meter 5 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 - Pumps:DistrictHeating, !- Variable or Meter 6 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 - Heating:DistrictHeating, !- Variable or Meter 7 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 - Cooling:DistrictHeating, !- Variable or Meter 8 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 - HeatRejection:DistrictHeating, !- Variable or Meter 9 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 - Humidifier:DistrictHeating, !- Variable or Meter 10 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:DistrictHeating,!- Variable or Meter 11 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 - WaterSystems:DistrictHeating,!- Variable or Meter 12 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 - Cogeneration:DistrictHeating,!- Variable or Meter 13 Name - ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 13 + Building Energy Performance - District Heating Peak Demand, !- Name + 2, !- Digits After Decimal + DistrictHeating:Facility, !- Variable or Meter Name 1 + Maximum, !- Aggregation Type for Variable or Meter 1 + InteriorLights:DistrictHeating, !- Variable or Meter Name 1 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 + ExteriorLights:DistrictHeating, !- Variable or Meter Name 2 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 + InteriorEquipment:DistrictHeating, !- Variable or Meter Name 3 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 + ExteriorEquipment:DistrictHeating, !- Variable or Meter Name 4 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 + Fans:DistrictHeating, !- Variable or Meter Name 5 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 + Pumps:DistrictHeating, !- Variable or Meter Name 6 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 + Heating:DistrictHeating, !- Variable or Meter Name 7 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 + Cooling:DistrictHeating, !- Variable or Meter Name 8 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 + HeatRejection:DistrictHeating, !- Variable or Meter Name 9 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 + Humidifier:DistrictHeating, !- Variable or Meter Name 10 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 + HeatRecovery:DistrictHeating, !- Variable or Meter Name 11 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 + WaterSystems:DistrictHeating, !- Variable or Meter Name 12 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 + Cogeneration:DistrictHeating, !- Variable or Meter Name 13 + ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 13 Output:Table:Monthly, - Building Energy Performance - District Cooling Peak Demand, !- Name - 2, !- Digits After Decimal - DistrictCooling:Facility, !- Variable or Meter 1 Name - Maximum, !- Aggregation Type for Variable or Meter 1 - InteriorLights:DistrictCooling, !- Variable or Meter 1 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:DistrictCooling, !- Variable or Meter 2 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:DistrictCooling, !- Variable or Meter 3 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:DistrictCooling, !- Variable or Meter 4 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 - Fans:DistrictCooling, !- Variable or Meter 5 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 - Pumps:DistrictCooling, !- Variable or Meter 6 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 - Heating:DistrictCooling, !- Variable or Meter 7 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 - Cooling:DistrictCooling, !- Variable or Meter 8 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 - HeatRejection:DistrictCooling, !- Variable or Meter 9 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 - Humidifier:DistrictCooling, !- Variable or Meter 10 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:DistrictCooling,!- Variable or Meter 11 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 - WaterSystems:DistrictCooling,!- Variable or Meter 12 Name - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 - Cogeneration:DistrictCooling,!- Variable or Meter 13 Name - ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 13 + Building Energy Performance - District Cooling Peak Demand, !- Name + 2, !- Digits After Decimal + DistrictCooling:Facility, !- Variable or Meter Name 1 + Maximum, !- Aggregation Type for Variable or Meter 1 + InteriorLights:DistrictCooling, !- Variable or Meter Name 1 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 + ExteriorLights:DistrictCooling, !- Variable or Meter Name 2 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 + InteriorEquipment:DistrictCooling, !- Variable or Meter Name 3 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 + ExteriorEquipment:DistrictCooling, !- Variable or Meter Name 4 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 + Fans:DistrictCooling, !- Variable or Meter Name 5 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 + Pumps:DistrictCooling, !- Variable or Meter Name 6 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 + Heating:DistrictCooling, !- Variable or Meter Name 7 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 + Cooling:DistrictCooling, !- Variable or Meter Name 8 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 + HeatRejection:DistrictCooling, !- Variable or Meter Name 9 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 + Humidifier:DistrictCooling, !- Variable or Meter Name 10 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 + HeatRecovery:DistrictCooling, !- Variable or Meter Name 11 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 + WaterSystems:DistrictCooling, !- Variable or Meter Name 12 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 + Cogeneration:DistrictCooling, !- Variable or Meter Name 13 + ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 13 HEREDOC end end From fd05573994b707fa2e1fb4fd289cccafe4147771 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Tue, 12 Mar 2024 10:54:04 +0100 Subject: [PATCH 08/25] Increment the field comments properly (no change) --- .../jobs/resources/monthly_report.idf | 106 ++--- lib/openstudio/workflow/util/energyplus.rb | 442 +++++++++--------- 2 files changed, 274 insertions(+), 274 deletions(-) diff --git a/lib/openstudio/workflow/jobs/resources/monthly_report.idf b/lib/openstudio/workflow/jobs/resources/monthly_report.idf index bec548d..7a4c52b 100644 --- a/lib/openstudio/workflow/jobs/resources/monthly_report.idf +++ b/lib/openstudio/workflow/jobs/resources/monthly_report.idf @@ -113,111 +113,111 @@ Output:Table:Monthly, 2, !- Digits After Decimal Electricity:Facility, !- Variable or Meter Name 1 Maximum, !- Aggregation Type for Variable or Meter 1 - InteriorLights:Electricity, !- Variable or Meter Name 1 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:Electricity, !- Variable or Meter Name 2 + InteriorLights:Electricity, !- Variable or Meter Name 2 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:Electricity, !- Variable or Meter Name 3 + ExteriorLights:Electricity, !- Variable or Meter Name 3 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:Electricity, !- Variable or Meter Name 4 + InteriorEquipment:Electricity, !- Variable or Meter Name 4 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 - Fans:Electricity, !- Variable or Meter Name 5 + ExteriorEquipment:Electricity, !- Variable or Meter Name 5 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 - Pumps:Electricity, !- Variable or Meter Name 6 + Fans:Electricity, !- Variable or Meter Name 6 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 - Heating:Electricity, !- Variable or Meter Name 7 + Pumps:Electricity, !- Variable or Meter Name 7 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 - Cooling:Electricity, !- Variable or Meter Name 8 + Heating:Electricity, !- Variable or Meter Name 8 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 - HeatRejection:Electricity, !- Variable or Meter Name 9 + Cooling:Electricity, !- Variable or Meter Name 9 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 - Humidifier:Electricity, !- Variable or Meter Name 10 + HeatRejection:Electricity, !- Variable or Meter Name 10 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:Electricity, !- Variable or Meter Name 11 + Humidifier:Electricity, !- Variable or Meter Name 11 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 - WaterSystems:Electricity, !- Variable or Meter Name 12 + HeatRecovery:Electricity, !- Variable or Meter Name 12 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 - Cogeneration:Electricity, !- Variable or Meter Name 13 - ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 13 + WaterSystems:Electricity, !- Variable or Meter Name 13 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 13 + Cogeneration:Electricity, !- Variable or Meter Name 14 + ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 14 Output:Table:Monthly, Building Energy Performance - Natural Gas Peak Demand, !- Name 2, !- Digits After Decimal NaturalGas:Facility, !- Variable or Meter Name 1 Maximum, !- Aggregation Type for Variable or Meter 1 - InteriorEquipment:NaturalGas, !- Variable or Meter Name 1 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 - ExteriorEquipment:NaturalGas, !- Variable or Meter Name 2 + InteriorEquipment:NaturalGas, !- Variable or Meter Name 2 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 - Heating:NaturalGas, !- Variable or Meter Name 3 + ExteriorEquipment:NaturalGas, !- Variable or Meter Name 3 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 - Cooling:NaturalGas, !- Variable or Meter Name 4 + Heating:NaturalGas, !- Variable or Meter Name 4 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 - WaterSystems:NaturalGas, !- Variable or Meter Name 5 + Cooling:NaturalGas, !- Variable or Meter Name 5 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 - Cogeneration:NaturalGas, !- Variable or Meter Name 6 - ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 6 + WaterSystems:NaturalGas, !- Variable or Meter Name 6 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 + Cogeneration:NaturalGas, !- Variable or Meter Name 7 + ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 7 Output:Table:Monthly, Building Energy Performance - District Heating Peak Demand, !- Name 2, !- Digits After Decimal DistrictHeating:Facility, !- Variable or Meter Name 1 Maximum, !- Aggregation Type for Variable or Meter 1 - InteriorLights:DistrictHeating, !- Variable or Meter Name 1 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:DistrictHeating, !- Variable or Meter Name 2 + InteriorLights:DistrictHeating, !- Variable or Meter Name 2 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:DistrictHeating, !- Variable or Meter Name 3 + ExteriorLights:DistrictHeating, !- Variable or Meter Name 3 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:DistrictHeating, !- Variable or Meter Name 4 + InteriorEquipment:DistrictHeating, !- Variable or Meter Name 4 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 - Fans:DistrictHeating, !- Variable or Meter Name 5 + ExteriorEquipment:DistrictHeating, !- Variable or Meter Name 5 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 - Pumps:DistrictHeating, !- Variable or Meter Name 6 + Fans:DistrictHeating, !- Variable or Meter Name 6 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 - Heating:DistrictHeating, !- Variable or Meter Name 7 + Pumps:DistrictHeating, !- Variable or Meter Name 7 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 - Cooling:DistrictHeating, !- Variable or Meter Name 8 + Heating:DistrictHeating, !- Variable or Meter Name 8 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 - HeatRejection:DistrictHeating, !- Variable or Meter Name 9 + Cooling:DistrictHeating, !- Variable or Meter Name 9 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 - Humidifier:DistrictHeating, !- Variable or Meter Name 10 + HeatRejection:DistrictHeating, !- Variable or Meter Name 10 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:DistrictHeating, !- Variable or Meter Name 11 + Humidifier:DistrictHeating, !- Variable or Meter Name 11 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 - WaterSystems:DistrictHeating, !- Variable or Meter Name 12 + HeatRecovery:DistrictHeating, !- Variable or Meter Name 12 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 - Cogeneration:DistrictHeating, !- Variable or Meter Name 13 - ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 13 + WaterSystems:DistrictHeating, !- Variable or Meter Name 13 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 13 + Cogeneration:DistrictHeating, !- Variable or Meter Name 14 + ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 14 Output:Table:Monthly, Building Energy Performance - District Cooling Peak Demand, !- Name 2, !- Digits After Decimal DistrictCooling:Facility, !- Variable or Meter Name 1 Maximum, !- Aggregation Type for Variable or Meter 1 - InteriorLights:DistrictCooling, !- Variable or Meter Name 1 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:DistrictCooling, !- Variable or Meter Name 2 + InteriorLights:DistrictCooling, !- Variable or Meter Name 2 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:DistrictCooling, !- Variable or Meter Name 3 + ExteriorLights:DistrictCooling, !- Variable or Meter Name 3 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:DistrictCooling, !- Variable or Meter Name 4 + InteriorEquipment:DistrictCooling, !- Variable or Meter Name 4 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 - Fans:DistrictCooling, !- Variable or Meter Name 5 + ExteriorEquipment:DistrictCooling, !- Variable or Meter Name 5 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 - Pumps:DistrictCooling, !- Variable or Meter Name 6 + Fans:DistrictCooling, !- Variable or Meter Name 6 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 - Heating:DistrictCooling, !- Variable or Meter Name 7 + Pumps:DistrictCooling, !- Variable or Meter Name 7 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 - Cooling:DistrictCooling, !- Variable or Meter Name 8 + Heating:DistrictCooling, !- Variable or Meter Name 8 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 - HeatRejection:DistrictCooling, !- Variable or Meter Name 9 + Cooling:DistrictCooling, !- Variable or Meter Name 9 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 - Humidifier:DistrictCooling, !- Variable or Meter Name 10 + HeatRejection:DistrictCooling, !- Variable or Meter Name 10 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:DistrictCooling, !- Variable or Meter Name 11 + Humidifier:DistrictCooling, !- Variable or Meter Name 11 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 - WaterSystems:DistrictCooling, !- Variable or Meter Name 12 + HeatRecovery:DistrictCooling, !- Variable or Meter Name 12 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 - Cogeneration:DistrictCooling, !- Variable or Meter Name 13 - ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 13 + WaterSystems:DistrictCooling, !- Variable or Meter Name 13 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 13 + Cogeneration:DistrictCooling, !- Variable or Meter Name 14 + ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 14 diff --git a/lib/openstudio/workflow/util/energyplus.rb b/lib/openstudio/workflow/util/energyplus.rb index ba8e30f..d1a39f4 100644 --- a/lib/openstudio/workflow/util/energyplus.rb +++ b/lib/openstudio/workflow/util/energyplus.rb @@ -351,227 +351,227 @@ def self.merge_output_table_summary_reports(current_object, new_object) def self.monthly_report_idf_text <<~HEREDOC - Output:Table:Monthly, - Building Energy Performance - Electricity, !- Name - 2, !- Digits After Decimal - InteriorLights:Electricity, !- Variable or Meter Name 1 - SumOrAverage, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:Electricity, !- Variable or Meter Name 2 - SumOrAverage, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:Electricity, !- Variable or Meter Name 3 - SumOrAverage, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:Electricity, !- Variable or Meter Name 4 - SumOrAverage, !- Aggregation Type for Variable or Meter 4 - Fans:Electricity, !- Variable or Meter Name 5 - SumOrAverage, !- Aggregation Type for Variable or Meter 5 - Pumps:Electricity, !- Variable or Meter Name 6 - SumOrAverage, !- Aggregation Type for Variable or Meter 6 - Heating:Electricity, !- Variable or Meter Name 7 - SumOrAverage, !- Aggregation Type for Variable or Meter 7 - Cooling:Electricity, !- Variable or Meter Name 8 - SumOrAverage, !- Aggregation Type for Variable or Meter 8 - HeatRejection:Electricity, !- Variable or Meter Name 9 - SumOrAverage, !- Aggregation Type for Variable or Meter 9 - Humidifier:Electricity, !- Variable or Meter Name 10 - SumOrAverage, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:Electricity, !- Variable or Meter Name 11 - SumOrAverage, !- Aggregation Type for Variable or Meter 11 - WaterSystems:Electricity, !- Variable or Meter Name 12 - SumOrAverage, !- Aggregation Type for Variable or Meter 12 - Cogeneration:Electricity, !- Variable or Meter Name 13 - SumOrAverage, !- Aggregation Type for Variable or Meter 13 - Refrigeration:Electricity, !- Variable or Meter Name 14 - SumOrAverage; !- Aggregation Type for Variable or Meter 14 - - Output:Table:Monthly, - Building Energy Performance - Natural Gas, !- Name - 2, !- Digits After Decimal - InteriorEquipment:NaturalGas, !- Variable or Meter Name 1 - SumOrAverage, !- Aggregation Type for Variable or Meter 1 - ExteriorEquipment:NaturalGas, !- Variable or Meter Name 2 - SumOrAverage, !- Aggregation Type for Variable or Meter 2 - Heating:NaturalGas, !- Variable or Meter Name 3 - SumOrAverage, !- Aggregation Type for Variable or Meter 3 - Cooling:NaturalGas, !- Variable or Meter Name 4 - SumOrAverage, !- Aggregation Type for Variable or Meter 4 - WaterSystems:NaturalGas, !- Variable or Meter Name 5 - SumOrAverage, !- Aggregation Type for Variable or Meter 5 - Cogeneration:NaturalGas, !- Variable or Meter Name 6 - SumOrAverage; !- Aggregation Type for Variable or Meter 6 - - Output:Table:Monthly, - Building Energy Performance - District Heating, !- Name - 2, !- Digits After Decimal - InteriorLights:DistrictHeating, !- Variable or Meter Name 1 - SumOrAverage, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:DistrictHeating, !- Variable or Meter Name 2 - SumOrAverage, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:DistrictHeating, !- Variable or Meter Name 3 - SumOrAverage, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:DistrictHeating, !- Variable or Meter Name 4 - SumOrAverage, !- Aggregation Type for Variable or Meter 4 - Fans:DistrictHeating, !- Variable or Meter Name 5 - SumOrAverage, !- Aggregation Type for Variable or Meter 5 - Pumps:DistrictHeating, !- Variable or Meter Name 6 - SumOrAverage, !- Aggregation Type for Variable or Meter 6 - Heating:DistrictHeating, !- Variable or Meter Name 7 - SumOrAverage, !- Aggregation Type for Variable or Meter 7 - Cooling:DistrictHeating, !- Variable or Meter Name 8 - SumOrAverage, !- Aggregation Type for Variable or Meter 8 - HeatRejection:DistrictHeating, !- Variable or Meter Name 9 - SumOrAverage, !- Aggregation Type for Variable or Meter 9 - Humidifier:DistrictHeating, !- Variable or Meter Name 10 - SumOrAverage, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:DistrictHeating, !- Variable or Meter Name 11 - SumOrAverage, !- Aggregation Type for Variable or Meter 11 - WaterSystems:DistrictHeating, !- Variable or Meter Name 12 - SumOrAverage, !- Aggregation Type for Variable or Meter 12 - Cogeneration:DistrictHeating, !- Variable or Meter Name 13 - SumOrAverage; !- Aggregation Type for Variable or Meter 13 - - Output:Table:Monthly, - Building Energy Performance - District Cooling, !- Name - 2, !- Digits After Decimal - InteriorLights:DistrictCooling, !- Variable or Meter Name 1 - SumOrAverage, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:DistrictCooling, !- Variable or Meter Name 2 - SumOrAverage, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:DistrictCooling, !- Variable or Meter Name 3 - SumOrAverage, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:DistrictCooling, !- Variable or Meter Name 4 - SumOrAverage, !- Aggregation Type for Variable or Meter 4 - Fans:DistrictCooling, !- Variable or Meter Name 5 - SumOrAverage, !- Aggregation Type for Variable or Meter 5 - Pumps:DistrictCooling, !- Variable or Meter Name 6 - SumOrAverage, !- Aggregation Type for Variable or Meter 6 - Heating:DistrictCooling, !- Variable or Meter Name 7 - SumOrAverage, !- Aggregation Type for Variable or Meter 7 - Cooling:DistrictCooling, !- Variable or Meter Name 8 - SumOrAverage, !- Aggregation Type for Variable or Meter 8 - HeatRejection:DistrictCooling, !- Variable or Meter Name 9 - SumOrAverage, !- Aggregation Type for Variable or Meter 9 - Humidifier:DistrictCooling, !- Variable or Meter Name 10 - SumOrAverage, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:DistrictCooling, !- Variable or Meter Name 11 - SumOrAverage, !- Aggregation Type for Variable or Meter 11 - WaterSystems:DistrictCooling, !- Variable or Meter Name 12 - SumOrAverage, !- Aggregation Type for Variable or Meter 12 - Cogeneration:DistrictCooling, !- Variable or Meter Name 13 - SumOrAverage; !- Aggregation Type for Variable or Meter 13 - - Output:Table:Monthly, - Building Energy Performance - Electricity Peak Demand, !- Name - 2, !- Digits After Decimal - Electricity:Facility, !- Variable or Meter Name 1 - Maximum, !- Aggregation Type for Variable or Meter 1 - InteriorLights:Electricity, !- Variable or Meter Name 1 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:Electricity, !- Variable or Meter Name 2 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:Electricity, !- Variable or Meter Name 3 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:Electricity, !- Variable or Meter Name 4 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 - Fans:Electricity, !- Variable or Meter Name 5 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 - Pumps:Electricity, !- Variable or Meter Name 6 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 - Heating:Electricity, !- Variable or Meter Name 7 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 - Cooling:Electricity, !- Variable or Meter Name 8 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 - HeatRejection:Electricity, !- Variable or Meter Name 9 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 - Humidifier:Electricity, !- Variable or Meter Name 10 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:Electricity, !- Variable or Meter Name 11 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 - WaterSystems:Electricity, !- Variable or Meter Name 12 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 - Cogeneration:Electricity, !- Variable or Meter Name 13 - ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 13 - - Output:Table:Monthly, - Building Energy Performance - Natural Gas Peak Demand, !- Name - 2, !- Digits After Decimal - NaturalGas:Facility, !- Variable or Meter Name 1 - Maximum, !- Aggregation Type for Variable or Meter 1 - InteriorEquipment:NaturalGas, !- Variable or Meter Name 1 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 - ExteriorEquipment:NaturalGas, !- Variable or Meter Name 2 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 - Heating:NaturalGas, !- Variable or Meter Name 3 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 - Cooling:NaturalGas, !- Variable or Meter Name 4 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 - WaterSystems:NaturalGas, !- Variable or Meter Name 5 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 - Cogeneration:NaturalGas, !- Variable or Meter Name 6 - ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 6 - - Output:Table:Monthly, - Building Energy Performance - District Heating Peak Demand, !- Name - 2, !- Digits After Decimal - DistrictHeating:Facility, !- Variable or Meter Name 1 - Maximum, !- Aggregation Type for Variable or Meter 1 - InteriorLights:DistrictHeating, !- Variable or Meter Name 1 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:DistrictHeating, !- Variable or Meter Name 2 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:DistrictHeating, !- Variable or Meter Name 3 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:DistrictHeating, !- Variable or Meter Name 4 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 - Fans:DistrictHeating, !- Variable or Meter Name 5 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 - Pumps:DistrictHeating, !- Variable or Meter Name 6 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 - Heating:DistrictHeating, !- Variable or Meter Name 7 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 - Cooling:DistrictHeating, !- Variable or Meter Name 8 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 - HeatRejection:DistrictHeating, !- Variable or Meter Name 9 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 - Humidifier:DistrictHeating, !- Variable or Meter Name 10 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:DistrictHeating, !- Variable or Meter Name 11 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 - WaterSystems:DistrictHeating, !- Variable or Meter Name 12 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 - Cogeneration:DistrictHeating, !- Variable or Meter Name 13 - ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 13 - - Output:Table:Monthly, - Building Energy Performance - District Cooling Peak Demand, !- Name - 2, !- Digits After Decimal - DistrictCooling:Facility, !- Variable or Meter Name 1 - Maximum, !- Aggregation Type for Variable or Meter 1 - InteriorLights:DistrictCooling, !- Variable or Meter Name 1 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:DistrictCooling, !- Variable or Meter Name 2 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:DistrictCooling, !- Variable or Meter Name 3 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:DistrictCooling, !- Variable or Meter Name 4 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 - Fans:DistrictCooling, !- Variable or Meter Name 5 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 - Pumps:DistrictCooling, !- Variable or Meter Name 6 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 - Heating:DistrictCooling, !- Variable or Meter Name 7 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 - Cooling:DistrictCooling, !- Variable or Meter Name 8 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 - HeatRejection:DistrictCooling, !- Variable or Meter Name 9 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 - Humidifier:DistrictCooling, !- Variable or Meter Name 10 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:DistrictCooling, !- Variable or Meter Name 11 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 - WaterSystems:DistrictCooling, !- Variable or Meter Name 12 - ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 - Cogeneration:DistrictCooling, !- Variable or Meter Name 13 - ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 13 +Output:Table:Monthly, + Building Energy Performance - Electricity, !- Name + 2, !- Digits After Decimal + InteriorLights:Electricity, !- Variable or Meter Name 1 + SumOrAverage, !- Aggregation Type for Variable or Meter 1 + ExteriorLights:Electricity, !- Variable or Meter Name 2 + SumOrAverage, !- Aggregation Type for Variable or Meter 2 + InteriorEquipment:Electricity, !- Variable or Meter Name 3 + SumOrAverage, !- Aggregation Type for Variable or Meter 3 + ExteriorEquipment:Electricity, !- Variable or Meter Name 4 + SumOrAverage, !- Aggregation Type for Variable or Meter 4 + Fans:Electricity, !- Variable or Meter Name 5 + SumOrAverage, !- Aggregation Type for Variable or Meter 5 + Pumps:Electricity, !- Variable or Meter Name 6 + SumOrAverage, !- Aggregation Type for Variable or Meter 6 + Heating:Electricity, !- Variable or Meter Name 7 + SumOrAverage, !- Aggregation Type for Variable or Meter 7 + Cooling:Electricity, !- Variable or Meter Name 8 + SumOrAverage, !- Aggregation Type for Variable or Meter 8 + HeatRejection:Electricity, !- Variable or Meter Name 9 + SumOrAverage, !- Aggregation Type for Variable or Meter 9 + Humidifier:Electricity, !- Variable or Meter Name 10 + SumOrAverage, !- Aggregation Type for Variable or Meter 10 + HeatRecovery:Electricity, !- Variable or Meter Name 11 + SumOrAverage, !- Aggregation Type for Variable or Meter 11 + WaterSystems:Electricity, !- Variable or Meter Name 12 + SumOrAverage, !- Aggregation Type for Variable or Meter 12 + Cogeneration:Electricity, !- Variable or Meter Name 13 + SumOrAverage, !- Aggregation Type for Variable or Meter 13 + Refrigeration:Electricity, !- Variable or Meter Name 14 + SumOrAverage; !- Aggregation Type for Variable or Meter 14 + +Output:Table:Monthly, + Building Energy Performance - Natural Gas, !- Name + 2, !- Digits After Decimal + InteriorEquipment:NaturalGas, !- Variable or Meter Name 1 + SumOrAverage, !- Aggregation Type for Variable or Meter 1 + ExteriorEquipment:NaturalGas, !- Variable or Meter Name 2 + SumOrAverage, !- Aggregation Type for Variable or Meter 2 + Heating:NaturalGas, !- Variable or Meter Name 3 + SumOrAverage, !- Aggregation Type for Variable or Meter 3 + Cooling:NaturalGas, !- Variable or Meter Name 4 + SumOrAverage, !- Aggregation Type for Variable or Meter 4 + WaterSystems:NaturalGas, !- Variable or Meter Name 5 + SumOrAverage, !- Aggregation Type for Variable or Meter 5 + Cogeneration:NaturalGas, !- Variable or Meter Name 6 + SumOrAverage; !- Aggregation Type for Variable or Meter 6 + +Output:Table:Monthly, + Building Energy Performance - District Heating, !- Name + 2, !- Digits After Decimal + InteriorLights:DistrictHeating, !- Variable or Meter Name 1 + SumOrAverage, !- Aggregation Type for Variable or Meter 1 + ExteriorLights:DistrictHeating, !- Variable or Meter Name 2 + SumOrAverage, !- Aggregation Type for Variable or Meter 2 + InteriorEquipment:DistrictHeating, !- Variable or Meter Name 3 + SumOrAverage, !- Aggregation Type for Variable or Meter 3 + ExteriorEquipment:DistrictHeating, !- Variable or Meter Name 4 + SumOrAverage, !- Aggregation Type for Variable or Meter 4 + Fans:DistrictHeating, !- Variable or Meter Name 5 + SumOrAverage, !- Aggregation Type for Variable or Meter 5 + Pumps:DistrictHeating, !- Variable or Meter Name 6 + SumOrAverage, !- Aggregation Type for Variable or Meter 6 + Heating:DistrictHeating, !- Variable or Meter Name 7 + SumOrAverage, !- Aggregation Type for Variable or Meter 7 + Cooling:DistrictHeating, !- Variable or Meter Name 8 + SumOrAverage, !- Aggregation Type for Variable or Meter 8 + HeatRejection:DistrictHeating, !- Variable or Meter Name 9 + SumOrAverage, !- Aggregation Type for Variable or Meter 9 + Humidifier:DistrictHeating, !- Variable or Meter Name 10 + SumOrAverage, !- Aggregation Type for Variable or Meter 10 + HeatRecovery:DistrictHeating, !- Variable or Meter Name 11 + SumOrAverage, !- Aggregation Type for Variable or Meter 11 + WaterSystems:DistrictHeating, !- Variable or Meter Name 12 + SumOrAverage, !- Aggregation Type for Variable or Meter 12 + Cogeneration:DistrictHeating, !- Variable or Meter Name 13 + SumOrAverage; !- Aggregation Type for Variable or Meter 13 + +Output:Table:Monthly, + Building Energy Performance - District Cooling, !- Name + 2, !- Digits After Decimal + InteriorLights:DistrictCooling, !- Variable or Meter Name 1 + SumOrAverage, !- Aggregation Type for Variable or Meter 1 + ExteriorLights:DistrictCooling, !- Variable or Meter Name 2 + SumOrAverage, !- Aggregation Type for Variable or Meter 2 + InteriorEquipment:DistrictCooling, !- Variable or Meter Name 3 + SumOrAverage, !- Aggregation Type for Variable or Meter 3 + ExteriorEquipment:DistrictCooling, !- Variable or Meter Name 4 + SumOrAverage, !- Aggregation Type for Variable or Meter 4 + Fans:DistrictCooling, !- Variable or Meter Name 5 + SumOrAverage, !- Aggregation Type for Variable or Meter 5 + Pumps:DistrictCooling, !- Variable or Meter Name 6 + SumOrAverage, !- Aggregation Type for Variable or Meter 6 + Heating:DistrictCooling, !- Variable or Meter Name 7 + SumOrAverage, !- Aggregation Type for Variable or Meter 7 + Cooling:DistrictCooling, !- Variable or Meter Name 8 + SumOrAverage, !- Aggregation Type for Variable or Meter 8 + HeatRejection:DistrictCooling, !- Variable or Meter Name 9 + SumOrAverage, !- Aggregation Type for Variable or Meter 9 + Humidifier:DistrictCooling, !- Variable or Meter Name 10 + SumOrAverage, !- Aggregation Type for Variable or Meter 10 + HeatRecovery:DistrictCooling, !- Variable or Meter Name 11 + SumOrAverage, !- Aggregation Type for Variable or Meter 11 + WaterSystems:DistrictCooling, !- Variable or Meter Name 12 + SumOrAverage, !- Aggregation Type for Variable or Meter 12 + Cogeneration:DistrictCooling, !- Variable or Meter Name 13 + SumOrAverage; !- Aggregation Type for Variable or Meter 13 + +Output:Table:Monthly, + Building Energy Performance - Electricity Peak Demand, !- Name + 2, !- Digits After Decimal + Electricity:Facility, !- Variable or Meter Name 1 + Maximum, !- Aggregation Type for Variable or Meter 1 + InteriorLights:Electricity, !- Variable or Meter Name 2 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 + ExteriorLights:Electricity, !- Variable or Meter Name 3 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 + InteriorEquipment:Electricity, !- Variable or Meter Name 4 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 + ExteriorEquipment:Electricity, !- Variable or Meter Name 5 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 + Fans:Electricity, !- Variable or Meter Name 6 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 + Pumps:Electricity, !- Variable or Meter Name 7 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 + Heating:Electricity, !- Variable or Meter Name 8 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 + Cooling:Electricity, !- Variable or Meter Name 9 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 + HeatRejection:Electricity, !- Variable or Meter Name 10 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 + Humidifier:Electricity, !- Variable or Meter Name 11 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 + HeatRecovery:Electricity, !- Variable or Meter Name 12 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 + WaterSystems:Electricity, !- Variable or Meter Name 13 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 13 + Cogeneration:Electricity, !- Variable or Meter Name 14 + ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 14 + +Output:Table:Monthly, + Building Energy Performance - Natural Gas Peak Demand, !- Name + 2, !- Digits After Decimal + NaturalGas:Facility, !- Variable or Meter Name 1 + Maximum, !- Aggregation Type for Variable or Meter 1 + InteriorEquipment:NaturalGas, !- Variable or Meter Name 2 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 + ExteriorEquipment:NaturalGas, !- Variable or Meter Name 3 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 + Heating:NaturalGas, !- Variable or Meter Name 4 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 + Cooling:NaturalGas, !- Variable or Meter Name 5 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 + WaterSystems:NaturalGas, !- Variable or Meter Name 6 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 + Cogeneration:NaturalGas, !- Variable or Meter Name 7 + ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 7 + +Output:Table:Monthly, + Building Energy Performance - District Heating Peak Demand, !- Name + 2, !- Digits After Decimal + DistrictHeating:Facility, !- Variable or Meter Name 1 + Maximum, !- Aggregation Type for Variable or Meter 1 + InteriorLights:DistrictHeating, !- Variable or Meter Name 2 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 + ExteriorLights:DistrictHeating, !- Variable or Meter Name 3 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 + InteriorEquipment:DistrictHeating, !- Variable or Meter Name 4 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 + ExteriorEquipment:DistrictHeating, !- Variable or Meter Name 5 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 + Fans:DistrictHeating, !- Variable or Meter Name 6 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 + Pumps:DistrictHeating, !- Variable or Meter Name 7 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 + Heating:DistrictHeating, !- Variable or Meter Name 8 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 + Cooling:DistrictHeating, !- Variable or Meter Name 9 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 + HeatRejection:DistrictHeating, !- Variable or Meter Name 10 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 + Humidifier:DistrictHeating, !- Variable or Meter Name 11 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 + HeatRecovery:DistrictHeating, !- Variable or Meter Name 12 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 + WaterSystems:DistrictHeating, !- Variable or Meter Name 13 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 13 + Cogeneration:DistrictHeating, !- Variable or Meter Name 14 + ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 14 + +Output:Table:Monthly, + Building Energy Performance - District Cooling Peak Demand, !- Name + 2, !- Digits After Decimal + DistrictCooling:Facility, !- Variable or Meter Name 1 + Maximum, !- Aggregation Type for Variable or Meter 1 + InteriorLights:DistrictCooling, !- Variable or Meter Name 2 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 + ExteriorLights:DistrictCooling, !- Variable or Meter Name 3 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 + InteriorEquipment:DistrictCooling, !- Variable or Meter Name 4 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 + ExteriorEquipment:DistrictCooling, !- Variable or Meter Name 5 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 + Fans:DistrictCooling, !- Variable or Meter Name 6 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 + Pumps:DistrictCooling, !- Variable or Meter Name 7 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 + Heating:DistrictCooling, !- Variable or Meter Name 8 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 + Cooling:DistrictCooling, !- Variable or Meter Name 9 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 + HeatRejection:DistrictCooling, !- Variable or Meter Name 10 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 + Humidifier:DistrictCooling, !- Variable or Meter Name 11 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 + HeatRecovery:DistrictCooling, !- Variable or Meter Name 12 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 + WaterSystems:DistrictCooling, !- Variable or Meter Name 13 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 13 + Cogeneration:DistrictCooling, !- Variable or Meter Name 14 + ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 14 HEREDOC end end From 32f37e2d00c103fd6d59d8573c7134d3ddf83b0a Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Tue, 12 Mar 2024 11:00:09 +0100 Subject: [PATCH 09/25] #5101 - Update monthly reports for DistrictHeating * Note for the name of the Output:Table:Monthly: AFAIK, this is OpenStudio::EndUseFuelType::valueDescription that is used by reporting measures so I made the change as well, perhaps some of them harcoded it to "District Heating", I'm not sure * `Electricity Peak Demand` was missing Refrigeration EUT cf https://github.com/NREL/OpenStudio/issues/5101 --- .../jobs/resources/monthly_report.idf | 65 ++++++++++--------- lib/openstudio/workflow/util/energyplus.rb | 65 ++++++++++--------- 2 files changed, 67 insertions(+), 63 deletions(-) diff --git a/lib/openstudio/workflow/jobs/resources/monthly_report.idf b/lib/openstudio/workflow/jobs/resources/monthly_report.idf index 7a4c52b..edfaa03 100644 --- a/lib/openstudio/workflow/jobs/resources/monthly_report.idf +++ b/lib/openstudio/workflow/jobs/resources/monthly_report.idf @@ -1,4 +1,5 @@ -Version,9.4; +Version, + 23.2.0; !- Version Identifier Output:Table:Monthly, Building Energy Performance - Electricity, !- Name @@ -49,33 +50,33 @@ Output:Table:Monthly, SumOrAverage; !- Aggregation Type for Variable or Meter 6 Output:Table:Monthly, - Building Energy Performance - District Heating, !- Name + Building Energy Performance - District Heating Water, !- Name 2, !- Digits After Decimal - InteriorLights:DistrictHeating, !- Variable or Meter Name 1 + InteriorLights:DistrictHeatingWater, !- Variable or Meter Name 1 SumOrAverage, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:DistrictHeating, !- Variable or Meter Name 2 + ExteriorLights:DistrictHeatingWater, !- Variable or Meter Name 2 SumOrAverage, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:DistrictHeating, !- Variable or Meter Name 3 + InteriorEquipment:DistrictHeatingWater, !- Variable or Meter Name 3 SumOrAverage, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:DistrictHeating, !- Variable or Meter Name 4 + ExteriorEquipment:DistrictHeatingWater, !- Variable or Meter Name 4 SumOrAverage, !- Aggregation Type for Variable or Meter 4 - Fans:DistrictHeating, !- Variable or Meter Name 5 + Fans:DistrictHeatingWater, !- Variable or Meter Name 5 SumOrAverage, !- Aggregation Type for Variable or Meter 5 - Pumps:DistrictHeating, !- Variable or Meter Name 6 + Pumps:DistrictHeatingWater, !- Variable or Meter Name 6 SumOrAverage, !- Aggregation Type for Variable or Meter 6 - Heating:DistrictHeating, !- Variable or Meter Name 7 + Heating:DistrictHeatingWater, !- Variable or Meter Name 7 SumOrAverage, !- Aggregation Type for Variable or Meter 7 - Cooling:DistrictHeating, !- Variable or Meter Name 8 + Cooling:DistrictHeatingWater, !- Variable or Meter Name 8 SumOrAverage, !- Aggregation Type for Variable or Meter 8 - HeatRejection:DistrictHeating, !- Variable or Meter Name 9 + HeatRejection:DistrictHeatingWater, !- Variable or Meter Name 9 SumOrAverage, !- Aggregation Type for Variable or Meter 9 - Humidifier:DistrictHeating, !- Variable or Meter Name 10 + Humidifier:DistrictHeatingWater, !- Variable or Meter Name 10 SumOrAverage, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:DistrictHeating, !- Variable or Meter Name 11 + HeatRecovery:DistrictHeatingWater, !- Variable or Meter Name 11 SumOrAverage, !- Aggregation Type for Variable or Meter 11 - WaterSystems:DistrictHeating, !- Variable or Meter Name 12 + WaterSystems:DistrictHeatingWater, !- Variable or Meter Name 12 SumOrAverage, !- Aggregation Type for Variable or Meter 12 - Cogeneration:DistrictHeating, !- Variable or Meter Name 13 + Cogeneration:DistrictHeatingWater, !- Variable or Meter Name 13 SumOrAverage; !- Aggregation Type for Variable or Meter 13 Output:Table:Monthly, @@ -138,7 +139,9 @@ Output:Table:Monthly, WaterSystems:Electricity, !- Variable or Meter Name 13 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 13 Cogeneration:Electricity, !- Variable or Meter Name 14 - ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 14 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 14 + Refrigeration:Electricity, !- Variable or Meter Name 15 + ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 15 Output:Table:Monthly, Building Energy Performance - Natural Gas Peak Demand, !- Name @@ -159,35 +162,35 @@ Output:Table:Monthly, ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 7 Output:Table:Monthly, - Building Energy Performance - District Heating Peak Demand, !- Name + Building Energy Performance - District Heating Water Peak Demand, !- Name 2, !- Digits After Decimal - DistrictHeating:Facility, !- Variable or Meter Name 1 + DistrictHeatingWater:Facility, !- Variable or Meter Name 1 Maximum, !- Aggregation Type for Variable or Meter 1 - InteriorLights:DistrictHeating, !- Variable or Meter Name 2 + InteriorLights:DistrictHeatingWater, !- Variable or Meter Name 2 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 - ExteriorLights:DistrictHeating, !- Variable or Meter Name 3 + ExteriorLights:DistrictHeatingWater, !- Variable or Meter Name 3 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 - InteriorEquipment:DistrictHeating, !- Variable or Meter Name 4 + InteriorEquipment:DistrictHeatingWater, !- Variable or Meter Name 4 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 - ExteriorEquipment:DistrictHeating, !- Variable or Meter Name 5 + ExteriorEquipment:DistrictHeatingWater, !- Variable or Meter Name 5 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 - Fans:DistrictHeating, !- Variable or Meter Name 6 + Fans:DistrictHeatingWater, !- Variable or Meter Name 6 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 - Pumps:DistrictHeating, !- Variable or Meter Name 7 + Pumps:DistrictHeatingWater, !- Variable or Meter Name 7 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 - Heating:DistrictHeating, !- Variable or Meter Name 8 + Heating:DistrictHeatingWater, !- Variable or Meter Name 8 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 - Cooling:DistrictHeating, !- Variable or Meter Name 9 + Cooling:DistrictHeatingWater, !- Variable or Meter Name 9 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 - HeatRejection:DistrictHeating, !- Variable or Meter Name 10 + HeatRejection:DistrictHeatingWater, !- Variable or Meter Name 10 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 - Humidifier:DistrictHeating, !- Variable or Meter Name 11 + Humidifier:DistrictHeatingWater, !- Variable or Meter Name 11 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 - HeatRecovery:DistrictHeating, !- Variable or Meter Name 12 + HeatRecovery:DistrictHeatingWater, !- Variable or Meter Name 12 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 - WaterSystems:DistrictHeating, !- Variable or Meter Name 13 + WaterSystems:DistrictHeatingWater, !- Variable or Meter Name 13 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 13 - Cogeneration:DistrictHeating, !- Variable or Meter Name 14 + Cogeneration:DistrictHeatingWater, !- Variable or Meter Name 14 ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 14 Output:Table:Monthly, diff --git a/lib/openstudio/workflow/util/energyplus.rb b/lib/openstudio/workflow/util/energyplus.rb index d1a39f4..845ea04 100644 --- a/lib/openstudio/workflow/util/energyplus.rb +++ b/lib/openstudio/workflow/util/energyplus.rb @@ -400,33 +400,33 @@ def self.monthly_report_idf_text SumOrAverage; !- Aggregation Type for Variable or Meter 6 Output:Table:Monthly, - Building Energy Performance - District Heating, !- Name + Building Energy Performance - District Heating Water, !- Name 2, !- Digits After Decimal - InteriorLights:DistrictHeating, !- Variable or Meter Name 1 + InteriorLights:DistrictHeatingWater, !- Variable or Meter Name 1 SumOrAverage, !- Aggregation Type for Variable or Meter 1 - ExteriorLights:DistrictHeating, !- Variable or Meter Name 2 + ExteriorLights:DistrictHeatingWater, !- Variable or Meter Name 2 SumOrAverage, !- Aggregation Type for Variable or Meter 2 - InteriorEquipment:DistrictHeating, !- Variable or Meter Name 3 + InteriorEquipment:DistrictHeatingWater, !- Variable or Meter Name 3 SumOrAverage, !- Aggregation Type for Variable or Meter 3 - ExteriorEquipment:DistrictHeating, !- Variable or Meter Name 4 + ExteriorEquipment:DistrictHeatingWater, !- Variable or Meter Name 4 SumOrAverage, !- Aggregation Type for Variable or Meter 4 - Fans:DistrictHeating, !- Variable or Meter Name 5 + Fans:DistrictHeatingWater, !- Variable or Meter Name 5 SumOrAverage, !- Aggregation Type for Variable or Meter 5 - Pumps:DistrictHeating, !- Variable or Meter Name 6 + Pumps:DistrictHeatingWater, !- Variable or Meter Name 6 SumOrAverage, !- Aggregation Type for Variable or Meter 6 - Heating:DistrictHeating, !- Variable or Meter Name 7 + Heating:DistrictHeatingWater, !- Variable or Meter Name 7 SumOrAverage, !- Aggregation Type for Variable or Meter 7 - Cooling:DistrictHeating, !- Variable or Meter Name 8 + Cooling:DistrictHeatingWater, !- Variable or Meter Name 8 SumOrAverage, !- Aggregation Type for Variable or Meter 8 - HeatRejection:DistrictHeating, !- Variable or Meter Name 9 + HeatRejection:DistrictHeatingWater, !- Variable or Meter Name 9 SumOrAverage, !- Aggregation Type for Variable or Meter 9 - Humidifier:DistrictHeating, !- Variable or Meter Name 10 + Humidifier:DistrictHeatingWater, !- Variable or Meter Name 10 SumOrAverage, !- Aggregation Type for Variable or Meter 10 - HeatRecovery:DistrictHeating, !- Variable or Meter Name 11 + HeatRecovery:DistrictHeatingWater, !- Variable or Meter Name 11 SumOrAverage, !- Aggregation Type for Variable or Meter 11 - WaterSystems:DistrictHeating, !- Variable or Meter Name 12 + WaterSystems:DistrictHeatingWater, !- Variable or Meter Name 12 SumOrAverage, !- Aggregation Type for Variable or Meter 12 - Cogeneration:DistrictHeating, !- Variable or Meter Name 13 + Cogeneration:DistrictHeatingWater, !- Variable or Meter Name 13 SumOrAverage; !- Aggregation Type for Variable or Meter 13 Output:Table:Monthly, @@ -489,7 +489,9 @@ def self.monthly_report_idf_text WaterSystems:Electricity, !- Variable or Meter Name 13 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 13 Cogeneration:Electricity, !- Variable or Meter Name 14 - ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 14 + ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 14 + Refrigeration:Electricity, !- Variable or Meter Name 15 + ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 15 Output:Table:Monthly, Building Energy Performance - Natural Gas Peak Demand, !- Name @@ -510,35 +512,35 @@ def self.monthly_report_idf_text ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 7 Output:Table:Monthly, - Building Energy Performance - District Heating Peak Demand, !- Name + Building Energy Performance - District Heating Water Peak Demand, !- Name 2, !- Digits After Decimal - DistrictHeating:Facility, !- Variable or Meter Name 1 + DistrictHeatingWater:Facility, !- Variable or Meter Name 1 Maximum, !- Aggregation Type for Variable or Meter 1 - InteriorLights:DistrictHeating, !- Variable or Meter Name 2 + InteriorLights:DistrictHeatingWater, !- Variable or Meter Name 2 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2 - ExteriorLights:DistrictHeating, !- Variable or Meter Name 3 + ExteriorLights:DistrictHeatingWater, !- Variable or Meter Name 3 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 3 - InteriorEquipment:DistrictHeating, !- Variable or Meter Name 4 + InteriorEquipment:DistrictHeatingWater, !- Variable or Meter Name 4 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 4 - ExteriorEquipment:DistrictHeating, !- Variable or Meter Name 5 + ExteriorEquipment:DistrictHeatingWater, !- Variable or Meter Name 5 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 5 - Fans:DistrictHeating, !- Variable or Meter Name 6 + Fans:DistrictHeatingWater, !- Variable or Meter Name 6 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 6 - Pumps:DistrictHeating, !- Variable or Meter Name 7 + Pumps:DistrictHeatingWater, !- Variable or Meter Name 7 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 7 - Heating:DistrictHeating, !- Variable or Meter Name 8 + Heating:DistrictHeatingWater, !- Variable or Meter Name 8 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 8 - Cooling:DistrictHeating, !- Variable or Meter Name 9 + Cooling:DistrictHeatingWater, !- Variable or Meter Name 9 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 9 - HeatRejection:DistrictHeating, !- Variable or Meter Name 10 + HeatRejection:DistrictHeatingWater, !- Variable or Meter Name 10 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 10 - Humidifier:DistrictHeating, !- Variable or Meter Name 11 + Humidifier:DistrictHeatingWater, !- Variable or Meter Name 11 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 11 - HeatRecovery:DistrictHeating, !- Variable or Meter Name 12 + HeatRecovery:DistrictHeatingWater, !- Variable or Meter Name 12 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 12 - WaterSystems:DistrictHeating, !- Variable or Meter Name 13 + WaterSystems:DistrictHeatingWater, !- Variable or Meter Name 13 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 13 - Cogeneration:DistrictHeating, !- Variable or Meter Name 14 + Cogeneration:DistrictHeatingWater, !- Variable or Meter Name 14 ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 14 Output:Table:Monthly, @@ -571,8 +573,7 @@ def self.monthly_report_idf_text WaterSystems:DistrictCooling, !- Variable or Meter Name 13 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 13 Cogeneration:DistrictCooling, !- Variable or Meter Name 14 - ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 14 - HEREDOC + ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 14 HEREDOC end end end From dcb1ba5f34446b9aaab13ea5147f396b8a4f2759 Mon Sep 17 00:00:00 2001 From: David Goldwasser Date: Wed, 17 Apr 2024 12:12:27 -0600 Subject: [PATCH 10/25] Requiring Ruby 3.2 --- CHANGELOG.md | 4 ++++ LICENSE.txt | 2 +- lib/openstudio/workflow/version.rb | 2 +- openstudio-workflow.gemspec | 7 ++++--- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index acabad2..bb76bba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ OpenStudio::Workflow Change Log ================================== +Version 2.3.1 +------------- +* Minimum Ruby version upgraded to 3.2 + Version 2.3.1 ------------- * Forward translation when !@run_options.get.forwardTranslateOptions().empty? diff --git a/LICENSE.txt b/LICENSE.txt index f1603f6..6fab4e2 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -OpenStudio(R), Copyright (c) 2008, 2023 Alliance for Sustainable Energy, LLC. +OpenStudio(R), Copyright (c) 2008, 2024 Alliance for Sustainable Energy, LLC. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/lib/openstudio/workflow/version.rb b/lib/openstudio/workflow/version.rb index 08ef7c9..c90a79f 100644 --- a/lib/openstudio/workflow/version.rb +++ b/lib/openstudio/workflow/version.rb @@ -7,6 +7,6 @@ module OpenStudio module Workflow - VERSION = '2.3.1' # Suffixes must have periods (not dashes) + VERSION = '2.4.0' # Suffixes must have periods (not dashes) end end diff --git a/openstudio-workflow.gemspec b/openstudio-workflow.gemspec index eb4c4b2..d9e4e37 100644 --- a/openstudio-workflow.gemspec +++ b/openstudio-workflow.gemspec @@ -19,14 +19,15 @@ Gem::Specification.new do |s| s.files = Dir.glob('lib/**/*') + ['README.md', 'CHANGELOG.md', 'Rakefile'] s.require_path = 'lib' + s.required_ruby_version = '~> 3.2' + s.add_development_dependency 'builder', '~> 3.2.4' - s.add_development_dependency 'bundler', '>= 2.1.0' + s.add_development_dependency 'bundler', '>= 2.5.5' s.add_development_dependency 'ci_reporter', '~> 2.0.0' s.add_development_dependency 'ci_reporter_rspec', '~> 1.0.0' s.add_development_dependency 'coveralls', '~> 0.8.21' s.add_development_dependency 'json-schema', '~> 2.8.0' - s.add_development_dependency 'openstudio_measure_tester', '~> 0.3.1' - s.add_development_dependency 'openstudio-standards', '~> 0.2.14' + s.add_development_dependency 'openstudio_measure_tester', '~> 0.4.0' s.add_development_dependency 'parallel', '~> 1.19.1' s.add_development_dependency 'public_suffix', '~> 4.0.3' s.add_development_dependency 'rainbow', '~> 3.0.0' From d7156fd04ce3aff006d3c9b677aa22669ac814bd Mon Sep 17 00:00:00 2001 From: Katherine Fleming <2205659+kflemin@users.noreply.github.com> Date: Wed, 17 Apr 2024 13:48:25 -0600 Subject: [PATCH 11/25] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb76bba..dd83100 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ OpenStudio::Workflow Change Log ================================== -Version 2.3.1 +Version 2.4.0 ------------- * Minimum Ruby version upgraded to 3.2 From a611581edd9f707cccca768b1b230a9dc8d1600b Mon Sep 17 00:00:00 2001 From: kflemin <2205659+kflemin@users.noreply.github.com> Date: Wed, 17 Apr 2024 14:12:14 -0600 Subject: [PATCH 12/25] fix ruby dependency in spec --- CHANGELOG.md | 2 +- openstudio-workflow.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd83100..efe7ca5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ OpenStudio::Workflow Change Log Version 2.4.0 ------------- -* Minimum Ruby version upgraded to 3.2 +* Minimum Ruby version upgraded to 3.2.2 Version 2.3.1 ------------- diff --git a/openstudio-workflow.gemspec b/openstudio-workflow.gemspec index d9e4e37..b29a5f3 100644 --- a/openstudio-workflow.gemspec +++ b/openstudio-workflow.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |s| s.files = Dir.glob('lib/**/*') + ['README.md', 'CHANGELOG.md', 'Rakefile'] s.require_path = 'lib' - s.required_ruby_version = '~> 3.2' + s.required_ruby_version = '~> 3.2.2' s.add_development_dependency 'builder', '~> 3.2.4' s.add_development_dependency 'bundler', '>= 2.5.5' From 9fdd3cf03ad480ee63b9119826249fdb5de4fc58 Mon Sep 17 00:00:00 2001 From: Kyle Benne Date: Thu, 18 Apr 2024 22:26:32 -0500 Subject: [PATCH 13/25] Fix heredoc in energyplus.rb ref NREL/OpenStudio#5157 --- lib/openstudio/workflow/util/energyplus.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/openstudio/workflow/util/energyplus.rb b/lib/openstudio/workflow/util/energyplus.rb index 845ea04..030e553 100644 --- a/lib/openstudio/workflow/util/energyplus.rb +++ b/lib/openstudio/workflow/util/energyplus.rb @@ -573,7 +573,8 @@ def self.monthly_report_idf_text WaterSystems:DistrictCooling, !- Variable or Meter Name 13 ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 13 Cogeneration:DistrictCooling, !- Variable or Meter Name 14 - ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 14 HEREDOC + ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 14 +HEREDOC end end end From 405b3008d63bef8507b72454012de0cbb277e48c Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Fri, 19 Apr 2024 13:23:30 +0200 Subject: [PATCH 14/25] For now, get measure_tester from github as it's not released m --- Gemfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index 38d099f..ed5f290 100644 --- a/Gemfile +++ b/Gemfile @@ -5,6 +5,8 @@ source 'http://rubygems.org' # Specify your gem's dependencies in OpenStudio-workflow.gemspec gemspec +gem 'openstudio_measure_tester', '~> 0.4.0', :github => 'NREL/OpenStudio-measure-tester-gem', :ref => '1baa9e70254a0cdb6740ccf14052baada8cf9e1c' + group :test do gem 'coveralls', require: false end From 2ab781dab7f04237283f16f860054be8eca957a3 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Fri, 19 Apr 2024 13:17:17 +0200 Subject: [PATCH 15/25] File.exists is removed in ruby 3 --- .../measures/ViewModel/tests/ViewModel_Test.rb | 2 +- .../no_epw_file_osw/measures/ViewModel/tests/ViewModel_Test.rb | 2 +- .../measures/ViewModel/tests/ViewModel_Test.rb | 2 +- .../measures/Xcel EDA Reporting and QAQC/measure.rb | 2 +- .../measures/Xcel EDA Reporting and QAQC/measure.rb | 2 +- .../measures/XcelEDAReportingandQAQC/measure.rb | 2 +- .../files/socket_osw/measures/ViewModel/tests/ViewModel_Test.rb | 2 +- spec/files/web_osw/measures/ViewModel/tests/ViewModel_Test.rb | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/spec/files/measures_only_osw/measures/ViewModel/tests/ViewModel_Test.rb b/spec/files/measures_only_osw/measures/ViewModel/tests/ViewModel_Test.rb index aacc508..e09d530 100644 --- a/spec/files/measures_only_osw/measures/ViewModel/tests/ViewModel_Test.rb +++ b/spec/files/measures_only_osw/measures/ViewModel/tests/ViewModel_Test.rb @@ -61,7 +61,7 @@ def test_ViewModel current_dir = Dir.pwd run_dir = File.dirname(__FILE__) + '/output' - FileUtils.rm_rf(run_dir) if File.exists?(run_dir) + FileUtils.rm_rf(run_dir) if File.exist?(run_dir) FileUtils.mkdir_p(run_dir) Dir.chdir(run_dir) diff --git a/spec/files/no_epw_file_osw/measures/ViewModel/tests/ViewModel_Test.rb b/spec/files/no_epw_file_osw/measures/ViewModel/tests/ViewModel_Test.rb index aacc508..e09d530 100644 --- a/spec/files/no_epw_file_osw/measures/ViewModel/tests/ViewModel_Test.rb +++ b/spec/files/no_epw_file_osw/measures/ViewModel/tests/ViewModel_Test.rb @@ -61,7 +61,7 @@ def test_ViewModel current_dir = Dir.pwd run_dir = File.dirname(__FILE__) + '/output' - FileUtils.rm_rf(run_dir) if File.exists?(run_dir) + FileUtils.rm_rf(run_dir) if File.exist?(run_dir) FileUtils.mkdir_p(run_dir) Dir.chdir(run_dir) diff --git a/spec/files/output_request_osw/measures/ViewModel/tests/ViewModel_Test.rb b/spec/files/output_request_osw/measures/ViewModel/tests/ViewModel_Test.rb index aacc508..e09d530 100644 --- a/spec/files/output_request_osw/measures/ViewModel/tests/ViewModel_Test.rb +++ b/spec/files/output_request_osw/measures/ViewModel/tests/ViewModel_Test.rb @@ -61,7 +61,7 @@ def test_ViewModel current_dir = Dir.pwd run_dir = File.dirname(__FILE__) + '/output' - FileUtils.rm_rf(run_dir) if File.exists?(run_dir) + FileUtils.rm_rf(run_dir) if File.exist?(run_dir) FileUtils.mkdir_p(run_dir) Dir.chdir(run_dir) diff --git a/spec/files/output_request_osw/measures/Xcel EDA Reporting and QAQC/measure.rb b/spec/files/output_request_osw/measures/Xcel EDA Reporting and QAQC/measure.rb index ad264ab..64c84e6 100644 --- a/spec/files/output_request_osw/measures/Xcel EDA Reporting and QAQC/measure.rb +++ b/spec/files/output_request_osw/measures/Xcel EDA Reporting and QAQC/measure.rb @@ -46,7 +46,7 @@ def run(runner, user_arguments) end resource_path = "#{File.dirname(__FILE__)}/resources/" - if not File.exists?("#{resource_path}/CreateResults.rb") + if not File.exist?("#{resource_path}/CreateResults.rb") # support pre 1.2.0 OpenStudio resource_path = "#{File.dirname(__FILE__)}/" end diff --git a/spec/files/reporting_measure_error/measures/Xcel EDA Reporting and QAQC/measure.rb b/spec/files/reporting_measure_error/measures/Xcel EDA Reporting and QAQC/measure.rb index ad264ab..64c84e6 100644 --- a/spec/files/reporting_measure_error/measures/Xcel EDA Reporting and QAQC/measure.rb +++ b/spec/files/reporting_measure_error/measures/Xcel EDA Reporting and QAQC/measure.rb @@ -46,7 +46,7 @@ def run(runner, user_arguments) end resource_path = "#{File.dirname(__FILE__)}/resources/" - if not File.exists?("#{resource_path}/CreateResults.rb") + if not File.exist?("#{resource_path}/CreateResults.rb") # support pre 1.2.0 OpenStudio resource_path = "#{File.dirname(__FILE__)}/" end diff --git a/spec/files/results_in_order/measures/XcelEDAReportingandQAQC/measure.rb b/spec/files/results_in_order/measures/XcelEDAReportingandQAQC/measure.rb index eebd2a4..3953289 100644 --- a/spec/files/results_in_order/measures/XcelEDAReportingandQAQC/measure.rb +++ b/spec/files/results_in_order/measures/XcelEDAReportingandQAQC/measure.rb @@ -46,7 +46,7 @@ def run(runner, user_arguments) end resource_path = "#{File.dirname(__FILE__)}/resources/" - if not File.exists?("#{resource_path}/CreateResults.rb") + if not File.exist?("#{resource_path}/CreateResults.rb") # support pre 1.2.0 OpenStudio resource_path = "#{File.dirname(__FILE__)}/" end diff --git a/spec/files/socket_osw/measures/ViewModel/tests/ViewModel_Test.rb b/spec/files/socket_osw/measures/ViewModel/tests/ViewModel_Test.rb index aacc508..e09d530 100644 --- a/spec/files/socket_osw/measures/ViewModel/tests/ViewModel_Test.rb +++ b/spec/files/socket_osw/measures/ViewModel/tests/ViewModel_Test.rb @@ -61,7 +61,7 @@ def test_ViewModel current_dir = Dir.pwd run_dir = File.dirname(__FILE__) + '/output' - FileUtils.rm_rf(run_dir) if File.exists?(run_dir) + FileUtils.rm_rf(run_dir) if File.exist?(run_dir) FileUtils.mkdir_p(run_dir) Dir.chdir(run_dir) diff --git a/spec/files/web_osw/measures/ViewModel/tests/ViewModel_Test.rb b/spec/files/web_osw/measures/ViewModel/tests/ViewModel_Test.rb index aacc508..e09d530 100644 --- a/spec/files/web_osw/measures/ViewModel/tests/ViewModel_Test.rb +++ b/spec/files/web_osw/measures/ViewModel/tests/ViewModel_Test.rb @@ -61,7 +61,7 @@ def test_ViewModel current_dir = Dir.pwd run_dir = File.dirname(__FILE__) + '/output' - FileUtils.rm_rf(run_dir) if File.exists?(run_dir) + FileUtils.rm_rf(run_dir) if File.exist?(run_dir) FileUtils.mkdir_p(run_dir) Dir.chdir(run_dir) From c0985f9f51ef700cf2bc7620b275f4c5120505c8 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Fri, 19 Apr 2024 13:23:01 +0200 Subject: [PATCH 16/25] ci_reporter 2.0.0 is from 2014 and used File.exists as well --- openstudio-workflow.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openstudio-workflow.gemspec b/openstudio-workflow.gemspec index b29a5f3..6b1ef43 100644 --- a/openstudio-workflow.gemspec +++ b/openstudio-workflow.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'builder', '~> 3.2.4' s.add_development_dependency 'bundler', '>= 2.5.5' - s.add_development_dependency 'ci_reporter', '~> 2.0.0' + s.add_development_dependency 'ci_reporter', '~> 2.1.0' s.add_development_dependency 'ci_reporter_rspec', '~> 1.0.0' s.add_development_dependency 'coveralls', '~> 0.8.21' s.add_development_dependency 'json-schema', '~> 2.8.0' From 874308d68f8098384a76c572f04e53661d44a8a0 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Fri, 19 Apr 2024 13:44:50 +0200 Subject: [PATCH 17/25] Starting with Ruby 2.4, Fixnum and Bignum are unified into Integer. Removed in Ruby 3.2 --- lib/openstudio/workflow/registry.rb | 2 +- lib/openstudio/workflow/util/measure.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/openstudio/workflow/registry.rb b/lib/openstudio/workflow/registry.rb index f52dd0d..e72e4cf 100644 --- a/lib/openstudio/workflow/registry.rb +++ b/lib/openstudio/workflow/registry.rb @@ -85,7 +85,7 @@ def keys # Return the number of elements in this registry # - # @return [Fixnum] + # @return [Integer] # def length @items.keys.length diff --git a/lib/openstudio/workflow/util/measure.rb b/lib/openstudio/workflow/util/measure.rb index 67891a7..2db409a 100644 --- a/lib/openstudio/workflow/util/measure.rb +++ b/lib/openstudio/workflow/util/measure.rb @@ -312,8 +312,8 @@ def apply_measure(registry, step, options = {}, energyplus_output_requests = fal result = nil begin load measure_path.to_s - # load.c in ruby can result in changing dir to root / so preserve cwd here. happens in openstudio cli - Dir.chdir measure_run_dir + # load.c in ruby can result in changing dir to root / so preserve cwd here. happens in openstudio cli + Dir.chdir measure_run_dir measure_object = Object.const_get(class_name).new rescue => e @@ -382,7 +382,7 @@ def apply_measure(registry, step, options = {}, energyplus_output_requests = fal else skip_measure = true end - elsif argument_value.class == Fixnum + elsif argument_value.class == Integer skip_measure = (argument_value != 0) elsif argument_value.class == Float skip_measure = (argument_value != 0.0) From d802e151765d0f54ee26c5b68ac7fff3121b32e3 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Fri, 19 Apr 2024 14:01:19 +0200 Subject: [PATCH 18/25] DencityReports: Ruby 2.4 deprecated constants TRUE, FALSE & NIL, removed now --- .../DencityReports/measure.rb | 16 +- .../measures/DencityReports/measure.rb | 16 +- .../measures/DencityReports/measure.rb | 16 +- .../measures/DencityReports/measure.rb | 1218 ++++++++--------- .../measures/DencityReports/measure.rb | 1218 ++++++++--------- .../measures/DencityReports/measure.rb | 16 +- .../measures/DencityReports/measure.rb | 1218 ++++++++--------- .../measures/DencityReports/measure.rb | 16 +- .../measures/DencityReports/measure.rb | 16 +- .../measures/DencityReports/measure.rb | 16 +- .../measures/DencityReports/measure.rb | 1218 ++++++++--------- .../measures/DencityReports/measure.rb | 16 +- .../measures/DencityReports/measure.rb | 16 +- .../measures/DencityReports/measure.rb | 16 +- .../measures/DencityReports/measure.rb | 16 +- 15 files changed, 2524 insertions(+), 2524 deletions(-) diff --git a/spec/files/alternate_paths/measures_and_stuff/DencityReports/measure.rb b/spec/files/alternate_paths/measures_and_stuff/DencityReports/measure.rb index d63787a..9cfe03f 100644 --- a/spec/files/alternate_paths/measures_and_stuff/DencityReports/measure.rb +++ b/spec/files/alternate_paths/measures_and_stuff/DencityReports/measure.rb @@ -129,13 +129,13 @@ def run(runner, user_arguments) end # determine how to format time series output - msgpack_flag = FALSE - csv_flag = FALSE + msgpack_flag = false + csv_flag = false if output_format == "MessagePack" || output_format == "Both" - msgpack_flag = TRUE + msgpack_flag = true end if output_format == "CSV" || output_format == "Both" - csv_flag = TRUE + csv_flag = true end # get the last model and sql file @@ -426,7 +426,7 @@ def run(runner, user_arguments) #todo: find a way for the sql call to not rely on RUN PERIOD 1 timeseries_start = Time.now.to_i available_meters = sql_file.execAndReturnVectorOfString("SELECT VariableName FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") - get_timeseries_flag = TRUE + get_timeseries_flag = true if available_meters.empty? runner.registerWarning("No meters found with Hourly reporting frequency to extract timeseries data from") else @@ -435,7 +435,7 @@ def run(runner, user_arguments) runner.registerInfo("The following meters were found: #{meter_strings}") rescue runner.registerWarning("Unable to retrieve timeseries strings") - get_timeseries_flag = FALSE + get_timeseries_flag = false end meter_units = sql_file.execAndReturnVectorOfString("SELECT VariableUnits FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") begin @@ -443,11 +443,11 @@ def run(runner, user_arguments) runner.registerInfo("Units were found for all available meters") rescue runner.registerWarning("Unable to retrieve timeseries unit strings") - get_timeseries_flag = FALSE + get_timeseries_flag = false end runner.registerInfo("The following meter units were found: #{meter_units}") runner.registerError("Timeseries variable names and units of differing lengths. Exiting Dencity Reports.") if meter_units.size != meter_strings.size - get_timeseries_flag = FALSE if meter_units.size != meter_strings.size + get_timeseries_flag = false if meter_units.size != meter_strings.size end runner.registerInfo("get_timeseries_flag is set to #{get_timeseries_flag}") diff --git a/spec/files/bad_order_osw/measures/DencityReports/measure.rb b/spec/files/bad_order_osw/measures/DencityReports/measure.rb index b0fb27a..d87f955 100644 --- a/spec/files/bad_order_osw/measures/DencityReports/measure.rb +++ b/spec/files/bad_order_osw/measures/DencityReports/measure.rb @@ -129,13 +129,13 @@ def run(runner, user_arguments) end # determine how to format time series output - msgpack_flag = FALSE - csv_flag = FALSE + msgpack_flag = false + csv_flag = false if output_format == "MessagePack" || output_format == "Both" - msgpack_flag = TRUE + msgpack_flag = true end if output_format == "CSV" || output_format == "Both" - csv_flag = TRUE + csv_flag = true end # get the last model and sql file @@ -426,7 +426,7 @@ def run(runner, user_arguments) #todo: find a way for the sql call to not rely on RUN PERIOD 1 timeseries_start = Time.now.to_i available_meters = sql_file.execAndReturnVectorOfString("SELECT VariableName FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") - get_timeseries_flag = TRUE + get_timeseries_flag = true if available_meters.empty? runner.registerWarning("No meters found with Hourly reporting frequency to extract timeseries data from") else @@ -435,7 +435,7 @@ def run(runner, user_arguments) runner.registerInfo("The following meters were found: #{meter_strings}") rescue runner.registerWarning("Unable to retrieve timeseries strings") - get_timeseries_flag = FALSE + get_timeseries_flag = false end meter_units = sql_file.execAndReturnVectorOfString("SELECT VariableUnits FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") begin @@ -443,11 +443,11 @@ def run(runner, user_arguments) runner.registerInfo("Units were found for all available meters") rescue runner.registerWarning("Unable to retrieve timeseries unit strings") - get_timeseries_flag = FALSE + get_timeseries_flag = false end runner.registerInfo("The following meter units were found: #{meter_units}") runner.registerError("Timeseries variable names and units of differing lengths. Exiting Dencity Reports.") if meter_units.size != meter_strings.size - get_timeseries_flag = FALSE if meter_units.size != meter_strings.size + get_timeseries_flag = false if meter_units.size != meter_strings.size end runner.registerInfo("get_timeseries_flag is set to #{get_timeseries_flag}") diff --git a/spec/files/compact_mwp_osw/measures/DencityReports/measure.rb b/spec/files/compact_mwp_osw/measures/DencityReports/measure.rb index 3196d4c..635b779 100644 --- a/spec/files/compact_mwp_osw/measures/DencityReports/measure.rb +++ b/spec/files/compact_mwp_osw/measures/DencityReports/measure.rb @@ -131,13 +131,13 @@ def run(runner, user_arguments) end # determine how to format time series output - msgpack_flag = FALSE - csv_flag = FALSE + msgpack_flag = false + csv_flag = false if output_format == "MessagePack" || output_format == "Both" - msgpack_flag = TRUE + msgpack_flag = true end if output_format == "CSV" || output_format == "Both" - csv_flag = TRUE + csv_flag = true end # get the last model and sql file @@ -428,7 +428,7 @@ def run(runner, user_arguments) #todo: find a way for the sql call to not rely on RUN PERIOD 1 timeseries_start = Time.now.to_i available_meters = sql_file.execAndReturnVectorOfString("SELECT VariableName FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") - get_timeseries_flag = TRUE + get_timeseries_flag = true if available_meters.empty? runner.registerWarning("No meters found with Hourly reporting frequency to extract timeseries data from") else @@ -437,7 +437,7 @@ def run(runner, user_arguments) runner.registerInfo("The following meters were found: #{meter_strings}") rescue runner.registerWarning("Unable to retrieve timeseries strings") - get_timeseries_flag = FALSE + get_timeseries_flag = false end meter_units = sql_file.execAndReturnVectorOfString("SELECT VariableUnits FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") begin @@ -445,11 +445,11 @@ def run(runner, user_arguments) runner.registerInfo("Units were found for all available meters") rescue runner.registerWarning("Unable to retrieve timeseries unit strings") - get_timeseries_flag = FALSE + get_timeseries_flag = false end runner.registerInfo("The following meter units were found: #{meter_units}") runner.registerError("Timeseries variable names and units of differing lengths. Exiting Dencity Reports.") if meter_units.size != meter_strings.size - get_timeseries_flag = FALSE if meter_units.size != meter_strings.size + get_timeseries_flag = false if meter_units.size != meter_strings.size end runner.registerInfo("get_timeseries_flag is set to #{get_timeseries_flag}") diff --git a/spec/files/compact_osw/measures/DencityReports/measure.rb b/spec/files/compact_osw/measures/DencityReports/measure.rb index 906a4c3..d87f955 100644 --- a/spec/files/compact_osw/measures/DencityReports/measure.rb +++ b/spec/files/compact_osw/measures/DencityReports/measure.rb @@ -1,610 +1,610 @@ -# DencityReports generates data that are required for the DEnCity API. - -# Author: Henry Horsey (github: henryhorsey) -# Creation Date: 6/27/2014 - -require 'openstudio' - -class DencityReports < OpenStudio::Ruleset::ReportingUserScript - - #define the name that a user will see, this method may be deprecated as - #the display name in PAT comes from the name field in measure.xml - def name - "Dencity Reports" - end - - #define the arguments that the user will input - def arguments - args = OpenStudio::Ruleset::OSArgumentVector.new - - #make choice argument for facade - choices = OpenStudio::StringVector.new - choices << "MessagePack" - choices << "CSV" - choices << "Both" - output_format = OpenStudio::Ruleset::OSArgument::makeChoiceArgument("output_format", choices) - output_format.setDisplayName("Output Format") - output_format.setDefaultValue("Both") - args << output_format - - args - end - - #short_os_fuel method - def short_os_fuel(fuel_string) - val = nil - fuel_vec = fuel_string.split(" ") - if fuel_vec[0] == "Electricity" - val = "Elec" - elsif fuel_vec[0] == "District" - fuel_vec[1] == "Heating" ? val = "Dist Heat" : val = "Dist Cool" - elsif fuel_vec[0] == "Natural" - val = "NG" - elsif fuel_vec[0] == "Additional" - val = "Other Fuel" - elsif fuel_vec[0] == "Water" - val = "Water" - else - val = "Unknown" - end - - val - - end - - #short_os_cat method - def short_os_cat(category_string) - val = nil - cat_vec = category_string.split(" ") - if cat_vec[0] == "Heating" - val = "Heat" - elsif cat_vec[0] == "Cooling" - val = "Cool" - elsif cat_vec[0] == "Humidification" - val = "Humid" - elsif cat_vec[0] == "Interior" - cat_vec[1] == "Lighting" ? val = "Int Light" : val = "Int Equip" - elsif cat_vec[0] == "Exterior" - cat_vec[1] == "Lighting" ? val = "Ext Light" : val = "Ext Equip" - elsif cat_vec[0] == "Heat" - cat_vec[1] == "Recovery" ? val = "Heat Rec" : val = "Heat Rej" - elsif cat_vec[0] == "Pumps" - val = "Pumps" - elsif cat_vec[0] == "Fans" - val = "Fans" - elsif cat_vec[0] == "Refrigeration" - val = "Rfg" - elsif cat_vec[0] == "Generators" - val = "Gen" - elsif cat_vec[0] == "Water" - val = "Water Systems" - else - val = "Unknown" - end - - val - - end - - #sql_query method - def sql_query(runner, sql, report_name, query) - val = nil - result = sql.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='#{report_name}' AND #{query}") - if result.empty? - runner.registerWarning("Query failed for #{report_name} and #{query}") - else - begin - val = result.get - rescue - val = nil - runner.registerWarning("Query result.get failed") - end - end - - val - end - - #define what happens when the measure is run - def run(runner, user_arguments) - super(runner, user_arguments) - - #use the built-in error checking - unless runner.validateUserArguments(arguments, user_arguments) - return false - end - - # require 'ruby-prof' - - begin - # RubyProf.start - - output_format = runner.getStringArgumentValue("output_format", user_arguments) - os_version = OpenStudio::VersionString.new(OpenStudio::openStudioVersion()) - min_version_feature1 = OpenStudio::VersionString.new("1.2.3") - require "time" - - unless os_version >= min_version_feature1 - runner.registerError("Dencity Reports requires a version of OpenStudio greater than 1.2.3.") - return false - end - - # determine how to format time series output - msgpack_flag = FALSE - csv_flag = FALSE - if output_format == "MessagePack" || output_format == "Both" - msgpack_flag = TRUE - end - if output_format == "CSV" || output_format == "Both" - csv_flag = TRUE - end - - # get the last model and sql file - model = runner.lastOpenStudioModel - if model.empty? - runner.registerError("Cannot find last model.") - return false - end - model = model.get - building = model.getBuilding - - runner.registerInfo("Model loaded") - - sql_file = runner.lastEnergyPlusSqlFile - if sql_file.empty? - runner.registerError("Cannot find last sql file.") - return false - end - sql_file = sql_file.get - model.setSqlFile(sql_file) - - runner.registerInfo("Sql loaded") - - #Initalize array that will be used to construct the DEnCity metadata csv - metadata = Array.new - metadata[0] = ["name", "display_name", "short_name", "description", "unit", "datatype", "user_defined"] - - #get building footprint to use for calculating end use EUIs - building_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Total Building Area' AND ColumnName='Area'") - building_area ||= "NIL" - runner.registerValue("building_area", building_area, "m2") - metadata[metadata.length] = ["building_area", "Total Building Area", "Bldg Area", "Total building area as calculated by Energy Plus", "square_meter", "double", "FALSE"] - - #get end use totals for fuels - site_energy_use = 0.0 - OpenStudio::EndUseFuelType.getValues.each do |fuel_type| - fuel_str = OpenStudio::EndUseFuelType.new(fuel_type).valueDescription - fuel_type_aggregation = 0.0 - mult_factor = 1 - if fuel_str != "Water" - runner_units_eui = "MJ/m2" - metadata_units_eui = "megajoules_per_square_meter" - mult_factor = 1000 - runner_units_agg = "GJ" - metadata_units_agg = "gigajoule" - else - runner_units_eui = "m" - metadata_units_eui = "meter" - runner_units_agg = "m3" - metadata_units_agg = "cubic meter" - end - OpenStudio::EndUseCategoryType.getValues.each do |category_type| - category_str = OpenStudio::EndUseCategoryType.new(category_type).valueDescription - temp_val = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='End Uses' AND RowName='#{category_str}' AND ColumnName='#{fuel_str}'") - if temp_val - eui_val = temp_val / building_area * mult_factor - prefix_str = OpenStudio::toUnderscoreCase("#{fuel_str}_#{category_str}_eui") - runner.registerValue("#{prefix_str}", eui_val, "#{runner_units_eui}") - short_name = "#{short_os_fuel(fuel_str)} #{short_os_cat(category_str)} EUI" - metadata[metadata.length] = [prefix_str, "#{category_str} #{fuel_str} EUI", short_name, "Total #{fuel_str.downcase} used for #{category_str.downcase} per square foot", metadata_units_eui, "double", "FALSE"] - fuel_type_aggregation += temp_val - end - end - if fuel_type_aggregation - prefix_str = OpenStudio::toUnderscoreCase("total_#{fuel_str}_end_use") - runner.registerValue(prefix_str, fuel_type_aggregation, "#{runner_units_agg}") - short_name = "#{short_os_fuel(fuel_str)} Total" - metadata[metadata.length] = [prefix_str, "Total #{fuel_str} End Use", short_name, "Total #{fuel_str.downcase} End Use", metadata_units_agg, "double", "FALSE"] - site_energy_use += fuel_type_aggregation if fuel_str != "Water" - end - end - - runner.registerValue("site_energy_use", site_energy_use, "GJ") - metadata[metadata.length] = ["site_energy_use", "Total Site Energy Use", "Site Energy", "Total energy consumption for the site", "gigajoule", "double", "FALSE"] - - #get monthly fuel aggregates - #todo: get all monthly fuel type outputs, including non-present fuel types, mapping to 0 - OpenStudio::EndUseFuelType.getValues.each do |fuel_type| - fuel_str = OpenStudio::EndUseFuelType.new(fuel_type).valueDescription - mult_factor = 10**-6 / building_area - runner_units = "MJ/m2" - metadata_units = "megajoules_per_square_meter" - if fuel_str == "Water" - next - end - OpenStudio::MonthOfYear.getValues.each do |month| - if month >= 1 and month <= 12 - fuel_and_month_aggregation = 0.0 - OpenStudio::EndUseCategoryType::getValues.each do |category_type| - if sql_file.energyConsumptionByMonth(OpenStudio::EndUseFuelType.new(fuel_str), OpenStudio::EndUseCategoryType.new(category_type), OpenStudio::MonthOfYear.new(month)).is_initialized - val_in_j = sql_file.energyConsumptionByMonth(OpenStudio::EndUseFuelType.new(fuel_str), OpenStudio::EndUseCategoryType.new(category_type), OpenStudio::MonthOfYear.new(month)).get - fuel_and_month_aggregation += val_in_j - end - end - fuel_and_month_aggregation *= mult_factor - month_str = OpenStudio::MonthOfYear.new(month).valueDescription - prefix_str = OpenStudio::toUnderscoreCase("#{month_str}_end_use_#{fuel_str}_eui") - runner.registerValue("#{prefix_str}", fuel_and_month_aggregation, "#{runner_units}") - short_name = "#{month_str[0..2]} #{short_os_fuel(fuel_str)} EUI" - metadata[metadata.length] = ["#{prefix_str}", "#{month_str} #{fuel_str} EUI", short_name, "Total #{fuel_str.downcase} end use energy use per square meter in #{month_str}", metadata_units, "double", "FALSE"] - end - end - end - - # queries that don't have API methods yet - - life_cycle_cost = sql_query(runner, sql_file, "Life-Cycle Cost Report", "TableName='Present Value by Category' AND RowName='Grand Total' AND ColumnName='Present Value'") - runner.registerValue("life_cycle_cost", life_cycle_cost, "dollars") - metadata[metadata.length] = ["life_cycle_cost", "Total Life Cycle Cost", "Life Cycle Cost", "Total calculated life cycle cost", "us_dollar", "double", "FALSE"] - - conditioned_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Net Conditioned Building Area' AND ColumnName='Area'") - runner.registerValue("conditioned_area", conditioned_area, "m2") - metadata[metadata.length] = ["conditioned_area", "Total Conditioned Area", "Cond Bldg Area", "Total conditioned building area as calculated by Energy Plus", "square_meter", "double", "FALSE"] - - unconditioned_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Unconditioned Building Area' AND ColumnName='Area'") - runner.registerValue("unconditioned_area", unconditioned_area, "m2") - metadata[metadata.length] = ["unconditioned_area", "Total Unconditioned Area", "Uncond Bldg Area", "Total unconditioned building area as calculated by EnergyPlus", "square_meter", "double", "FALSE"] - - total_site_eui = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Site and Source Energy' AND RowName='Total Site Energy' AND ColumnName='Energy Per Conditioned Building Area'") - runner.registerValue("total_site_eui", total_site_eui, "MJ/m2") - metadata[metadata.length] = ["total_site_eui", "Total Site Energy Use Intensity", "Site EUI", "Total site energy use intensity per conditioned building area as calculated by EnergyPlus", "megajoules_per_square_meter", "double", "FALSE"] - - total_source_eui = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Site and Source Energy' AND RowName='Total Source Energy' AND ColumnName='Energy Per Conditioned Building Area'") - runner.registerValue("total_source_eui", total_source_eui, "MJ/m2") - metadata[metadata.length] = ["total_source_eui", "Total Source Energy Use Intensity", "Source EUI", "Total source energy use intensity per conditioned building area as calculated by EnergyPlus", "megajoules_per_square_meter", "double", "FALSE"] - - time_setpoint_not_met_during_occupied_heating = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Comfort and Setpoint Not Met Summary' AND RowName='Time Setpoint Not Met During Occupied Heating' AND ColumnName='Facility'") - runner.registerValue("time_setpoint_not_met_during_occupied_heating", time_setpoint_not_met_during_occupied_heating, "hr") - metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_heating", "Occupied Time During Which Heating Setpoint Not Met", "Setpoint Missed Heat", "Hours during which the building was occupied but the heating setpoint temperature was not met", "hour", "double", "FALSE"] - - time_setpoint_not_met_during_occupied_cooling = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Comfort and Setpoint Not Met Summary' AND RowName='Time Setpoint Not Met During Occupied Cooling' AND ColumnName='Facility'") - runner.registerValue("time_setpoint_not_met_during_occupied_cooling", time_setpoint_not_met_during_occupied_cooling, "hr") - metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_cooling", "Occupied Time During Which Cooling Setpoint Not Met", "Setpoint Missed Cool", "Hours during which the building was occupied but the cooling setpoint temperature was not met", "hour", "double", "FALSE"] - - time_setpoint_not_met_during_occupied_hours = time_setpoint_not_met_during_occupied_heating + time_setpoint_not_met_during_occupied_cooling - runner.registerValue("time_setpoint_not_met_during_occupied_hours", time_setpoint_not_met_during_occupied_hours, "hr") - metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_hours", "Occupied Time During Which Temperature Setpoint Not Met", "Setpoint Missed Total", "Hours during which the building was occupied but the setpoint temperatures were not met", "hour", "double", "FALSE"] - - window_to_wall_ratio_north = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='North (315 to 45 deg)'") - runner.registerValue("window_to_wall_ratio_north", window_to_wall_ratio_north, "%") - metadata[metadata.length] = ["window_to_wall_ratio_north", "North Window to Wall Ratio", "WWR North", "Window to wall ratio of wall objects facing between 315 and 45 degrees", "percent", "double", "FALSE"] - - window_to_wall_ratio_south = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='South (135 to 225 deg)'") - runner.registerValue("window_to_wall_ratio_south", window_to_wall_ratio_south, "%") - metadata[metadata.length] = ["window_to_wall_ratio_south", "South Window to Wall Ratio", "WWR South", "Window to wall ratio of wall objects facing between 135 and 225 degrees", "percent", "double", "FALSE"] - - window_to_wall_ratio_east = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='East (45 to 135 deg)'") - runner.registerValue("window_to_wall_ratio_east", window_to_wall_ratio_east, "%") - metadata[metadata.length] = ["window_to_wall_ratio_east", "East Window to Wall Ratio", "WWR East", "Window to wall ratio of wall objects facing between 45 and 135 degrees", "percent", "double", "FALSE"] - - window_to_wall_ratio_west = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='West (225 to 315 deg)'") - runner.registerValue("window_to_wall_ratio_west", window_to_wall_ratio_west, "%") - metadata[metadata.length] = ["window_to_wall_ratio_west", "West Window to Wall Ratio", "WWR West", "Window to wall ratio of wall objects facing between 225 and 315 degrees", "percent", "double", "FALSE"] - - lat = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Latitude' AND ColumnName='Value'") - runner.registerValue("latitude", lat, "deg") - metadata[metadata.length] = ["latitude", "Latitude", "Lat", "Building latitude based on weather file", "degrees_angular", "double", "FALSE"] - - long = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Longitude' AND ColumnName='Value'") - runner.registerValue("longitude", long, "deg") - metadata[metadata.length] = ["longitude", "Longitude", "Long", "Building longitude based on weather file", "degrees_angular", "double", "FALSE"] - - weather_file = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Weather File' AND ColumnName='Value'") - runner.registerValue("weather_file", weather_file, "deg") - metadata[metadata.length] = ["weather_file", "Weather File", "Weather File", "Name of weather file", "none", "string", "FALSE"] - - # queries with one-line API methods - building_rotation = building.northAxis - runner.registerValue("orientation", building_rotation, "deg") - metadata[metadata.length] = ["orientation", "Building Orientation", "Orientation", "Degrees of building north axis off of true north", "degrees_angular", "double", "FALSE"] - - #floor_to_floor_height = building.nominalFloortoFloorHeight.get - #runner.registerValue("floor_to_floor_height", floor_to_floor_height, "m") - #metadata[metadata.length] = ["floor_to_floor_height", "Floor to Floor Height", "Flr-to-Flr Height", "Nominal floor to floor height of building", "meter", "double", "FALSE"] - - #total_building_volume = building_area * floor_to_floor_height - #runner.registerValue("total_building_volume", total_building_volume, "m3") - #metadata[metadata.length] = ["total_building_volume", "Total Building Volume", "Volume", "Building volume calculated by multiplying floor to floor height and footprint", "cubic_meter", "double", "FALSE"] - - total_occupancy = building.numberOfPeople - runner.registerValue("total_occupancy", total_occupancy, "people") - metadata[metadata.length] = ["total_occupancy", "Total Building Occupancy", "Bldg Occ", "Number of people in the building as calculated by EnergyPlus", "none", "double", "FALSE"] - - occupancy_density = building.peoplePerFloorArea - runner.registerValue("occupant_density", occupancy_density, "people/m2") - metadata[metadata.length] = ["occupant_density", "Building Occupancy Density", "Occ Density", "Number of people per floor area as calculated by EnergyPlus", "none", "double", "FALSE"] - - lighting_power = building.lightingPower - runner.registerValue("lighting_power", lighting_power, "W") - metadata[metadata.length] = ["lighting_power", "Lighting Power", "Lighting Pwr", "Total lighting power", "watt", "double", "FALSE"] - - lighting_power_density = building.lightingPowerPerFloorArea - runner.registerValue("lighting_power_density", lighting_power_density, "W/m2") - metadata[metadata.length] = ["lighting_power_density", "Lighting Power Density", "LPD", "Total lighting power density", "watts_per_square_meter", "double", "FALSE"] - - infiltration_rate = building.infiltrationDesignAirChangesPerHour - runner.registerValue("infiltration_rate", infiltration_rate, "ACH") - metadata[metadata.length] = ["infiltration_rate", "Infiltration Rate", "Infil Rate", "Infiltration rate of air into the building", "none", "double", "FALSE"] - - number_of_floors = building.standardsNumberOfStories.get if building.standardsNumberOfStories.is_initialized - number_of_floors ||= "NIL" - runner.registerValue("number_of_floors", number_of_floors, "") - metadata[metadata.length] = ["number_of_floors", "Number of Floors", "Number of Floors", "Total number of storeys in the building", "none", "double", "FALSE"] - - building_type = building.standardsBuildingType if building.standardsBuildingType.is_initialized - building_type ||= "NIL" - runner.registerValue("building_type", building_type, "") - metadata[metadata.length] = ["building_type", "Building Type", "Bldg Type", "Building type as defined by the modeler", "none", "string", "FALSE"] - - #get exterior wall, exterior roof, and ground plate areas - exterior_wall_area = 0.0 - exterior_roof_area = 0.0 - ground_contact_area = 0.0 - surfaces = model.getSurfaces - surfaces.each do |surface| - if surface.outsideBoundaryCondition == "Outdoors" and surface.surfaceType == "Wall" - exterior_wall_area += surface.netArea - end - if surface.outsideBoundaryCondition == "Outdoors" and surface.surfaceType == "RoofCeiling" - exterior_roof_area += surface.netArea - end - if surface.outsideBoundaryCondition == "Ground" and surface.surfaceType == "Floor" - ground_contact_area += surface.netArea - end - end - - runner.registerValue("exterior_wall_area", exterior_wall_area, "m2") - metadata[metadata.length] = ["exterior_wall_area", "Exterior Wall Area", "Ext Wall Area", "Total area of all surfaces with the conditions of 'Outdoors' and 'Wall'", "square_meter", "double", "FALSE"] - - runner.registerValue("exterior_roof_area", exterior_roof_area, "m2") - metadata[metadata.length] = ["exterior_roof_area", "Exterior Roof Area", "Ext Roof Area", "Total area of all surfaces with the conditions of 'Outdoors' and 'Roof'", "square_meter", "double", "FALSE"] - - runner.registerValue("ground_contact_area", ground_contact_area, "m2") - metadata[metadata.length] = ["ground_contact_area", "Ground Contact Area", "Gnd Area", "Total area of all surfaces with the conditions of 'Ground' and 'Floor'", "square_meter", "double", "FALSE"] - - #get exterior fenestration area - exterior_fenestration_area = 0.0 - subsurfaces = model.getSubSurfaces - subsurfaces.each do |subsurface| - if subsurface.outsideBoundaryCondition == "Outdoors" - if subsurface.subSurfaceType == "FixedWindow" or subsurface.subSurfaceType == "OperableWindow" - exterior_fenestration_area += subsurface.netArea - end - end - end - - runner.registerValue("exterior_fenestration_area", exterior_fenestration_area, "m2") - metadata[metadata.length] = ["exterior_fenestration_area", "Exterior Fenestration Area", "Window Area Total", "Total area of all surfaces with the conditions of 'Outdoors' and 'FixedWindow' or 'OperableWindow'", "square_meter", "double", "FALSE"] - - #get density of economizers in airloops - num_airloops = 0 - num_economizers = 0 - model.getAirLoopHVACs.each do |air_loop| - num_airloops += 1 - if air_loop.airLoopHVACOutdoorAirSystem.is_initialized - air_loop_oa = air_loop.airLoopHVACOutdoorAirSystem.get - air_loop_oa_controller = air_loop_oa.getControllerOutdoorAir - if air_loop_oa_controller.getEconomizerControlType != "NoEconomizer" - num_economizers += 1 - end - end - end - economizer_density = num_economizers / num_airloops if num_airloops != 0 - economizer_density ||= "NIL" - - runner.registerValue("economizer_density", economizer_density, "") - metadata[metadata.length] = ["economizer_density", "Economizer Density", "Econ Density", "Proportion of air loops with economizers to air loops without", "percent", "double", "FALSE"] - - #get aspect ratios - north_wall_area = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Wall Area' AND ColumnName='North (315 to 45 deg)'") - east_wall_area = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Wall Area' AND ColumnName='East (45 to 135 deg)'") - aspect_ratio = north_wall_area / east_wall_area if north_wall_area != 0 && east_wall_area != 0 - aspect_ratio ||= "NIL" - - runner.registerValue("aspect_ratio", aspect_ratio, "") - metadata[metadata.length] = ["aspect_ratio", "Aspect Ratio", "Aspect Ratio", "Proportion of north wall area to east wall area", "percent", "double", "FALSE"] - - #write metadata CSV - runner.registerInfo("Saving Dencity metadata csv file") - CSV.open("report_metadata.csv", "wb") do |csv| - metadata.each do |elem| - csv << elem - end - end - runner.registerInfo("Saved Dencity metadata as report_metadata.csv") - - #get meter timeseries data and output as a msgpack or csv or both - #todo: find a way for the sql call to not rely on RUN PERIOD 1 - timeseries_start = Time.now.to_i - available_meters = sql_file.execAndReturnVectorOfString("SELECT VariableName FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") - get_timeseries_flag = TRUE - if available_meters.empty? - runner.registerWarning("No meters found with Hourly reporting frequency to extract timeseries data from") - else - begin - meter_strings = available_meters.get - runner.registerInfo("The following meters were found: #{meter_strings}") - rescue - runner.registerWarning("Unable to retrieve timeseries strings") - get_timeseries_flag = FALSE - end - meter_units = sql_file.execAndReturnVectorOfString("SELECT VariableUnits FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") - begin - meter_units = meter_units.get - runner.registerInfo("Units were found for all available meters") - rescue - runner.registerWarning("Unable to retrieve timeseries unit strings") - get_timeseries_flag = FALSE - end - runner.registerInfo("The following meter units were found: #{meter_units}") - runner.registerError("Timeseries variable names and units of differing lengths. Exiting Dencity Reports.") if meter_units.size != meter_strings.size - get_timeseries_flag = FALSE if meter_units.size != meter_strings.size - end - - runner.registerInfo("get_timeseries_flag is set to #{get_timeseries_flag}") - if get_timeseries_flag - runner.registerInfo("Retrieving timeseries data") - if msgpack_flag and csv_flag - require "parallel" - require "msgpack" - msgpack_array = [] - csv_array = [] - mark0 = Time.now.to_i - Parallel.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| - if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized - sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get - ts_values = sql_ts.values - ts_times = sql_ts.dateTimes - timeseries_out = {} - initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 - timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 - timeseries_out[initial_epoch_time] = ts_values[0] - next_epoch_time = initial_epoch_time - for i in 1..ts_times.size - 1 - next_epoch_time += timestep_in_epoch - timeseries_out[next_epoch_time] = ts_values[i] - end - csv_array << (["epoch_time"] + timeseries_out.to_a.transpose[0]) if meter_index == 0 - csv_array << ([meter_string.gsub(":", "_") + " [" + meter_units[meter_index] + "]"] + timeseries_out.to_a.transpose[1]) - meter_hash = {timeseries: {}} - meter_hash[:timeseries][:fuel] = meter_string.gsub(":", "_") - meter_hash[:timeseries][:interval] = Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i - meter_hash[:timeseries][:interval_units] = "seconds" - meter_hash[:timeseries][:data] = timeseries_out - meter_hash[:timeseries][:units] = meter_units[meter_index] - msgpack_array << meter_hash - else - runner.registerWarning("Timeseries #{meter_string} was empty.") - end - end - mark1 = Time.now.to_i - runner.registerInfo("DeltaMake=#{mark1-mark0}s") - File.open("report_timeseries.msgpack", "w") do |file| - file << {data: msgpack_array}.to_msgpack - end - runner.registerInfo("Saved timeseries data as report_timeseries.msgpack") - csv_array = csv_array.transpose - CSV.open("report_timeseries.csv", "w") do |csv| - csv_array.each do |elem| - csv << elem - end - end - runner.registerInfo("Saved timeseries data as report_timeseries.csv") - mark2 = Time.now.to_i - runner.registerInfo("DeltaWrite=#{mark2-mark1}s") - - elsif msgpack_flag - require "parallel" - require "msgpack" - msgpack_array = [] - mark0 = Time.now.to_i - meter_strings.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| - if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized - sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get - ts_values = sql_ts.values - ts_times = sql_ts.dateTimes - timeseries_out = {} - initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 - timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 - timeseries_out[initial_epoch_time] = ts_values[0] - next_epoch_time = initial_epoch_time - for i in 1..ts_times.size - 1 - next_epoch_time += timestep_in_epoch - timeseries_out[next_epoch_time] = ts_values[i] - end - meter_hash = {timeseries: {}} - meter_hash[:timeseries][:fuel] = meter_string.gsub(":", "_") - meter_hash[:timeseries][:interval] = Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i - meter_hash[:timeseries][:interval_units] = "seconds" - meter_hash[:timeseries][:data] = timeseries_out - meter_hash[:timeseries][:units] = meter_units[meter_index] - msgpack_array << meter_hash - else - runner.registerWarning("Timeseries #{meter_string} was empty.") - end - end - mark1 = Time.now.to_i - runner.registerInfo("DeltaMake=#{mark1-mark0}s") - File.open("report_timeseries.msgpack", "w") do |file| - file << {data: msgpack_array}.to_msgpack - runner.registerInfo("Saved timeseries data as report_timeseries.msgpack") - end - mark2 = Time.now.to_i - runner.registerInfo("DeltaWrite=#{mark2-mark1}s") - - elsif csv_flag - require "parallel" - csv_array = [] - mark0 = Time.now.to_i - Parallel.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| - if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized - sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get - ts_values = sql_ts.values - ts_times = sql_ts.dateTimes - timeseries_out = {} - initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 - timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 - timeseries_out[initial_epoch_time] = ts_values[0] - next_epoch_time = initial_epoch_time - for i in 1..ts_times.size - 1 - next_epoch_time += timestep_in_epoch - timeseries_out[next_epoch_time] = ts_values[i] - end - csv_array << (["epoch_time"] + timeseries_out.to_a.transpose[0]) if meter_index == 0 - csv_array << ([meter_string.gsub(":", "_") + " [" + meter_units[meter_index] + "]"] + timeseries_out.to_a.transpose[1]) - else - runner.registerWarning("Timeseries #{meter_string} was empty.") - end - end - mark1 = Time.now.to_i - runner.registerInfo("DeltaMake=#{mark1-mark0}s") - csv_array = csv_array.transpose - CSV.open("report_timeseries.csv", "w") do |csv| - csv_array.each do |elem| - csv << elem - end - end - runner.registerInfo("Saved timeseries data as report_timeseries.csv") - mark2 = Time.now.to_i - runner.registerInfo("DeltaWrite=#{mark2-mark1}s") - end - end - timeseries_end = Time.now.to_i - runner.registerInfo("Total Timeseries Time: #{timeseries_end-timeseries_start}") - - #closing the sql file - sql_file.close - - #reporting final condition - runner.registerFinalCondition("DEnCity Report generated successfully.") - - rescue => e - fail "Measure failed with #{e.message}:#{e.backtrace}" - ensure - - # profile_results = RubyProf.stop - # FileUtils.mkdir_p 'results' - # File.open("results/profile-graph.html", 'w') { |f| RubyProf::GraphHtmlPrinter.new(profile_results).print(f) } - # File.open("results/profile-flat.txt", 'w') { |f| RubyProf::FlatPrinter.new(profile_results).print(f) } - # File.open("results/profile-tree.prof", 'w') { |f| RubyProf::CallTreePrinter.new(profile_results).print(f) } - - - end - - true - - end #end the run method - -end #end the measure - -#this allows the measure to be use by the application +# DencityReports generates data that are required for the DEnCity API. + +# Author: Henry Horsey (github: henryhorsey) +# Creation Date: 6/27/2014 + +require 'openstudio' + +class DencityReports < OpenStudio::Ruleset::ReportingUserScript + + #define the name that a user will see, this method may be deprecated as + #the display name in PAT comes from the name field in measure.xml + def name + "Dencity Reports" + end + + #define the arguments that the user will input + def arguments + args = OpenStudio::Ruleset::OSArgumentVector.new + + #make choice argument for facade + choices = OpenStudio::StringVector.new + choices << "MessagePack" + choices << "CSV" + choices << "Both" + output_format = OpenStudio::Ruleset::OSArgument::makeChoiceArgument("output_format", choices) + output_format.setDisplayName("Output Format") + output_format.setDefaultValue("Both") + args << output_format + + args + end + + #short_os_fuel method + def short_os_fuel(fuel_string) + val = nil + fuel_vec = fuel_string.split(" ") + if fuel_vec[0] == "Electricity" + val = "Elec" + elsif fuel_vec[0] == "District" + fuel_vec[1] == "Heating" ? val = "Dist Heat" : val = "Dist Cool" + elsif fuel_vec[0] == "Natural" + val = "NG" + elsif fuel_vec[0] == "Additional" + val = "Other Fuel" + elsif fuel_vec[0] == "Water" + val = "Water" + else + val = "Unknown" + end + + val + + end + + #short_os_cat method + def short_os_cat(category_string) + val = nil + cat_vec = category_string.split(" ") + if cat_vec[0] == "Heating" + val = "Heat" + elsif cat_vec[0] == "Cooling" + val = "Cool" + elsif cat_vec[0] == "Humidification" + val = "Humid" + elsif cat_vec[0] == "Interior" + cat_vec[1] == "Lighting" ? val = "Int Light" : val = "Int Equip" + elsif cat_vec[0] == "Exterior" + cat_vec[1] == "Lighting" ? val = "Ext Light" : val = "Ext Equip" + elsif cat_vec[0] == "Heat" + cat_vec[1] == "Recovery" ? val = "Heat Rec" : val = "Heat Rej" + elsif cat_vec[0] == "Pumps" + val = "Pumps" + elsif cat_vec[0] == "Fans" + val = "Fans" + elsif cat_vec[0] == "Refrigeration" + val = "Rfg" + elsif cat_vec[0] == "Generators" + val = "Gen" + elsif cat_vec[0] == "Water" + val = "Water Systems" + else + val = "Unknown" + end + + val + + end + + #sql_query method + def sql_query(runner, sql, report_name, query) + val = nil + result = sql.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='#{report_name}' AND #{query}") + if result.empty? + runner.registerWarning("Query failed for #{report_name} and #{query}") + else + begin + val = result.get + rescue + val = nil + runner.registerWarning("Query result.get failed") + end + end + + val + end + + #define what happens when the measure is run + def run(runner, user_arguments) + super(runner, user_arguments) + + #use the built-in error checking + unless runner.validateUserArguments(arguments, user_arguments) + return false + end + + # require 'ruby-prof' + + begin + # RubyProf.start + + output_format = runner.getStringArgumentValue("output_format", user_arguments) + os_version = OpenStudio::VersionString.new(OpenStudio::openStudioVersion()) + min_version_feature1 = OpenStudio::VersionString.new("1.2.3") + require "time" + + unless os_version >= min_version_feature1 + runner.registerError("Dencity Reports requires a version of OpenStudio greater than 1.2.3.") + return false + end + + # determine how to format time series output + msgpack_flag = false + csv_flag = false + if output_format == "MessagePack" || output_format == "Both" + msgpack_flag = true + end + if output_format == "CSV" || output_format == "Both" + csv_flag = true + end + + # get the last model and sql file + model = runner.lastOpenStudioModel + if model.empty? + runner.registerError("Cannot find last model.") + return false + end + model = model.get + building = model.getBuilding + + runner.registerInfo("Model loaded") + + sql_file = runner.lastEnergyPlusSqlFile + if sql_file.empty? + runner.registerError("Cannot find last sql file.") + return false + end + sql_file = sql_file.get + model.setSqlFile(sql_file) + + runner.registerInfo("Sql loaded") + + #Initalize array that will be used to construct the DEnCity metadata csv + metadata = Array.new + metadata[0] = ["name", "display_name", "short_name", "description", "unit", "datatype", "user_defined"] + + #get building footprint to use for calculating end use EUIs + building_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Total Building Area' AND ColumnName='Area'") + building_area ||= "NIL" + runner.registerValue("building_area", building_area, "m2") + metadata[metadata.length] = ["building_area", "Total Building Area", "Bldg Area", "Total building area as calculated by Energy Plus", "square_meter", "double", "FALSE"] + + #get end use totals for fuels + site_energy_use = 0.0 + OpenStudio::EndUseFuelType.getValues.each do |fuel_type| + fuel_str = OpenStudio::EndUseFuelType.new(fuel_type).valueDescription + fuel_type_aggregation = 0.0 + mult_factor = 1 + if fuel_str != "Water" + runner_units_eui = "MJ/m2" + metadata_units_eui = "megajoules_per_square_meter" + mult_factor = 1000 + runner_units_agg = "GJ" + metadata_units_agg = "gigajoule" + else + runner_units_eui = "m" + metadata_units_eui = "meter" + runner_units_agg = "m3" + metadata_units_agg = "cubic meter" + end + OpenStudio::EndUseCategoryType.getValues.each do |category_type| + category_str = OpenStudio::EndUseCategoryType.new(category_type).valueDescription + temp_val = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='End Uses' AND RowName='#{category_str}' AND ColumnName='#{fuel_str}'") + if temp_val + eui_val = temp_val / building_area * mult_factor + prefix_str = OpenStudio::toUnderscoreCase("#{fuel_str}_#{category_str}_eui") + runner.registerValue("#{prefix_str}", eui_val, "#{runner_units_eui}") + short_name = "#{short_os_fuel(fuel_str)} #{short_os_cat(category_str)} EUI" + metadata[metadata.length] = [prefix_str, "#{category_str} #{fuel_str} EUI", short_name, "Total #{fuel_str.downcase} used for #{category_str.downcase} per square foot", metadata_units_eui, "double", "FALSE"] + fuel_type_aggregation += temp_val + end + end + if fuel_type_aggregation + prefix_str = OpenStudio::toUnderscoreCase("total_#{fuel_str}_end_use") + runner.registerValue(prefix_str, fuel_type_aggregation, "#{runner_units_agg}") + short_name = "#{short_os_fuel(fuel_str)} Total" + metadata[metadata.length] = [prefix_str, "Total #{fuel_str} End Use", short_name, "Total #{fuel_str.downcase} End Use", metadata_units_agg, "double", "FALSE"] + site_energy_use += fuel_type_aggregation if fuel_str != "Water" + end + end + + runner.registerValue("site_energy_use", site_energy_use, "GJ") + metadata[metadata.length] = ["site_energy_use", "Total Site Energy Use", "Site Energy", "Total energy consumption for the site", "gigajoule", "double", "FALSE"] + + #get monthly fuel aggregates + #todo: get all monthly fuel type outputs, including non-present fuel types, mapping to 0 + OpenStudio::EndUseFuelType.getValues.each do |fuel_type| + fuel_str = OpenStudio::EndUseFuelType.new(fuel_type).valueDescription + mult_factor = 10**-6 / building_area + runner_units = "MJ/m2" + metadata_units = "megajoules_per_square_meter" + if fuel_str == "Water" + next + end + OpenStudio::MonthOfYear.getValues.each do |month| + if month >= 1 and month <= 12 + fuel_and_month_aggregation = 0.0 + OpenStudio::EndUseCategoryType::getValues.each do |category_type| + if sql_file.energyConsumptionByMonth(OpenStudio::EndUseFuelType.new(fuel_str), OpenStudio::EndUseCategoryType.new(category_type), OpenStudio::MonthOfYear.new(month)).is_initialized + val_in_j = sql_file.energyConsumptionByMonth(OpenStudio::EndUseFuelType.new(fuel_str), OpenStudio::EndUseCategoryType.new(category_type), OpenStudio::MonthOfYear.new(month)).get + fuel_and_month_aggregation += val_in_j + end + end + fuel_and_month_aggregation *= mult_factor + month_str = OpenStudio::MonthOfYear.new(month).valueDescription + prefix_str = OpenStudio::toUnderscoreCase("#{month_str}_end_use_#{fuel_str}_eui") + runner.registerValue("#{prefix_str}", fuel_and_month_aggregation, "#{runner_units}") + short_name = "#{month_str[0..2]} #{short_os_fuel(fuel_str)} EUI" + metadata[metadata.length] = ["#{prefix_str}", "#{month_str} #{fuel_str} EUI", short_name, "Total #{fuel_str.downcase} end use energy use per square meter in #{month_str}", metadata_units, "double", "FALSE"] + end + end + end + + # queries that don't have API methods yet + + life_cycle_cost = sql_query(runner, sql_file, "Life-Cycle Cost Report", "TableName='Present Value by Category' AND RowName='Grand Total' AND ColumnName='Present Value'") + runner.registerValue("life_cycle_cost", life_cycle_cost, "dollars") + metadata[metadata.length] = ["life_cycle_cost", "Total Life Cycle Cost", "Life Cycle Cost", "Total calculated life cycle cost", "us_dollar", "double", "FALSE"] + + conditioned_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Net Conditioned Building Area' AND ColumnName='Area'") + runner.registerValue("conditioned_area", conditioned_area, "m2") + metadata[metadata.length] = ["conditioned_area", "Total Conditioned Area", "Cond Bldg Area", "Total conditioned building area as calculated by Energy Plus", "square_meter", "double", "FALSE"] + + unconditioned_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Unconditioned Building Area' AND ColumnName='Area'") + runner.registerValue("unconditioned_area", unconditioned_area, "m2") + metadata[metadata.length] = ["unconditioned_area", "Total Unconditioned Area", "Uncond Bldg Area", "Total unconditioned building area as calculated by EnergyPlus", "square_meter", "double", "FALSE"] + + total_site_eui = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Site and Source Energy' AND RowName='Total Site Energy' AND ColumnName='Energy Per Conditioned Building Area'") + runner.registerValue("total_site_eui", total_site_eui, "MJ/m2") + metadata[metadata.length] = ["total_site_eui", "Total Site Energy Use Intensity", "Site EUI", "Total site energy use intensity per conditioned building area as calculated by EnergyPlus", "megajoules_per_square_meter", "double", "FALSE"] + + total_source_eui = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Site and Source Energy' AND RowName='Total Source Energy' AND ColumnName='Energy Per Conditioned Building Area'") + runner.registerValue("total_source_eui", total_source_eui, "MJ/m2") + metadata[metadata.length] = ["total_source_eui", "Total Source Energy Use Intensity", "Source EUI", "Total source energy use intensity per conditioned building area as calculated by EnergyPlus", "megajoules_per_square_meter", "double", "FALSE"] + + time_setpoint_not_met_during_occupied_heating = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Comfort and Setpoint Not Met Summary' AND RowName='Time Setpoint Not Met During Occupied Heating' AND ColumnName='Facility'") + runner.registerValue("time_setpoint_not_met_during_occupied_heating", time_setpoint_not_met_during_occupied_heating, "hr") + metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_heating", "Occupied Time During Which Heating Setpoint Not Met", "Setpoint Missed Heat", "Hours during which the building was occupied but the heating setpoint temperature was not met", "hour", "double", "FALSE"] + + time_setpoint_not_met_during_occupied_cooling = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Comfort and Setpoint Not Met Summary' AND RowName='Time Setpoint Not Met During Occupied Cooling' AND ColumnName='Facility'") + runner.registerValue("time_setpoint_not_met_during_occupied_cooling", time_setpoint_not_met_during_occupied_cooling, "hr") + metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_cooling", "Occupied Time During Which Cooling Setpoint Not Met", "Setpoint Missed Cool", "Hours during which the building was occupied but the cooling setpoint temperature was not met", "hour", "double", "FALSE"] + + time_setpoint_not_met_during_occupied_hours = time_setpoint_not_met_during_occupied_heating + time_setpoint_not_met_during_occupied_cooling + runner.registerValue("time_setpoint_not_met_during_occupied_hours", time_setpoint_not_met_during_occupied_hours, "hr") + metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_hours", "Occupied Time During Which Temperature Setpoint Not Met", "Setpoint Missed Total", "Hours during which the building was occupied but the setpoint temperatures were not met", "hour", "double", "FALSE"] + + window_to_wall_ratio_north = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='North (315 to 45 deg)'") + runner.registerValue("window_to_wall_ratio_north", window_to_wall_ratio_north, "%") + metadata[metadata.length] = ["window_to_wall_ratio_north", "North Window to Wall Ratio", "WWR North", "Window to wall ratio of wall objects facing between 315 and 45 degrees", "percent", "double", "FALSE"] + + window_to_wall_ratio_south = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='South (135 to 225 deg)'") + runner.registerValue("window_to_wall_ratio_south", window_to_wall_ratio_south, "%") + metadata[metadata.length] = ["window_to_wall_ratio_south", "South Window to Wall Ratio", "WWR South", "Window to wall ratio of wall objects facing between 135 and 225 degrees", "percent", "double", "FALSE"] + + window_to_wall_ratio_east = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='East (45 to 135 deg)'") + runner.registerValue("window_to_wall_ratio_east", window_to_wall_ratio_east, "%") + metadata[metadata.length] = ["window_to_wall_ratio_east", "East Window to Wall Ratio", "WWR East", "Window to wall ratio of wall objects facing between 45 and 135 degrees", "percent", "double", "FALSE"] + + window_to_wall_ratio_west = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='West (225 to 315 deg)'") + runner.registerValue("window_to_wall_ratio_west", window_to_wall_ratio_west, "%") + metadata[metadata.length] = ["window_to_wall_ratio_west", "West Window to Wall Ratio", "WWR West", "Window to wall ratio of wall objects facing between 225 and 315 degrees", "percent", "double", "FALSE"] + + lat = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Latitude' AND ColumnName='Value'") + runner.registerValue("latitude", lat, "deg") + metadata[metadata.length] = ["latitude", "Latitude", "Lat", "Building latitude based on weather file", "degrees_angular", "double", "FALSE"] + + long = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Longitude' AND ColumnName='Value'") + runner.registerValue("longitude", long, "deg") + metadata[metadata.length] = ["longitude", "Longitude", "Long", "Building longitude based on weather file", "degrees_angular", "double", "FALSE"] + + weather_file = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Weather File' AND ColumnName='Value'") + runner.registerValue("weather_file", weather_file, "deg") + metadata[metadata.length] = ["weather_file", "Weather File", "Weather File", "Name of weather file", "none", "string", "FALSE"] + + # queries with one-line API methods + building_rotation = building.northAxis + runner.registerValue("orientation", building_rotation, "deg") + metadata[metadata.length] = ["orientation", "Building Orientation", "Orientation", "Degrees of building north axis off of true north", "degrees_angular", "double", "FALSE"] + + #floor_to_floor_height = building.nominalFloortoFloorHeight.get + #runner.registerValue("floor_to_floor_height", floor_to_floor_height, "m") + #metadata[metadata.length] = ["floor_to_floor_height", "Floor to Floor Height", "Flr-to-Flr Height", "Nominal floor to floor height of building", "meter", "double", "FALSE"] + + #total_building_volume = building_area * floor_to_floor_height + #runner.registerValue("total_building_volume", total_building_volume, "m3") + #metadata[metadata.length] = ["total_building_volume", "Total Building Volume", "Volume", "Building volume calculated by multiplying floor to floor height and footprint", "cubic_meter", "double", "FALSE"] + + total_occupancy = building.numberOfPeople + runner.registerValue("total_occupancy", total_occupancy, "people") + metadata[metadata.length] = ["total_occupancy", "Total Building Occupancy", "Bldg Occ", "Number of people in the building as calculated by EnergyPlus", "none", "double", "FALSE"] + + occupancy_density = building.peoplePerFloorArea + runner.registerValue("occupant_density", occupancy_density, "people/m2") + metadata[metadata.length] = ["occupant_density", "Building Occupancy Density", "Occ Density", "Number of people per floor area as calculated by EnergyPlus", "none", "double", "FALSE"] + + lighting_power = building.lightingPower + runner.registerValue("lighting_power", lighting_power, "W") + metadata[metadata.length] = ["lighting_power", "Lighting Power", "Lighting Pwr", "Total lighting power", "watt", "double", "FALSE"] + + lighting_power_density = building.lightingPowerPerFloorArea + runner.registerValue("lighting_power_density", lighting_power_density, "W/m2") + metadata[metadata.length] = ["lighting_power_density", "Lighting Power Density", "LPD", "Total lighting power density", "watts_per_square_meter", "double", "FALSE"] + + infiltration_rate = building.infiltrationDesignAirChangesPerHour + runner.registerValue("infiltration_rate", infiltration_rate, "ACH") + metadata[metadata.length] = ["infiltration_rate", "Infiltration Rate", "Infil Rate", "Infiltration rate of air into the building", "none", "double", "FALSE"] + + number_of_floors = building.standardsNumberOfStories.get if building.standardsNumberOfStories.is_initialized + number_of_floors ||= "NIL" + runner.registerValue("number_of_floors", number_of_floors, "") + metadata[metadata.length] = ["number_of_floors", "Number of Floors", "Number of Floors", "Total number of storeys in the building", "none", "double", "FALSE"] + + building_type = building.standardsBuildingType if building.standardsBuildingType.is_initialized + building_type ||= "NIL" + runner.registerValue("building_type", building_type, "") + metadata[metadata.length] = ["building_type", "Building Type", "Bldg Type", "Building type as defined by the modeler", "none", "string", "FALSE"] + + #get exterior wall, exterior roof, and ground plate areas + exterior_wall_area = 0.0 + exterior_roof_area = 0.0 + ground_contact_area = 0.0 + surfaces = model.getSurfaces + surfaces.each do |surface| + if surface.outsideBoundaryCondition == "Outdoors" and surface.surfaceType == "Wall" + exterior_wall_area += surface.netArea + end + if surface.outsideBoundaryCondition == "Outdoors" and surface.surfaceType == "RoofCeiling" + exterior_roof_area += surface.netArea + end + if surface.outsideBoundaryCondition == "Ground" and surface.surfaceType == "Floor" + ground_contact_area += surface.netArea + end + end + + runner.registerValue("exterior_wall_area", exterior_wall_area, "m2") + metadata[metadata.length] = ["exterior_wall_area", "Exterior Wall Area", "Ext Wall Area", "Total area of all surfaces with the conditions of 'Outdoors' and 'Wall'", "square_meter", "double", "FALSE"] + + runner.registerValue("exterior_roof_area", exterior_roof_area, "m2") + metadata[metadata.length] = ["exterior_roof_area", "Exterior Roof Area", "Ext Roof Area", "Total area of all surfaces with the conditions of 'Outdoors' and 'Roof'", "square_meter", "double", "FALSE"] + + runner.registerValue("ground_contact_area", ground_contact_area, "m2") + metadata[metadata.length] = ["ground_contact_area", "Ground Contact Area", "Gnd Area", "Total area of all surfaces with the conditions of 'Ground' and 'Floor'", "square_meter", "double", "FALSE"] + + #get exterior fenestration area + exterior_fenestration_area = 0.0 + subsurfaces = model.getSubSurfaces + subsurfaces.each do |subsurface| + if subsurface.outsideBoundaryCondition == "Outdoors" + if subsurface.subSurfaceType == "FixedWindow" or subsurface.subSurfaceType == "OperableWindow" + exterior_fenestration_area += subsurface.netArea + end + end + end + + runner.registerValue("exterior_fenestration_area", exterior_fenestration_area, "m2") + metadata[metadata.length] = ["exterior_fenestration_area", "Exterior Fenestration Area", "Window Area Total", "Total area of all surfaces with the conditions of 'Outdoors' and 'FixedWindow' or 'OperableWindow'", "square_meter", "double", "FALSE"] + + #get density of economizers in airloops + num_airloops = 0 + num_economizers = 0 + model.getAirLoopHVACs.each do |air_loop| + num_airloops += 1 + if air_loop.airLoopHVACOutdoorAirSystem.is_initialized + air_loop_oa = air_loop.airLoopHVACOutdoorAirSystem.get + air_loop_oa_controller = air_loop_oa.getControllerOutdoorAir + if air_loop_oa_controller.getEconomizerControlType != "NoEconomizer" + num_economizers += 1 + end + end + end + economizer_density = num_economizers / num_airloops if num_airloops != 0 + economizer_density ||= "NIL" + + runner.registerValue("economizer_density", economizer_density, "") + metadata[metadata.length] = ["economizer_density", "Economizer Density", "Econ Density", "Proportion of air loops with economizers to air loops without", "percent", "double", "FALSE"] + + #get aspect ratios + north_wall_area = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Wall Area' AND ColumnName='North (315 to 45 deg)'") + east_wall_area = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Wall Area' AND ColumnName='East (45 to 135 deg)'") + aspect_ratio = north_wall_area / east_wall_area if north_wall_area != 0 && east_wall_area != 0 + aspect_ratio ||= "NIL" + + runner.registerValue("aspect_ratio", aspect_ratio, "") + metadata[metadata.length] = ["aspect_ratio", "Aspect Ratio", "Aspect Ratio", "Proportion of north wall area to east wall area", "percent", "double", "FALSE"] + + #write metadata CSV + runner.registerInfo("Saving Dencity metadata csv file") + CSV.open("report_metadata.csv", "wb") do |csv| + metadata.each do |elem| + csv << elem + end + end + runner.registerInfo("Saved Dencity metadata as report_metadata.csv") + + #get meter timeseries data and output as a msgpack or csv or both + #todo: find a way for the sql call to not rely on RUN PERIOD 1 + timeseries_start = Time.now.to_i + available_meters = sql_file.execAndReturnVectorOfString("SELECT VariableName FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") + get_timeseries_flag = true + if available_meters.empty? + runner.registerWarning("No meters found with Hourly reporting frequency to extract timeseries data from") + else + begin + meter_strings = available_meters.get + runner.registerInfo("The following meters were found: #{meter_strings}") + rescue + runner.registerWarning("Unable to retrieve timeseries strings") + get_timeseries_flag = false + end + meter_units = sql_file.execAndReturnVectorOfString("SELECT VariableUnits FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") + begin + meter_units = meter_units.get + runner.registerInfo("Units were found for all available meters") + rescue + runner.registerWarning("Unable to retrieve timeseries unit strings") + get_timeseries_flag = false + end + runner.registerInfo("The following meter units were found: #{meter_units}") + runner.registerError("Timeseries variable names and units of differing lengths. Exiting Dencity Reports.") if meter_units.size != meter_strings.size + get_timeseries_flag = false if meter_units.size != meter_strings.size + end + + runner.registerInfo("get_timeseries_flag is set to #{get_timeseries_flag}") + if get_timeseries_flag + runner.registerInfo("Retrieving timeseries data") + if msgpack_flag and csv_flag + require "parallel" + require "msgpack" + msgpack_array = [] + csv_array = [] + mark0 = Time.now.to_i + Parallel.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| + if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized + sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get + ts_values = sql_ts.values + ts_times = sql_ts.dateTimes + timeseries_out = {} + initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 + timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 + timeseries_out[initial_epoch_time] = ts_values[0] + next_epoch_time = initial_epoch_time + for i in 1..ts_times.size - 1 + next_epoch_time += timestep_in_epoch + timeseries_out[next_epoch_time] = ts_values[i] + end + csv_array << (["epoch_time"] + timeseries_out.to_a.transpose[0]) if meter_index == 0 + csv_array << ([meter_string.gsub(":", "_") + " [" + meter_units[meter_index] + "]"] + timeseries_out.to_a.transpose[1]) + meter_hash = {timeseries: {}} + meter_hash[:timeseries][:fuel] = meter_string.gsub(":", "_") + meter_hash[:timeseries][:interval] = Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i + meter_hash[:timeseries][:interval_units] = "seconds" + meter_hash[:timeseries][:data] = timeseries_out + meter_hash[:timeseries][:units] = meter_units[meter_index] + msgpack_array << meter_hash + else + runner.registerWarning("Timeseries #{meter_string} was empty.") + end + end + mark1 = Time.now.to_i + runner.registerInfo("DeltaMake=#{mark1-mark0}s") + File.open("report_timeseries.msgpack", "w") do |file| + file << {data: msgpack_array}.to_msgpack + end + runner.registerInfo("Saved timeseries data as report_timeseries.msgpack") + csv_array = csv_array.transpose + CSV.open("report_timeseries.csv", "w") do |csv| + csv_array.each do |elem| + csv << elem + end + end + runner.registerInfo("Saved timeseries data as report_timeseries.csv") + mark2 = Time.now.to_i + runner.registerInfo("DeltaWrite=#{mark2-mark1}s") + + elsif msgpack_flag + require "parallel" + require "msgpack" + msgpack_array = [] + mark0 = Time.now.to_i + meter_strings.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| + if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized + sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get + ts_values = sql_ts.values + ts_times = sql_ts.dateTimes + timeseries_out = {} + initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 + timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 + timeseries_out[initial_epoch_time] = ts_values[0] + next_epoch_time = initial_epoch_time + for i in 1..ts_times.size - 1 + next_epoch_time += timestep_in_epoch + timeseries_out[next_epoch_time] = ts_values[i] + end + meter_hash = {timeseries: {}} + meter_hash[:timeseries][:fuel] = meter_string.gsub(":", "_") + meter_hash[:timeseries][:interval] = Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i + meter_hash[:timeseries][:interval_units] = "seconds" + meter_hash[:timeseries][:data] = timeseries_out + meter_hash[:timeseries][:units] = meter_units[meter_index] + msgpack_array << meter_hash + else + runner.registerWarning("Timeseries #{meter_string} was empty.") + end + end + mark1 = Time.now.to_i + runner.registerInfo("DeltaMake=#{mark1-mark0}s") + File.open("report_timeseries.msgpack", "w") do |file| + file << {data: msgpack_array}.to_msgpack + runner.registerInfo("Saved timeseries data as report_timeseries.msgpack") + end + mark2 = Time.now.to_i + runner.registerInfo("DeltaWrite=#{mark2-mark1}s") + + elsif csv_flag + require "parallel" + csv_array = [] + mark0 = Time.now.to_i + Parallel.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| + if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized + sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get + ts_values = sql_ts.values + ts_times = sql_ts.dateTimes + timeseries_out = {} + initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 + timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 + timeseries_out[initial_epoch_time] = ts_values[0] + next_epoch_time = initial_epoch_time + for i in 1..ts_times.size - 1 + next_epoch_time += timestep_in_epoch + timeseries_out[next_epoch_time] = ts_values[i] + end + csv_array << (["epoch_time"] + timeseries_out.to_a.transpose[0]) if meter_index == 0 + csv_array << ([meter_string.gsub(":", "_") + " [" + meter_units[meter_index] + "]"] + timeseries_out.to_a.transpose[1]) + else + runner.registerWarning("Timeseries #{meter_string} was empty.") + end + end + mark1 = Time.now.to_i + runner.registerInfo("DeltaMake=#{mark1-mark0}s") + csv_array = csv_array.transpose + CSV.open("report_timeseries.csv", "w") do |csv| + csv_array.each do |elem| + csv << elem + end + end + runner.registerInfo("Saved timeseries data as report_timeseries.csv") + mark2 = Time.now.to_i + runner.registerInfo("DeltaWrite=#{mark2-mark1}s") + end + end + timeseries_end = Time.now.to_i + runner.registerInfo("Total Timeseries Time: #{timeseries_end-timeseries_start}") + + #closing the sql file + sql_file.close + + #reporting final condition + runner.registerFinalCondition("DEnCity Report generated successfully.") + + rescue => e + fail "Measure failed with #{e.message}:#{e.backtrace}" + ensure + + # profile_results = RubyProf.stop + # FileUtils.mkdir_p 'results' + # File.open("results/profile-graph.html", 'w') { |f| RubyProf::GraphHtmlPrinter.new(profile_results).print(f) } + # File.open("results/profile-flat.txt", 'w') { |f| RubyProf::FlatPrinter.new(profile_results).print(f) } + # File.open("results/profile-tree.prof", 'w') { |f| RubyProf::CallTreePrinter.new(profile_results).print(f) } + + + end + + true + + end #end the run method + +end #end the measure + +#this allows the measure to be use by the application DencityReports.new.registerWithApplication \ No newline at end of file diff --git a/spec/files/extended_osw/example/measures/DencityReports/measure.rb b/spec/files/extended_osw/example/measures/DencityReports/measure.rb index 906a4c3..d87f955 100644 --- a/spec/files/extended_osw/example/measures/DencityReports/measure.rb +++ b/spec/files/extended_osw/example/measures/DencityReports/measure.rb @@ -1,610 +1,610 @@ -# DencityReports generates data that are required for the DEnCity API. - -# Author: Henry Horsey (github: henryhorsey) -# Creation Date: 6/27/2014 - -require 'openstudio' - -class DencityReports < OpenStudio::Ruleset::ReportingUserScript - - #define the name that a user will see, this method may be deprecated as - #the display name in PAT comes from the name field in measure.xml - def name - "Dencity Reports" - end - - #define the arguments that the user will input - def arguments - args = OpenStudio::Ruleset::OSArgumentVector.new - - #make choice argument for facade - choices = OpenStudio::StringVector.new - choices << "MessagePack" - choices << "CSV" - choices << "Both" - output_format = OpenStudio::Ruleset::OSArgument::makeChoiceArgument("output_format", choices) - output_format.setDisplayName("Output Format") - output_format.setDefaultValue("Both") - args << output_format - - args - end - - #short_os_fuel method - def short_os_fuel(fuel_string) - val = nil - fuel_vec = fuel_string.split(" ") - if fuel_vec[0] == "Electricity" - val = "Elec" - elsif fuel_vec[0] == "District" - fuel_vec[1] == "Heating" ? val = "Dist Heat" : val = "Dist Cool" - elsif fuel_vec[0] == "Natural" - val = "NG" - elsif fuel_vec[0] == "Additional" - val = "Other Fuel" - elsif fuel_vec[0] == "Water" - val = "Water" - else - val = "Unknown" - end - - val - - end - - #short_os_cat method - def short_os_cat(category_string) - val = nil - cat_vec = category_string.split(" ") - if cat_vec[0] == "Heating" - val = "Heat" - elsif cat_vec[0] == "Cooling" - val = "Cool" - elsif cat_vec[0] == "Humidification" - val = "Humid" - elsif cat_vec[0] == "Interior" - cat_vec[1] == "Lighting" ? val = "Int Light" : val = "Int Equip" - elsif cat_vec[0] == "Exterior" - cat_vec[1] == "Lighting" ? val = "Ext Light" : val = "Ext Equip" - elsif cat_vec[0] == "Heat" - cat_vec[1] == "Recovery" ? val = "Heat Rec" : val = "Heat Rej" - elsif cat_vec[0] == "Pumps" - val = "Pumps" - elsif cat_vec[0] == "Fans" - val = "Fans" - elsif cat_vec[0] == "Refrigeration" - val = "Rfg" - elsif cat_vec[0] == "Generators" - val = "Gen" - elsif cat_vec[0] == "Water" - val = "Water Systems" - else - val = "Unknown" - end - - val - - end - - #sql_query method - def sql_query(runner, sql, report_name, query) - val = nil - result = sql.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='#{report_name}' AND #{query}") - if result.empty? - runner.registerWarning("Query failed for #{report_name} and #{query}") - else - begin - val = result.get - rescue - val = nil - runner.registerWarning("Query result.get failed") - end - end - - val - end - - #define what happens when the measure is run - def run(runner, user_arguments) - super(runner, user_arguments) - - #use the built-in error checking - unless runner.validateUserArguments(arguments, user_arguments) - return false - end - - # require 'ruby-prof' - - begin - # RubyProf.start - - output_format = runner.getStringArgumentValue("output_format", user_arguments) - os_version = OpenStudio::VersionString.new(OpenStudio::openStudioVersion()) - min_version_feature1 = OpenStudio::VersionString.new("1.2.3") - require "time" - - unless os_version >= min_version_feature1 - runner.registerError("Dencity Reports requires a version of OpenStudio greater than 1.2.3.") - return false - end - - # determine how to format time series output - msgpack_flag = FALSE - csv_flag = FALSE - if output_format == "MessagePack" || output_format == "Both" - msgpack_flag = TRUE - end - if output_format == "CSV" || output_format == "Both" - csv_flag = TRUE - end - - # get the last model and sql file - model = runner.lastOpenStudioModel - if model.empty? - runner.registerError("Cannot find last model.") - return false - end - model = model.get - building = model.getBuilding - - runner.registerInfo("Model loaded") - - sql_file = runner.lastEnergyPlusSqlFile - if sql_file.empty? - runner.registerError("Cannot find last sql file.") - return false - end - sql_file = sql_file.get - model.setSqlFile(sql_file) - - runner.registerInfo("Sql loaded") - - #Initalize array that will be used to construct the DEnCity metadata csv - metadata = Array.new - metadata[0] = ["name", "display_name", "short_name", "description", "unit", "datatype", "user_defined"] - - #get building footprint to use for calculating end use EUIs - building_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Total Building Area' AND ColumnName='Area'") - building_area ||= "NIL" - runner.registerValue("building_area", building_area, "m2") - metadata[metadata.length] = ["building_area", "Total Building Area", "Bldg Area", "Total building area as calculated by Energy Plus", "square_meter", "double", "FALSE"] - - #get end use totals for fuels - site_energy_use = 0.0 - OpenStudio::EndUseFuelType.getValues.each do |fuel_type| - fuel_str = OpenStudio::EndUseFuelType.new(fuel_type).valueDescription - fuel_type_aggregation = 0.0 - mult_factor = 1 - if fuel_str != "Water" - runner_units_eui = "MJ/m2" - metadata_units_eui = "megajoules_per_square_meter" - mult_factor = 1000 - runner_units_agg = "GJ" - metadata_units_agg = "gigajoule" - else - runner_units_eui = "m" - metadata_units_eui = "meter" - runner_units_agg = "m3" - metadata_units_agg = "cubic meter" - end - OpenStudio::EndUseCategoryType.getValues.each do |category_type| - category_str = OpenStudio::EndUseCategoryType.new(category_type).valueDescription - temp_val = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='End Uses' AND RowName='#{category_str}' AND ColumnName='#{fuel_str}'") - if temp_val - eui_val = temp_val / building_area * mult_factor - prefix_str = OpenStudio::toUnderscoreCase("#{fuel_str}_#{category_str}_eui") - runner.registerValue("#{prefix_str}", eui_val, "#{runner_units_eui}") - short_name = "#{short_os_fuel(fuel_str)} #{short_os_cat(category_str)} EUI" - metadata[metadata.length] = [prefix_str, "#{category_str} #{fuel_str} EUI", short_name, "Total #{fuel_str.downcase} used for #{category_str.downcase} per square foot", metadata_units_eui, "double", "FALSE"] - fuel_type_aggregation += temp_val - end - end - if fuel_type_aggregation - prefix_str = OpenStudio::toUnderscoreCase("total_#{fuel_str}_end_use") - runner.registerValue(prefix_str, fuel_type_aggregation, "#{runner_units_agg}") - short_name = "#{short_os_fuel(fuel_str)} Total" - metadata[metadata.length] = [prefix_str, "Total #{fuel_str} End Use", short_name, "Total #{fuel_str.downcase} End Use", metadata_units_agg, "double", "FALSE"] - site_energy_use += fuel_type_aggregation if fuel_str != "Water" - end - end - - runner.registerValue("site_energy_use", site_energy_use, "GJ") - metadata[metadata.length] = ["site_energy_use", "Total Site Energy Use", "Site Energy", "Total energy consumption for the site", "gigajoule", "double", "FALSE"] - - #get monthly fuel aggregates - #todo: get all monthly fuel type outputs, including non-present fuel types, mapping to 0 - OpenStudio::EndUseFuelType.getValues.each do |fuel_type| - fuel_str = OpenStudio::EndUseFuelType.new(fuel_type).valueDescription - mult_factor = 10**-6 / building_area - runner_units = "MJ/m2" - metadata_units = "megajoules_per_square_meter" - if fuel_str == "Water" - next - end - OpenStudio::MonthOfYear.getValues.each do |month| - if month >= 1 and month <= 12 - fuel_and_month_aggregation = 0.0 - OpenStudio::EndUseCategoryType::getValues.each do |category_type| - if sql_file.energyConsumptionByMonth(OpenStudio::EndUseFuelType.new(fuel_str), OpenStudio::EndUseCategoryType.new(category_type), OpenStudio::MonthOfYear.new(month)).is_initialized - val_in_j = sql_file.energyConsumptionByMonth(OpenStudio::EndUseFuelType.new(fuel_str), OpenStudio::EndUseCategoryType.new(category_type), OpenStudio::MonthOfYear.new(month)).get - fuel_and_month_aggregation += val_in_j - end - end - fuel_and_month_aggregation *= mult_factor - month_str = OpenStudio::MonthOfYear.new(month).valueDescription - prefix_str = OpenStudio::toUnderscoreCase("#{month_str}_end_use_#{fuel_str}_eui") - runner.registerValue("#{prefix_str}", fuel_and_month_aggregation, "#{runner_units}") - short_name = "#{month_str[0..2]} #{short_os_fuel(fuel_str)} EUI" - metadata[metadata.length] = ["#{prefix_str}", "#{month_str} #{fuel_str} EUI", short_name, "Total #{fuel_str.downcase} end use energy use per square meter in #{month_str}", metadata_units, "double", "FALSE"] - end - end - end - - # queries that don't have API methods yet - - life_cycle_cost = sql_query(runner, sql_file, "Life-Cycle Cost Report", "TableName='Present Value by Category' AND RowName='Grand Total' AND ColumnName='Present Value'") - runner.registerValue("life_cycle_cost", life_cycle_cost, "dollars") - metadata[metadata.length] = ["life_cycle_cost", "Total Life Cycle Cost", "Life Cycle Cost", "Total calculated life cycle cost", "us_dollar", "double", "FALSE"] - - conditioned_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Net Conditioned Building Area' AND ColumnName='Area'") - runner.registerValue("conditioned_area", conditioned_area, "m2") - metadata[metadata.length] = ["conditioned_area", "Total Conditioned Area", "Cond Bldg Area", "Total conditioned building area as calculated by Energy Plus", "square_meter", "double", "FALSE"] - - unconditioned_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Unconditioned Building Area' AND ColumnName='Area'") - runner.registerValue("unconditioned_area", unconditioned_area, "m2") - metadata[metadata.length] = ["unconditioned_area", "Total Unconditioned Area", "Uncond Bldg Area", "Total unconditioned building area as calculated by EnergyPlus", "square_meter", "double", "FALSE"] - - total_site_eui = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Site and Source Energy' AND RowName='Total Site Energy' AND ColumnName='Energy Per Conditioned Building Area'") - runner.registerValue("total_site_eui", total_site_eui, "MJ/m2") - metadata[metadata.length] = ["total_site_eui", "Total Site Energy Use Intensity", "Site EUI", "Total site energy use intensity per conditioned building area as calculated by EnergyPlus", "megajoules_per_square_meter", "double", "FALSE"] - - total_source_eui = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Site and Source Energy' AND RowName='Total Source Energy' AND ColumnName='Energy Per Conditioned Building Area'") - runner.registerValue("total_source_eui", total_source_eui, "MJ/m2") - metadata[metadata.length] = ["total_source_eui", "Total Source Energy Use Intensity", "Source EUI", "Total source energy use intensity per conditioned building area as calculated by EnergyPlus", "megajoules_per_square_meter", "double", "FALSE"] - - time_setpoint_not_met_during_occupied_heating = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Comfort and Setpoint Not Met Summary' AND RowName='Time Setpoint Not Met During Occupied Heating' AND ColumnName='Facility'") - runner.registerValue("time_setpoint_not_met_during_occupied_heating", time_setpoint_not_met_during_occupied_heating, "hr") - metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_heating", "Occupied Time During Which Heating Setpoint Not Met", "Setpoint Missed Heat", "Hours during which the building was occupied but the heating setpoint temperature was not met", "hour", "double", "FALSE"] - - time_setpoint_not_met_during_occupied_cooling = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Comfort and Setpoint Not Met Summary' AND RowName='Time Setpoint Not Met During Occupied Cooling' AND ColumnName='Facility'") - runner.registerValue("time_setpoint_not_met_during_occupied_cooling", time_setpoint_not_met_during_occupied_cooling, "hr") - metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_cooling", "Occupied Time During Which Cooling Setpoint Not Met", "Setpoint Missed Cool", "Hours during which the building was occupied but the cooling setpoint temperature was not met", "hour", "double", "FALSE"] - - time_setpoint_not_met_during_occupied_hours = time_setpoint_not_met_during_occupied_heating + time_setpoint_not_met_during_occupied_cooling - runner.registerValue("time_setpoint_not_met_during_occupied_hours", time_setpoint_not_met_during_occupied_hours, "hr") - metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_hours", "Occupied Time During Which Temperature Setpoint Not Met", "Setpoint Missed Total", "Hours during which the building was occupied but the setpoint temperatures were not met", "hour", "double", "FALSE"] - - window_to_wall_ratio_north = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='North (315 to 45 deg)'") - runner.registerValue("window_to_wall_ratio_north", window_to_wall_ratio_north, "%") - metadata[metadata.length] = ["window_to_wall_ratio_north", "North Window to Wall Ratio", "WWR North", "Window to wall ratio of wall objects facing between 315 and 45 degrees", "percent", "double", "FALSE"] - - window_to_wall_ratio_south = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='South (135 to 225 deg)'") - runner.registerValue("window_to_wall_ratio_south", window_to_wall_ratio_south, "%") - metadata[metadata.length] = ["window_to_wall_ratio_south", "South Window to Wall Ratio", "WWR South", "Window to wall ratio of wall objects facing between 135 and 225 degrees", "percent", "double", "FALSE"] - - window_to_wall_ratio_east = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='East (45 to 135 deg)'") - runner.registerValue("window_to_wall_ratio_east", window_to_wall_ratio_east, "%") - metadata[metadata.length] = ["window_to_wall_ratio_east", "East Window to Wall Ratio", "WWR East", "Window to wall ratio of wall objects facing between 45 and 135 degrees", "percent", "double", "FALSE"] - - window_to_wall_ratio_west = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='West (225 to 315 deg)'") - runner.registerValue("window_to_wall_ratio_west", window_to_wall_ratio_west, "%") - metadata[metadata.length] = ["window_to_wall_ratio_west", "West Window to Wall Ratio", "WWR West", "Window to wall ratio of wall objects facing between 225 and 315 degrees", "percent", "double", "FALSE"] - - lat = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Latitude' AND ColumnName='Value'") - runner.registerValue("latitude", lat, "deg") - metadata[metadata.length] = ["latitude", "Latitude", "Lat", "Building latitude based on weather file", "degrees_angular", "double", "FALSE"] - - long = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Longitude' AND ColumnName='Value'") - runner.registerValue("longitude", long, "deg") - metadata[metadata.length] = ["longitude", "Longitude", "Long", "Building longitude based on weather file", "degrees_angular", "double", "FALSE"] - - weather_file = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Weather File' AND ColumnName='Value'") - runner.registerValue("weather_file", weather_file, "deg") - metadata[metadata.length] = ["weather_file", "Weather File", "Weather File", "Name of weather file", "none", "string", "FALSE"] - - # queries with one-line API methods - building_rotation = building.northAxis - runner.registerValue("orientation", building_rotation, "deg") - metadata[metadata.length] = ["orientation", "Building Orientation", "Orientation", "Degrees of building north axis off of true north", "degrees_angular", "double", "FALSE"] - - #floor_to_floor_height = building.nominalFloortoFloorHeight.get - #runner.registerValue("floor_to_floor_height", floor_to_floor_height, "m") - #metadata[metadata.length] = ["floor_to_floor_height", "Floor to Floor Height", "Flr-to-Flr Height", "Nominal floor to floor height of building", "meter", "double", "FALSE"] - - #total_building_volume = building_area * floor_to_floor_height - #runner.registerValue("total_building_volume", total_building_volume, "m3") - #metadata[metadata.length] = ["total_building_volume", "Total Building Volume", "Volume", "Building volume calculated by multiplying floor to floor height and footprint", "cubic_meter", "double", "FALSE"] - - total_occupancy = building.numberOfPeople - runner.registerValue("total_occupancy", total_occupancy, "people") - metadata[metadata.length] = ["total_occupancy", "Total Building Occupancy", "Bldg Occ", "Number of people in the building as calculated by EnergyPlus", "none", "double", "FALSE"] - - occupancy_density = building.peoplePerFloorArea - runner.registerValue("occupant_density", occupancy_density, "people/m2") - metadata[metadata.length] = ["occupant_density", "Building Occupancy Density", "Occ Density", "Number of people per floor area as calculated by EnergyPlus", "none", "double", "FALSE"] - - lighting_power = building.lightingPower - runner.registerValue("lighting_power", lighting_power, "W") - metadata[metadata.length] = ["lighting_power", "Lighting Power", "Lighting Pwr", "Total lighting power", "watt", "double", "FALSE"] - - lighting_power_density = building.lightingPowerPerFloorArea - runner.registerValue("lighting_power_density", lighting_power_density, "W/m2") - metadata[metadata.length] = ["lighting_power_density", "Lighting Power Density", "LPD", "Total lighting power density", "watts_per_square_meter", "double", "FALSE"] - - infiltration_rate = building.infiltrationDesignAirChangesPerHour - runner.registerValue("infiltration_rate", infiltration_rate, "ACH") - metadata[metadata.length] = ["infiltration_rate", "Infiltration Rate", "Infil Rate", "Infiltration rate of air into the building", "none", "double", "FALSE"] - - number_of_floors = building.standardsNumberOfStories.get if building.standardsNumberOfStories.is_initialized - number_of_floors ||= "NIL" - runner.registerValue("number_of_floors", number_of_floors, "") - metadata[metadata.length] = ["number_of_floors", "Number of Floors", "Number of Floors", "Total number of storeys in the building", "none", "double", "FALSE"] - - building_type = building.standardsBuildingType if building.standardsBuildingType.is_initialized - building_type ||= "NIL" - runner.registerValue("building_type", building_type, "") - metadata[metadata.length] = ["building_type", "Building Type", "Bldg Type", "Building type as defined by the modeler", "none", "string", "FALSE"] - - #get exterior wall, exterior roof, and ground plate areas - exterior_wall_area = 0.0 - exterior_roof_area = 0.0 - ground_contact_area = 0.0 - surfaces = model.getSurfaces - surfaces.each do |surface| - if surface.outsideBoundaryCondition == "Outdoors" and surface.surfaceType == "Wall" - exterior_wall_area += surface.netArea - end - if surface.outsideBoundaryCondition == "Outdoors" and surface.surfaceType == "RoofCeiling" - exterior_roof_area += surface.netArea - end - if surface.outsideBoundaryCondition == "Ground" and surface.surfaceType == "Floor" - ground_contact_area += surface.netArea - end - end - - runner.registerValue("exterior_wall_area", exterior_wall_area, "m2") - metadata[metadata.length] = ["exterior_wall_area", "Exterior Wall Area", "Ext Wall Area", "Total area of all surfaces with the conditions of 'Outdoors' and 'Wall'", "square_meter", "double", "FALSE"] - - runner.registerValue("exterior_roof_area", exterior_roof_area, "m2") - metadata[metadata.length] = ["exterior_roof_area", "Exterior Roof Area", "Ext Roof Area", "Total area of all surfaces with the conditions of 'Outdoors' and 'Roof'", "square_meter", "double", "FALSE"] - - runner.registerValue("ground_contact_area", ground_contact_area, "m2") - metadata[metadata.length] = ["ground_contact_area", "Ground Contact Area", "Gnd Area", "Total area of all surfaces with the conditions of 'Ground' and 'Floor'", "square_meter", "double", "FALSE"] - - #get exterior fenestration area - exterior_fenestration_area = 0.0 - subsurfaces = model.getSubSurfaces - subsurfaces.each do |subsurface| - if subsurface.outsideBoundaryCondition == "Outdoors" - if subsurface.subSurfaceType == "FixedWindow" or subsurface.subSurfaceType == "OperableWindow" - exterior_fenestration_area += subsurface.netArea - end - end - end - - runner.registerValue("exterior_fenestration_area", exterior_fenestration_area, "m2") - metadata[metadata.length] = ["exterior_fenestration_area", "Exterior Fenestration Area", "Window Area Total", "Total area of all surfaces with the conditions of 'Outdoors' and 'FixedWindow' or 'OperableWindow'", "square_meter", "double", "FALSE"] - - #get density of economizers in airloops - num_airloops = 0 - num_economizers = 0 - model.getAirLoopHVACs.each do |air_loop| - num_airloops += 1 - if air_loop.airLoopHVACOutdoorAirSystem.is_initialized - air_loop_oa = air_loop.airLoopHVACOutdoorAirSystem.get - air_loop_oa_controller = air_loop_oa.getControllerOutdoorAir - if air_loop_oa_controller.getEconomizerControlType != "NoEconomizer" - num_economizers += 1 - end - end - end - economizer_density = num_economizers / num_airloops if num_airloops != 0 - economizer_density ||= "NIL" - - runner.registerValue("economizer_density", economizer_density, "") - metadata[metadata.length] = ["economizer_density", "Economizer Density", "Econ Density", "Proportion of air loops with economizers to air loops without", "percent", "double", "FALSE"] - - #get aspect ratios - north_wall_area = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Wall Area' AND ColumnName='North (315 to 45 deg)'") - east_wall_area = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Wall Area' AND ColumnName='East (45 to 135 deg)'") - aspect_ratio = north_wall_area / east_wall_area if north_wall_area != 0 && east_wall_area != 0 - aspect_ratio ||= "NIL" - - runner.registerValue("aspect_ratio", aspect_ratio, "") - metadata[metadata.length] = ["aspect_ratio", "Aspect Ratio", "Aspect Ratio", "Proportion of north wall area to east wall area", "percent", "double", "FALSE"] - - #write metadata CSV - runner.registerInfo("Saving Dencity metadata csv file") - CSV.open("report_metadata.csv", "wb") do |csv| - metadata.each do |elem| - csv << elem - end - end - runner.registerInfo("Saved Dencity metadata as report_metadata.csv") - - #get meter timeseries data and output as a msgpack or csv or both - #todo: find a way for the sql call to not rely on RUN PERIOD 1 - timeseries_start = Time.now.to_i - available_meters = sql_file.execAndReturnVectorOfString("SELECT VariableName FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") - get_timeseries_flag = TRUE - if available_meters.empty? - runner.registerWarning("No meters found with Hourly reporting frequency to extract timeseries data from") - else - begin - meter_strings = available_meters.get - runner.registerInfo("The following meters were found: #{meter_strings}") - rescue - runner.registerWarning("Unable to retrieve timeseries strings") - get_timeseries_flag = FALSE - end - meter_units = sql_file.execAndReturnVectorOfString("SELECT VariableUnits FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") - begin - meter_units = meter_units.get - runner.registerInfo("Units were found for all available meters") - rescue - runner.registerWarning("Unable to retrieve timeseries unit strings") - get_timeseries_flag = FALSE - end - runner.registerInfo("The following meter units were found: #{meter_units}") - runner.registerError("Timeseries variable names and units of differing lengths. Exiting Dencity Reports.") if meter_units.size != meter_strings.size - get_timeseries_flag = FALSE if meter_units.size != meter_strings.size - end - - runner.registerInfo("get_timeseries_flag is set to #{get_timeseries_flag}") - if get_timeseries_flag - runner.registerInfo("Retrieving timeseries data") - if msgpack_flag and csv_flag - require "parallel" - require "msgpack" - msgpack_array = [] - csv_array = [] - mark0 = Time.now.to_i - Parallel.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| - if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized - sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get - ts_values = sql_ts.values - ts_times = sql_ts.dateTimes - timeseries_out = {} - initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 - timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 - timeseries_out[initial_epoch_time] = ts_values[0] - next_epoch_time = initial_epoch_time - for i in 1..ts_times.size - 1 - next_epoch_time += timestep_in_epoch - timeseries_out[next_epoch_time] = ts_values[i] - end - csv_array << (["epoch_time"] + timeseries_out.to_a.transpose[0]) if meter_index == 0 - csv_array << ([meter_string.gsub(":", "_") + " [" + meter_units[meter_index] + "]"] + timeseries_out.to_a.transpose[1]) - meter_hash = {timeseries: {}} - meter_hash[:timeseries][:fuel] = meter_string.gsub(":", "_") - meter_hash[:timeseries][:interval] = Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i - meter_hash[:timeseries][:interval_units] = "seconds" - meter_hash[:timeseries][:data] = timeseries_out - meter_hash[:timeseries][:units] = meter_units[meter_index] - msgpack_array << meter_hash - else - runner.registerWarning("Timeseries #{meter_string} was empty.") - end - end - mark1 = Time.now.to_i - runner.registerInfo("DeltaMake=#{mark1-mark0}s") - File.open("report_timeseries.msgpack", "w") do |file| - file << {data: msgpack_array}.to_msgpack - end - runner.registerInfo("Saved timeseries data as report_timeseries.msgpack") - csv_array = csv_array.transpose - CSV.open("report_timeseries.csv", "w") do |csv| - csv_array.each do |elem| - csv << elem - end - end - runner.registerInfo("Saved timeseries data as report_timeseries.csv") - mark2 = Time.now.to_i - runner.registerInfo("DeltaWrite=#{mark2-mark1}s") - - elsif msgpack_flag - require "parallel" - require "msgpack" - msgpack_array = [] - mark0 = Time.now.to_i - meter_strings.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| - if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized - sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get - ts_values = sql_ts.values - ts_times = sql_ts.dateTimes - timeseries_out = {} - initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 - timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 - timeseries_out[initial_epoch_time] = ts_values[0] - next_epoch_time = initial_epoch_time - for i in 1..ts_times.size - 1 - next_epoch_time += timestep_in_epoch - timeseries_out[next_epoch_time] = ts_values[i] - end - meter_hash = {timeseries: {}} - meter_hash[:timeseries][:fuel] = meter_string.gsub(":", "_") - meter_hash[:timeseries][:interval] = Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i - meter_hash[:timeseries][:interval_units] = "seconds" - meter_hash[:timeseries][:data] = timeseries_out - meter_hash[:timeseries][:units] = meter_units[meter_index] - msgpack_array << meter_hash - else - runner.registerWarning("Timeseries #{meter_string} was empty.") - end - end - mark1 = Time.now.to_i - runner.registerInfo("DeltaMake=#{mark1-mark0}s") - File.open("report_timeseries.msgpack", "w") do |file| - file << {data: msgpack_array}.to_msgpack - runner.registerInfo("Saved timeseries data as report_timeseries.msgpack") - end - mark2 = Time.now.to_i - runner.registerInfo("DeltaWrite=#{mark2-mark1}s") - - elsif csv_flag - require "parallel" - csv_array = [] - mark0 = Time.now.to_i - Parallel.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| - if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized - sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get - ts_values = sql_ts.values - ts_times = sql_ts.dateTimes - timeseries_out = {} - initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 - timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 - timeseries_out[initial_epoch_time] = ts_values[0] - next_epoch_time = initial_epoch_time - for i in 1..ts_times.size - 1 - next_epoch_time += timestep_in_epoch - timeseries_out[next_epoch_time] = ts_values[i] - end - csv_array << (["epoch_time"] + timeseries_out.to_a.transpose[0]) if meter_index == 0 - csv_array << ([meter_string.gsub(":", "_") + " [" + meter_units[meter_index] + "]"] + timeseries_out.to_a.transpose[1]) - else - runner.registerWarning("Timeseries #{meter_string} was empty.") - end - end - mark1 = Time.now.to_i - runner.registerInfo("DeltaMake=#{mark1-mark0}s") - csv_array = csv_array.transpose - CSV.open("report_timeseries.csv", "w") do |csv| - csv_array.each do |elem| - csv << elem - end - end - runner.registerInfo("Saved timeseries data as report_timeseries.csv") - mark2 = Time.now.to_i - runner.registerInfo("DeltaWrite=#{mark2-mark1}s") - end - end - timeseries_end = Time.now.to_i - runner.registerInfo("Total Timeseries Time: #{timeseries_end-timeseries_start}") - - #closing the sql file - sql_file.close - - #reporting final condition - runner.registerFinalCondition("DEnCity Report generated successfully.") - - rescue => e - fail "Measure failed with #{e.message}:#{e.backtrace}" - ensure - - # profile_results = RubyProf.stop - # FileUtils.mkdir_p 'results' - # File.open("results/profile-graph.html", 'w') { |f| RubyProf::GraphHtmlPrinter.new(profile_results).print(f) } - # File.open("results/profile-flat.txt", 'w') { |f| RubyProf::FlatPrinter.new(profile_results).print(f) } - # File.open("results/profile-tree.prof", 'w') { |f| RubyProf::CallTreePrinter.new(profile_results).print(f) } - - - end - - true - - end #end the run method - -end #end the measure - -#this allows the measure to be use by the application +# DencityReports generates data that are required for the DEnCity API. + +# Author: Henry Horsey (github: henryhorsey) +# Creation Date: 6/27/2014 + +require 'openstudio' + +class DencityReports < OpenStudio::Ruleset::ReportingUserScript + + #define the name that a user will see, this method may be deprecated as + #the display name in PAT comes from the name field in measure.xml + def name + "Dencity Reports" + end + + #define the arguments that the user will input + def arguments + args = OpenStudio::Ruleset::OSArgumentVector.new + + #make choice argument for facade + choices = OpenStudio::StringVector.new + choices << "MessagePack" + choices << "CSV" + choices << "Both" + output_format = OpenStudio::Ruleset::OSArgument::makeChoiceArgument("output_format", choices) + output_format.setDisplayName("Output Format") + output_format.setDefaultValue("Both") + args << output_format + + args + end + + #short_os_fuel method + def short_os_fuel(fuel_string) + val = nil + fuel_vec = fuel_string.split(" ") + if fuel_vec[0] == "Electricity" + val = "Elec" + elsif fuel_vec[0] == "District" + fuel_vec[1] == "Heating" ? val = "Dist Heat" : val = "Dist Cool" + elsif fuel_vec[0] == "Natural" + val = "NG" + elsif fuel_vec[0] == "Additional" + val = "Other Fuel" + elsif fuel_vec[0] == "Water" + val = "Water" + else + val = "Unknown" + end + + val + + end + + #short_os_cat method + def short_os_cat(category_string) + val = nil + cat_vec = category_string.split(" ") + if cat_vec[0] == "Heating" + val = "Heat" + elsif cat_vec[0] == "Cooling" + val = "Cool" + elsif cat_vec[0] == "Humidification" + val = "Humid" + elsif cat_vec[0] == "Interior" + cat_vec[1] == "Lighting" ? val = "Int Light" : val = "Int Equip" + elsif cat_vec[0] == "Exterior" + cat_vec[1] == "Lighting" ? val = "Ext Light" : val = "Ext Equip" + elsif cat_vec[0] == "Heat" + cat_vec[1] == "Recovery" ? val = "Heat Rec" : val = "Heat Rej" + elsif cat_vec[0] == "Pumps" + val = "Pumps" + elsif cat_vec[0] == "Fans" + val = "Fans" + elsif cat_vec[0] == "Refrigeration" + val = "Rfg" + elsif cat_vec[0] == "Generators" + val = "Gen" + elsif cat_vec[0] == "Water" + val = "Water Systems" + else + val = "Unknown" + end + + val + + end + + #sql_query method + def sql_query(runner, sql, report_name, query) + val = nil + result = sql.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='#{report_name}' AND #{query}") + if result.empty? + runner.registerWarning("Query failed for #{report_name} and #{query}") + else + begin + val = result.get + rescue + val = nil + runner.registerWarning("Query result.get failed") + end + end + + val + end + + #define what happens when the measure is run + def run(runner, user_arguments) + super(runner, user_arguments) + + #use the built-in error checking + unless runner.validateUserArguments(arguments, user_arguments) + return false + end + + # require 'ruby-prof' + + begin + # RubyProf.start + + output_format = runner.getStringArgumentValue("output_format", user_arguments) + os_version = OpenStudio::VersionString.new(OpenStudio::openStudioVersion()) + min_version_feature1 = OpenStudio::VersionString.new("1.2.3") + require "time" + + unless os_version >= min_version_feature1 + runner.registerError("Dencity Reports requires a version of OpenStudio greater than 1.2.3.") + return false + end + + # determine how to format time series output + msgpack_flag = false + csv_flag = false + if output_format == "MessagePack" || output_format == "Both" + msgpack_flag = true + end + if output_format == "CSV" || output_format == "Both" + csv_flag = true + end + + # get the last model and sql file + model = runner.lastOpenStudioModel + if model.empty? + runner.registerError("Cannot find last model.") + return false + end + model = model.get + building = model.getBuilding + + runner.registerInfo("Model loaded") + + sql_file = runner.lastEnergyPlusSqlFile + if sql_file.empty? + runner.registerError("Cannot find last sql file.") + return false + end + sql_file = sql_file.get + model.setSqlFile(sql_file) + + runner.registerInfo("Sql loaded") + + #Initalize array that will be used to construct the DEnCity metadata csv + metadata = Array.new + metadata[0] = ["name", "display_name", "short_name", "description", "unit", "datatype", "user_defined"] + + #get building footprint to use for calculating end use EUIs + building_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Total Building Area' AND ColumnName='Area'") + building_area ||= "NIL" + runner.registerValue("building_area", building_area, "m2") + metadata[metadata.length] = ["building_area", "Total Building Area", "Bldg Area", "Total building area as calculated by Energy Plus", "square_meter", "double", "FALSE"] + + #get end use totals for fuels + site_energy_use = 0.0 + OpenStudio::EndUseFuelType.getValues.each do |fuel_type| + fuel_str = OpenStudio::EndUseFuelType.new(fuel_type).valueDescription + fuel_type_aggregation = 0.0 + mult_factor = 1 + if fuel_str != "Water" + runner_units_eui = "MJ/m2" + metadata_units_eui = "megajoules_per_square_meter" + mult_factor = 1000 + runner_units_agg = "GJ" + metadata_units_agg = "gigajoule" + else + runner_units_eui = "m" + metadata_units_eui = "meter" + runner_units_agg = "m3" + metadata_units_agg = "cubic meter" + end + OpenStudio::EndUseCategoryType.getValues.each do |category_type| + category_str = OpenStudio::EndUseCategoryType.new(category_type).valueDescription + temp_val = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='End Uses' AND RowName='#{category_str}' AND ColumnName='#{fuel_str}'") + if temp_val + eui_val = temp_val / building_area * mult_factor + prefix_str = OpenStudio::toUnderscoreCase("#{fuel_str}_#{category_str}_eui") + runner.registerValue("#{prefix_str}", eui_val, "#{runner_units_eui}") + short_name = "#{short_os_fuel(fuel_str)} #{short_os_cat(category_str)} EUI" + metadata[metadata.length] = [prefix_str, "#{category_str} #{fuel_str} EUI", short_name, "Total #{fuel_str.downcase} used for #{category_str.downcase} per square foot", metadata_units_eui, "double", "FALSE"] + fuel_type_aggregation += temp_val + end + end + if fuel_type_aggregation + prefix_str = OpenStudio::toUnderscoreCase("total_#{fuel_str}_end_use") + runner.registerValue(prefix_str, fuel_type_aggregation, "#{runner_units_agg}") + short_name = "#{short_os_fuel(fuel_str)} Total" + metadata[metadata.length] = [prefix_str, "Total #{fuel_str} End Use", short_name, "Total #{fuel_str.downcase} End Use", metadata_units_agg, "double", "FALSE"] + site_energy_use += fuel_type_aggregation if fuel_str != "Water" + end + end + + runner.registerValue("site_energy_use", site_energy_use, "GJ") + metadata[metadata.length] = ["site_energy_use", "Total Site Energy Use", "Site Energy", "Total energy consumption for the site", "gigajoule", "double", "FALSE"] + + #get monthly fuel aggregates + #todo: get all monthly fuel type outputs, including non-present fuel types, mapping to 0 + OpenStudio::EndUseFuelType.getValues.each do |fuel_type| + fuel_str = OpenStudio::EndUseFuelType.new(fuel_type).valueDescription + mult_factor = 10**-6 / building_area + runner_units = "MJ/m2" + metadata_units = "megajoules_per_square_meter" + if fuel_str == "Water" + next + end + OpenStudio::MonthOfYear.getValues.each do |month| + if month >= 1 and month <= 12 + fuel_and_month_aggregation = 0.0 + OpenStudio::EndUseCategoryType::getValues.each do |category_type| + if sql_file.energyConsumptionByMonth(OpenStudio::EndUseFuelType.new(fuel_str), OpenStudio::EndUseCategoryType.new(category_type), OpenStudio::MonthOfYear.new(month)).is_initialized + val_in_j = sql_file.energyConsumptionByMonth(OpenStudio::EndUseFuelType.new(fuel_str), OpenStudio::EndUseCategoryType.new(category_type), OpenStudio::MonthOfYear.new(month)).get + fuel_and_month_aggregation += val_in_j + end + end + fuel_and_month_aggregation *= mult_factor + month_str = OpenStudio::MonthOfYear.new(month).valueDescription + prefix_str = OpenStudio::toUnderscoreCase("#{month_str}_end_use_#{fuel_str}_eui") + runner.registerValue("#{prefix_str}", fuel_and_month_aggregation, "#{runner_units}") + short_name = "#{month_str[0..2]} #{short_os_fuel(fuel_str)} EUI" + metadata[metadata.length] = ["#{prefix_str}", "#{month_str} #{fuel_str} EUI", short_name, "Total #{fuel_str.downcase} end use energy use per square meter in #{month_str}", metadata_units, "double", "FALSE"] + end + end + end + + # queries that don't have API methods yet + + life_cycle_cost = sql_query(runner, sql_file, "Life-Cycle Cost Report", "TableName='Present Value by Category' AND RowName='Grand Total' AND ColumnName='Present Value'") + runner.registerValue("life_cycle_cost", life_cycle_cost, "dollars") + metadata[metadata.length] = ["life_cycle_cost", "Total Life Cycle Cost", "Life Cycle Cost", "Total calculated life cycle cost", "us_dollar", "double", "FALSE"] + + conditioned_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Net Conditioned Building Area' AND ColumnName='Area'") + runner.registerValue("conditioned_area", conditioned_area, "m2") + metadata[metadata.length] = ["conditioned_area", "Total Conditioned Area", "Cond Bldg Area", "Total conditioned building area as calculated by Energy Plus", "square_meter", "double", "FALSE"] + + unconditioned_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Unconditioned Building Area' AND ColumnName='Area'") + runner.registerValue("unconditioned_area", unconditioned_area, "m2") + metadata[metadata.length] = ["unconditioned_area", "Total Unconditioned Area", "Uncond Bldg Area", "Total unconditioned building area as calculated by EnergyPlus", "square_meter", "double", "FALSE"] + + total_site_eui = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Site and Source Energy' AND RowName='Total Site Energy' AND ColumnName='Energy Per Conditioned Building Area'") + runner.registerValue("total_site_eui", total_site_eui, "MJ/m2") + metadata[metadata.length] = ["total_site_eui", "Total Site Energy Use Intensity", "Site EUI", "Total site energy use intensity per conditioned building area as calculated by EnergyPlus", "megajoules_per_square_meter", "double", "FALSE"] + + total_source_eui = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Site and Source Energy' AND RowName='Total Source Energy' AND ColumnName='Energy Per Conditioned Building Area'") + runner.registerValue("total_source_eui", total_source_eui, "MJ/m2") + metadata[metadata.length] = ["total_source_eui", "Total Source Energy Use Intensity", "Source EUI", "Total source energy use intensity per conditioned building area as calculated by EnergyPlus", "megajoules_per_square_meter", "double", "FALSE"] + + time_setpoint_not_met_during_occupied_heating = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Comfort and Setpoint Not Met Summary' AND RowName='Time Setpoint Not Met During Occupied Heating' AND ColumnName='Facility'") + runner.registerValue("time_setpoint_not_met_during_occupied_heating", time_setpoint_not_met_during_occupied_heating, "hr") + metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_heating", "Occupied Time During Which Heating Setpoint Not Met", "Setpoint Missed Heat", "Hours during which the building was occupied but the heating setpoint temperature was not met", "hour", "double", "FALSE"] + + time_setpoint_not_met_during_occupied_cooling = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Comfort and Setpoint Not Met Summary' AND RowName='Time Setpoint Not Met During Occupied Cooling' AND ColumnName='Facility'") + runner.registerValue("time_setpoint_not_met_during_occupied_cooling", time_setpoint_not_met_during_occupied_cooling, "hr") + metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_cooling", "Occupied Time During Which Cooling Setpoint Not Met", "Setpoint Missed Cool", "Hours during which the building was occupied but the cooling setpoint temperature was not met", "hour", "double", "FALSE"] + + time_setpoint_not_met_during_occupied_hours = time_setpoint_not_met_during_occupied_heating + time_setpoint_not_met_during_occupied_cooling + runner.registerValue("time_setpoint_not_met_during_occupied_hours", time_setpoint_not_met_during_occupied_hours, "hr") + metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_hours", "Occupied Time During Which Temperature Setpoint Not Met", "Setpoint Missed Total", "Hours during which the building was occupied but the setpoint temperatures were not met", "hour", "double", "FALSE"] + + window_to_wall_ratio_north = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='North (315 to 45 deg)'") + runner.registerValue("window_to_wall_ratio_north", window_to_wall_ratio_north, "%") + metadata[metadata.length] = ["window_to_wall_ratio_north", "North Window to Wall Ratio", "WWR North", "Window to wall ratio of wall objects facing between 315 and 45 degrees", "percent", "double", "FALSE"] + + window_to_wall_ratio_south = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='South (135 to 225 deg)'") + runner.registerValue("window_to_wall_ratio_south", window_to_wall_ratio_south, "%") + metadata[metadata.length] = ["window_to_wall_ratio_south", "South Window to Wall Ratio", "WWR South", "Window to wall ratio of wall objects facing between 135 and 225 degrees", "percent", "double", "FALSE"] + + window_to_wall_ratio_east = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='East (45 to 135 deg)'") + runner.registerValue("window_to_wall_ratio_east", window_to_wall_ratio_east, "%") + metadata[metadata.length] = ["window_to_wall_ratio_east", "East Window to Wall Ratio", "WWR East", "Window to wall ratio of wall objects facing between 45 and 135 degrees", "percent", "double", "FALSE"] + + window_to_wall_ratio_west = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='West (225 to 315 deg)'") + runner.registerValue("window_to_wall_ratio_west", window_to_wall_ratio_west, "%") + metadata[metadata.length] = ["window_to_wall_ratio_west", "West Window to Wall Ratio", "WWR West", "Window to wall ratio of wall objects facing between 225 and 315 degrees", "percent", "double", "FALSE"] + + lat = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Latitude' AND ColumnName='Value'") + runner.registerValue("latitude", lat, "deg") + metadata[metadata.length] = ["latitude", "Latitude", "Lat", "Building latitude based on weather file", "degrees_angular", "double", "FALSE"] + + long = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Longitude' AND ColumnName='Value'") + runner.registerValue("longitude", long, "deg") + metadata[metadata.length] = ["longitude", "Longitude", "Long", "Building longitude based on weather file", "degrees_angular", "double", "FALSE"] + + weather_file = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Weather File' AND ColumnName='Value'") + runner.registerValue("weather_file", weather_file, "deg") + metadata[metadata.length] = ["weather_file", "Weather File", "Weather File", "Name of weather file", "none", "string", "FALSE"] + + # queries with one-line API methods + building_rotation = building.northAxis + runner.registerValue("orientation", building_rotation, "deg") + metadata[metadata.length] = ["orientation", "Building Orientation", "Orientation", "Degrees of building north axis off of true north", "degrees_angular", "double", "FALSE"] + + #floor_to_floor_height = building.nominalFloortoFloorHeight.get + #runner.registerValue("floor_to_floor_height", floor_to_floor_height, "m") + #metadata[metadata.length] = ["floor_to_floor_height", "Floor to Floor Height", "Flr-to-Flr Height", "Nominal floor to floor height of building", "meter", "double", "FALSE"] + + #total_building_volume = building_area * floor_to_floor_height + #runner.registerValue("total_building_volume", total_building_volume, "m3") + #metadata[metadata.length] = ["total_building_volume", "Total Building Volume", "Volume", "Building volume calculated by multiplying floor to floor height and footprint", "cubic_meter", "double", "FALSE"] + + total_occupancy = building.numberOfPeople + runner.registerValue("total_occupancy", total_occupancy, "people") + metadata[metadata.length] = ["total_occupancy", "Total Building Occupancy", "Bldg Occ", "Number of people in the building as calculated by EnergyPlus", "none", "double", "FALSE"] + + occupancy_density = building.peoplePerFloorArea + runner.registerValue("occupant_density", occupancy_density, "people/m2") + metadata[metadata.length] = ["occupant_density", "Building Occupancy Density", "Occ Density", "Number of people per floor area as calculated by EnergyPlus", "none", "double", "FALSE"] + + lighting_power = building.lightingPower + runner.registerValue("lighting_power", lighting_power, "W") + metadata[metadata.length] = ["lighting_power", "Lighting Power", "Lighting Pwr", "Total lighting power", "watt", "double", "FALSE"] + + lighting_power_density = building.lightingPowerPerFloorArea + runner.registerValue("lighting_power_density", lighting_power_density, "W/m2") + metadata[metadata.length] = ["lighting_power_density", "Lighting Power Density", "LPD", "Total lighting power density", "watts_per_square_meter", "double", "FALSE"] + + infiltration_rate = building.infiltrationDesignAirChangesPerHour + runner.registerValue("infiltration_rate", infiltration_rate, "ACH") + metadata[metadata.length] = ["infiltration_rate", "Infiltration Rate", "Infil Rate", "Infiltration rate of air into the building", "none", "double", "FALSE"] + + number_of_floors = building.standardsNumberOfStories.get if building.standardsNumberOfStories.is_initialized + number_of_floors ||= "NIL" + runner.registerValue("number_of_floors", number_of_floors, "") + metadata[metadata.length] = ["number_of_floors", "Number of Floors", "Number of Floors", "Total number of storeys in the building", "none", "double", "FALSE"] + + building_type = building.standardsBuildingType if building.standardsBuildingType.is_initialized + building_type ||= "NIL" + runner.registerValue("building_type", building_type, "") + metadata[metadata.length] = ["building_type", "Building Type", "Bldg Type", "Building type as defined by the modeler", "none", "string", "FALSE"] + + #get exterior wall, exterior roof, and ground plate areas + exterior_wall_area = 0.0 + exterior_roof_area = 0.0 + ground_contact_area = 0.0 + surfaces = model.getSurfaces + surfaces.each do |surface| + if surface.outsideBoundaryCondition == "Outdoors" and surface.surfaceType == "Wall" + exterior_wall_area += surface.netArea + end + if surface.outsideBoundaryCondition == "Outdoors" and surface.surfaceType == "RoofCeiling" + exterior_roof_area += surface.netArea + end + if surface.outsideBoundaryCondition == "Ground" and surface.surfaceType == "Floor" + ground_contact_area += surface.netArea + end + end + + runner.registerValue("exterior_wall_area", exterior_wall_area, "m2") + metadata[metadata.length] = ["exterior_wall_area", "Exterior Wall Area", "Ext Wall Area", "Total area of all surfaces with the conditions of 'Outdoors' and 'Wall'", "square_meter", "double", "FALSE"] + + runner.registerValue("exterior_roof_area", exterior_roof_area, "m2") + metadata[metadata.length] = ["exterior_roof_area", "Exterior Roof Area", "Ext Roof Area", "Total area of all surfaces with the conditions of 'Outdoors' and 'Roof'", "square_meter", "double", "FALSE"] + + runner.registerValue("ground_contact_area", ground_contact_area, "m2") + metadata[metadata.length] = ["ground_contact_area", "Ground Contact Area", "Gnd Area", "Total area of all surfaces with the conditions of 'Ground' and 'Floor'", "square_meter", "double", "FALSE"] + + #get exterior fenestration area + exterior_fenestration_area = 0.0 + subsurfaces = model.getSubSurfaces + subsurfaces.each do |subsurface| + if subsurface.outsideBoundaryCondition == "Outdoors" + if subsurface.subSurfaceType == "FixedWindow" or subsurface.subSurfaceType == "OperableWindow" + exterior_fenestration_area += subsurface.netArea + end + end + end + + runner.registerValue("exterior_fenestration_area", exterior_fenestration_area, "m2") + metadata[metadata.length] = ["exterior_fenestration_area", "Exterior Fenestration Area", "Window Area Total", "Total area of all surfaces with the conditions of 'Outdoors' and 'FixedWindow' or 'OperableWindow'", "square_meter", "double", "FALSE"] + + #get density of economizers in airloops + num_airloops = 0 + num_economizers = 0 + model.getAirLoopHVACs.each do |air_loop| + num_airloops += 1 + if air_loop.airLoopHVACOutdoorAirSystem.is_initialized + air_loop_oa = air_loop.airLoopHVACOutdoorAirSystem.get + air_loop_oa_controller = air_loop_oa.getControllerOutdoorAir + if air_loop_oa_controller.getEconomizerControlType != "NoEconomizer" + num_economizers += 1 + end + end + end + economizer_density = num_economizers / num_airloops if num_airloops != 0 + economizer_density ||= "NIL" + + runner.registerValue("economizer_density", economizer_density, "") + metadata[metadata.length] = ["economizer_density", "Economizer Density", "Econ Density", "Proportion of air loops with economizers to air loops without", "percent", "double", "FALSE"] + + #get aspect ratios + north_wall_area = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Wall Area' AND ColumnName='North (315 to 45 deg)'") + east_wall_area = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Wall Area' AND ColumnName='East (45 to 135 deg)'") + aspect_ratio = north_wall_area / east_wall_area if north_wall_area != 0 && east_wall_area != 0 + aspect_ratio ||= "NIL" + + runner.registerValue("aspect_ratio", aspect_ratio, "") + metadata[metadata.length] = ["aspect_ratio", "Aspect Ratio", "Aspect Ratio", "Proportion of north wall area to east wall area", "percent", "double", "FALSE"] + + #write metadata CSV + runner.registerInfo("Saving Dencity metadata csv file") + CSV.open("report_metadata.csv", "wb") do |csv| + metadata.each do |elem| + csv << elem + end + end + runner.registerInfo("Saved Dencity metadata as report_metadata.csv") + + #get meter timeseries data and output as a msgpack or csv or both + #todo: find a way for the sql call to not rely on RUN PERIOD 1 + timeseries_start = Time.now.to_i + available_meters = sql_file.execAndReturnVectorOfString("SELECT VariableName FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") + get_timeseries_flag = true + if available_meters.empty? + runner.registerWarning("No meters found with Hourly reporting frequency to extract timeseries data from") + else + begin + meter_strings = available_meters.get + runner.registerInfo("The following meters were found: #{meter_strings}") + rescue + runner.registerWarning("Unable to retrieve timeseries strings") + get_timeseries_flag = false + end + meter_units = sql_file.execAndReturnVectorOfString("SELECT VariableUnits FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") + begin + meter_units = meter_units.get + runner.registerInfo("Units were found for all available meters") + rescue + runner.registerWarning("Unable to retrieve timeseries unit strings") + get_timeseries_flag = false + end + runner.registerInfo("The following meter units were found: #{meter_units}") + runner.registerError("Timeseries variable names and units of differing lengths. Exiting Dencity Reports.") if meter_units.size != meter_strings.size + get_timeseries_flag = false if meter_units.size != meter_strings.size + end + + runner.registerInfo("get_timeseries_flag is set to #{get_timeseries_flag}") + if get_timeseries_flag + runner.registerInfo("Retrieving timeseries data") + if msgpack_flag and csv_flag + require "parallel" + require "msgpack" + msgpack_array = [] + csv_array = [] + mark0 = Time.now.to_i + Parallel.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| + if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized + sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get + ts_values = sql_ts.values + ts_times = sql_ts.dateTimes + timeseries_out = {} + initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 + timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 + timeseries_out[initial_epoch_time] = ts_values[0] + next_epoch_time = initial_epoch_time + for i in 1..ts_times.size - 1 + next_epoch_time += timestep_in_epoch + timeseries_out[next_epoch_time] = ts_values[i] + end + csv_array << (["epoch_time"] + timeseries_out.to_a.transpose[0]) if meter_index == 0 + csv_array << ([meter_string.gsub(":", "_") + " [" + meter_units[meter_index] + "]"] + timeseries_out.to_a.transpose[1]) + meter_hash = {timeseries: {}} + meter_hash[:timeseries][:fuel] = meter_string.gsub(":", "_") + meter_hash[:timeseries][:interval] = Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i + meter_hash[:timeseries][:interval_units] = "seconds" + meter_hash[:timeseries][:data] = timeseries_out + meter_hash[:timeseries][:units] = meter_units[meter_index] + msgpack_array << meter_hash + else + runner.registerWarning("Timeseries #{meter_string} was empty.") + end + end + mark1 = Time.now.to_i + runner.registerInfo("DeltaMake=#{mark1-mark0}s") + File.open("report_timeseries.msgpack", "w") do |file| + file << {data: msgpack_array}.to_msgpack + end + runner.registerInfo("Saved timeseries data as report_timeseries.msgpack") + csv_array = csv_array.transpose + CSV.open("report_timeseries.csv", "w") do |csv| + csv_array.each do |elem| + csv << elem + end + end + runner.registerInfo("Saved timeseries data as report_timeseries.csv") + mark2 = Time.now.to_i + runner.registerInfo("DeltaWrite=#{mark2-mark1}s") + + elsif msgpack_flag + require "parallel" + require "msgpack" + msgpack_array = [] + mark0 = Time.now.to_i + meter_strings.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| + if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized + sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get + ts_values = sql_ts.values + ts_times = sql_ts.dateTimes + timeseries_out = {} + initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 + timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 + timeseries_out[initial_epoch_time] = ts_values[0] + next_epoch_time = initial_epoch_time + for i in 1..ts_times.size - 1 + next_epoch_time += timestep_in_epoch + timeseries_out[next_epoch_time] = ts_values[i] + end + meter_hash = {timeseries: {}} + meter_hash[:timeseries][:fuel] = meter_string.gsub(":", "_") + meter_hash[:timeseries][:interval] = Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i + meter_hash[:timeseries][:interval_units] = "seconds" + meter_hash[:timeseries][:data] = timeseries_out + meter_hash[:timeseries][:units] = meter_units[meter_index] + msgpack_array << meter_hash + else + runner.registerWarning("Timeseries #{meter_string} was empty.") + end + end + mark1 = Time.now.to_i + runner.registerInfo("DeltaMake=#{mark1-mark0}s") + File.open("report_timeseries.msgpack", "w") do |file| + file << {data: msgpack_array}.to_msgpack + runner.registerInfo("Saved timeseries data as report_timeseries.msgpack") + end + mark2 = Time.now.to_i + runner.registerInfo("DeltaWrite=#{mark2-mark1}s") + + elsif csv_flag + require "parallel" + csv_array = [] + mark0 = Time.now.to_i + Parallel.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| + if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized + sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get + ts_values = sql_ts.values + ts_times = sql_ts.dateTimes + timeseries_out = {} + initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 + timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 + timeseries_out[initial_epoch_time] = ts_values[0] + next_epoch_time = initial_epoch_time + for i in 1..ts_times.size - 1 + next_epoch_time += timestep_in_epoch + timeseries_out[next_epoch_time] = ts_values[i] + end + csv_array << (["epoch_time"] + timeseries_out.to_a.transpose[0]) if meter_index == 0 + csv_array << ([meter_string.gsub(":", "_") + " [" + meter_units[meter_index] + "]"] + timeseries_out.to_a.transpose[1]) + else + runner.registerWarning("Timeseries #{meter_string} was empty.") + end + end + mark1 = Time.now.to_i + runner.registerInfo("DeltaMake=#{mark1-mark0}s") + csv_array = csv_array.transpose + CSV.open("report_timeseries.csv", "w") do |csv| + csv_array.each do |elem| + csv << elem + end + end + runner.registerInfo("Saved timeseries data as report_timeseries.csv") + mark2 = Time.now.to_i + runner.registerInfo("DeltaWrite=#{mark2-mark1}s") + end + end + timeseries_end = Time.now.to_i + runner.registerInfo("Total Timeseries Time: #{timeseries_end-timeseries_start}") + + #closing the sql file + sql_file.close + + #reporting final condition + runner.registerFinalCondition("DEnCity Report generated successfully.") + + rescue => e + fail "Measure failed with #{e.message}:#{e.backtrace}" + ensure + + # profile_results = RubyProf.stop + # FileUtils.mkdir_p 'results' + # File.open("results/profile-graph.html", 'w') { |f| RubyProf::GraphHtmlPrinter.new(profile_results).print(f) } + # File.open("results/profile-flat.txt", 'w') { |f| RubyProf::FlatPrinter.new(profile_results).print(f) } + # File.open("results/profile-tree.prof", 'w') { |f| RubyProf::CallTreePrinter.new(profile_results).print(f) } + + + end + + true + + end #end the run method + +end #end the measure + +#this allows the measure to be use by the application DencityReports.new.registerWithApplication \ No newline at end of file diff --git a/spec/files/fast_osw/measures/DencityReports/measure.rb b/spec/files/fast_osw/measures/DencityReports/measure.rb index b0fb27a..d87f955 100644 --- a/spec/files/fast_osw/measures/DencityReports/measure.rb +++ b/spec/files/fast_osw/measures/DencityReports/measure.rb @@ -129,13 +129,13 @@ def run(runner, user_arguments) end # determine how to format time series output - msgpack_flag = FALSE - csv_flag = FALSE + msgpack_flag = false + csv_flag = false if output_format == "MessagePack" || output_format == "Both" - msgpack_flag = TRUE + msgpack_flag = true end if output_format == "CSV" || output_format == "Both" - csv_flag = TRUE + csv_flag = true end # get the last model and sql file @@ -426,7 +426,7 @@ def run(runner, user_arguments) #todo: find a way for the sql call to not rely on RUN PERIOD 1 timeseries_start = Time.now.to_i available_meters = sql_file.execAndReturnVectorOfString("SELECT VariableName FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") - get_timeseries_flag = TRUE + get_timeseries_flag = true if available_meters.empty? runner.registerWarning("No meters found with Hourly reporting frequency to extract timeseries data from") else @@ -435,7 +435,7 @@ def run(runner, user_arguments) runner.registerInfo("The following meters were found: #{meter_strings}") rescue runner.registerWarning("Unable to retrieve timeseries strings") - get_timeseries_flag = FALSE + get_timeseries_flag = false end meter_units = sql_file.execAndReturnVectorOfString("SELECT VariableUnits FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") begin @@ -443,11 +443,11 @@ def run(runner, user_arguments) runner.registerInfo("Units were found for all available meters") rescue runner.registerWarning("Unable to retrieve timeseries unit strings") - get_timeseries_flag = FALSE + get_timeseries_flag = false end runner.registerInfo("The following meter units were found: #{meter_units}") runner.registerError("Timeseries variable names and units of differing lengths. Exiting Dencity Reports.") if meter_units.size != meter_strings.size - get_timeseries_flag = FALSE if meter_units.size != meter_strings.size + get_timeseries_flag = false if meter_units.size != meter_strings.size end runner.registerInfo("get_timeseries_flag is set to #{get_timeseries_flag}") diff --git a/spec/files/halt_workflow_osw/measures/DencityReports/measure.rb b/spec/files/halt_workflow_osw/measures/DencityReports/measure.rb index 906a4c3..d87f955 100644 --- a/spec/files/halt_workflow_osw/measures/DencityReports/measure.rb +++ b/spec/files/halt_workflow_osw/measures/DencityReports/measure.rb @@ -1,610 +1,610 @@ -# DencityReports generates data that are required for the DEnCity API. - -# Author: Henry Horsey (github: henryhorsey) -# Creation Date: 6/27/2014 - -require 'openstudio' - -class DencityReports < OpenStudio::Ruleset::ReportingUserScript - - #define the name that a user will see, this method may be deprecated as - #the display name in PAT comes from the name field in measure.xml - def name - "Dencity Reports" - end - - #define the arguments that the user will input - def arguments - args = OpenStudio::Ruleset::OSArgumentVector.new - - #make choice argument for facade - choices = OpenStudio::StringVector.new - choices << "MessagePack" - choices << "CSV" - choices << "Both" - output_format = OpenStudio::Ruleset::OSArgument::makeChoiceArgument("output_format", choices) - output_format.setDisplayName("Output Format") - output_format.setDefaultValue("Both") - args << output_format - - args - end - - #short_os_fuel method - def short_os_fuel(fuel_string) - val = nil - fuel_vec = fuel_string.split(" ") - if fuel_vec[0] == "Electricity" - val = "Elec" - elsif fuel_vec[0] == "District" - fuel_vec[1] == "Heating" ? val = "Dist Heat" : val = "Dist Cool" - elsif fuel_vec[0] == "Natural" - val = "NG" - elsif fuel_vec[0] == "Additional" - val = "Other Fuel" - elsif fuel_vec[0] == "Water" - val = "Water" - else - val = "Unknown" - end - - val - - end - - #short_os_cat method - def short_os_cat(category_string) - val = nil - cat_vec = category_string.split(" ") - if cat_vec[0] == "Heating" - val = "Heat" - elsif cat_vec[0] == "Cooling" - val = "Cool" - elsif cat_vec[0] == "Humidification" - val = "Humid" - elsif cat_vec[0] == "Interior" - cat_vec[1] == "Lighting" ? val = "Int Light" : val = "Int Equip" - elsif cat_vec[0] == "Exterior" - cat_vec[1] == "Lighting" ? val = "Ext Light" : val = "Ext Equip" - elsif cat_vec[0] == "Heat" - cat_vec[1] == "Recovery" ? val = "Heat Rec" : val = "Heat Rej" - elsif cat_vec[0] == "Pumps" - val = "Pumps" - elsif cat_vec[0] == "Fans" - val = "Fans" - elsif cat_vec[0] == "Refrigeration" - val = "Rfg" - elsif cat_vec[0] == "Generators" - val = "Gen" - elsif cat_vec[0] == "Water" - val = "Water Systems" - else - val = "Unknown" - end - - val - - end - - #sql_query method - def sql_query(runner, sql, report_name, query) - val = nil - result = sql.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='#{report_name}' AND #{query}") - if result.empty? - runner.registerWarning("Query failed for #{report_name} and #{query}") - else - begin - val = result.get - rescue - val = nil - runner.registerWarning("Query result.get failed") - end - end - - val - end - - #define what happens when the measure is run - def run(runner, user_arguments) - super(runner, user_arguments) - - #use the built-in error checking - unless runner.validateUserArguments(arguments, user_arguments) - return false - end - - # require 'ruby-prof' - - begin - # RubyProf.start - - output_format = runner.getStringArgumentValue("output_format", user_arguments) - os_version = OpenStudio::VersionString.new(OpenStudio::openStudioVersion()) - min_version_feature1 = OpenStudio::VersionString.new("1.2.3") - require "time" - - unless os_version >= min_version_feature1 - runner.registerError("Dencity Reports requires a version of OpenStudio greater than 1.2.3.") - return false - end - - # determine how to format time series output - msgpack_flag = FALSE - csv_flag = FALSE - if output_format == "MessagePack" || output_format == "Both" - msgpack_flag = TRUE - end - if output_format == "CSV" || output_format == "Both" - csv_flag = TRUE - end - - # get the last model and sql file - model = runner.lastOpenStudioModel - if model.empty? - runner.registerError("Cannot find last model.") - return false - end - model = model.get - building = model.getBuilding - - runner.registerInfo("Model loaded") - - sql_file = runner.lastEnergyPlusSqlFile - if sql_file.empty? - runner.registerError("Cannot find last sql file.") - return false - end - sql_file = sql_file.get - model.setSqlFile(sql_file) - - runner.registerInfo("Sql loaded") - - #Initalize array that will be used to construct the DEnCity metadata csv - metadata = Array.new - metadata[0] = ["name", "display_name", "short_name", "description", "unit", "datatype", "user_defined"] - - #get building footprint to use for calculating end use EUIs - building_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Total Building Area' AND ColumnName='Area'") - building_area ||= "NIL" - runner.registerValue("building_area", building_area, "m2") - metadata[metadata.length] = ["building_area", "Total Building Area", "Bldg Area", "Total building area as calculated by Energy Plus", "square_meter", "double", "FALSE"] - - #get end use totals for fuels - site_energy_use = 0.0 - OpenStudio::EndUseFuelType.getValues.each do |fuel_type| - fuel_str = OpenStudio::EndUseFuelType.new(fuel_type).valueDescription - fuel_type_aggregation = 0.0 - mult_factor = 1 - if fuel_str != "Water" - runner_units_eui = "MJ/m2" - metadata_units_eui = "megajoules_per_square_meter" - mult_factor = 1000 - runner_units_agg = "GJ" - metadata_units_agg = "gigajoule" - else - runner_units_eui = "m" - metadata_units_eui = "meter" - runner_units_agg = "m3" - metadata_units_agg = "cubic meter" - end - OpenStudio::EndUseCategoryType.getValues.each do |category_type| - category_str = OpenStudio::EndUseCategoryType.new(category_type).valueDescription - temp_val = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='End Uses' AND RowName='#{category_str}' AND ColumnName='#{fuel_str}'") - if temp_val - eui_val = temp_val / building_area * mult_factor - prefix_str = OpenStudio::toUnderscoreCase("#{fuel_str}_#{category_str}_eui") - runner.registerValue("#{prefix_str}", eui_val, "#{runner_units_eui}") - short_name = "#{short_os_fuel(fuel_str)} #{short_os_cat(category_str)} EUI" - metadata[metadata.length] = [prefix_str, "#{category_str} #{fuel_str} EUI", short_name, "Total #{fuel_str.downcase} used for #{category_str.downcase} per square foot", metadata_units_eui, "double", "FALSE"] - fuel_type_aggregation += temp_val - end - end - if fuel_type_aggregation - prefix_str = OpenStudio::toUnderscoreCase("total_#{fuel_str}_end_use") - runner.registerValue(prefix_str, fuel_type_aggregation, "#{runner_units_agg}") - short_name = "#{short_os_fuel(fuel_str)} Total" - metadata[metadata.length] = [prefix_str, "Total #{fuel_str} End Use", short_name, "Total #{fuel_str.downcase} End Use", metadata_units_agg, "double", "FALSE"] - site_energy_use += fuel_type_aggregation if fuel_str != "Water" - end - end - - runner.registerValue("site_energy_use", site_energy_use, "GJ") - metadata[metadata.length] = ["site_energy_use", "Total Site Energy Use", "Site Energy", "Total energy consumption for the site", "gigajoule", "double", "FALSE"] - - #get monthly fuel aggregates - #todo: get all monthly fuel type outputs, including non-present fuel types, mapping to 0 - OpenStudio::EndUseFuelType.getValues.each do |fuel_type| - fuel_str = OpenStudio::EndUseFuelType.new(fuel_type).valueDescription - mult_factor = 10**-6 / building_area - runner_units = "MJ/m2" - metadata_units = "megajoules_per_square_meter" - if fuel_str == "Water" - next - end - OpenStudio::MonthOfYear.getValues.each do |month| - if month >= 1 and month <= 12 - fuel_and_month_aggregation = 0.0 - OpenStudio::EndUseCategoryType::getValues.each do |category_type| - if sql_file.energyConsumptionByMonth(OpenStudio::EndUseFuelType.new(fuel_str), OpenStudio::EndUseCategoryType.new(category_type), OpenStudio::MonthOfYear.new(month)).is_initialized - val_in_j = sql_file.energyConsumptionByMonth(OpenStudio::EndUseFuelType.new(fuel_str), OpenStudio::EndUseCategoryType.new(category_type), OpenStudio::MonthOfYear.new(month)).get - fuel_and_month_aggregation += val_in_j - end - end - fuel_and_month_aggregation *= mult_factor - month_str = OpenStudio::MonthOfYear.new(month).valueDescription - prefix_str = OpenStudio::toUnderscoreCase("#{month_str}_end_use_#{fuel_str}_eui") - runner.registerValue("#{prefix_str}", fuel_and_month_aggregation, "#{runner_units}") - short_name = "#{month_str[0..2]} #{short_os_fuel(fuel_str)} EUI" - metadata[metadata.length] = ["#{prefix_str}", "#{month_str} #{fuel_str} EUI", short_name, "Total #{fuel_str.downcase} end use energy use per square meter in #{month_str}", metadata_units, "double", "FALSE"] - end - end - end - - # queries that don't have API methods yet - - life_cycle_cost = sql_query(runner, sql_file, "Life-Cycle Cost Report", "TableName='Present Value by Category' AND RowName='Grand Total' AND ColumnName='Present Value'") - runner.registerValue("life_cycle_cost", life_cycle_cost, "dollars") - metadata[metadata.length] = ["life_cycle_cost", "Total Life Cycle Cost", "Life Cycle Cost", "Total calculated life cycle cost", "us_dollar", "double", "FALSE"] - - conditioned_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Net Conditioned Building Area' AND ColumnName='Area'") - runner.registerValue("conditioned_area", conditioned_area, "m2") - metadata[metadata.length] = ["conditioned_area", "Total Conditioned Area", "Cond Bldg Area", "Total conditioned building area as calculated by Energy Plus", "square_meter", "double", "FALSE"] - - unconditioned_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Unconditioned Building Area' AND ColumnName='Area'") - runner.registerValue("unconditioned_area", unconditioned_area, "m2") - metadata[metadata.length] = ["unconditioned_area", "Total Unconditioned Area", "Uncond Bldg Area", "Total unconditioned building area as calculated by EnergyPlus", "square_meter", "double", "FALSE"] - - total_site_eui = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Site and Source Energy' AND RowName='Total Site Energy' AND ColumnName='Energy Per Conditioned Building Area'") - runner.registerValue("total_site_eui", total_site_eui, "MJ/m2") - metadata[metadata.length] = ["total_site_eui", "Total Site Energy Use Intensity", "Site EUI", "Total site energy use intensity per conditioned building area as calculated by EnergyPlus", "megajoules_per_square_meter", "double", "FALSE"] - - total_source_eui = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Site and Source Energy' AND RowName='Total Source Energy' AND ColumnName='Energy Per Conditioned Building Area'") - runner.registerValue("total_source_eui", total_source_eui, "MJ/m2") - metadata[metadata.length] = ["total_source_eui", "Total Source Energy Use Intensity", "Source EUI", "Total source energy use intensity per conditioned building area as calculated by EnergyPlus", "megajoules_per_square_meter", "double", "FALSE"] - - time_setpoint_not_met_during_occupied_heating = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Comfort and Setpoint Not Met Summary' AND RowName='Time Setpoint Not Met During Occupied Heating' AND ColumnName='Facility'") - runner.registerValue("time_setpoint_not_met_during_occupied_heating", time_setpoint_not_met_during_occupied_heating, "hr") - metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_heating", "Occupied Time During Which Heating Setpoint Not Met", "Setpoint Missed Heat", "Hours during which the building was occupied but the heating setpoint temperature was not met", "hour", "double", "FALSE"] - - time_setpoint_not_met_during_occupied_cooling = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Comfort and Setpoint Not Met Summary' AND RowName='Time Setpoint Not Met During Occupied Cooling' AND ColumnName='Facility'") - runner.registerValue("time_setpoint_not_met_during_occupied_cooling", time_setpoint_not_met_during_occupied_cooling, "hr") - metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_cooling", "Occupied Time During Which Cooling Setpoint Not Met", "Setpoint Missed Cool", "Hours during which the building was occupied but the cooling setpoint temperature was not met", "hour", "double", "FALSE"] - - time_setpoint_not_met_during_occupied_hours = time_setpoint_not_met_during_occupied_heating + time_setpoint_not_met_during_occupied_cooling - runner.registerValue("time_setpoint_not_met_during_occupied_hours", time_setpoint_not_met_during_occupied_hours, "hr") - metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_hours", "Occupied Time During Which Temperature Setpoint Not Met", "Setpoint Missed Total", "Hours during which the building was occupied but the setpoint temperatures were not met", "hour", "double", "FALSE"] - - window_to_wall_ratio_north = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='North (315 to 45 deg)'") - runner.registerValue("window_to_wall_ratio_north", window_to_wall_ratio_north, "%") - metadata[metadata.length] = ["window_to_wall_ratio_north", "North Window to Wall Ratio", "WWR North", "Window to wall ratio of wall objects facing between 315 and 45 degrees", "percent", "double", "FALSE"] - - window_to_wall_ratio_south = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='South (135 to 225 deg)'") - runner.registerValue("window_to_wall_ratio_south", window_to_wall_ratio_south, "%") - metadata[metadata.length] = ["window_to_wall_ratio_south", "South Window to Wall Ratio", "WWR South", "Window to wall ratio of wall objects facing between 135 and 225 degrees", "percent", "double", "FALSE"] - - window_to_wall_ratio_east = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='East (45 to 135 deg)'") - runner.registerValue("window_to_wall_ratio_east", window_to_wall_ratio_east, "%") - metadata[metadata.length] = ["window_to_wall_ratio_east", "East Window to Wall Ratio", "WWR East", "Window to wall ratio of wall objects facing between 45 and 135 degrees", "percent", "double", "FALSE"] - - window_to_wall_ratio_west = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='West (225 to 315 deg)'") - runner.registerValue("window_to_wall_ratio_west", window_to_wall_ratio_west, "%") - metadata[metadata.length] = ["window_to_wall_ratio_west", "West Window to Wall Ratio", "WWR West", "Window to wall ratio of wall objects facing between 225 and 315 degrees", "percent", "double", "FALSE"] - - lat = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Latitude' AND ColumnName='Value'") - runner.registerValue("latitude", lat, "deg") - metadata[metadata.length] = ["latitude", "Latitude", "Lat", "Building latitude based on weather file", "degrees_angular", "double", "FALSE"] - - long = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Longitude' AND ColumnName='Value'") - runner.registerValue("longitude", long, "deg") - metadata[metadata.length] = ["longitude", "Longitude", "Long", "Building longitude based on weather file", "degrees_angular", "double", "FALSE"] - - weather_file = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Weather File' AND ColumnName='Value'") - runner.registerValue("weather_file", weather_file, "deg") - metadata[metadata.length] = ["weather_file", "Weather File", "Weather File", "Name of weather file", "none", "string", "FALSE"] - - # queries with one-line API methods - building_rotation = building.northAxis - runner.registerValue("orientation", building_rotation, "deg") - metadata[metadata.length] = ["orientation", "Building Orientation", "Orientation", "Degrees of building north axis off of true north", "degrees_angular", "double", "FALSE"] - - #floor_to_floor_height = building.nominalFloortoFloorHeight.get - #runner.registerValue("floor_to_floor_height", floor_to_floor_height, "m") - #metadata[metadata.length] = ["floor_to_floor_height", "Floor to Floor Height", "Flr-to-Flr Height", "Nominal floor to floor height of building", "meter", "double", "FALSE"] - - #total_building_volume = building_area * floor_to_floor_height - #runner.registerValue("total_building_volume", total_building_volume, "m3") - #metadata[metadata.length] = ["total_building_volume", "Total Building Volume", "Volume", "Building volume calculated by multiplying floor to floor height and footprint", "cubic_meter", "double", "FALSE"] - - total_occupancy = building.numberOfPeople - runner.registerValue("total_occupancy", total_occupancy, "people") - metadata[metadata.length] = ["total_occupancy", "Total Building Occupancy", "Bldg Occ", "Number of people in the building as calculated by EnergyPlus", "none", "double", "FALSE"] - - occupancy_density = building.peoplePerFloorArea - runner.registerValue("occupant_density", occupancy_density, "people/m2") - metadata[metadata.length] = ["occupant_density", "Building Occupancy Density", "Occ Density", "Number of people per floor area as calculated by EnergyPlus", "none", "double", "FALSE"] - - lighting_power = building.lightingPower - runner.registerValue("lighting_power", lighting_power, "W") - metadata[metadata.length] = ["lighting_power", "Lighting Power", "Lighting Pwr", "Total lighting power", "watt", "double", "FALSE"] - - lighting_power_density = building.lightingPowerPerFloorArea - runner.registerValue("lighting_power_density", lighting_power_density, "W/m2") - metadata[metadata.length] = ["lighting_power_density", "Lighting Power Density", "LPD", "Total lighting power density", "watts_per_square_meter", "double", "FALSE"] - - infiltration_rate = building.infiltrationDesignAirChangesPerHour - runner.registerValue("infiltration_rate", infiltration_rate, "ACH") - metadata[metadata.length] = ["infiltration_rate", "Infiltration Rate", "Infil Rate", "Infiltration rate of air into the building", "none", "double", "FALSE"] - - number_of_floors = building.standardsNumberOfStories.get if building.standardsNumberOfStories.is_initialized - number_of_floors ||= "NIL" - runner.registerValue("number_of_floors", number_of_floors, "") - metadata[metadata.length] = ["number_of_floors", "Number of Floors", "Number of Floors", "Total number of storeys in the building", "none", "double", "FALSE"] - - building_type = building.standardsBuildingType if building.standardsBuildingType.is_initialized - building_type ||= "NIL" - runner.registerValue("building_type", building_type, "") - metadata[metadata.length] = ["building_type", "Building Type", "Bldg Type", "Building type as defined by the modeler", "none", "string", "FALSE"] - - #get exterior wall, exterior roof, and ground plate areas - exterior_wall_area = 0.0 - exterior_roof_area = 0.0 - ground_contact_area = 0.0 - surfaces = model.getSurfaces - surfaces.each do |surface| - if surface.outsideBoundaryCondition == "Outdoors" and surface.surfaceType == "Wall" - exterior_wall_area += surface.netArea - end - if surface.outsideBoundaryCondition == "Outdoors" and surface.surfaceType == "RoofCeiling" - exterior_roof_area += surface.netArea - end - if surface.outsideBoundaryCondition == "Ground" and surface.surfaceType == "Floor" - ground_contact_area += surface.netArea - end - end - - runner.registerValue("exterior_wall_area", exterior_wall_area, "m2") - metadata[metadata.length] = ["exterior_wall_area", "Exterior Wall Area", "Ext Wall Area", "Total area of all surfaces with the conditions of 'Outdoors' and 'Wall'", "square_meter", "double", "FALSE"] - - runner.registerValue("exterior_roof_area", exterior_roof_area, "m2") - metadata[metadata.length] = ["exterior_roof_area", "Exterior Roof Area", "Ext Roof Area", "Total area of all surfaces with the conditions of 'Outdoors' and 'Roof'", "square_meter", "double", "FALSE"] - - runner.registerValue("ground_contact_area", ground_contact_area, "m2") - metadata[metadata.length] = ["ground_contact_area", "Ground Contact Area", "Gnd Area", "Total area of all surfaces with the conditions of 'Ground' and 'Floor'", "square_meter", "double", "FALSE"] - - #get exterior fenestration area - exterior_fenestration_area = 0.0 - subsurfaces = model.getSubSurfaces - subsurfaces.each do |subsurface| - if subsurface.outsideBoundaryCondition == "Outdoors" - if subsurface.subSurfaceType == "FixedWindow" or subsurface.subSurfaceType == "OperableWindow" - exterior_fenestration_area += subsurface.netArea - end - end - end - - runner.registerValue("exterior_fenestration_area", exterior_fenestration_area, "m2") - metadata[metadata.length] = ["exterior_fenestration_area", "Exterior Fenestration Area", "Window Area Total", "Total area of all surfaces with the conditions of 'Outdoors' and 'FixedWindow' or 'OperableWindow'", "square_meter", "double", "FALSE"] - - #get density of economizers in airloops - num_airloops = 0 - num_economizers = 0 - model.getAirLoopHVACs.each do |air_loop| - num_airloops += 1 - if air_loop.airLoopHVACOutdoorAirSystem.is_initialized - air_loop_oa = air_loop.airLoopHVACOutdoorAirSystem.get - air_loop_oa_controller = air_loop_oa.getControllerOutdoorAir - if air_loop_oa_controller.getEconomizerControlType != "NoEconomizer" - num_economizers += 1 - end - end - end - economizer_density = num_economizers / num_airloops if num_airloops != 0 - economizer_density ||= "NIL" - - runner.registerValue("economizer_density", economizer_density, "") - metadata[metadata.length] = ["economizer_density", "Economizer Density", "Econ Density", "Proportion of air loops with economizers to air loops without", "percent", "double", "FALSE"] - - #get aspect ratios - north_wall_area = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Wall Area' AND ColumnName='North (315 to 45 deg)'") - east_wall_area = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Wall Area' AND ColumnName='East (45 to 135 deg)'") - aspect_ratio = north_wall_area / east_wall_area if north_wall_area != 0 && east_wall_area != 0 - aspect_ratio ||= "NIL" - - runner.registerValue("aspect_ratio", aspect_ratio, "") - metadata[metadata.length] = ["aspect_ratio", "Aspect Ratio", "Aspect Ratio", "Proportion of north wall area to east wall area", "percent", "double", "FALSE"] - - #write metadata CSV - runner.registerInfo("Saving Dencity metadata csv file") - CSV.open("report_metadata.csv", "wb") do |csv| - metadata.each do |elem| - csv << elem - end - end - runner.registerInfo("Saved Dencity metadata as report_metadata.csv") - - #get meter timeseries data and output as a msgpack or csv or both - #todo: find a way for the sql call to not rely on RUN PERIOD 1 - timeseries_start = Time.now.to_i - available_meters = sql_file.execAndReturnVectorOfString("SELECT VariableName FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") - get_timeseries_flag = TRUE - if available_meters.empty? - runner.registerWarning("No meters found with Hourly reporting frequency to extract timeseries data from") - else - begin - meter_strings = available_meters.get - runner.registerInfo("The following meters were found: #{meter_strings}") - rescue - runner.registerWarning("Unable to retrieve timeseries strings") - get_timeseries_flag = FALSE - end - meter_units = sql_file.execAndReturnVectorOfString("SELECT VariableUnits FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") - begin - meter_units = meter_units.get - runner.registerInfo("Units were found for all available meters") - rescue - runner.registerWarning("Unable to retrieve timeseries unit strings") - get_timeseries_flag = FALSE - end - runner.registerInfo("The following meter units were found: #{meter_units}") - runner.registerError("Timeseries variable names and units of differing lengths. Exiting Dencity Reports.") if meter_units.size != meter_strings.size - get_timeseries_flag = FALSE if meter_units.size != meter_strings.size - end - - runner.registerInfo("get_timeseries_flag is set to #{get_timeseries_flag}") - if get_timeseries_flag - runner.registerInfo("Retrieving timeseries data") - if msgpack_flag and csv_flag - require "parallel" - require "msgpack" - msgpack_array = [] - csv_array = [] - mark0 = Time.now.to_i - Parallel.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| - if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized - sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get - ts_values = sql_ts.values - ts_times = sql_ts.dateTimes - timeseries_out = {} - initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 - timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 - timeseries_out[initial_epoch_time] = ts_values[0] - next_epoch_time = initial_epoch_time - for i in 1..ts_times.size - 1 - next_epoch_time += timestep_in_epoch - timeseries_out[next_epoch_time] = ts_values[i] - end - csv_array << (["epoch_time"] + timeseries_out.to_a.transpose[0]) if meter_index == 0 - csv_array << ([meter_string.gsub(":", "_") + " [" + meter_units[meter_index] + "]"] + timeseries_out.to_a.transpose[1]) - meter_hash = {timeseries: {}} - meter_hash[:timeseries][:fuel] = meter_string.gsub(":", "_") - meter_hash[:timeseries][:interval] = Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i - meter_hash[:timeseries][:interval_units] = "seconds" - meter_hash[:timeseries][:data] = timeseries_out - meter_hash[:timeseries][:units] = meter_units[meter_index] - msgpack_array << meter_hash - else - runner.registerWarning("Timeseries #{meter_string} was empty.") - end - end - mark1 = Time.now.to_i - runner.registerInfo("DeltaMake=#{mark1-mark0}s") - File.open("report_timeseries.msgpack", "w") do |file| - file << {data: msgpack_array}.to_msgpack - end - runner.registerInfo("Saved timeseries data as report_timeseries.msgpack") - csv_array = csv_array.transpose - CSV.open("report_timeseries.csv", "w") do |csv| - csv_array.each do |elem| - csv << elem - end - end - runner.registerInfo("Saved timeseries data as report_timeseries.csv") - mark2 = Time.now.to_i - runner.registerInfo("DeltaWrite=#{mark2-mark1}s") - - elsif msgpack_flag - require "parallel" - require "msgpack" - msgpack_array = [] - mark0 = Time.now.to_i - meter_strings.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| - if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized - sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get - ts_values = sql_ts.values - ts_times = sql_ts.dateTimes - timeseries_out = {} - initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 - timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 - timeseries_out[initial_epoch_time] = ts_values[0] - next_epoch_time = initial_epoch_time - for i in 1..ts_times.size - 1 - next_epoch_time += timestep_in_epoch - timeseries_out[next_epoch_time] = ts_values[i] - end - meter_hash = {timeseries: {}} - meter_hash[:timeseries][:fuel] = meter_string.gsub(":", "_") - meter_hash[:timeseries][:interval] = Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i - meter_hash[:timeseries][:interval_units] = "seconds" - meter_hash[:timeseries][:data] = timeseries_out - meter_hash[:timeseries][:units] = meter_units[meter_index] - msgpack_array << meter_hash - else - runner.registerWarning("Timeseries #{meter_string} was empty.") - end - end - mark1 = Time.now.to_i - runner.registerInfo("DeltaMake=#{mark1-mark0}s") - File.open("report_timeseries.msgpack", "w") do |file| - file << {data: msgpack_array}.to_msgpack - runner.registerInfo("Saved timeseries data as report_timeseries.msgpack") - end - mark2 = Time.now.to_i - runner.registerInfo("DeltaWrite=#{mark2-mark1}s") - - elsif csv_flag - require "parallel" - csv_array = [] - mark0 = Time.now.to_i - Parallel.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| - if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized - sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get - ts_values = sql_ts.values - ts_times = sql_ts.dateTimes - timeseries_out = {} - initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 - timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 - timeseries_out[initial_epoch_time] = ts_values[0] - next_epoch_time = initial_epoch_time - for i in 1..ts_times.size - 1 - next_epoch_time += timestep_in_epoch - timeseries_out[next_epoch_time] = ts_values[i] - end - csv_array << (["epoch_time"] + timeseries_out.to_a.transpose[0]) if meter_index == 0 - csv_array << ([meter_string.gsub(":", "_") + " [" + meter_units[meter_index] + "]"] + timeseries_out.to_a.transpose[1]) - else - runner.registerWarning("Timeseries #{meter_string} was empty.") - end - end - mark1 = Time.now.to_i - runner.registerInfo("DeltaMake=#{mark1-mark0}s") - csv_array = csv_array.transpose - CSV.open("report_timeseries.csv", "w") do |csv| - csv_array.each do |elem| - csv << elem - end - end - runner.registerInfo("Saved timeseries data as report_timeseries.csv") - mark2 = Time.now.to_i - runner.registerInfo("DeltaWrite=#{mark2-mark1}s") - end - end - timeseries_end = Time.now.to_i - runner.registerInfo("Total Timeseries Time: #{timeseries_end-timeseries_start}") - - #closing the sql file - sql_file.close - - #reporting final condition - runner.registerFinalCondition("DEnCity Report generated successfully.") - - rescue => e - fail "Measure failed with #{e.message}:#{e.backtrace}" - ensure - - # profile_results = RubyProf.stop - # FileUtils.mkdir_p 'results' - # File.open("results/profile-graph.html", 'w') { |f| RubyProf::GraphHtmlPrinter.new(profile_results).print(f) } - # File.open("results/profile-flat.txt", 'w') { |f| RubyProf::FlatPrinter.new(profile_results).print(f) } - # File.open("results/profile-tree.prof", 'w') { |f| RubyProf::CallTreePrinter.new(profile_results).print(f) } - - - end - - true - - end #end the run method - -end #end the measure - -#this allows the measure to be use by the application +# DencityReports generates data that are required for the DEnCity API. + +# Author: Henry Horsey (github: henryhorsey) +# Creation Date: 6/27/2014 + +require 'openstudio' + +class DencityReports < OpenStudio::Ruleset::ReportingUserScript + + #define the name that a user will see, this method may be deprecated as + #the display name in PAT comes from the name field in measure.xml + def name + "Dencity Reports" + end + + #define the arguments that the user will input + def arguments + args = OpenStudio::Ruleset::OSArgumentVector.new + + #make choice argument for facade + choices = OpenStudio::StringVector.new + choices << "MessagePack" + choices << "CSV" + choices << "Both" + output_format = OpenStudio::Ruleset::OSArgument::makeChoiceArgument("output_format", choices) + output_format.setDisplayName("Output Format") + output_format.setDefaultValue("Both") + args << output_format + + args + end + + #short_os_fuel method + def short_os_fuel(fuel_string) + val = nil + fuel_vec = fuel_string.split(" ") + if fuel_vec[0] == "Electricity" + val = "Elec" + elsif fuel_vec[0] == "District" + fuel_vec[1] == "Heating" ? val = "Dist Heat" : val = "Dist Cool" + elsif fuel_vec[0] == "Natural" + val = "NG" + elsif fuel_vec[0] == "Additional" + val = "Other Fuel" + elsif fuel_vec[0] == "Water" + val = "Water" + else + val = "Unknown" + end + + val + + end + + #short_os_cat method + def short_os_cat(category_string) + val = nil + cat_vec = category_string.split(" ") + if cat_vec[0] == "Heating" + val = "Heat" + elsif cat_vec[0] == "Cooling" + val = "Cool" + elsif cat_vec[0] == "Humidification" + val = "Humid" + elsif cat_vec[0] == "Interior" + cat_vec[1] == "Lighting" ? val = "Int Light" : val = "Int Equip" + elsif cat_vec[0] == "Exterior" + cat_vec[1] == "Lighting" ? val = "Ext Light" : val = "Ext Equip" + elsif cat_vec[0] == "Heat" + cat_vec[1] == "Recovery" ? val = "Heat Rec" : val = "Heat Rej" + elsif cat_vec[0] == "Pumps" + val = "Pumps" + elsif cat_vec[0] == "Fans" + val = "Fans" + elsif cat_vec[0] == "Refrigeration" + val = "Rfg" + elsif cat_vec[0] == "Generators" + val = "Gen" + elsif cat_vec[0] == "Water" + val = "Water Systems" + else + val = "Unknown" + end + + val + + end + + #sql_query method + def sql_query(runner, sql, report_name, query) + val = nil + result = sql.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='#{report_name}' AND #{query}") + if result.empty? + runner.registerWarning("Query failed for #{report_name} and #{query}") + else + begin + val = result.get + rescue + val = nil + runner.registerWarning("Query result.get failed") + end + end + + val + end + + #define what happens when the measure is run + def run(runner, user_arguments) + super(runner, user_arguments) + + #use the built-in error checking + unless runner.validateUserArguments(arguments, user_arguments) + return false + end + + # require 'ruby-prof' + + begin + # RubyProf.start + + output_format = runner.getStringArgumentValue("output_format", user_arguments) + os_version = OpenStudio::VersionString.new(OpenStudio::openStudioVersion()) + min_version_feature1 = OpenStudio::VersionString.new("1.2.3") + require "time" + + unless os_version >= min_version_feature1 + runner.registerError("Dencity Reports requires a version of OpenStudio greater than 1.2.3.") + return false + end + + # determine how to format time series output + msgpack_flag = false + csv_flag = false + if output_format == "MessagePack" || output_format == "Both" + msgpack_flag = true + end + if output_format == "CSV" || output_format == "Both" + csv_flag = true + end + + # get the last model and sql file + model = runner.lastOpenStudioModel + if model.empty? + runner.registerError("Cannot find last model.") + return false + end + model = model.get + building = model.getBuilding + + runner.registerInfo("Model loaded") + + sql_file = runner.lastEnergyPlusSqlFile + if sql_file.empty? + runner.registerError("Cannot find last sql file.") + return false + end + sql_file = sql_file.get + model.setSqlFile(sql_file) + + runner.registerInfo("Sql loaded") + + #Initalize array that will be used to construct the DEnCity metadata csv + metadata = Array.new + metadata[0] = ["name", "display_name", "short_name", "description", "unit", "datatype", "user_defined"] + + #get building footprint to use for calculating end use EUIs + building_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Total Building Area' AND ColumnName='Area'") + building_area ||= "NIL" + runner.registerValue("building_area", building_area, "m2") + metadata[metadata.length] = ["building_area", "Total Building Area", "Bldg Area", "Total building area as calculated by Energy Plus", "square_meter", "double", "FALSE"] + + #get end use totals for fuels + site_energy_use = 0.0 + OpenStudio::EndUseFuelType.getValues.each do |fuel_type| + fuel_str = OpenStudio::EndUseFuelType.new(fuel_type).valueDescription + fuel_type_aggregation = 0.0 + mult_factor = 1 + if fuel_str != "Water" + runner_units_eui = "MJ/m2" + metadata_units_eui = "megajoules_per_square_meter" + mult_factor = 1000 + runner_units_agg = "GJ" + metadata_units_agg = "gigajoule" + else + runner_units_eui = "m" + metadata_units_eui = "meter" + runner_units_agg = "m3" + metadata_units_agg = "cubic meter" + end + OpenStudio::EndUseCategoryType.getValues.each do |category_type| + category_str = OpenStudio::EndUseCategoryType.new(category_type).valueDescription + temp_val = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='End Uses' AND RowName='#{category_str}' AND ColumnName='#{fuel_str}'") + if temp_val + eui_val = temp_val / building_area * mult_factor + prefix_str = OpenStudio::toUnderscoreCase("#{fuel_str}_#{category_str}_eui") + runner.registerValue("#{prefix_str}", eui_val, "#{runner_units_eui}") + short_name = "#{short_os_fuel(fuel_str)} #{short_os_cat(category_str)} EUI" + metadata[metadata.length] = [prefix_str, "#{category_str} #{fuel_str} EUI", short_name, "Total #{fuel_str.downcase} used for #{category_str.downcase} per square foot", metadata_units_eui, "double", "FALSE"] + fuel_type_aggregation += temp_val + end + end + if fuel_type_aggregation + prefix_str = OpenStudio::toUnderscoreCase("total_#{fuel_str}_end_use") + runner.registerValue(prefix_str, fuel_type_aggregation, "#{runner_units_agg}") + short_name = "#{short_os_fuel(fuel_str)} Total" + metadata[metadata.length] = [prefix_str, "Total #{fuel_str} End Use", short_name, "Total #{fuel_str.downcase} End Use", metadata_units_agg, "double", "FALSE"] + site_energy_use += fuel_type_aggregation if fuel_str != "Water" + end + end + + runner.registerValue("site_energy_use", site_energy_use, "GJ") + metadata[metadata.length] = ["site_energy_use", "Total Site Energy Use", "Site Energy", "Total energy consumption for the site", "gigajoule", "double", "FALSE"] + + #get monthly fuel aggregates + #todo: get all monthly fuel type outputs, including non-present fuel types, mapping to 0 + OpenStudio::EndUseFuelType.getValues.each do |fuel_type| + fuel_str = OpenStudio::EndUseFuelType.new(fuel_type).valueDescription + mult_factor = 10**-6 / building_area + runner_units = "MJ/m2" + metadata_units = "megajoules_per_square_meter" + if fuel_str == "Water" + next + end + OpenStudio::MonthOfYear.getValues.each do |month| + if month >= 1 and month <= 12 + fuel_and_month_aggregation = 0.0 + OpenStudio::EndUseCategoryType::getValues.each do |category_type| + if sql_file.energyConsumptionByMonth(OpenStudio::EndUseFuelType.new(fuel_str), OpenStudio::EndUseCategoryType.new(category_type), OpenStudio::MonthOfYear.new(month)).is_initialized + val_in_j = sql_file.energyConsumptionByMonth(OpenStudio::EndUseFuelType.new(fuel_str), OpenStudio::EndUseCategoryType.new(category_type), OpenStudio::MonthOfYear.new(month)).get + fuel_and_month_aggregation += val_in_j + end + end + fuel_and_month_aggregation *= mult_factor + month_str = OpenStudio::MonthOfYear.new(month).valueDescription + prefix_str = OpenStudio::toUnderscoreCase("#{month_str}_end_use_#{fuel_str}_eui") + runner.registerValue("#{prefix_str}", fuel_and_month_aggregation, "#{runner_units}") + short_name = "#{month_str[0..2]} #{short_os_fuel(fuel_str)} EUI" + metadata[metadata.length] = ["#{prefix_str}", "#{month_str} #{fuel_str} EUI", short_name, "Total #{fuel_str.downcase} end use energy use per square meter in #{month_str}", metadata_units, "double", "FALSE"] + end + end + end + + # queries that don't have API methods yet + + life_cycle_cost = sql_query(runner, sql_file, "Life-Cycle Cost Report", "TableName='Present Value by Category' AND RowName='Grand Total' AND ColumnName='Present Value'") + runner.registerValue("life_cycle_cost", life_cycle_cost, "dollars") + metadata[metadata.length] = ["life_cycle_cost", "Total Life Cycle Cost", "Life Cycle Cost", "Total calculated life cycle cost", "us_dollar", "double", "FALSE"] + + conditioned_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Net Conditioned Building Area' AND ColumnName='Area'") + runner.registerValue("conditioned_area", conditioned_area, "m2") + metadata[metadata.length] = ["conditioned_area", "Total Conditioned Area", "Cond Bldg Area", "Total conditioned building area as calculated by Energy Plus", "square_meter", "double", "FALSE"] + + unconditioned_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Unconditioned Building Area' AND ColumnName='Area'") + runner.registerValue("unconditioned_area", unconditioned_area, "m2") + metadata[metadata.length] = ["unconditioned_area", "Total Unconditioned Area", "Uncond Bldg Area", "Total unconditioned building area as calculated by EnergyPlus", "square_meter", "double", "FALSE"] + + total_site_eui = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Site and Source Energy' AND RowName='Total Site Energy' AND ColumnName='Energy Per Conditioned Building Area'") + runner.registerValue("total_site_eui", total_site_eui, "MJ/m2") + metadata[metadata.length] = ["total_site_eui", "Total Site Energy Use Intensity", "Site EUI", "Total site energy use intensity per conditioned building area as calculated by EnergyPlus", "megajoules_per_square_meter", "double", "FALSE"] + + total_source_eui = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Site and Source Energy' AND RowName='Total Source Energy' AND ColumnName='Energy Per Conditioned Building Area'") + runner.registerValue("total_source_eui", total_source_eui, "MJ/m2") + metadata[metadata.length] = ["total_source_eui", "Total Source Energy Use Intensity", "Source EUI", "Total source energy use intensity per conditioned building area as calculated by EnergyPlus", "megajoules_per_square_meter", "double", "FALSE"] + + time_setpoint_not_met_during_occupied_heating = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Comfort and Setpoint Not Met Summary' AND RowName='Time Setpoint Not Met During Occupied Heating' AND ColumnName='Facility'") + runner.registerValue("time_setpoint_not_met_during_occupied_heating", time_setpoint_not_met_during_occupied_heating, "hr") + metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_heating", "Occupied Time During Which Heating Setpoint Not Met", "Setpoint Missed Heat", "Hours during which the building was occupied but the heating setpoint temperature was not met", "hour", "double", "FALSE"] + + time_setpoint_not_met_during_occupied_cooling = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Comfort and Setpoint Not Met Summary' AND RowName='Time Setpoint Not Met During Occupied Cooling' AND ColumnName='Facility'") + runner.registerValue("time_setpoint_not_met_during_occupied_cooling", time_setpoint_not_met_during_occupied_cooling, "hr") + metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_cooling", "Occupied Time During Which Cooling Setpoint Not Met", "Setpoint Missed Cool", "Hours during which the building was occupied but the cooling setpoint temperature was not met", "hour", "double", "FALSE"] + + time_setpoint_not_met_during_occupied_hours = time_setpoint_not_met_during_occupied_heating + time_setpoint_not_met_during_occupied_cooling + runner.registerValue("time_setpoint_not_met_during_occupied_hours", time_setpoint_not_met_during_occupied_hours, "hr") + metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_hours", "Occupied Time During Which Temperature Setpoint Not Met", "Setpoint Missed Total", "Hours during which the building was occupied but the setpoint temperatures were not met", "hour", "double", "FALSE"] + + window_to_wall_ratio_north = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='North (315 to 45 deg)'") + runner.registerValue("window_to_wall_ratio_north", window_to_wall_ratio_north, "%") + metadata[metadata.length] = ["window_to_wall_ratio_north", "North Window to Wall Ratio", "WWR North", "Window to wall ratio of wall objects facing between 315 and 45 degrees", "percent", "double", "FALSE"] + + window_to_wall_ratio_south = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='South (135 to 225 deg)'") + runner.registerValue("window_to_wall_ratio_south", window_to_wall_ratio_south, "%") + metadata[metadata.length] = ["window_to_wall_ratio_south", "South Window to Wall Ratio", "WWR South", "Window to wall ratio of wall objects facing between 135 and 225 degrees", "percent", "double", "FALSE"] + + window_to_wall_ratio_east = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='East (45 to 135 deg)'") + runner.registerValue("window_to_wall_ratio_east", window_to_wall_ratio_east, "%") + metadata[metadata.length] = ["window_to_wall_ratio_east", "East Window to Wall Ratio", "WWR East", "Window to wall ratio of wall objects facing between 45 and 135 degrees", "percent", "double", "FALSE"] + + window_to_wall_ratio_west = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='West (225 to 315 deg)'") + runner.registerValue("window_to_wall_ratio_west", window_to_wall_ratio_west, "%") + metadata[metadata.length] = ["window_to_wall_ratio_west", "West Window to Wall Ratio", "WWR West", "Window to wall ratio of wall objects facing between 225 and 315 degrees", "percent", "double", "FALSE"] + + lat = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Latitude' AND ColumnName='Value'") + runner.registerValue("latitude", lat, "deg") + metadata[metadata.length] = ["latitude", "Latitude", "Lat", "Building latitude based on weather file", "degrees_angular", "double", "FALSE"] + + long = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Longitude' AND ColumnName='Value'") + runner.registerValue("longitude", long, "deg") + metadata[metadata.length] = ["longitude", "Longitude", "Long", "Building longitude based on weather file", "degrees_angular", "double", "FALSE"] + + weather_file = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Weather File' AND ColumnName='Value'") + runner.registerValue("weather_file", weather_file, "deg") + metadata[metadata.length] = ["weather_file", "Weather File", "Weather File", "Name of weather file", "none", "string", "FALSE"] + + # queries with one-line API methods + building_rotation = building.northAxis + runner.registerValue("orientation", building_rotation, "deg") + metadata[metadata.length] = ["orientation", "Building Orientation", "Orientation", "Degrees of building north axis off of true north", "degrees_angular", "double", "FALSE"] + + #floor_to_floor_height = building.nominalFloortoFloorHeight.get + #runner.registerValue("floor_to_floor_height", floor_to_floor_height, "m") + #metadata[metadata.length] = ["floor_to_floor_height", "Floor to Floor Height", "Flr-to-Flr Height", "Nominal floor to floor height of building", "meter", "double", "FALSE"] + + #total_building_volume = building_area * floor_to_floor_height + #runner.registerValue("total_building_volume", total_building_volume, "m3") + #metadata[metadata.length] = ["total_building_volume", "Total Building Volume", "Volume", "Building volume calculated by multiplying floor to floor height and footprint", "cubic_meter", "double", "FALSE"] + + total_occupancy = building.numberOfPeople + runner.registerValue("total_occupancy", total_occupancy, "people") + metadata[metadata.length] = ["total_occupancy", "Total Building Occupancy", "Bldg Occ", "Number of people in the building as calculated by EnergyPlus", "none", "double", "FALSE"] + + occupancy_density = building.peoplePerFloorArea + runner.registerValue("occupant_density", occupancy_density, "people/m2") + metadata[metadata.length] = ["occupant_density", "Building Occupancy Density", "Occ Density", "Number of people per floor area as calculated by EnergyPlus", "none", "double", "FALSE"] + + lighting_power = building.lightingPower + runner.registerValue("lighting_power", lighting_power, "W") + metadata[metadata.length] = ["lighting_power", "Lighting Power", "Lighting Pwr", "Total lighting power", "watt", "double", "FALSE"] + + lighting_power_density = building.lightingPowerPerFloorArea + runner.registerValue("lighting_power_density", lighting_power_density, "W/m2") + metadata[metadata.length] = ["lighting_power_density", "Lighting Power Density", "LPD", "Total lighting power density", "watts_per_square_meter", "double", "FALSE"] + + infiltration_rate = building.infiltrationDesignAirChangesPerHour + runner.registerValue("infiltration_rate", infiltration_rate, "ACH") + metadata[metadata.length] = ["infiltration_rate", "Infiltration Rate", "Infil Rate", "Infiltration rate of air into the building", "none", "double", "FALSE"] + + number_of_floors = building.standardsNumberOfStories.get if building.standardsNumberOfStories.is_initialized + number_of_floors ||= "NIL" + runner.registerValue("number_of_floors", number_of_floors, "") + metadata[metadata.length] = ["number_of_floors", "Number of Floors", "Number of Floors", "Total number of storeys in the building", "none", "double", "FALSE"] + + building_type = building.standardsBuildingType if building.standardsBuildingType.is_initialized + building_type ||= "NIL" + runner.registerValue("building_type", building_type, "") + metadata[metadata.length] = ["building_type", "Building Type", "Bldg Type", "Building type as defined by the modeler", "none", "string", "FALSE"] + + #get exterior wall, exterior roof, and ground plate areas + exterior_wall_area = 0.0 + exterior_roof_area = 0.0 + ground_contact_area = 0.0 + surfaces = model.getSurfaces + surfaces.each do |surface| + if surface.outsideBoundaryCondition == "Outdoors" and surface.surfaceType == "Wall" + exterior_wall_area += surface.netArea + end + if surface.outsideBoundaryCondition == "Outdoors" and surface.surfaceType == "RoofCeiling" + exterior_roof_area += surface.netArea + end + if surface.outsideBoundaryCondition == "Ground" and surface.surfaceType == "Floor" + ground_contact_area += surface.netArea + end + end + + runner.registerValue("exterior_wall_area", exterior_wall_area, "m2") + metadata[metadata.length] = ["exterior_wall_area", "Exterior Wall Area", "Ext Wall Area", "Total area of all surfaces with the conditions of 'Outdoors' and 'Wall'", "square_meter", "double", "FALSE"] + + runner.registerValue("exterior_roof_area", exterior_roof_area, "m2") + metadata[metadata.length] = ["exterior_roof_area", "Exterior Roof Area", "Ext Roof Area", "Total area of all surfaces with the conditions of 'Outdoors' and 'Roof'", "square_meter", "double", "FALSE"] + + runner.registerValue("ground_contact_area", ground_contact_area, "m2") + metadata[metadata.length] = ["ground_contact_area", "Ground Contact Area", "Gnd Area", "Total area of all surfaces with the conditions of 'Ground' and 'Floor'", "square_meter", "double", "FALSE"] + + #get exterior fenestration area + exterior_fenestration_area = 0.0 + subsurfaces = model.getSubSurfaces + subsurfaces.each do |subsurface| + if subsurface.outsideBoundaryCondition == "Outdoors" + if subsurface.subSurfaceType == "FixedWindow" or subsurface.subSurfaceType == "OperableWindow" + exterior_fenestration_area += subsurface.netArea + end + end + end + + runner.registerValue("exterior_fenestration_area", exterior_fenestration_area, "m2") + metadata[metadata.length] = ["exterior_fenestration_area", "Exterior Fenestration Area", "Window Area Total", "Total area of all surfaces with the conditions of 'Outdoors' and 'FixedWindow' or 'OperableWindow'", "square_meter", "double", "FALSE"] + + #get density of economizers in airloops + num_airloops = 0 + num_economizers = 0 + model.getAirLoopHVACs.each do |air_loop| + num_airloops += 1 + if air_loop.airLoopHVACOutdoorAirSystem.is_initialized + air_loop_oa = air_loop.airLoopHVACOutdoorAirSystem.get + air_loop_oa_controller = air_loop_oa.getControllerOutdoorAir + if air_loop_oa_controller.getEconomizerControlType != "NoEconomizer" + num_economizers += 1 + end + end + end + economizer_density = num_economizers / num_airloops if num_airloops != 0 + economizer_density ||= "NIL" + + runner.registerValue("economizer_density", economizer_density, "") + metadata[metadata.length] = ["economizer_density", "Economizer Density", "Econ Density", "Proportion of air loops with economizers to air loops without", "percent", "double", "FALSE"] + + #get aspect ratios + north_wall_area = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Wall Area' AND ColumnName='North (315 to 45 deg)'") + east_wall_area = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Wall Area' AND ColumnName='East (45 to 135 deg)'") + aspect_ratio = north_wall_area / east_wall_area if north_wall_area != 0 && east_wall_area != 0 + aspect_ratio ||= "NIL" + + runner.registerValue("aspect_ratio", aspect_ratio, "") + metadata[metadata.length] = ["aspect_ratio", "Aspect Ratio", "Aspect Ratio", "Proportion of north wall area to east wall area", "percent", "double", "FALSE"] + + #write metadata CSV + runner.registerInfo("Saving Dencity metadata csv file") + CSV.open("report_metadata.csv", "wb") do |csv| + metadata.each do |elem| + csv << elem + end + end + runner.registerInfo("Saved Dencity metadata as report_metadata.csv") + + #get meter timeseries data and output as a msgpack or csv or both + #todo: find a way for the sql call to not rely on RUN PERIOD 1 + timeseries_start = Time.now.to_i + available_meters = sql_file.execAndReturnVectorOfString("SELECT VariableName FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") + get_timeseries_flag = true + if available_meters.empty? + runner.registerWarning("No meters found with Hourly reporting frequency to extract timeseries data from") + else + begin + meter_strings = available_meters.get + runner.registerInfo("The following meters were found: #{meter_strings}") + rescue + runner.registerWarning("Unable to retrieve timeseries strings") + get_timeseries_flag = false + end + meter_units = sql_file.execAndReturnVectorOfString("SELECT VariableUnits FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") + begin + meter_units = meter_units.get + runner.registerInfo("Units were found for all available meters") + rescue + runner.registerWarning("Unable to retrieve timeseries unit strings") + get_timeseries_flag = false + end + runner.registerInfo("The following meter units were found: #{meter_units}") + runner.registerError("Timeseries variable names and units of differing lengths. Exiting Dencity Reports.") if meter_units.size != meter_strings.size + get_timeseries_flag = false if meter_units.size != meter_strings.size + end + + runner.registerInfo("get_timeseries_flag is set to #{get_timeseries_flag}") + if get_timeseries_flag + runner.registerInfo("Retrieving timeseries data") + if msgpack_flag and csv_flag + require "parallel" + require "msgpack" + msgpack_array = [] + csv_array = [] + mark0 = Time.now.to_i + Parallel.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| + if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized + sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get + ts_values = sql_ts.values + ts_times = sql_ts.dateTimes + timeseries_out = {} + initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 + timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 + timeseries_out[initial_epoch_time] = ts_values[0] + next_epoch_time = initial_epoch_time + for i in 1..ts_times.size - 1 + next_epoch_time += timestep_in_epoch + timeseries_out[next_epoch_time] = ts_values[i] + end + csv_array << (["epoch_time"] + timeseries_out.to_a.transpose[0]) if meter_index == 0 + csv_array << ([meter_string.gsub(":", "_") + " [" + meter_units[meter_index] + "]"] + timeseries_out.to_a.transpose[1]) + meter_hash = {timeseries: {}} + meter_hash[:timeseries][:fuel] = meter_string.gsub(":", "_") + meter_hash[:timeseries][:interval] = Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i + meter_hash[:timeseries][:interval_units] = "seconds" + meter_hash[:timeseries][:data] = timeseries_out + meter_hash[:timeseries][:units] = meter_units[meter_index] + msgpack_array << meter_hash + else + runner.registerWarning("Timeseries #{meter_string} was empty.") + end + end + mark1 = Time.now.to_i + runner.registerInfo("DeltaMake=#{mark1-mark0}s") + File.open("report_timeseries.msgpack", "w") do |file| + file << {data: msgpack_array}.to_msgpack + end + runner.registerInfo("Saved timeseries data as report_timeseries.msgpack") + csv_array = csv_array.transpose + CSV.open("report_timeseries.csv", "w") do |csv| + csv_array.each do |elem| + csv << elem + end + end + runner.registerInfo("Saved timeseries data as report_timeseries.csv") + mark2 = Time.now.to_i + runner.registerInfo("DeltaWrite=#{mark2-mark1}s") + + elsif msgpack_flag + require "parallel" + require "msgpack" + msgpack_array = [] + mark0 = Time.now.to_i + meter_strings.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| + if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized + sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get + ts_values = sql_ts.values + ts_times = sql_ts.dateTimes + timeseries_out = {} + initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 + timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 + timeseries_out[initial_epoch_time] = ts_values[0] + next_epoch_time = initial_epoch_time + for i in 1..ts_times.size - 1 + next_epoch_time += timestep_in_epoch + timeseries_out[next_epoch_time] = ts_values[i] + end + meter_hash = {timeseries: {}} + meter_hash[:timeseries][:fuel] = meter_string.gsub(":", "_") + meter_hash[:timeseries][:interval] = Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i + meter_hash[:timeseries][:interval_units] = "seconds" + meter_hash[:timeseries][:data] = timeseries_out + meter_hash[:timeseries][:units] = meter_units[meter_index] + msgpack_array << meter_hash + else + runner.registerWarning("Timeseries #{meter_string} was empty.") + end + end + mark1 = Time.now.to_i + runner.registerInfo("DeltaMake=#{mark1-mark0}s") + File.open("report_timeseries.msgpack", "w") do |file| + file << {data: msgpack_array}.to_msgpack + runner.registerInfo("Saved timeseries data as report_timeseries.msgpack") + end + mark2 = Time.now.to_i + runner.registerInfo("DeltaWrite=#{mark2-mark1}s") + + elsif csv_flag + require "parallel" + csv_array = [] + mark0 = Time.now.to_i + Parallel.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| + if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized + sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get + ts_values = sql_ts.values + ts_times = sql_ts.dateTimes + timeseries_out = {} + initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 + timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 + timeseries_out[initial_epoch_time] = ts_values[0] + next_epoch_time = initial_epoch_time + for i in 1..ts_times.size - 1 + next_epoch_time += timestep_in_epoch + timeseries_out[next_epoch_time] = ts_values[i] + end + csv_array << (["epoch_time"] + timeseries_out.to_a.transpose[0]) if meter_index == 0 + csv_array << ([meter_string.gsub(":", "_") + " [" + meter_units[meter_index] + "]"] + timeseries_out.to_a.transpose[1]) + else + runner.registerWarning("Timeseries #{meter_string} was empty.") + end + end + mark1 = Time.now.to_i + runner.registerInfo("DeltaMake=#{mark1-mark0}s") + csv_array = csv_array.transpose + CSV.open("report_timeseries.csv", "w") do |csv| + csv_array.each do |elem| + csv << elem + end + end + runner.registerInfo("Saved timeseries data as report_timeseries.csv") + mark2 = Time.now.to_i + runner.registerInfo("DeltaWrite=#{mark2-mark1}s") + end + end + timeseries_end = Time.now.to_i + runner.registerInfo("Total Timeseries Time: #{timeseries_end-timeseries_start}") + + #closing the sql file + sql_file.close + + #reporting final condition + runner.registerFinalCondition("DEnCity Report generated successfully.") + + rescue => e + fail "Measure failed with #{e.message}:#{e.backtrace}" + ensure + + # profile_results = RubyProf.stop + # FileUtils.mkdir_p 'results' + # File.open("results/profile-graph.html", 'w') { |f| RubyProf::GraphHtmlPrinter.new(profile_results).print(f) } + # File.open("results/profile-flat.txt", 'w') { |f| RubyProf::FlatPrinter.new(profile_results).print(f) } + # File.open("results/profile-tree.prof", 'w') { |f| RubyProf::CallTreePrinter.new(profile_results).print(f) } + + + end + + true + + end #end the run method + +end #end the measure + +#this allows the measure to be use by the application DencityReports.new.registerWithApplication \ No newline at end of file diff --git a/spec/files/measures_only_osw/measures/DencityReports/measure.rb b/spec/files/measures_only_osw/measures/DencityReports/measure.rb index b0fb27a..d87f955 100644 --- a/spec/files/measures_only_osw/measures/DencityReports/measure.rb +++ b/spec/files/measures_only_osw/measures/DencityReports/measure.rb @@ -129,13 +129,13 @@ def run(runner, user_arguments) end # determine how to format time series output - msgpack_flag = FALSE - csv_flag = FALSE + msgpack_flag = false + csv_flag = false if output_format == "MessagePack" || output_format == "Both" - msgpack_flag = TRUE + msgpack_flag = true end if output_format == "CSV" || output_format == "Both" - csv_flag = TRUE + csv_flag = true end # get the last model and sql file @@ -426,7 +426,7 @@ def run(runner, user_arguments) #todo: find a way for the sql call to not rely on RUN PERIOD 1 timeseries_start = Time.now.to_i available_meters = sql_file.execAndReturnVectorOfString("SELECT VariableName FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") - get_timeseries_flag = TRUE + get_timeseries_flag = true if available_meters.empty? runner.registerWarning("No meters found with Hourly reporting frequency to extract timeseries data from") else @@ -435,7 +435,7 @@ def run(runner, user_arguments) runner.registerInfo("The following meters were found: #{meter_strings}") rescue runner.registerWarning("Unable to retrieve timeseries strings") - get_timeseries_flag = FALSE + get_timeseries_flag = false end meter_units = sql_file.execAndReturnVectorOfString("SELECT VariableUnits FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") begin @@ -443,11 +443,11 @@ def run(runner, user_arguments) runner.registerInfo("Units were found for all available meters") rescue runner.registerWarning("Unable to retrieve timeseries unit strings") - get_timeseries_flag = FALSE + get_timeseries_flag = false end runner.registerInfo("The following meter units were found: #{meter_units}") runner.registerError("Timeseries variable names and units of differing lengths. Exiting Dencity Reports.") if meter_units.size != meter_strings.size - get_timeseries_flag = FALSE if meter_units.size != meter_strings.size + get_timeseries_flag = false if meter_units.size != meter_strings.size end runner.registerInfo("get_timeseries_flag is set to #{get_timeseries_flag}") diff --git a/spec/files/no_epw_file_osw/measures/DencityReports/measure.rb b/spec/files/no_epw_file_osw/measures/DencityReports/measure.rb index b0fb27a..d87f955 100644 --- a/spec/files/no_epw_file_osw/measures/DencityReports/measure.rb +++ b/spec/files/no_epw_file_osw/measures/DencityReports/measure.rb @@ -129,13 +129,13 @@ def run(runner, user_arguments) end # determine how to format time series output - msgpack_flag = FALSE - csv_flag = FALSE + msgpack_flag = false + csv_flag = false if output_format == "MessagePack" || output_format == "Both" - msgpack_flag = TRUE + msgpack_flag = true end if output_format == "CSV" || output_format == "Both" - csv_flag = TRUE + csv_flag = true end # get the last model and sql file @@ -426,7 +426,7 @@ def run(runner, user_arguments) #todo: find a way for the sql call to not rely on RUN PERIOD 1 timeseries_start = Time.now.to_i available_meters = sql_file.execAndReturnVectorOfString("SELECT VariableName FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") - get_timeseries_flag = TRUE + get_timeseries_flag = true if available_meters.empty? runner.registerWarning("No meters found with Hourly reporting frequency to extract timeseries data from") else @@ -435,7 +435,7 @@ def run(runner, user_arguments) runner.registerInfo("The following meters were found: #{meter_strings}") rescue runner.registerWarning("Unable to retrieve timeseries strings") - get_timeseries_flag = FALSE + get_timeseries_flag = false end meter_units = sql_file.execAndReturnVectorOfString("SELECT VariableUnits FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") begin @@ -443,11 +443,11 @@ def run(runner, user_arguments) runner.registerInfo("Units were found for all available meters") rescue runner.registerWarning("Unable to retrieve timeseries unit strings") - get_timeseries_flag = FALSE + get_timeseries_flag = false end runner.registerInfo("The following meter units were found: #{meter_units}") runner.registerError("Timeseries variable names and units of differing lengths. Exiting Dencity Reports.") if meter_units.size != meter_strings.size - get_timeseries_flag = FALSE if meter_units.size != meter_strings.size + get_timeseries_flag = false if meter_units.size != meter_strings.size end runner.registerInfo("get_timeseries_flag is set to #{get_timeseries_flag}") diff --git a/spec/files/output_request_osw/measures/DencityReports/measure.rb b/spec/files/output_request_osw/measures/DencityReports/measure.rb index a4623c1..f0e0b89 100644 --- a/spec/files/output_request_osw/measures/DencityReports/measure.rb +++ b/spec/files/output_request_osw/measures/DencityReports/measure.rb @@ -148,13 +148,13 @@ def run(runner, user_arguments) end # determine how to format time series output - msgpack_flag = FALSE - csv_flag = FALSE + msgpack_flag = false + csv_flag = false if output_format == 'MessagePack' || output_format == 'Both' - msgpack_flag = TRUE + msgpack_flag = true end if output_format == 'CSV' || output_format == 'Both' - csv_flag = TRUE + csv_flag = true end # get the last model and sql file @@ -445,7 +445,7 @@ def run(runner, user_arguments) # todo: find a way for the sql call to not rely on RUN PERIOD 1 timeseries_start = Time.now.to_i available_meters = sql_file.execAndReturnVectorOfString("SELECT VariableName FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") - get_timeseries_flag = TRUE + get_timeseries_flag = true if available_meters.empty? runner.registerWarning('No meters found with Hourly reporting frequency to extract timeseries data from') else @@ -454,7 +454,7 @@ def run(runner, user_arguments) runner.registerInfo("The following meters were found: #{meter_strings}") rescue runner.registerWarning('Unable to retrieve timeseries strings') - get_timeseries_flag = FALSE + get_timeseries_flag = false end meter_units = sql_file.execAndReturnVectorOfString("SELECT VariableUnits FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") begin @@ -462,11 +462,11 @@ def run(runner, user_arguments) runner.registerInfo('Units were found for all available meters') rescue runner.registerWarning('Unable to retrieve timeseries unit strings') - get_timeseries_flag = FALSE + get_timeseries_flag = false end runner.registerInfo("The following meter units were found: #{meter_units}") runner.registerError('Timeseries variable names and units of differing lengths. Exiting Dencity Reports.') if meter_units.size != meter_strings.size - get_timeseries_flag = FALSE if meter_units.size != meter_strings.size + get_timeseries_flag = false if meter_units.size != meter_strings.size end runner.registerInfo("get_timeseries_flag is set to #{get_timeseries_flag}") diff --git a/spec/files/repeated_measure_osw/measures/DencityReports/measure.rb b/spec/files/repeated_measure_osw/measures/DencityReports/measure.rb index 906a4c3..d87f955 100644 --- a/spec/files/repeated_measure_osw/measures/DencityReports/measure.rb +++ b/spec/files/repeated_measure_osw/measures/DencityReports/measure.rb @@ -1,610 +1,610 @@ -# DencityReports generates data that are required for the DEnCity API. - -# Author: Henry Horsey (github: henryhorsey) -# Creation Date: 6/27/2014 - -require 'openstudio' - -class DencityReports < OpenStudio::Ruleset::ReportingUserScript - - #define the name that a user will see, this method may be deprecated as - #the display name in PAT comes from the name field in measure.xml - def name - "Dencity Reports" - end - - #define the arguments that the user will input - def arguments - args = OpenStudio::Ruleset::OSArgumentVector.new - - #make choice argument for facade - choices = OpenStudio::StringVector.new - choices << "MessagePack" - choices << "CSV" - choices << "Both" - output_format = OpenStudio::Ruleset::OSArgument::makeChoiceArgument("output_format", choices) - output_format.setDisplayName("Output Format") - output_format.setDefaultValue("Both") - args << output_format - - args - end - - #short_os_fuel method - def short_os_fuel(fuel_string) - val = nil - fuel_vec = fuel_string.split(" ") - if fuel_vec[0] == "Electricity" - val = "Elec" - elsif fuel_vec[0] == "District" - fuel_vec[1] == "Heating" ? val = "Dist Heat" : val = "Dist Cool" - elsif fuel_vec[0] == "Natural" - val = "NG" - elsif fuel_vec[0] == "Additional" - val = "Other Fuel" - elsif fuel_vec[0] == "Water" - val = "Water" - else - val = "Unknown" - end - - val - - end - - #short_os_cat method - def short_os_cat(category_string) - val = nil - cat_vec = category_string.split(" ") - if cat_vec[0] == "Heating" - val = "Heat" - elsif cat_vec[0] == "Cooling" - val = "Cool" - elsif cat_vec[0] == "Humidification" - val = "Humid" - elsif cat_vec[0] == "Interior" - cat_vec[1] == "Lighting" ? val = "Int Light" : val = "Int Equip" - elsif cat_vec[0] == "Exterior" - cat_vec[1] == "Lighting" ? val = "Ext Light" : val = "Ext Equip" - elsif cat_vec[0] == "Heat" - cat_vec[1] == "Recovery" ? val = "Heat Rec" : val = "Heat Rej" - elsif cat_vec[0] == "Pumps" - val = "Pumps" - elsif cat_vec[0] == "Fans" - val = "Fans" - elsif cat_vec[0] == "Refrigeration" - val = "Rfg" - elsif cat_vec[0] == "Generators" - val = "Gen" - elsif cat_vec[0] == "Water" - val = "Water Systems" - else - val = "Unknown" - end - - val - - end - - #sql_query method - def sql_query(runner, sql, report_name, query) - val = nil - result = sql.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='#{report_name}' AND #{query}") - if result.empty? - runner.registerWarning("Query failed for #{report_name} and #{query}") - else - begin - val = result.get - rescue - val = nil - runner.registerWarning("Query result.get failed") - end - end - - val - end - - #define what happens when the measure is run - def run(runner, user_arguments) - super(runner, user_arguments) - - #use the built-in error checking - unless runner.validateUserArguments(arguments, user_arguments) - return false - end - - # require 'ruby-prof' - - begin - # RubyProf.start - - output_format = runner.getStringArgumentValue("output_format", user_arguments) - os_version = OpenStudio::VersionString.new(OpenStudio::openStudioVersion()) - min_version_feature1 = OpenStudio::VersionString.new("1.2.3") - require "time" - - unless os_version >= min_version_feature1 - runner.registerError("Dencity Reports requires a version of OpenStudio greater than 1.2.3.") - return false - end - - # determine how to format time series output - msgpack_flag = FALSE - csv_flag = FALSE - if output_format == "MessagePack" || output_format == "Both" - msgpack_flag = TRUE - end - if output_format == "CSV" || output_format == "Both" - csv_flag = TRUE - end - - # get the last model and sql file - model = runner.lastOpenStudioModel - if model.empty? - runner.registerError("Cannot find last model.") - return false - end - model = model.get - building = model.getBuilding - - runner.registerInfo("Model loaded") - - sql_file = runner.lastEnergyPlusSqlFile - if sql_file.empty? - runner.registerError("Cannot find last sql file.") - return false - end - sql_file = sql_file.get - model.setSqlFile(sql_file) - - runner.registerInfo("Sql loaded") - - #Initalize array that will be used to construct the DEnCity metadata csv - metadata = Array.new - metadata[0] = ["name", "display_name", "short_name", "description", "unit", "datatype", "user_defined"] - - #get building footprint to use for calculating end use EUIs - building_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Total Building Area' AND ColumnName='Area'") - building_area ||= "NIL" - runner.registerValue("building_area", building_area, "m2") - metadata[metadata.length] = ["building_area", "Total Building Area", "Bldg Area", "Total building area as calculated by Energy Plus", "square_meter", "double", "FALSE"] - - #get end use totals for fuels - site_energy_use = 0.0 - OpenStudio::EndUseFuelType.getValues.each do |fuel_type| - fuel_str = OpenStudio::EndUseFuelType.new(fuel_type).valueDescription - fuel_type_aggregation = 0.0 - mult_factor = 1 - if fuel_str != "Water" - runner_units_eui = "MJ/m2" - metadata_units_eui = "megajoules_per_square_meter" - mult_factor = 1000 - runner_units_agg = "GJ" - metadata_units_agg = "gigajoule" - else - runner_units_eui = "m" - metadata_units_eui = "meter" - runner_units_agg = "m3" - metadata_units_agg = "cubic meter" - end - OpenStudio::EndUseCategoryType.getValues.each do |category_type| - category_str = OpenStudio::EndUseCategoryType.new(category_type).valueDescription - temp_val = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='End Uses' AND RowName='#{category_str}' AND ColumnName='#{fuel_str}'") - if temp_val - eui_val = temp_val / building_area * mult_factor - prefix_str = OpenStudio::toUnderscoreCase("#{fuel_str}_#{category_str}_eui") - runner.registerValue("#{prefix_str}", eui_val, "#{runner_units_eui}") - short_name = "#{short_os_fuel(fuel_str)} #{short_os_cat(category_str)} EUI" - metadata[metadata.length] = [prefix_str, "#{category_str} #{fuel_str} EUI", short_name, "Total #{fuel_str.downcase} used for #{category_str.downcase} per square foot", metadata_units_eui, "double", "FALSE"] - fuel_type_aggregation += temp_val - end - end - if fuel_type_aggregation - prefix_str = OpenStudio::toUnderscoreCase("total_#{fuel_str}_end_use") - runner.registerValue(prefix_str, fuel_type_aggregation, "#{runner_units_agg}") - short_name = "#{short_os_fuel(fuel_str)} Total" - metadata[metadata.length] = [prefix_str, "Total #{fuel_str} End Use", short_name, "Total #{fuel_str.downcase} End Use", metadata_units_agg, "double", "FALSE"] - site_energy_use += fuel_type_aggregation if fuel_str != "Water" - end - end - - runner.registerValue("site_energy_use", site_energy_use, "GJ") - metadata[metadata.length] = ["site_energy_use", "Total Site Energy Use", "Site Energy", "Total energy consumption for the site", "gigajoule", "double", "FALSE"] - - #get monthly fuel aggregates - #todo: get all monthly fuel type outputs, including non-present fuel types, mapping to 0 - OpenStudio::EndUseFuelType.getValues.each do |fuel_type| - fuel_str = OpenStudio::EndUseFuelType.new(fuel_type).valueDescription - mult_factor = 10**-6 / building_area - runner_units = "MJ/m2" - metadata_units = "megajoules_per_square_meter" - if fuel_str == "Water" - next - end - OpenStudio::MonthOfYear.getValues.each do |month| - if month >= 1 and month <= 12 - fuel_and_month_aggregation = 0.0 - OpenStudio::EndUseCategoryType::getValues.each do |category_type| - if sql_file.energyConsumptionByMonth(OpenStudio::EndUseFuelType.new(fuel_str), OpenStudio::EndUseCategoryType.new(category_type), OpenStudio::MonthOfYear.new(month)).is_initialized - val_in_j = sql_file.energyConsumptionByMonth(OpenStudio::EndUseFuelType.new(fuel_str), OpenStudio::EndUseCategoryType.new(category_type), OpenStudio::MonthOfYear.new(month)).get - fuel_and_month_aggregation += val_in_j - end - end - fuel_and_month_aggregation *= mult_factor - month_str = OpenStudio::MonthOfYear.new(month).valueDescription - prefix_str = OpenStudio::toUnderscoreCase("#{month_str}_end_use_#{fuel_str}_eui") - runner.registerValue("#{prefix_str}", fuel_and_month_aggregation, "#{runner_units}") - short_name = "#{month_str[0..2]} #{short_os_fuel(fuel_str)} EUI" - metadata[metadata.length] = ["#{prefix_str}", "#{month_str} #{fuel_str} EUI", short_name, "Total #{fuel_str.downcase} end use energy use per square meter in #{month_str}", metadata_units, "double", "FALSE"] - end - end - end - - # queries that don't have API methods yet - - life_cycle_cost = sql_query(runner, sql_file, "Life-Cycle Cost Report", "TableName='Present Value by Category' AND RowName='Grand Total' AND ColumnName='Present Value'") - runner.registerValue("life_cycle_cost", life_cycle_cost, "dollars") - metadata[metadata.length] = ["life_cycle_cost", "Total Life Cycle Cost", "Life Cycle Cost", "Total calculated life cycle cost", "us_dollar", "double", "FALSE"] - - conditioned_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Net Conditioned Building Area' AND ColumnName='Area'") - runner.registerValue("conditioned_area", conditioned_area, "m2") - metadata[metadata.length] = ["conditioned_area", "Total Conditioned Area", "Cond Bldg Area", "Total conditioned building area as calculated by Energy Plus", "square_meter", "double", "FALSE"] - - unconditioned_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Unconditioned Building Area' AND ColumnName='Area'") - runner.registerValue("unconditioned_area", unconditioned_area, "m2") - metadata[metadata.length] = ["unconditioned_area", "Total Unconditioned Area", "Uncond Bldg Area", "Total unconditioned building area as calculated by EnergyPlus", "square_meter", "double", "FALSE"] - - total_site_eui = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Site and Source Energy' AND RowName='Total Site Energy' AND ColumnName='Energy Per Conditioned Building Area'") - runner.registerValue("total_site_eui", total_site_eui, "MJ/m2") - metadata[metadata.length] = ["total_site_eui", "Total Site Energy Use Intensity", "Site EUI", "Total site energy use intensity per conditioned building area as calculated by EnergyPlus", "megajoules_per_square_meter", "double", "FALSE"] - - total_source_eui = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Site and Source Energy' AND RowName='Total Source Energy' AND ColumnName='Energy Per Conditioned Building Area'") - runner.registerValue("total_source_eui", total_source_eui, "MJ/m2") - metadata[metadata.length] = ["total_source_eui", "Total Source Energy Use Intensity", "Source EUI", "Total source energy use intensity per conditioned building area as calculated by EnergyPlus", "megajoules_per_square_meter", "double", "FALSE"] - - time_setpoint_not_met_during_occupied_heating = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Comfort and Setpoint Not Met Summary' AND RowName='Time Setpoint Not Met During Occupied Heating' AND ColumnName='Facility'") - runner.registerValue("time_setpoint_not_met_during_occupied_heating", time_setpoint_not_met_during_occupied_heating, "hr") - metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_heating", "Occupied Time During Which Heating Setpoint Not Met", "Setpoint Missed Heat", "Hours during which the building was occupied but the heating setpoint temperature was not met", "hour", "double", "FALSE"] - - time_setpoint_not_met_during_occupied_cooling = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Comfort and Setpoint Not Met Summary' AND RowName='Time Setpoint Not Met During Occupied Cooling' AND ColumnName='Facility'") - runner.registerValue("time_setpoint_not_met_during_occupied_cooling", time_setpoint_not_met_during_occupied_cooling, "hr") - metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_cooling", "Occupied Time During Which Cooling Setpoint Not Met", "Setpoint Missed Cool", "Hours during which the building was occupied but the cooling setpoint temperature was not met", "hour", "double", "FALSE"] - - time_setpoint_not_met_during_occupied_hours = time_setpoint_not_met_during_occupied_heating + time_setpoint_not_met_during_occupied_cooling - runner.registerValue("time_setpoint_not_met_during_occupied_hours", time_setpoint_not_met_during_occupied_hours, "hr") - metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_hours", "Occupied Time During Which Temperature Setpoint Not Met", "Setpoint Missed Total", "Hours during which the building was occupied but the setpoint temperatures were not met", "hour", "double", "FALSE"] - - window_to_wall_ratio_north = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='North (315 to 45 deg)'") - runner.registerValue("window_to_wall_ratio_north", window_to_wall_ratio_north, "%") - metadata[metadata.length] = ["window_to_wall_ratio_north", "North Window to Wall Ratio", "WWR North", "Window to wall ratio of wall objects facing between 315 and 45 degrees", "percent", "double", "FALSE"] - - window_to_wall_ratio_south = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='South (135 to 225 deg)'") - runner.registerValue("window_to_wall_ratio_south", window_to_wall_ratio_south, "%") - metadata[metadata.length] = ["window_to_wall_ratio_south", "South Window to Wall Ratio", "WWR South", "Window to wall ratio of wall objects facing between 135 and 225 degrees", "percent", "double", "FALSE"] - - window_to_wall_ratio_east = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='East (45 to 135 deg)'") - runner.registerValue("window_to_wall_ratio_east", window_to_wall_ratio_east, "%") - metadata[metadata.length] = ["window_to_wall_ratio_east", "East Window to Wall Ratio", "WWR East", "Window to wall ratio of wall objects facing between 45 and 135 degrees", "percent", "double", "FALSE"] - - window_to_wall_ratio_west = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='West (225 to 315 deg)'") - runner.registerValue("window_to_wall_ratio_west", window_to_wall_ratio_west, "%") - metadata[metadata.length] = ["window_to_wall_ratio_west", "West Window to Wall Ratio", "WWR West", "Window to wall ratio of wall objects facing between 225 and 315 degrees", "percent", "double", "FALSE"] - - lat = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Latitude' AND ColumnName='Value'") - runner.registerValue("latitude", lat, "deg") - metadata[metadata.length] = ["latitude", "Latitude", "Lat", "Building latitude based on weather file", "degrees_angular", "double", "FALSE"] - - long = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Longitude' AND ColumnName='Value'") - runner.registerValue("longitude", long, "deg") - metadata[metadata.length] = ["longitude", "Longitude", "Long", "Building longitude based on weather file", "degrees_angular", "double", "FALSE"] - - weather_file = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Weather File' AND ColumnName='Value'") - runner.registerValue("weather_file", weather_file, "deg") - metadata[metadata.length] = ["weather_file", "Weather File", "Weather File", "Name of weather file", "none", "string", "FALSE"] - - # queries with one-line API methods - building_rotation = building.northAxis - runner.registerValue("orientation", building_rotation, "deg") - metadata[metadata.length] = ["orientation", "Building Orientation", "Orientation", "Degrees of building north axis off of true north", "degrees_angular", "double", "FALSE"] - - #floor_to_floor_height = building.nominalFloortoFloorHeight.get - #runner.registerValue("floor_to_floor_height", floor_to_floor_height, "m") - #metadata[metadata.length] = ["floor_to_floor_height", "Floor to Floor Height", "Flr-to-Flr Height", "Nominal floor to floor height of building", "meter", "double", "FALSE"] - - #total_building_volume = building_area * floor_to_floor_height - #runner.registerValue("total_building_volume", total_building_volume, "m3") - #metadata[metadata.length] = ["total_building_volume", "Total Building Volume", "Volume", "Building volume calculated by multiplying floor to floor height and footprint", "cubic_meter", "double", "FALSE"] - - total_occupancy = building.numberOfPeople - runner.registerValue("total_occupancy", total_occupancy, "people") - metadata[metadata.length] = ["total_occupancy", "Total Building Occupancy", "Bldg Occ", "Number of people in the building as calculated by EnergyPlus", "none", "double", "FALSE"] - - occupancy_density = building.peoplePerFloorArea - runner.registerValue("occupant_density", occupancy_density, "people/m2") - metadata[metadata.length] = ["occupant_density", "Building Occupancy Density", "Occ Density", "Number of people per floor area as calculated by EnergyPlus", "none", "double", "FALSE"] - - lighting_power = building.lightingPower - runner.registerValue("lighting_power", lighting_power, "W") - metadata[metadata.length] = ["lighting_power", "Lighting Power", "Lighting Pwr", "Total lighting power", "watt", "double", "FALSE"] - - lighting_power_density = building.lightingPowerPerFloorArea - runner.registerValue("lighting_power_density", lighting_power_density, "W/m2") - metadata[metadata.length] = ["lighting_power_density", "Lighting Power Density", "LPD", "Total lighting power density", "watts_per_square_meter", "double", "FALSE"] - - infiltration_rate = building.infiltrationDesignAirChangesPerHour - runner.registerValue("infiltration_rate", infiltration_rate, "ACH") - metadata[metadata.length] = ["infiltration_rate", "Infiltration Rate", "Infil Rate", "Infiltration rate of air into the building", "none", "double", "FALSE"] - - number_of_floors = building.standardsNumberOfStories.get if building.standardsNumberOfStories.is_initialized - number_of_floors ||= "NIL" - runner.registerValue("number_of_floors", number_of_floors, "") - metadata[metadata.length] = ["number_of_floors", "Number of Floors", "Number of Floors", "Total number of storeys in the building", "none", "double", "FALSE"] - - building_type = building.standardsBuildingType if building.standardsBuildingType.is_initialized - building_type ||= "NIL" - runner.registerValue("building_type", building_type, "") - metadata[metadata.length] = ["building_type", "Building Type", "Bldg Type", "Building type as defined by the modeler", "none", "string", "FALSE"] - - #get exterior wall, exterior roof, and ground plate areas - exterior_wall_area = 0.0 - exterior_roof_area = 0.0 - ground_contact_area = 0.0 - surfaces = model.getSurfaces - surfaces.each do |surface| - if surface.outsideBoundaryCondition == "Outdoors" and surface.surfaceType == "Wall" - exterior_wall_area += surface.netArea - end - if surface.outsideBoundaryCondition == "Outdoors" and surface.surfaceType == "RoofCeiling" - exterior_roof_area += surface.netArea - end - if surface.outsideBoundaryCondition == "Ground" and surface.surfaceType == "Floor" - ground_contact_area += surface.netArea - end - end - - runner.registerValue("exterior_wall_area", exterior_wall_area, "m2") - metadata[metadata.length] = ["exterior_wall_area", "Exterior Wall Area", "Ext Wall Area", "Total area of all surfaces with the conditions of 'Outdoors' and 'Wall'", "square_meter", "double", "FALSE"] - - runner.registerValue("exterior_roof_area", exterior_roof_area, "m2") - metadata[metadata.length] = ["exterior_roof_area", "Exterior Roof Area", "Ext Roof Area", "Total area of all surfaces with the conditions of 'Outdoors' and 'Roof'", "square_meter", "double", "FALSE"] - - runner.registerValue("ground_contact_area", ground_contact_area, "m2") - metadata[metadata.length] = ["ground_contact_area", "Ground Contact Area", "Gnd Area", "Total area of all surfaces with the conditions of 'Ground' and 'Floor'", "square_meter", "double", "FALSE"] - - #get exterior fenestration area - exterior_fenestration_area = 0.0 - subsurfaces = model.getSubSurfaces - subsurfaces.each do |subsurface| - if subsurface.outsideBoundaryCondition == "Outdoors" - if subsurface.subSurfaceType == "FixedWindow" or subsurface.subSurfaceType == "OperableWindow" - exterior_fenestration_area += subsurface.netArea - end - end - end - - runner.registerValue("exterior_fenestration_area", exterior_fenestration_area, "m2") - metadata[metadata.length] = ["exterior_fenestration_area", "Exterior Fenestration Area", "Window Area Total", "Total area of all surfaces with the conditions of 'Outdoors' and 'FixedWindow' or 'OperableWindow'", "square_meter", "double", "FALSE"] - - #get density of economizers in airloops - num_airloops = 0 - num_economizers = 0 - model.getAirLoopHVACs.each do |air_loop| - num_airloops += 1 - if air_loop.airLoopHVACOutdoorAirSystem.is_initialized - air_loop_oa = air_loop.airLoopHVACOutdoorAirSystem.get - air_loop_oa_controller = air_loop_oa.getControllerOutdoorAir - if air_loop_oa_controller.getEconomizerControlType != "NoEconomizer" - num_economizers += 1 - end - end - end - economizer_density = num_economizers / num_airloops if num_airloops != 0 - economizer_density ||= "NIL" - - runner.registerValue("economizer_density", economizer_density, "") - metadata[metadata.length] = ["economizer_density", "Economizer Density", "Econ Density", "Proportion of air loops with economizers to air loops without", "percent", "double", "FALSE"] - - #get aspect ratios - north_wall_area = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Wall Area' AND ColumnName='North (315 to 45 deg)'") - east_wall_area = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Wall Area' AND ColumnName='East (45 to 135 deg)'") - aspect_ratio = north_wall_area / east_wall_area if north_wall_area != 0 && east_wall_area != 0 - aspect_ratio ||= "NIL" - - runner.registerValue("aspect_ratio", aspect_ratio, "") - metadata[metadata.length] = ["aspect_ratio", "Aspect Ratio", "Aspect Ratio", "Proportion of north wall area to east wall area", "percent", "double", "FALSE"] - - #write metadata CSV - runner.registerInfo("Saving Dencity metadata csv file") - CSV.open("report_metadata.csv", "wb") do |csv| - metadata.each do |elem| - csv << elem - end - end - runner.registerInfo("Saved Dencity metadata as report_metadata.csv") - - #get meter timeseries data and output as a msgpack or csv or both - #todo: find a way for the sql call to not rely on RUN PERIOD 1 - timeseries_start = Time.now.to_i - available_meters = sql_file.execAndReturnVectorOfString("SELECT VariableName FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") - get_timeseries_flag = TRUE - if available_meters.empty? - runner.registerWarning("No meters found with Hourly reporting frequency to extract timeseries data from") - else - begin - meter_strings = available_meters.get - runner.registerInfo("The following meters were found: #{meter_strings}") - rescue - runner.registerWarning("Unable to retrieve timeseries strings") - get_timeseries_flag = FALSE - end - meter_units = sql_file.execAndReturnVectorOfString("SELECT VariableUnits FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") - begin - meter_units = meter_units.get - runner.registerInfo("Units were found for all available meters") - rescue - runner.registerWarning("Unable to retrieve timeseries unit strings") - get_timeseries_flag = FALSE - end - runner.registerInfo("The following meter units were found: #{meter_units}") - runner.registerError("Timeseries variable names and units of differing lengths. Exiting Dencity Reports.") if meter_units.size != meter_strings.size - get_timeseries_flag = FALSE if meter_units.size != meter_strings.size - end - - runner.registerInfo("get_timeseries_flag is set to #{get_timeseries_flag}") - if get_timeseries_flag - runner.registerInfo("Retrieving timeseries data") - if msgpack_flag and csv_flag - require "parallel" - require "msgpack" - msgpack_array = [] - csv_array = [] - mark0 = Time.now.to_i - Parallel.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| - if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized - sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get - ts_values = sql_ts.values - ts_times = sql_ts.dateTimes - timeseries_out = {} - initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 - timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 - timeseries_out[initial_epoch_time] = ts_values[0] - next_epoch_time = initial_epoch_time - for i in 1..ts_times.size - 1 - next_epoch_time += timestep_in_epoch - timeseries_out[next_epoch_time] = ts_values[i] - end - csv_array << (["epoch_time"] + timeseries_out.to_a.transpose[0]) if meter_index == 0 - csv_array << ([meter_string.gsub(":", "_") + " [" + meter_units[meter_index] + "]"] + timeseries_out.to_a.transpose[1]) - meter_hash = {timeseries: {}} - meter_hash[:timeseries][:fuel] = meter_string.gsub(":", "_") - meter_hash[:timeseries][:interval] = Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i - meter_hash[:timeseries][:interval_units] = "seconds" - meter_hash[:timeseries][:data] = timeseries_out - meter_hash[:timeseries][:units] = meter_units[meter_index] - msgpack_array << meter_hash - else - runner.registerWarning("Timeseries #{meter_string} was empty.") - end - end - mark1 = Time.now.to_i - runner.registerInfo("DeltaMake=#{mark1-mark0}s") - File.open("report_timeseries.msgpack", "w") do |file| - file << {data: msgpack_array}.to_msgpack - end - runner.registerInfo("Saved timeseries data as report_timeseries.msgpack") - csv_array = csv_array.transpose - CSV.open("report_timeseries.csv", "w") do |csv| - csv_array.each do |elem| - csv << elem - end - end - runner.registerInfo("Saved timeseries data as report_timeseries.csv") - mark2 = Time.now.to_i - runner.registerInfo("DeltaWrite=#{mark2-mark1}s") - - elsif msgpack_flag - require "parallel" - require "msgpack" - msgpack_array = [] - mark0 = Time.now.to_i - meter_strings.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| - if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized - sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get - ts_values = sql_ts.values - ts_times = sql_ts.dateTimes - timeseries_out = {} - initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 - timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 - timeseries_out[initial_epoch_time] = ts_values[0] - next_epoch_time = initial_epoch_time - for i in 1..ts_times.size - 1 - next_epoch_time += timestep_in_epoch - timeseries_out[next_epoch_time] = ts_values[i] - end - meter_hash = {timeseries: {}} - meter_hash[:timeseries][:fuel] = meter_string.gsub(":", "_") - meter_hash[:timeseries][:interval] = Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i - meter_hash[:timeseries][:interval_units] = "seconds" - meter_hash[:timeseries][:data] = timeseries_out - meter_hash[:timeseries][:units] = meter_units[meter_index] - msgpack_array << meter_hash - else - runner.registerWarning("Timeseries #{meter_string} was empty.") - end - end - mark1 = Time.now.to_i - runner.registerInfo("DeltaMake=#{mark1-mark0}s") - File.open("report_timeseries.msgpack", "w") do |file| - file << {data: msgpack_array}.to_msgpack - runner.registerInfo("Saved timeseries data as report_timeseries.msgpack") - end - mark2 = Time.now.to_i - runner.registerInfo("DeltaWrite=#{mark2-mark1}s") - - elsif csv_flag - require "parallel" - csv_array = [] - mark0 = Time.now.to_i - Parallel.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| - if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized - sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get - ts_values = sql_ts.values - ts_times = sql_ts.dateTimes - timeseries_out = {} - initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 - timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 - timeseries_out[initial_epoch_time] = ts_values[0] - next_epoch_time = initial_epoch_time - for i in 1..ts_times.size - 1 - next_epoch_time += timestep_in_epoch - timeseries_out[next_epoch_time] = ts_values[i] - end - csv_array << (["epoch_time"] + timeseries_out.to_a.transpose[0]) if meter_index == 0 - csv_array << ([meter_string.gsub(":", "_") + " [" + meter_units[meter_index] + "]"] + timeseries_out.to_a.transpose[1]) - else - runner.registerWarning("Timeseries #{meter_string} was empty.") - end - end - mark1 = Time.now.to_i - runner.registerInfo("DeltaMake=#{mark1-mark0}s") - csv_array = csv_array.transpose - CSV.open("report_timeseries.csv", "w") do |csv| - csv_array.each do |elem| - csv << elem - end - end - runner.registerInfo("Saved timeseries data as report_timeseries.csv") - mark2 = Time.now.to_i - runner.registerInfo("DeltaWrite=#{mark2-mark1}s") - end - end - timeseries_end = Time.now.to_i - runner.registerInfo("Total Timeseries Time: #{timeseries_end-timeseries_start}") - - #closing the sql file - sql_file.close - - #reporting final condition - runner.registerFinalCondition("DEnCity Report generated successfully.") - - rescue => e - fail "Measure failed with #{e.message}:#{e.backtrace}" - ensure - - # profile_results = RubyProf.stop - # FileUtils.mkdir_p 'results' - # File.open("results/profile-graph.html", 'w') { |f| RubyProf::GraphHtmlPrinter.new(profile_results).print(f) } - # File.open("results/profile-flat.txt", 'w') { |f| RubyProf::FlatPrinter.new(profile_results).print(f) } - # File.open("results/profile-tree.prof", 'w') { |f| RubyProf::CallTreePrinter.new(profile_results).print(f) } - - - end - - true - - end #end the run method - -end #end the measure - -#this allows the measure to be use by the application +# DencityReports generates data that are required for the DEnCity API. + +# Author: Henry Horsey (github: henryhorsey) +# Creation Date: 6/27/2014 + +require 'openstudio' + +class DencityReports < OpenStudio::Ruleset::ReportingUserScript + + #define the name that a user will see, this method may be deprecated as + #the display name in PAT comes from the name field in measure.xml + def name + "Dencity Reports" + end + + #define the arguments that the user will input + def arguments + args = OpenStudio::Ruleset::OSArgumentVector.new + + #make choice argument for facade + choices = OpenStudio::StringVector.new + choices << "MessagePack" + choices << "CSV" + choices << "Both" + output_format = OpenStudio::Ruleset::OSArgument::makeChoiceArgument("output_format", choices) + output_format.setDisplayName("Output Format") + output_format.setDefaultValue("Both") + args << output_format + + args + end + + #short_os_fuel method + def short_os_fuel(fuel_string) + val = nil + fuel_vec = fuel_string.split(" ") + if fuel_vec[0] == "Electricity" + val = "Elec" + elsif fuel_vec[0] == "District" + fuel_vec[1] == "Heating" ? val = "Dist Heat" : val = "Dist Cool" + elsif fuel_vec[0] == "Natural" + val = "NG" + elsif fuel_vec[0] == "Additional" + val = "Other Fuel" + elsif fuel_vec[0] == "Water" + val = "Water" + else + val = "Unknown" + end + + val + + end + + #short_os_cat method + def short_os_cat(category_string) + val = nil + cat_vec = category_string.split(" ") + if cat_vec[0] == "Heating" + val = "Heat" + elsif cat_vec[0] == "Cooling" + val = "Cool" + elsif cat_vec[0] == "Humidification" + val = "Humid" + elsif cat_vec[0] == "Interior" + cat_vec[1] == "Lighting" ? val = "Int Light" : val = "Int Equip" + elsif cat_vec[0] == "Exterior" + cat_vec[1] == "Lighting" ? val = "Ext Light" : val = "Ext Equip" + elsif cat_vec[0] == "Heat" + cat_vec[1] == "Recovery" ? val = "Heat Rec" : val = "Heat Rej" + elsif cat_vec[0] == "Pumps" + val = "Pumps" + elsif cat_vec[0] == "Fans" + val = "Fans" + elsif cat_vec[0] == "Refrigeration" + val = "Rfg" + elsif cat_vec[0] == "Generators" + val = "Gen" + elsif cat_vec[0] == "Water" + val = "Water Systems" + else + val = "Unknown" + end + + val + + end + + #sql_query method + def sql_query(runner, sql, report_name, query) + val = nil + result = sql.execAndReturnFirstDouble("SELECT Value FROM TabularDataWithStrings WHERE ReportName='#{report_name}' AND #{query}") + if result.empty? + runner.registerWarning("Query failed for #{report_name} and #{query}") + else + begin + val = result.get + rescue + val = nil + runner.registerWarning("Query result.get failed") + end + end + + val + end + + #define what happens when the measure is run + def run(runner, user_arguments) + super(runner, user_arguments) + + #use the built-in error checking + unless runner.validateUserArguments(arguments, user_arguments) + return false + end + + # require 'ruby-prof' + + begin + # RubyProf.start + + output_format = runner.getStringArgumentValue("output_format", user_arguments) + os_version = OpenStudio::VersionString.new(OpenStudio::openStudioVersion()) + min_version_feature1 = OpenStudio::VersionString.new("1.2.3") + require "time" + + unless os_version >= min_version_feature1 + runner.registerError("Dencity Reports requires a version of OpenStudio greater than 1.2.3.") + return false + end + + # determine how to format time series output + msgpack_flag = false + csv_flag = false + if output_format == "MessagePack" || output_format == "Both" + msgpack_flag = true + end + if output_format == "CSV" || output_format == "Both" + csv_flag = true + end + + # get the last model and sql file + model = runner.lastOpenStudioModel + if model.empty? + runner.registerError("Cannot find last model.") + return false + end + model = model.get + building = model.getBuilding + + runner.registerInfo("Model loaded") + + sql_file = runner.lastEnergyPlusSqlFile + if sql_file.empty? + runner.registerError("Cannot find last sql file.") + return false + end + sql_file = sql_file.get + model.setSqlFile(sql_file) + + runner.registerInfo("Sql loaded") + + #Initalize array that will be used to construct the DEnCity metadata csv + metadata = Array.new + metadata[0] = ["name", "display_name", "short_name", "description", "unit", "datatype", "user_defined"] + + #get building footprint to use for calculating end use EUIs + building_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Total Building Area' AND ColumnName='Area'") + building_area ||= "NIL" + runner.registerValue("building_area", building_area, "m2") + metadata[metadata.length] = ["building_area", "Total Building Area", "Bldg Area", "Total building area as calculated by Energy Plus", "square_meter", "double", "FALSE"] + + #get end use totals for fuels + site_energy_use = 0.0 + OpenStudio::EndUseFuelType.getValues.each do |fuel_type| + fuel_str = OpenStudio::EndUseFuelType.new(fuel_type).valueDescription + fuel_type_aggregation = 0.0 + mult_factor = 1 + if fuel_str != "Water" + runner_units_eui = "MJ/m2" + metadata_units_eui = "megajoules_per_square_meter" + mult_factor = 1000 + runner_units_agg = "GJ" + metadata_units_agg = "gigajoule" + else + runner_units_eui = "m" + metadata_units_eui = "meter" + runner_units_agg = "m3" + metadata_units_agg = "cubic meter" + end + OpenStudio::EndUseCategoryType.getValues.each do |category_type| + category_str = OpenStudio::EndUseCategoryType.new(category_type).valueDescription + temp_val = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='End Uses' AND RowName='#{category_str}' AND ColumnName='#{fuel_str}'") + if temp_val + eui_val = temp_val / building_area * mult_factor + prefix_str = OpenStudio::toUnderscoreCase("#{fuel_str}_#{category_str}_eui") + runner.registerValue("#{prefix_str}", eui_val, "#{runner_units_eui}") + short_name = "#{short_os_fuel(fuel_str)} #{short_os_cat(category_str)} EUI" + metadata[metadata.length] = [prefix_str, "#{category_str} #{fuel_str} EUI", short_name, "Total #{fuel_str.downcase} used for #{category_str.downcase} per square foot", metadata_units_eui, "double", "FALSE"] + fuel_type_aggregation += temp_val + end + end + if fuel_type_aggregation + prefix_str = OpenStudio::toUnderscoreCase("total_#{fuel_str}_end_use") + runner.registerValue(prefix_str, fuel_type_aggregation, "#{runner_units_agg}") + short_name = "#{short_os_fuel(fuel_str)} Total" + metadata[metadata.length] = [prefix_str, "Total #{fuel_str} End Use", short_name, "Total #{fuel_str.downcase} End Use", metadata_units_agg, "double", "FALSE"] + site_energy_use += fuel_type_aggregation if fuel_str != "Water" + end + end + + runner.registerValue("site_energy_use", site_energy_use, "GJ") + metadata[metadata.length] = ["site_energy_use", "Total Site Energy Use", "Site Energy", "Total energy consumption for the site", "gigajoule", "double", "FALSE"] + + #get monthly fuel aggregates + #todo: get all monthly fuel type outputs, including non-present fuel types, mapping to 0 + OpenStudio::EndUseFuelType.getValues.each do |fuel_type| + fuel_str = OpenStudio::EndUseFuelType.new(fuel_type).valueDescription + mult_factor = 10**-6 / building_area + runner_units = "MJ/m2" + metadata_units = "megajoules_per_square_meter" + if fuel_str == "Water" + next + end + OpenStudio::MonthOfYear.getValues.each do |month| + if month >= 1 and month <= 12 + fuel_and_month_aggregation = 0.0 + OpenStudio::EndUseCategoryType::getValues.each do |category_type| + if sql_file.energyConsumptionByMonth(OpenStudio::EndUseFuelType.new(fuel_str), OpenStudio::EndUseCategoryType.new(category_type), OpenStudio::MonthOfYear.new(month)).is_initialized + val_in_j = sql_file.energyConsumptionByMonth(OpenStudio::EndUseFuelType.new(fuel_str), OpenStudio::EndUseCategoryType.new(category_type), OpenStudio::MonthOfYear.new(month)).get + fuel_and_month_aggregation += val_in_j + end + end + fuel_and_month_aggregation *= mult_factor + month_str = OpenStudio::MonthOfYear.new(month).valueDescription + prefix_str = OpenStudio::toUnderscoreCase("#{month_str}_end_use_#{fuel_str}_eui") + runner.registerValue("#{prefix_str}", fuel_and_month_aggregation, "#{runner_units}") + short_name = "#{month_str[0..2]} #{short_os_fuel(fuel_str)} EUI" + metadata[metadata.length] = ["#{prefix_str}", "#{month_str} #{fuel_str} EUI", short_name, "Total #{fuel_str.downcase} end use energy use per square meter in #{month_str}", metadata_units, "double", "FALSE"] + end + end + end + + # queries that don't have API methods yet + + life_cycle_cost = sql_query(runner, sql_file, "Life-Cycle Cost Report", "TableName='Present Value by Category' AND RowName='Grand Total' AND ColumnName='Present Value'") + runner.registerValue("life_cycle_cost", life_cycle_cost, "dollars") + metadata[metadata.length] = ["life_cycle_cost", "Total Life Cycle Cost", "Life Cycle Cost", "Total calculated life cycle cost", "us_dollar", "double", "FALSE"] + + conditioned_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Net Conditioned Building Area' AND ColumnName='Area'") + runner.registerValue("conditioned_area", conditioned_area, "m2") + metadata[metadata.length] = ["conditioned_area", "Total Conditioned Area", "Cond Bldg Area", "Total conditioned building area as calculated by Energy Plus", "square_meter", "double", "FALSE"] + + unconditioned_area = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Building Area' AND RowName='Unconditioned Building Area' AND ColumnName='Area'") + runner.registerValue("unconditioned_area", unconditioned_area, "m2") + metadata[metadata.length] = ["unconditioned_area", "Total Unconditioned Area", "Uncond Bldg Area", "Total unconditioned building area as calculated by EnergyPlus", "square_meter", "double", "FALSE"] + + total_site_eui = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Site and Source Energy' AND RowName='Total Site Energy' AND ColumnName='Energy Per Conditioned Building Area'") + runner.registerValue("total_site_eui", total_site_eui, "MJ/m2") + metadata[metadata.length] = ["total_site_eui", "Total Site Energy Use Intensity", "Site EUI", "Total site energy use intensity per conditioned building area as calculated by EnergyPlus", "megajoules_per_square_meter", "double", "FALSE"] + + total_source_eui = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Site and Source Energy' AND RowName='Total Source Energy' AND ColumnName='Energy Per Conditioned Building Area'") + runner.registerValue("total_source_eui", total_source_eui, "MJ/m2") + metadata[metadata.length] = ["total_source_eui", "Total Source Energy Use Intensity", "Source EUI", "Total source energy use intensity per conditioned building area as calculated by EnergyPlus", "megajoules_per_square_meter", "double", "FALSE"] + + time_setpoint_not_met_during_occupied_heating = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Comfort and Setpoint Not Met Summary' AND RowName='Time Setpoint Not Met During Occupied Heating' AND ColumnName='Facility'") + runner.registerValue("time_setpoint_not_met_during_occupied_heating", time_setpoint_not_met_during_occupied_heating, "hr") + metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_heating", "Occupied Time During Which Heating Setpoint Not Met", "Setpoint Missed Heat", "Hours during which the building was occupied but the heating setpoint temperature was not met", "hour", "double", "FALSE"] + + time_setpoint_not_met_during_occupied_cooling = sql_query(runner, sql_file, "AnnualBuildingUtilityPerformanceSummary", "TableName='Comfort and Setpoint Not Met Summary' AND RowName='Time Setpoint Not Met During Occupied Cooling' AND ColumnName='Facility'") + runner.registerValue("time_setpoint_not_met_during_occupied_cooling", time_setpoint_not_met_during_occupied_cooling, "hr") + metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_cooling", "Occupied Time During Which Cooling Setpoint Not Met", "Setpoint Missed Cool", "Hours during which the building was occupied but the cooling setpoint temperature was not met", "hour", "double", "FALSE"] + + time_setpoint_not_met_during_occupied_hours = time_setpoint_not_met_during_occupied_heating + time_setpoint_not_met_during_occupied_cooling + runner.registerValue("time_setpoint_not_met_during_occupied_hours", time_setpoint_not_met_during_occupied_hours, "hr") + metadata[metadata.length] = ["time_setpoint_not_met_during_occupied_hours", "Occupied Time During Which Temperature Setpoint Not Met", "Setpoint Missed Total", "Hours during which the building was occupied but the setpoint temperatures were not met", "hour", "double", "FALSE"] + + window_to_wall_ratio_north = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='North (315 to 45 deg)'") + runner.registerValue("window_to_wall_ratio_north", window_to_wall_ratio_north, "%") + metadata[metadata.length] = ["window_to_wall_ratio_north", "North Window to Wall Ratio", "WWR North", "Window to wall ratio of wall objects facing between 315 and 45 degrees", "percent", "double", "FALSE"] + + window_to_wall_ratio_south = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='South (135 to 225 deg)'") + runner.registerValue("window_to_wall_ratio_south", window_to_wall_ratio_south, "%") + metadata[metadata.length] = ["window_to_wall_ratio_south", "South Window to Wall Ratio", "WWR South", "Window to wall ratio of wall objects facing between 135 and 225 degrees", "percent", "double", "FALSE"] + + window_to_wall_ratio_east = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='East (45 to 135 deg)'") + runner.registerValue("window_to_wall_ratio_east", window_to_wall_ratio_east, "%") + metadata[metadata.length] = ["window_to_wall_ratio_east", "East Window to Wall Ratio", "WWR East", "Window to wall ratio of wall objects facing between 45 and 135 degrees", "percent", "double", "FALSE"] + + window_to_wall_ratio_west = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Window-Wall Ratio' AND ColumnName='West (225 to 315 deg)'") + runner.registerValue("window_to_wall_ratio_west", window_to_wall_ratio_west, "%") + metadata[metadata.length] = ["window_to_wall_ratio_west", "West Window to Wall Ratio", "WWR West", "Window to wall ratio of wall objects facing between 225 and 315 degrees", "percent", "double", "FALSE"] + + lat = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Latitude' AND ColumnName='Value'") + runner.registerValue("latitude", lat, "deg") + metadata[metadata.length] = ["latitude", "Latitude", "Lat", "Building latitude based on weather file", "degrees_angular", "double", "FALSE"] + + long = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Longitude' AND ColumnName='Value'") + runner.registerValue("longitude", long, "deg") + metadata[metadata.length] = ["longitude", "Longitude", "Long", "Building longitude based on weather file", "degrees_angular", "double", "FALSE"] + + weather_file = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='General' AND RowName='Weather File' AND ColumnName='Value'") + runner.registerValue("weather_file", weather_file, "deg") + metadata[metadata.length] = ["weather_file", "Weather File", "Weather File", "Name of weather file", "none", "string", "FALSE"] + + # queries with one-line API methods + building_rotation = building.northAxis + runner.registerValue("orientation", building_rotation, "deg") + metadata[metadata.length] = ["orientation", "Building Orientation", "Orientation", "Degrees of building north axis off of true north", "degrees_angular", "double", "FALSE"] + + #floor_to_floor_height = building.nominalFloortoFloorHeight.get + #runner.registerValue("floor_to_floor_height", floor_to_floor_height, "m") + #metadata[metadata.length] = ["floor_to_floor_height", "Floor to Floor Height", "Flr-to-Flr Height", "Nominal floor to floor height of building", "meter", "double", "FALSE"] + + #total_building_volume = building_area * floor_to_floor_height + #runner.registerValue("total_building_volume", total_building_volume, "m3") + #metadata[metadata.length] = ["total_building_volume", "Total Building Volume", "Volume", "Building volume calculated by multiplying floor to floor height and footprint", "cubic_meter", "double", "FALSE"] + + total_occupancy = building.numberOfPeople + runner.registerValue("total_occupancy", total_occupancy, "people") + metadata[metadata.length] = ["total_occupancy", "Total Building Occupancy", "Bldg Occ", "Number of people in the building as calculated by EnergyPlus", "none", "double", "FALSE"] + + occupancy_density = building.peoplePerFloorArea + runner.registerValue("occupant_density", occupancy_density, "people/m2") + metadata[metadata.length] = ["occupant_density", "Building Occupancy Density", "Occ Density", "Number of people per floor area as calculated by EnergyPlus", "none", "double", "FALSE"] + + lighting_power = building.lightingPower + runner.registerValue("lighting_power", lighting_power, "W") + metadata[metadata.length] = ["lighting_power", "Lighting Power", "Lighting Pwr", "Total lighting power", "watt", "double", "FALSE"] + + lighting_power_density = building.lightingPowerPerFloorArea + runner.registerValue("lighting_power_density", lighting_power_density, "W/m2") + metadata[metadata.length] = ["lighting_power_density", "Lighting Power Density", "LPD", "Total lighting power density", "watts_per_square_meter", "double", "FALSE"] + + infiltration_rate = building.infiltrationDesignAirChangesPerHour + runner.registerValue("infiltration_rate", infiltration_rate, "ACH") + metadata[metadata.length] = ["infiltration_rate", "Infiltration Rate", "Infil Rate", "Infiltration rate of air into the building", "none", "double", "FALSE"] + + number_of_floors = building.standardsNumberOfStories.get if building.standardsNumberOfStories.is_initialized + number_of_floors ||= "NIL" + runner.registerValue("number_of_floors", number_of_floors, "") + metadata[metadata.length] = ["number_of_floors", "Number of Floors", "Number of Floors", "Total number of storeys in the building", "none", "double", "FALSE"] + + building_type = building.standardsBuildingType if building.standardsBuildingType.is_initialized + building_type ||= "NIL" + runner.registerValue("building_type", building_type, "") + metadata[metadata.length] = ["building_type", "Building Type", "Bldg Type", "Building type as defined by the modeler", "none", "string", "FALSE"] + + #get exterior wall, exterior roof, and ground plate areas + exterior_wall_area = 0.0 + exterior_roof_area = 0.0 + ground_contact_area = 0.0 + surfaces = model.getSurfaces + surfaces.each do |surface| + if surface.outsideBoundaryCondition == "Outdoors" and surface.surfaceType == "Wall" + exterior_wall_area += surface.netArea + end + if surface.outsideBoundaryCondition == "Outdoors" and surface.surfaceType == "RoofCeiling" + exterior_roof_area += surface.netArea + end + if surface.outsideBoundaryCondition == "Ground" and surface.surfaceType == "Floor" + ground_contact_area += surface.netArea + end + end + + runner.registerValue("exterior_wall_area", exterior_wall_area, "m2") + metadata[metadata.length] = ["exterior_wall_area", "Exterior Wall Area", "Ext Wall Area", "Total area of all surfaces with the conditions of 'Outdoors' and 'Wall'", "square_meter", "double", "FALSE"] + + runner.registerValue("exterior_roof_area", exterior_roof_area, "m2") + metadata[metadata.length] = ["exterior_roof_area", "Exterior Roof Area", "Ext Roof Area", "Total area of all surfaces with the conditions of 'Outdoors' and 'Roof'", "square_meter", "double", "FALSE"] + + runner.registerValue("ground_contact_area", ground_contact_area, "m2") + metadata[metadata.length] = ["ground_contact_area", "Ground Contact Area", "Gnd Area", "Total area of all surfaces with the conditions of 'Ground' and 'Floor'", "square_meter", "double", "FALSE"] + + #get exterior fenestration area + exterior_fenestration_area = 0.0 + subsurfaces = model.getSubSurfaces + subsurfaces.each do |subsurface| + if subsurface.outsideBoundaryCondition == "Outdoors" + if subsurface.subSurfaceType == "FixedWindow" or subsurface.subSurfaceType == "OperableWindow" + exterior_fenestration_area += subsurface.netArea + end + end + end + + runner.registerValue("exterior_fenestration_area", exterior_fenestration_area, "m2") + metadata[metadata.length] = ["exterior_fenestration_area", "Exterior Fenestration Area", "Window Area Total", "Total area of all surfaces with the conditions of 'Outdoors' and 'FixedWindow' or 'OperableWindow'", "square_meter", "double", "FALSE"] + + #get density of economizers in airloops + num_airloops = 0 + num_economizers = 0 + model.getAirLoopHVACs.each do |air_loop| + num_airloops += 1 + if air_loop.airLoopHVACOutdoorAirSystem.is_initialized + air_loop_oa = air_loop.airLoopHVACOutdoorAirSystem.get + air_loop_oa_controller = air_loop_oa.getControllerOutdoorAir + if air_loop_oa_controller.getEconomizerControlType != "NoEconomizer" + num_economizers += 1 + end + end + end + economizer_density = num_economizers / num_airloops if num_airloops != 0 + economizer_density ||= "NIL" + + runner.registerValue("economizer_density", economizer_density, "") + metadata[metadata.length] = ["economizer_density", "Economizer Density", "Econ Density", "Proportion of air loops with economizers to air loops without", "percent", "double", "FALSE"] + + #get aspect ratios + north_wall_area = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Wall Area' AND ColumnName='North (315 to 45 deg)'") + east_wall_area = sql_query(runner, sql_file, "InputVerificationandResultsSummary", "TableName='Window-Wall Ratio' AND RowName='Gross Wall Area' AND ColumnName='East (45 to 135 deg)'") + aspect_ratio = north_wall_area / east_wall_area if north_wall_area != 0 && east_wall_area != 0 + aspect_ratio ||= "NIL" + + runner.registerValue("aspect_ratio", aspect_ratio, "") + metadata[metadata.length] = ["aspect_ratio", "Aspect Ratio", "Aspect Ratio", "Proportion of north wall area to east wall area", "percent", "double", "FALSE"] + + #write metadata CSV + runner.registerInfo("Saving Dencity metadata csv file") + CSV.open("report_metadata.csv", "wb") do |csv| + metadata.each do |elem| + csv << elem + end + end + runner.registerInfo("Saved Dencity metadata as report_metadata.csv") + + #get meter timeseries data and output as a msgpack or csv or both + #todo: find a way for the sql call to not rely on RUN PERIOD 1 + timeseries_start = Time.now.to_i + available_meters = sql_file.execAndReturnVectorOfString("SELECT VariableName FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") + get_timeseries_flag = true + if available_meters.empty? + runner.registerWarning("No meters found with Hourly reporting frequency to extract timeseries data from") + else + begin + meter_strings = available_meters.get + runner.registerInfo("The following meters were found: #{meter_strings}") + rescue + runner.registerWarning("Unable to retrieve timeseries strings") + get_timeseries_flag = false + end + meter_units = sql_file.execAndReturnVectorOfString("SELECT VariableUnits FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") + begin + meter_units = meter_units.get + runner.registerInfo("Units were found for all available meters") + rescue + runner.registerWarning("Unable to retrieve timeseries unit strings") + get_timeseries_flag = false + end + runner.registerInfo("The following meter units were found: #{meter_units}") + runner.registerError("Timeseries variable names and units of differing lengths. Exiting Dencity Reports.") if meter_units.size != meter_strings.size + get_timeseries_flag = false if meter_units.size != meter_strings.size + end + + runner.registerInfo("get_timeseries_flag is set to #{get_timeseries_flag}") + if get_timeseries_flag + runner.registerInfo("Retrieving timeseries data") + if msgpack_flag and csv_flag + require "parallel" + require "msgpack" + msgpack_array = [] + csv_array = [] + mark0 = Time.now.to_i + Parallel.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| + if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized + sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get + ts_values = sql_ts.values + ts_times = sql_ts.dateTimes + timeseries_out = {} + initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 + timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 + timeseries_out[initial_epoch_time] = ts_values[0] + next_epoch_time = initial_epoch_time + for i in 1..ts_times.size - 1 + next_epoch_time += timestep_in_epoch + timeseries_out[next_epoch_time] = ts_values[i] + end + csv_array << (["epoch_time"] + timeseries_out.to_a.transpose[0]) if meter_index == 0 + csv_array << ([meter_string.gsub(":", "_") + " [" + meter_units[meter_index] + "]"] + timeseries_out.to_a.transpose[1]) + meter_hash = {timeseries: {}} + meter_hash[:timeseries][:fuel] = meter_string.gsub(":", "_") + meter_hash[:timeseries][:interval] = Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i + meter_hash[:timeseries][:interval_units] = "seconds" + meter_hash[:timeseries][:data] = timeseries_out + meter_hash[:timeseries][:units] = meter_units[meter_index] + msgpack_array << meter_hash + else + runner.registerWarning("Timeseries #{meter_string} was empty.") + end + end + mark1 = Time.now.to_i + runner.registerInfo("DeltaMake=#{mark1-mark0}s") + File.open("report_timeseries.msgpack", "w") do |file| + file << {data: msgpack_array}.to_msgpack + end + runner.registerInfo("Saved timeseries data as report_timeseries.msgpack") + csv_array = csv_array.transpose + CSV.open("report_timeseries.csv", "w") do |csv| + csv_array.each do |elem| + csv << elem + end + end + runner.registerInfo("Saved timeseries data as report_timeseries.csv") + mark2 = Time.now.to_i + runner.registerInfo("DeltaWrite=#{mark2-mark1}s") + + elsif msgpack_flag + require "parallel" + require "msgpack" + msgpack_array = [] + mark0 = Time.now.to_i + meter_strings.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| + if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized + sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get + ts_values = sql_ts.values + ts_times = sql_ts.dateTimes + timeseries_out = {} + initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 + timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 + timeseries_out[initial_epoch_time] = ts_values[0] + next_epoch_time = initial_epoch_time + for i in 1..ts_times.size - 1 + next_epoch_time += timestep_in_epoch + timeseries_out[next_epoch_time] = ts_values[i] + end + meter_hash = {timeseries: {}} + meter_hash[:timeseries][:fuel] = meter_string.gsub(":", "_") + meter_hash[:timeseries][:interval] = Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i + meter_hash[:timeseries][:interval_units] = "seconds" + meter_hash[:timeseries][:data] = timeseries_out + meter_hash[:timeseries][:units] = meter_units[meter_index] + msgpack_array << meter_hash + else + runner.registerWarning("Timeseries #{meter_string} was empty.") + end + end + mark1 = Time.now.to_i + runner.registerInfo("DeltaMake=#{mark1-mark0}s") + File.open("report_timeseries.msgpack", "w") do |file| + file << {data: msgpack_array}.to_msgpack + runner.registerInfo("Saved timeseries data as report_timeseries.msgpack") + end + mark2 = Time.now.to_i + runner.registerInfo("DeltaWrite=#{mark2-mark1}s") + + elsif csv_flag + require "parallel" + csv_array = [] + mark0 = Time.now.to_i + Parallel.each_with_index(meter_strings, :in_threads => 4) do |meter_string, meter_index| + if sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").is_initialized + sql_ts = sql_file.timeSeries("RUN PERIOD 1", "Hourly", meter_string, "").get + ts_values = sql_ts.values + ts_times = sql_ts.dateTimes + timeseries_out = {} + initial_epoch_time = Time.parse(ts_times[0].toString).to_i*1000 + timestep_in_epoch = (Time.parse(ts_times[1].toString).to_i - Time.parse(ts_times[0].toString).to_i)*1000 + timeseries_out[initial_epoch_time] = ts_values[0] + next_epoch_time = initial_epoch_time + for i in 1..ts_times.size - 1 + next_epoch_time += timestep_in_epoch + timeseries_out[next_epoch_time] = ts_values[i] + end + csv_array << (["epoch_time"] + timeseries_out.to_a.transpose[0]) if meter_index == 0 + csv_array << ([meter_string.gsub(":", "_") + " [" + meter_units[meter_index] + "]"] + timeseries_out.to_a.transpose[1]) + else + runner.registerWarning("Timeseries #{meter_string} was empty.") + end + end + mark1 = Time.now.to_i + runner.registerInfo("DeltaMake=#{mark1-mark0}s") + csv_array = csv_array.transpose + CSV.open("report_timeseries.csv", "w") do |csv| + csv_array.each do |elem| + csv << elem + end + end + runner.registerInfo("Saved timeseries data as report_timeseries.csv") + mark2 = Time.now.to_i + runner.registerInfo("DeltaWrite=#{mark2-mark1}s") + end + end + timeseries_end = Time.now.to_i + runner.registerInfo("Total Timeseries Time: #{timeseries_end-timeseries_start}") + + #closing the sql file + sql_file.close + + #reporting final condition + runner.registerFinalCondition("DEnCity Report generated successfully.") + + rescue => e + fail "Measure failed with #{e.message}:#{e.backtrace}" + ensure + + # profile_results = RubyProf.stop + # FileUtils.mkdir_p 'results' + # File.open("results/profile-graph.html", 'w') { |f| RubyProf::GraphHtmlPrinter.new(profile_results).print(f) } + # File.open("results/profile-flat.txt", 'w') { |f| RubyProf::FlatPrinter.new(profile_results).print(f) } + # File.open("results/profile-tree.prof", 'w') { |f| RubyProf::CallTreePrinter.new(profile_results).print(f) } + + + end + + true + + end #end the run method + +end #end the measure + +#this allows the measure to be use by the application DencityReports.new.registerWithApplication \ No newline at end of file diff --git a/spec/files/run_options_osw/measures/DencityReports/measure.rb b/spec/files/run_options_osw/measures/DencityReports/measure.rb index b0fb27a..d87f955 100644 --- a/spec/files/run_options_osw/measures/DencityReports/measure.rb +++ b/spec/files/run_options_osw/measures/DencityReports/measure.rb @@ -129,13 +129,13 @@ def run(runner, user_arguments) end # determine how to format time series output - msgpack_flag = FALSE - csv_flag = FALSE + msgpack_flag = false + csv_flag = false if output_format == "MessagePack" || output_format == "Both" - msgpack_flag = TRUE + msgpack_flag = true end if output_format == "CSV" || output_format == "Both" - csv_flag = TRUE + csv_flag = true end # get the last model and sql file @@ -426,7 +426,7 @@ def run(runner, user_arguments) #todo: find a way for the sql call to not rely on RUN PERIOD 1 timeseries_start = Time.now.to_i available_meters = sql_file.execAndReturnVectorOfString("SELECT VariableName FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") - get_timeseries_flag = TRUE + get_timeseries_flag = true if available_meters.empty? runner.registerWarning("No meters found with Hourly reporting frequency to extract timeseries data from") else @@ -435,7 +435,7 @@ def run(runner, user_arguments) runner.registerInfo("The following meters were found: #{meter_strings}") rescue runner.registerWarning("Unable to retrieve timeseries strings") - get_timeseries_flag = FALSE + get_timeseries_flag = false end meter_units = sql_file.execAndReturnVectorOfString("SELECT VariableUnits FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") begin @@ -443,11 +443,11 @@ def run(runner, user_arguments) runner.registerInfo("Units were found for all available meters") rescue runner.registerWarning("Unable to retrieve timeseries unit strings") - get_timeseries_flag = FALSE + get_timeseries_flag = false end runner.registerInfo("The following meter units were found: #{meter_units}") runner.registerError("Timeseries variable names and units of differing lengths. Exiting Dencity Reports.") if meter_units.size != meter_strings.size - get_timeseries_flag = FALSE if meter_units.size != meter_strings.size + get_timeseries_flag = false if meter_units.size != meter_strings.size end runner.registerInfo("get_timeseries_flag is set to #{get_timeseries_flag}") diff --git a/spec/files/skip_zip_results_osw/measures/DencityReports/measure.rb b/spec/files/skip_zip_results_osw/measures/DencityReports/measure.rb index b0fb27a..d87f955 100644 --- a/spec/files/skip_zip_results_osw/measures/DencityReports/measure.rb +++ b/spec/files/skip_zip_results_osw/measures/DencityReports/measure.rb @@ -129,13 +129,13 @@ def run(runner, user_arguments) end # determine how to format time series output - msgpack_flag = FALSE - csv_flag = FALSE + msgpack_flag = false + csv_flag = false if output_format == "MessagePack" || output_format == "Both" - msgpack_flag = TRUE + msgpack_flag = true end if output_format == "CSV" || output_format == "Both" - csv_flag = TRUE + csv_flag = true end # get the last model and sql file @@ -426,7 +426,7 @@ def run(runner, user_arguments) #todo: find a way for the sql call to not rely on RUN PERIOD 1 timeseries_start = Time.now.to_i available_meters = sql_file.execAndReturnVectorOfString("SELECT VariableName FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") - get_timeseries_flag = TRUE + get_timeseries_flag = true if available_meters.empty? runner.registerWarning("No meters found with Hourly reporting frequency to extract timeseries data from") else @@ -435,7 +435,7 @@ def run(runner, user_arguments) runner.registerInfo("The following meters were found: #{meter_strings}") rescue runner.registerWarning("Unable to retrieve timeseries strings") - get_timeseries_flag = FALSE + get_timeseries_flag = false end meter_units = sql_file.execAndReturnVectorOfString("SELECT VariableUnits FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") begin @@ -443,11 +443,11 @@ def run(runner, user_arguments) runner.registerInfo("Units were found for all available meters") rescue runner.registerWarning("Unable to retrieve timeseries unit strings") - get_timeseries_flag = FALSE + get_timeseries_flag = false end runner.registerInfo("The following meter units were found: #{meter_units}") runner.registerError("Timeseries variable names and units of differing lengths. Exiting Dencity Reports.") if meter_units.size != meter_strings.size - get_timeseries_flag = FALSE if meter_units.size != meter_strings.size + get_timeseries_flag = false if meter_units.size != meter_strings.size end runner.registerInfo("get_timeseries_flag is set to #{get_timeseries_flag}") diff --git a/spec/files/socket_osw/measures/DencityReports/measure.rb b/spec/files/socket_osw/measures/DencityReports/measure.rb index b0fb27a..d87f955 100644 --- a/spec/files/socket_osw/measures/DencityReports/measure.rb +++ b/spec/files/socket_osw/measures/DencityReports/measure.rb @@ -129,13 +129,13 @@ def run(runner, user_arguments) end # determine how to format time series output - msgpack_flag = FALSE - csv_flag = FALSE + msgpack_flag = false + csv_flag = false if output_format == "MessagePack" || output_format == "Both" - msgpack_flag = TRUE + msgpack_flag = true end if output_format == "CSV" || output_format == "Both" - csv_flag = TRUE + csv_flag = true end # get the last model and sql file @@ -426,7 +426,7 @@ def run(runner, user_arguments) #todo: find a way for the sql call to not rely on RUN PERIOD 1 timeseries_start = Time.now.to_i available_meters = sql_file.execAndReturnVectorOfString("SELECT VariableName FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") - get_timeseries_flag = TRUE + get_timeseries_flag = true if available_meters.empty? runner.registerWarning("No meters found with Hourly reporting frequency to extract timeseries data from") else @@ -435,7 +435,7 @@ def run(runner, user_arguments) runner.registerInfo("The following meters were found: #{meter_strings}") rescue runner.registerWarning("Unable to retrieve timeseries strings") - get_timeseries_flag = FALSE + get_timeseries_flag = false end meter_units = sql_file.execAndReturnVectorOfString("SELECT VariableUnits FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") begin @@ -443,11 +443,11 @@ def run(runner, user_arguments) runner.registerInfo("Units were found for all available meters") rescue runner.registerWarning("Unable to retrieve timeseries unit strings") - get_timeseries_flag = FALSE + get_timeseries_flag = false end runner.registerInfo("The following meter units were found: #{meter_units}") runner.registerError("Timeseries variable names and units of differing lengths. Exiting Dencity Reports.") if meter_units.size != meter_strings.size - get_timeseries_flag = FALSE if meter_units.size != meter_strings.size + get_timeseries_flag = false if meter_units.size != meter_strings.size end runner.registerInfo("get_timeseries_flag is set to #{get_timeseries_flag}") diff --git a/spec/files/web_osw/measures/DencityReports/measure.rb b/spec/files/web_osw/measures/DencityReports/measure.rb index b0fb27a..d87f955 100644 --- a/spec/files/web_osw/measures/DencityReports/measure.rb +++ b/spec/files/web_osw/measures/DencityReports/measure.rb @@ -129,13 +129,13 @@ def run(runner, user_arguments) end # determine how to format time series output - msgpack_flag = FALSE - csv_flag = FALSE + msgpack_flag = false + csv_flag = false if output_format == "MessagePack" || output_format == "Both" - msgpack_flag = TRUE + msgpack_flag = true end if output_format == "CSV" || output_format == "Both" - csv_flag = TRUE + csv_flag = true end # get the last model and sql file @@ -426,7 +426,7 @@ def run(runner, user_arguments) #todo: find a way for the sql call to not rely on RUN PERIOD 1 timeseries_start = Time.now.to_i available_meters = sql_file.execAndReturnVectorOfString("SELECT VariableName FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") - get_timeseries_flag = TRUE + get_timeseries_flag = true if available_meters.empty? runner.registerWarning("No meters found with Hourly reporting frequency to extract timeseries data from") else @@ -435,7 +435,7 @@ def run(runner, user_arguments) runner.registerInfo("The following meters were found: #{meter_strings}") rescue runner.registerWarning("Unable to retrieve timeseries strings") - get_timeseries_flag = FALSE + get_timeseries_flag = false end meter_units = sql_file.execAndReturnVectorOfString("SELECT VariableUnits FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND ReportingFrequency='Hourly'") begin @@ -443,11 +443,11 @@ def run(runner, user_arguments) runner.registerInfo("Units were found for all available meters") rescue runner.registerWarning("Unable to retrieve timeseries unit strings") - get_timeseries_flag = FALSE + get_timeseries_flag = false end runner.registerInfo("The following meter units were found: #{meter_units}") runner.registerError("Timeseries variable names and units of differing lengths. Exiting Dencity Reports.") if meter_units.size != meter_strings.size - get_timeseries_flag = FALSE if meter_units.size != meter_strings.size + get_timeseries_flag = false if meter_units.size != meter_strings.size end runner.registerInfo("get_timeseries_flag is set to #{get_timeseries_flag}") From 0c8de59f9fefeef68d92f1a0fa9a5cbcb8be0601 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Fri, 19 Apr 2024 14:02:28 +0200 Subject: [PATCH 19/25] Reupdate measure after modification (and avoid useless XMLValidator errors) --- .../DencityReports/measure.xml | 11 +- .../measures/DencityReports/measure.xml | 15 +- .../measures/DencityReports/measure.xml | 15 +- .../measures/DencityReports/measure.xml | 133 +++++++++--------- .../measures/DencityReports/measure.xml | 131 ++++++++--------- .../measures/DencityReports/measure.xml | 15 +- .../measures/DencityReports/measure.xml | 133 +++++++++--------- .../measures/DencityReports/measure.xml | 15 +- .../measures/DencityReports/measure.xml | 15 +- .../measures/DencityReports/measure.xml | 15 +- .../measures/DencityReports/measure.xml | 133 +++++++++--------- .../measures/DencityReports/measure.xml | 15 +- .../measures/DencityReports/measure.xml | 15 +- .../measures/DencityReports/measure.xml | 15 +- .../measures/DencityReports/measure.xml | 15 +- 15 files changed, 355 insertions(+), 336 deletions(-) diff --git a/spec/files/alternate_paths/measures_and_stuff/DencityReports/measure.xml b/spec/files/alternate_paths/measures_and_stuff/DencityReports/measure.xml index d8ed1bd..1fb794d 100644 --- a/spec/files/alternate_paths/measures_and_stuff/DencityReports/measure.xml +++ b/spec/files/alternate_paths/measures_and_stuff/DencityReports/measure.xml @@ -1,8 +1,10 @@ + - 3.0 + 3.1 dencity_reports 4f939be0-fe1c-11e3-a3ac-0800200c9a66 - 5dbbecc1-55ab-4113-8c8b-dca006df2d53 + eecc76fb-4203-4b8f-9ac1-108902247fe9 + 2024-04-19T12:01:27Z 2C8A3EEF DencityReports Dencity Reports @@ -32,7 +34,8 @@ - + + Reporting.QAQC @@ -58,7 +61,7 @@ measure.rb rb script - CAD52B50 + 28BF01F7 diff --git a/spec/files/bad_order_osw/measures/DencityReports/measure.xml b/spec/files/bad_order_osw/measures/DencityReports/measure.xml index 9d239f2..93164b6 100644 --- a/spec/files/bad_order_osw/measures/DencityReports/measure.xml +++ b/spec/files/bad_order_osw/measures/DencityReports/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 dencity_reports 4f939be0-fe1c-11e3-a3ac-0800200c9a66 - f773cdb8-b5e9-47db-bfed-bbc10aff986a - 20160426T215418Z - 9F9D8C87 + 9a207f7c-292d-4c2c-8262-144fed4dfd9c + 2024-04-19T12:01:32Z + 2C8A3EEF DencityReports Dencity Reports Default reports needed for DEnCity @@ -33,8 +34,8 @@ - - + + Reporting.QAQC @@ -60,7 +61,7 @@ measure.rb rb script - 5CEB2C25 + FDD5982D diff --git a/spec/files/compact_mwp_osw/measures/DencityReports/measure.xml b/spec/files/compact_mwp_osw/measures/DencityReports/measure.xml index 9d239f2..c5274d0 100644 --- a/spec/files/compact_mwp_osw/measures/DencityReports/measure.xml +++ b/spec/files/compact_mwp_osw/measures/DencityReports/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 dencity_reports 4f939be0-fe1c-11e3-a3ac-0800200c9a66 - f773cdb8-b5e9-47db-bfed-bbc10aff986a - 20160426T215418Z - 9F9D8C87 + 24b6e3f1-defd-41dd-a83b-d038689ba462 + 2024-04-19T12:01:40Z + 2C8A3EEF DencityReports Dencity Reports Default reports needed for DEnCity @@ -33,8 +34,8 @@ - - + + Reporting.QAQC @@ -60,7 +61,7 @@ measure.rb rb script - 5CEB2C25 + 3AEE226E diff --git a/spec/files/compact_osw/measures/DencityReports/measure.xml b/spec/files/compact_osw/measures/DencityReports/measure.xml index f023325..6ce4e6f 100644 --- a/spec/files/compact_osw/measures/DencityReports/measure.xml +++ b/spec/files/compact_osw/measures/DencityReports/measure.xml @@ -1,66 +1,67 @@ - - 3.0 - dencity_reports - 4f939be0-fe1c-11e3-a3ac-0800200c9a66 - f773cdb8-b5e9-47db-bfed-bbc10aff986a - 20160426T215418Z - 9F9D8C87 - DencityReports - Dencity Reports - Default reports needed for DEnCity - Add this reporting measure to the end of the workflow - - - output_format - Output Format - Choice - true - false - Both - - - MessagePack - MessagePack - - - CSV - CSV - - - Both - Both - - - - - - - - Reporting.QAQC - - - - Measure Type - ReportingMeasure - string - - - Uses SketchUp API - false - boolean - - - - - - OpenStudio - 1.3.0 - 1.3.0 - - measure.rb - rb - script - 5CEB2C25 - - - + + + 3.1 + dencity_reports + 4f939be0-fe1c-11e3-a3ac-0800200c9a66 + 5fe815ee-8a5f-4dee-bd53-5889804cf1a6 + 2024-04-19T12:01:36Z + 2C8A3EEF + DencityReports + Dencity Reports + Default reports needed for DEnCity + Add this reporting measure to the end of the workflow + + + output_format + Output Format + Choice + true + false + Both + + + MessagePack + MessagePack + + + CSV + CSV + + + Both + Both + + + + + + + + Reporting.QAQC + + + + Measure Type + ReportingMeasure + string + + + Uses SketchUp API + false + boolean + + + + + + OpenStudio + 1.3.0 + 1.3.0 + + measure.rb + rb + script + FDD5982D + + + diff --git a/spec/files/extended_osw/example/measures/DencityReports/measure.xml b/spec/files/extended_osw/example/measures/DencityReports/measure.xml index b1b7985..446f743 100644 --- a/spec/files/extended_osw/example/measures/DencityReports/measure.xml +++ b/spec/files/extended_osw/example/measures/DencityReports/measure.xml @@ -1,64 +1,67 @@ - - 3.0 - dencity_reports - 4f939be0-fe1c-11e3-a3ac-0800200c9a66 - 5dbbecc1-55ab-4113-8c8b-dca006df2d53 - 2C8A3EEF - DencityReports - Dencity Reports - Default reports needed for DEnCity - Add this reporting measure to the end of the workflow - - - output_format - Output Format - Choice - true - false - Both - - - MessagePack - MessagePack - - - CSV - CSV - - - Both - Both - - - - - - - Reporting.QAQC - - - - Measure Type - ReportingMeasure - string - - - Uses SketchUp API - false - boolean - - - - - - OpenStudio - 1.3.0 - 1.3.0 - - measure.rb - rb - script - CAD52B50 - - - + + + 3.1 + dencity_reports + 4f939be0-fe1c-11e3-a3ac-0800200c9a66 + d4130860-6f7d-452b-a08e-d5eae75b6b48 + 2024-04-19T12:01:30Z + 2C8A3EEF + DencityReports + Dencity Reports + Default reports needed for DEnCity + Add this reporting measure to the end of the workflow + + + output_format + Output Format + Choice + true + false + Both + + + MessagePack + MessagePack + + + CSV + CSV + + + Both + Both + + + + + + + + Reporting.QAQC + + + + Measure Type + ReportingMeasure + string + + + Uses SketchUp API + false + boolean + + + + + + OpenStudio + 1.3.0 + 1.3.0 + + measure.rb + rb + script + FDD5982D + + + diff --git a/spec/files/fast_osw/measures/DencityReports/measure.xml b/spec/files/fast_osw/measures/DencityReports/measure.xml index 9d239f2..3b6a5c1 100644 --- a/spec/files/fast_osw/measures/DencityReports/measure.xml +++ b/spec/files/fast_osw/measures/DencityReports/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 dencity_reports 4f939be0-fe1c-11e3-a3ac-0800200c9a66 - f773cdb8-b5e9-47db-bfed-bbc10aff986a - 20160426T215418Z - 9F9D8C87 + edc85d5b-bc1f-46d1-b12a-61e4e53e94b1 + 2024-04-19T12:01:34Z + 2C8A3EEF DencityReports Dencity Reports Default reports needed for DEnCity @@ -33,8 +34,8 @@ - - + + Reporting.QAQC @@ -60,7 +61,7 @@ measure.rb rb script - 5CEB2C25 + FDD5982D diff --git a/spec/files/halt_workflow_osw/measures/DencityReports/measure.xml b/spec/files/halt_workflow_osw/measures/DencityReports/measure.xml index f023325..60beb72 100644 --- a/spec/files/halt_workflow_osw/measures/DencityReports/measure.xml +++ b/spec/files/halt_workflow_osw/measures/DencityReports/measure.xml @@ -1,66 +1,67 @@ - - 3.0 - dencity_reports - 4f939be0-fe1c-11e3-a3ac-0800200c9a66 - f773cdb8-b5e9-47db-bfed-bbc10aff986a - 20160426T215418Z - 9F9D8C87 - DencityReports - Dencity Reports - Default reports needed for DEnCity - Add this reporting measure to the end of the workflow - - - output_format - Output Format - Choice - true - false - Both - - - MessagePack - MessagePack - - - CSV - CSV - - - Both - Both - - - - - - - - Reporting.QAQC - - - - Measure Type - ReportingMeasure - string - - - Uses SketchUp API - false - boolean - - - - - - OpenStudio - 1.3.0 - 1.3.0 - - measure.rb - rb - script - 5CEB2C25 - - - + + + 3.1 + dencity_reports + 4f939be0-fe1c-11e3-a3ac-0800200c9a66 + d730dcdb-8224-4f5b-aae1-6941618044b3 + 2024-04-19T12:01:35Z + 2C8A3EEF + DencityReports + Dencity Reports + Default reports needed for DEnCity + Add this reporting measure to the end of the workflow + + + output_format + Output Format + Choice + true + false + Both + + + MessagePack + MessagePack + + + CSV + CSV + + + Both + Both + + + + + + + + Reporting.QAQC + + + + Measure Type + ReportingMeasure + string + + + Uses SketchUp API + false + boolean + + + + + + OpenStudio + 1.3.0 + 1.3.0 + + measure.rb + rb + script + FDD5982D + + + diff --git a/spec/files/measures_only_osw/measures/DencityReports/measure.xml b/spec/files/measures_only_osw/measures/DencityReports/measure.xml index 9d239f2..de87bb1 100644 --- a/spec/files/measures_only_osw/measures/DencityReports/measure.xml +++ b/spec/files/measures_only_osw/measures/DencityReports/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 dencity_reports 4f939be0-fe1c-11e3-a3ac-0800200c9a66 - f773cdb8-b5e9-47db-bfed-bbc10aff986a - 20160426T215418Z - 9F9D8C87 + 7c3ec91d-f946-464a-8673-948e4b2bf620 + 2024-04-19T12:01:37Z + 2C8A3EEF DencityReports Dencity Reports Default reports needed for DEnCity @@ -33,8 +34,8 @@ - - + + Reporting.QAQC @@ -60,7 +61,7 @@ measure.rb rb script - 5CEB2C25 + FDD5982D diff --git a/spec/files/no_epw_file_osw/measures/DencityReports/measure.xml b/spec/files/no_epw_file_osw/measures/DencityReports/measure.xml index 9d239f2..36bb3da 100644 --- a/spec/files/no_epw_file_osw/measures/DencityReports/measure.xml +++ b/spec/files/no_epw_file_osw/measures/DencityReports/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 dencity_reports 4f939be0-fe1c-11e3-a3ac-0800200c9a66 - f773cdb8-b5e9-47db-bfed-bbc10aff986a - 20160426T215418Z - 9F9D8C87 + 938b10c4-2473-402a-bddc-e7157e7c6a2a + 2024-04-19T12:01:38Z + 2C8A3EEF DencityReports Dencity Reports Default reports needed for DEnCity @@ -33,8 +34,8 @@ - - + + Reporting.QAQC @@ -60,7 +61,7 @@ measure.rb rb script - 5CEB2C25 + FDD5982D diff --git a/spec/files/output_request_osw/measures/DencityReports/measure.xml b/spec/files/output_request_osw/measures/DencityReports/measure.xml index fa30f1f..794d201 100644 --- a/spec/files/output_request_osw/measures/DencityReports/measure.xml +++ b/spec/files/output_request_osw/measures/DencityReports/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 dencity_reports 4f939be0-fe1c-11e3-a3ac-0800200c9a66 - 12163e01-86ac-488a-9c14-79113175ca31 - 20161109T155342Z - 9F9D8C87 + 9a1ba7d3-3a22-4b31-b2cd-127541e17ca9 + 2024-04-19T12:01:29Z + 2C8A3EEF DencityReports Dencity Reports Default reports needed for DEnCity @@ -33,8 +34,8 @@ - - + + Reporting.QAQC @@ -60,7 +61,7 @@ measure.rb rb script - 61B49682 + 46984461 diff --git a/spec/files/repeated_measure_osw/measures/DencityReports/measure.xml b/spec/files/repeated_measure_osw/measures/DencityReports/measure.xml index f023325..92db3f5 100644 --- a/spec/files/repeated_measure_osw/measures/DencityReports/measure.xml +++ b/spec/files/repeated_measure_osw/measures/DencityReports/measure.xml @@ -1,66 +1,67 @@ - - 3.0 - dencity_reports - 4f939be0-fe1c-11e3-a3ac-0800200c9a66 - f773cdb8-b5e9-47db-bfed-bbc10aff986a - 20160426T215418Z - 9F9D8C87 - DencityReports - Dencity Reports - Default reports needed for DEnCity - Add this reporting measure to the end of the workflow - - - output_format - Output Format - Choice - true - false - Both - - - MessagePack - MessagePack - - - CSV - CSV - - - Both - Both - - - - - - - - Reporting.QAQC - - - - Measure Type - ReportingMeasure - string - - - Uses SketchUp API - false - boolean - - - - - - OpenStudio - 1.3.0 - 1.3.0 - - measure.rb - rb - script - 5CEB2C25 - - - + + + 3.1 + dencity_reports + 4f939be0-fe1c-11e3-a3ac-0800200c9a66 + cb3aeb47-4d1d-4ff9-a1b9-bad84e2b129e + 2024-04-19T12:01:33Z + 2C8A3EEF + DencityReports + Dencity Reports + Default reports needed for DEnCity + Add this reporting measure to the end of the workflow + + + output_format + Output Format + Choice + true + false + Both + + + MessagePack + MessagePack + + + CSV + CSV + + + Both + Both + + + + + + + + Reporting.QAQC + + + + Measure Type + ReportingMeasure + string + + + Uses SketchUp API + false + boolean + + + + + + OpenStudio + 1.3.0 + 1.3.0 + + measure.rb + rb + script + FDD5982D + + + diff --git a/spec/files/run_options_osw/measures/DencityReports/measure.xml b/spec/files/run_options_osw/measures/DencityReports/measure.xml index 9d239f2..7f946ad 100644 --- a/spec/files/run_options_osw/measures/DencityReports/measure.xml +++ b/spec/files/run_options_osw/measures/DencityReports/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 dencity_reports 4f939be0-fe1c-11e3-a3ac-0800200c9a66 - f773cdb8-b5e9-47db-bfed-bbc10aff986a - 20160426T215418Z - 9F9D8C87 + 6cc68a2f-86b7-4693-8b89-30d03966955b + 2024-04-19T12:01:28Z + 2C8A3EEF DencityReports Dencity Reports Default reports needed for DEnCity @@ -33,8 +34,8 @@ - - + + Reporting.QAQC @@ -60,7 +61,7 @@ measure.rb rb script - 5CEB2C25 + FDD5982D diff --git a/spec/files/skip_zip_results_osw/measures/DencityReports/measure.xml b/spec/files/skip_zip_results_osw/measures/DencityReports/measure.xml index 9d239f2..9f0f873 100644 --- a/spec/files/skip_zip_results_osw/measures/DencityReports/measure.xml +++ b/spec/files/skip_zip_results_osw/measures/DencityReports/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 dencity_reports 4f939be0-fe1c-11e3-a3ac-0800200c9a66 - f773cdb8-b5e9-47db-bfed-bbc10aff986a - 20160426T215418Z - 9F9D8C87 + fca83a07-7b82-4800-b05a-8ebbe4e52dc5 + 2024-04-19T12:01:39Z + 2C8A3EEF DencityReports Dencity Reports Default reports needed for DEnCity @@ -33,8 +34,8 @@ - - + + Reporting.QAQC @@ -60,7 +61,7 @@ measure.rb rb script - 5CEB2C25 + FDD5982D diff --git a/spec/files/socket_osw/measures/DencityReports/measure.xml b/spec/files/socket_osw/measures/DencityReports/measure.xml index 9d239f2..1883968 100644 --- a/spec/files/socket_osw/measures/DencityReports/measure.xml +++ b/spec/files/socket_osw/measures/DencityReports/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 dencity_reports 4f939be0-fe1c-11e3-a3ac-0800200c9a66 - f773cdb8-b5e9-47db-bfed-bbc10aff986a - 20160426T215418Z - 9F9D8C87 + 33fd6fec-1284-4501-9424-62ddde4773d7 + 2024-04-19T12:01:28Z + 2C8A3EEF DencityReports Dencity Reports Default reports needed for DEnCity @@ -33,8 +34,8 @@ - - + + Reporting.QAQC @@ -60,7 +61,7 @@ measure.rb rb script - 5CEB2C25 + FDD5982D diff --git a/spec/files/web_osw/measures/DencityReports/measure.xml b/spec/files/web_osw/measures/DencityReports/measure.xml index 9d239f2..8efb29d 100644 --- a/spec/files/web_osw/measures/DencityReports/measure.xml +++ b/spec/files/web_osw/measures/DencityReports/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 dencity_reports 4f939be0-fe1c-11e3-a3ac-0800200c9a66 - f773cdb8-b5e9-47db-bfed-bbc10aff986a - 20160426T215418Z - 9F9D8C87 + 4874a19a-c53c-4c8f-ad37-aa9af0b3993a + 2024-04-19T12:01:31Z + 2C8A3EEF DencityReports Dencity Reports Default reports needed for DEnCity @@ -33,8 +34,8 @@ - - + + Reporting.QAQC @@ -60,7 +61,7 @@ measure.rb rb script - 5CEB2C25 + FDD5982D From 2a117b818e12b66a1b0bf0792e0bb50e76985d20 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Fri, 19 Apr 2024 14:15:13 +0200 Subject: [PATCH 20/25] Update all measures to use the 3.1 schema XML --- .../IncreaseRoofRValue/measure.xml | 27 +- .../IncreaseWallRValue/measure.xml | 27 +- .../SetEplusInfiltration/measure.xml | 35 +- .../measures/IncreaseRoofRValue/measure.xml | 13 +- .../measures/IncreaseWallRValue/measure.xml | 13 +- .../measures/SetEplusInfiltration/measure.xml | 15 +- .../measures/IncreaseRoofRValue/measure.xml | 15 +- .../measures/IncreaseWallRValue/measure.xml | 15 +- .../measures/SetEplusInfiltration/measure.xml | 17 +- .../measures/IncreaseRoofRValue/measure.xml | 13 +- .../measures/IncreaseWallRValue/measure.xml | 13 +- .../measures/SetEplusInfiltration/measure.xml | 15 +- .../ChangeBuildingLocation/measure.xml | 165 +--- .../measure.xml | 19 +- .../measures/IncreaseRoofRValue/measure.xml | 27 +- .../measures/IncreaseWallRValue/measure.xml | 27 +- .../measures/SetEplusInfiltration/measure.xml | 35 +- .../measures/IncreaseRoofRValue/measure.xml | 13 +- .../measures/IncreaseWallRValue/measure.xml | 13 +- .../measures/SetEplusInfiltration/measure.xml | 15 +- .../measure.xml | 25 +- .../measures/IncreaseRoofRValue/measure.xml | 15 +- .../measures/IncreaseWallRValue/measure.xml | 15 +- .../measures/SetEplusInfiltration/measure.xml | 15 +- .../measures/IncreaseRoofRValue/measure.xml | 13 +- .../measures/IncreaseWallRValue/measure.xml | 13 +- .../measures/SetEplusInfiltration/measure.xml | 15 +- .../measures/ViewModel/measure.xml | 74 +- .../measures/IncreaseRoofRValue/measure.xml | 13 +- .../measures/IncreaseWallRValue/measure.xml | 13 +- .../measures/SetEplusInfiltration/measure.xml | 15 +- .../measures/ViewModel/measure.xml | 74 +- .../measure.xml | 19 +- .../measures/IncreaseRoofRValue/measure.xml | 13 +- .../measures/IncreaseWallRValue/measure.xml | 13 +- .../measures/SetEplusInfiltration/measure.xml | 15 +- .../measures/ViewModel/measure.xml | 74 +- .../Xcel EDA Reporting and QAQC/measure.xml | 61 +- .../measures/openstudio_results/measure.xml | 706 ++++++++---------- .../measures/IncreaseRoofRValue/measure.xml | 13 +- .../measures/IncreaseWallRValue/measure.xml | 13 +- .../measures/SetEplusInfiltration/measure.xml | 15 +- .../measure.xml | 25 +- .../Xcel EDA Reporting and QAQC/measure.xml | 41 +- .../measures/openstudio_results/measure.xml | 706 ++++++++---------- .../measures/openstudio_results/measure.xml | 706 ++++++++---------- .../measure.xml | 56 +- .../XcelEDAReportingandQAQC/measure.xml | 101 +-- .../measure.xml | 125 ++-- .../measures/add_rooftop_pv/measure.xml | 43 +- .../measures/IncreaseRoofRValue/measure.xml | 13 +- .../measures/IncreaseWallRValue/measure.xml | 13 +- .../measures/SetEplusInfiltration/measure.xml | 15 +- .../measures/IncreaseWallRValue/measure.xml | 16 +- .../measures/broken_measure/measure.xml | 35 +- .../measures/IncreaseRoofRValue/measure.xml | 13 +- .../measures/IncreaseWallRValue/measure.xml | 13 +- .../measures/SetEplusInfiltration/measure.xml | 15 +- .../measures/IncreaseRoofRValue/measure.xml | 13 +- .../measures/IncreaseWallRValue/measure.xml | 13 +- .../measures/SetEplusInfiltration/measure.xml | 15 +- .../socket_osw/measures/ViewModel/measure.xml | 74 +- .../measures/urban_opt_report/measure.xml | 20 +- .../measure.xml | 16 +- .../measures/EpChangeWeatherFile/measure.xml | 15 +- .../measures/EpChangeWeatherFile2/measure.xml | 15 +- .../measures/OsChangeWeatherFile/measure.xml | 15 +- .../measures/OsChangeWeatherFile2/measure.xml | 15 +- .../measures/IncreaseRoofRValue/measure.xml | 13 +- .../measures/IncreaseWallRValue/measure.xml | 13 +- .../measures/SetEplusInfiltration/measure.xml | 15 +- .../web_osw/measures/ViewModel/measure.xml | 74 +- 72 files changed, 1895 insertions(+), 2141 deletions(-) diff --git a/spec/files/alternate_paths/measures_and_stuff/IncreaseRoofRValue/measure.xml b/spec/files/alternate_paths/measures_and_stuff/IncreaseRoofRValue/measure.xml index ddc0714..c898b36 100644 --- a/spec/files/alternate_paths/measures_and_stuff/IncreaseRoofRValue/measure.xml +++ b/spec/files/alternate_paths/measures_and_stuff/IncreaseRoofRValue/measure.xml @@ -1,8 +1,10 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_roofs_by_percentage 807d3ebf-c89b-4b93-b400-110ca060b2bb - 2704be33-ea98-4896-a378-875b8af786f9 + 49c11c00-11f6-41b9-a740-967e634ec258 + 2024-04-19T12:12:09Z EB1A0C08 IncreaseInsulationRValueForRoofsByPercentage Increase R-value of Insulation for Roofs by a Specified Percentage. @@ -18,7 +20,8 @@ 30 - + + Envelope.Opaque @@ -45,18 +48,6 @@ - - EnvelopeAndLoadTestModel_01.osm - osm - test - 10AA8866 - - - ReverseTranslatedModel.osm - osm - test - 0B94403D - OpenStudio @@ -68,11 +59,5 @@ script DC927612 - - IncreaseInsulationRValueForRoofs_Test.rb - rb - test - 05883904 - diff --git a/spec/files/alternate_paths/measures_and_stuff/IncreaseWallRValue/measure.xml b/spec/files/alternate_paths/measures_and_stuff/IncreaseWallRValue/measure.xml index ac3e724..07820b0 100644 --- a/spec/files/alternate_paths/measures_and_stuff/IncreaseWallRValue/measure.xml +++ b/spec/files/alternate_paths/measures_and_stuff/IncreaseWallRValue/measure.xml @@ -1,8 +1,10 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_exterior_walls_by_percentage 7508c563-22bd-49f4-b646-aac69b02a82d - 9dcca162-642a-4a06-a98a-3c9a5567a2b4 + 96db8cac-8b42-414f-b2c1-4e32db33828a + 2024-04-19T12:12:11Z EB1A0C08 IncreaseInsulationRValueForExteriorWallsByPercentage Increase R-value of Insulation for Exterior Walls By a Specified Percentage @@ -18,7 +20,8 @@ 30 - + + Envelope.Opaque @@ -45,18 +48,6 @@ - - EnvelopeAndLoadTestModel_01.osm - osm - test - 10AA8866 - - - ReverseTranslatedModel.osm - osm - test - 0B94403D - OpenStudio @@ -68,11 +59,5 @@ script 2B0F0D0D - - IncreaseInsulationRValueForExteriorWalls_Test.rb - rb - test - 9D91D252 - diff --git a/spec/files/alternate_paths/measures_and_stuff/SetEplusInfiltration/measure.xml b/spec/files/alternate_paths/measures_and_stuff/SetEplusInfiltration/measure.xml index 39b64d9..57fcddc 100644 --- a/spec/files/alternate_paths/measures_and_stuff/SetEplusInfiltration/measure.xml +++ b/spec/files/alternate_paths/measures_and_stuff/SetEplusInfiltration/measure.xml @@ -1,15 +1,26 @@ + - 3.0 - Set EnergyPlus Infiltration Flow Rate Per Floor Area + 3.1 + set_energyplus_infiltration_flow_rate_per_floor_area 490a2af3-7b64-4915-bf9e-9a3a7b525a17 - 22c341d1-64e2-486d-a430-f30d3c6f9ad4 + f4f53827-f035-4d75-9bfb-d021dddcbc1c + 2024-04-19T12:12:11Z 2AC0F979 SetEnergyPlusInfiltrationFlowRatePerFloorArea - Set EnergyPlus Infiltration Flow Rate Per Floor Area + SetEnergyPlusInfiltrationFlowRatePerFloorArea Set the flow rate per floor area value for all infiltration objects in the model. Input values are in SI units. Affected infiltration objects will have "Design Flor Rate Calculation Method" set to "Flow/Area" and the "Flow per Zone Floor Area" set to the requested SI value. - - + + + flowPerZoneFloorArea + Flow per Zone Floor Area (m^3/s-m^2). + Double + true + false + + + + Envelope.Infiltration @@ -37,17 +48,5 @@ script 4BCA3C57 - - Test.osm - osm - test - BCF2DBB8 - - - SetEnergyPlusInfiltrationFlowRatePerFloorArea_Test.rb - rb - test - F47EC348 - diff --git a/spec/files/bad_order_osw/measures/IncreaseRoofRValue/measure.xml b/spec/files/bad_order_osw/measures/IncreaseRoofRValue/measure.xml index 50ac6bf..f5a39f4 100644 --- a/spec/files/bad_order_osw/measures/IncreaseRoofRValue/measure.xml +++ b/spec/files/bad_order_osw/measures/IncreaseRoofRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_roofs_by_percentage 807d3ebf-c89b-4b93-b400-110ca060b2bb - 37c64835-408c-4ed9-9966-12667f2de25d - 20160426T215418Z - 350B6836 + 903ec017-d7a5-442a-919c-64cfc91a118f + 2024-04-19T12:12:50Z + EB1A0C08 IncreaseInsulationRValueForRoofsByPercentage Increase R-value of Insulation for Roofs by a Specified Percentage. Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/bad_order_osw/measures/IncreaseWallRValue/measure.xml b/spec/files/bad_order_osw/measures/IncreaseWallRValue/measure.xml index d3a1a6f..cc91e86 100644 --- a/spec/files/bad_order_osw/measures/IncreaseWallRValue/measure.xml +++ b/spec/files/bad_order_osw/measures/IncreaseWallRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_exterior_walls_by_percentage 7508c563-22bd-49f4-b646-aac69b02a82d - 0abb166f-7a57-4ce2-87b4-39bf0c682522 - 20160426T215418Z - 350B6836 + bcf9f8d2-d8b1-471a-9f0a-df3dcc048a4b + 2024-04-19T12:12:52Z + EB1A0C08 IncreaseInsulationRValueForExteriorWallsByPercentage Increase R-value of Insulation for Exterior Walls By a Specified Percentage Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/bad_order_osw/measures/SetEplusInfiltration/measure.xml b/spec/files/bad_order_osw/measures/SetEplusInfiltration/measure.xml index 17669c7..efc2801 100644 --- a/spec/files/bad_order_osw/measures/SetEplusInfiltration/measure.xml +++ b/spec/files/bad_order_osw/measures/SetEplusInfiltration/measure.xml @@ -1,10 +1,11 @@ + - 3.0 - set_energy_plus_infiltration_flow_rate_per_floor_area + 3.1 + set_energyplus_infiltration_flow_rate_per_floor_area 490a2af3-7b64-4915-bf9e-9a3a7b525a17 - 06858048-5304-40a3-90ed-db5beef2cf1e - 20160426T215418Z - C75AF51E + 14dd899f-eb3a-4fe9-9565-52611866edde + 2024-04-19T12:12:52Z + 2AC0F979 SetEnergyPlusInfiltrationFlowRatePerFloorArea SetEnergyPlusInfiltrationFlowRatePerFloorArea Set the flow rate per floor area value for all infiltration objects in the model. Input values are in SI units. @@ -18,8 +19,8 @@ false - - + + Envelope.Infiltration diff --git a/spec/files/compact_mwp_osw/measures/IncreaseRoofRValue/measure.xml b/spec/files/compact_mwp_osw/measures/IncreaseRoofRValue/measure.xml index 50ac6bf..767ac55 100644 --- a/spec/files/compact_mwp_osw/measures/IncreaseRoofRValue/measure.xml +++ b/spec/files/compact_mwp_osw/measures/IncreaseRoofRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_roofs_by_percentage 807d3ebf-c89b-4b93-b400-110ca060b2bb - 37c64835-408c-4ed9-9966-12667f2de25d - 20160426T215418Z - 350B6836 + 88fa63e9-9013-496d-9049-3a05e12fc8a7 + 2024-04-19T12:13:28Z + EB1A0C08 IncreaseInsulationRValueForRoofsByPercentage Increase R-value of Insulation for Roofs by a Specified Percentage. Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque @@ -56,7 +57,7 @@ measure.rb rb script - DC927612 + 8AC3079A diff --git a/spec/files/compact_mwp_osw/measures/IncreaseWallRValue/measure.xml b/spec/files/compact_mwp_osw/measures/IncreaseWallRValue/measure.xml index d3a1a6f..a31be2b 100644 --- a/spec/files/compact_mwp_osw/measures/IncreaseWallRValue/measure.xml +++ b/spec/files/compact_mwp_osw/measures/IncreaseWallRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_exterior_walls_by_percentage 7508c563-22bd-49f4-b646-aac69b02a82d - 0abb166f-7a57-4ce2-87b4-39bf0c682522 - 20160426T215418Z - 350B6836 + 1cb67cbb-6179-4bc5-9f4d-de61a85b272f + 2024-04-19T12:13:30Z + EB1A0C08 IncreaseInsulationRValueForExteriorWallsByPercentage Increase R-value of Insulation for Exterior Walls By a Specified Percentage Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque @@ -56,7 +57,7 @@ measure.rb rb script - 2B0F0D0D + BD96FE55 diff --git a/spec/files/compact_mwp_osw/measures/SetEplusInfiltration/measure.xml b/spec/files/compact_mwp_osw/measures/SetEplusInfiltration/measure.xml index 17669c7..3440ca1 100644 --- a/spec/files/compact_mwp_osw/measures/SetEplusInfiltration/measure.xml +++ b/spec/files/compact_mwp_osw/measures/SetEplusInfiltration/measure.xml @@ -1,10 +1,11 @@ + - 3.0 - set_energy_plus_infiltration_flow_rate_per_floor_area + 3.1 + set_energyplus_infiltration_flow_rate_per_floor_area 490a2af3-7b64-4915-bf9e-9a3a7b525a17 - 06858048-5304-40a3-90ed-db5beef2cf1e - 20160426T215418Z - C75AF51E + 681e524d-0315-42a3-98df-8e674ad37d53 + 2024-04-19T12:13:30Z + 2AC0F979 SetEnergyPlusInfiltrationFlowRatePerFloorArea SetEnergyPlusInfiltrationFlowRatePerFloorArea Set the flow rate per floor area value for all infiltration objects in the model. Input values are in SI units. @@ -18,8 +19,8 @@ false - - + + Envelope.Infiltration @@ -45,7 +46,7 @@ measure.rb rb script - 4BCA3C57 + 163238E1 diff --git a/spec/files/compact_osw/measures/IncreaseRoofRValue/measure.xml b/spec/files/compact_osw/measures/IncreaseRoofRValue/measure.xml index 50ac6bf..00f3653 100644 --- a/spec/files/compact_osw/measures/IncreaseRoofRValue/measure.xml +++ b/spec/files/compact_osw/measures/IncreaseRoofRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_roofs_by_percentage 807d3ebf-c89b-4b93-b400-110ca060b2bb - 37c64835-408c-4ed9-9966-12667f2de25d - 20160426T215418Z - 350B6836 + d7930555-7133-4936-af00-2f050c56e477 + 2024-04-19T12:13:14Z + EB1A0C08 IncreaseInsulationRValueForRoofsByPercentage Increase R-value of Insulation for Roofs by a Specified Percentage. Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/compact_osw/measures/IncreaseWallRValue/measure.xml b/spec/files/compact_osw/measures/IncreaseWallRValue/measure.xml index d3a1a6f..a85b986 100644 --- a/spec/files/compact_osw/measures/IncreaseWallRValue/measure.xml +++ b/spec/files/compact_osw/measures/IncreaseWallRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_exterior_walls_by_percentage 7508c563-22bd-49f4-b646-aac69b02a82d - 0abb166f-7a57-4ce2-87b4-39bf0c682522 - 20160426T215418Z - 350B6836 + 6559c9c7-6d15-4373-bc18-8e74ea5e044a + 2024-04-19T12:13:16Z + EB1A0C08 IncreaseInsulationRValueForExteriorWallsByPercentage Increase R-value of Insulation for Exterior Walls By a Specified Percentage Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/compact_osw/measures/SetEplusInfiltration/measure.xml b/spec/files/compact_osw/measures/SetEplusInfiltration/measure.xml index 17669c7..0602379 100644 --- a/spec/files/compact_osw/measures/SetEplusInfiltration/measure.xml +++ b/spec/files/compact_osw/measures/SetEplusInfiltration/measure.xml @@ -1,10 +1,11 @@ + - 3.0 - set_energy_plus_infiltration_flow_rate_per_floor_area + 3.1 + set_energyplus_infiltration_flow_rate_per_floor_area 490a2af3-7b64-4915-bf9e-9a3a7b525a17 - 06858048-5304-40a3-90ed-db5beef2cf1e - 20160426T215418Z - C75AF51E + f4a41264-d831-453f-a891-81e0306d8991 + 2024-04-19T12:13:16Z + 2AC0F979 SetEnergyPlusInfiltrationFlowRatePerFloorArea SetEnergyPlusInfiltrationFlowRatePerFloorArea Set the flow rate per floor area value for all infiltration objects in the model. Input values are in SI units. @@ -18,8 +19,8 @@ false - - + + Envelope.Infiltration diff --git a/spec/files/empty_epw/measures/ChangeBuildingLocation/measure.xml b/spec/files/empty_epw/measures/ChangeBuildingLocation/measure.xml index b835461..d113f98 100644 --- a/spec/files/empty_epw/measures/ChangeBuildingLocation/measure.xml +++ b/spec/files/empty_epw/measures/ChangeBuildingLocation/measure.xml @@ -1,9 +1,10 @@ + - 3.0 + 3.1 change_building_location d4db4971-f5ba-11e3-a3ac-0800200c9a66 - a1be49d3-697f-41bc-ab49-e7cae8ae7638 - 20181121T231036Z + 599403de-af25-4c70-b03f-298e955a3638 + 2024-04-19T12:12:57Z 057E8D9D ChangeBuildingLocation ChangeBuildingLocation @@ -165,8 +166,8 @@ - - + + Whole Building.Space Types @@ -184,159 +185,33 @@ - another_weather_file.ddy - ddy - test - D6178C51 - - - another_weather_file.epw - epw - test - D3B7E25B - - - another_weather_file.stat - stat - test - E8C83421 - - - test.osm - osm - test - 0B8479BC - - - USA_MA_Boston-Logan.Intl.AP.725090_TMY3.ddy - ddy - test - E4CBEAF0 - - - USA_MA_Boston-Logan.Intl.AP.725090_TMY3.epw - epw - test - B65824C3 - - - USA_MA_Boston-Logan.Intl.AP.725090_TMY3.stat - stat - test - 8657DDB9 - - - multiyear.ddy - ddy - test - D6178C51 - - - multiyear.epw - epw - test - F0A18702 - - - multiyear.stat - stat - test - E715E1B9 - - - USA_WA_Renton.Muni.AP.727934_TMY3.ddy - ddy - test - D2D8CDAB - - - USA_WA_Renton.Muni.AP.727934_TMY3.epw - epw - test - F6F36230 - - - USA_WA_Renton.Muni.AP.727934_TMY3.stat - stat - test - 7C51425E - - - test.osw - osw - test - F5FABCCF + + OpenStudio + 2.0.0 + 2.0.0 + + measure.rb + rb + script + 08BB16A1 - stat_file.rb + epw.rb rb resource - FA04CAFA + 6CA28016 os_lib_helper_methods.rb rb resource - 9CFC43FB - - - LICENSE.md - md - license - 9640B6CB - - - README.md.erb - erb - readmeerb - 703C9964 + B1F6B297 - epw.rb + stat_file.rb rb resource - C146EEBC - - - change_building_location_test.rb - rb - test - 4E4E9E08 - - - CA_LOS-ANGELES-IAP_722950S_12.ddy - ddy - test - 6664A3D4 - - - CA_LOS-ANGELES-IAP_722950S_12.epw - epw - test - E8072B82 - - - CA_LOS-ANGELES-IAP_722950S_12.stat - stat - test - 12BCA842 - - - - OpenStudio - 2.0.0 - 2.0.0 - - measure.rb - rb - script - E6841C99 - - - README.md - md - readme - 8A07E3FE + E92FBCB3 diff --git a/spec/files/empty_epw/measures/ReduceSpaceInfiltrationByPercentage/measure.xml b/spec/files/empty_epw/measures/ReduceSpaceInfiltrationByPercentage/measure.xml index 8798043..071b0a6 100644 --- a/spec/files/empty_epw/measures/ReduceSpaceInfiltrationByPercentage/measure.xml +++ b/spec/files/empty_epw/measures/ReduceSpaceInfiltrationByPercentage/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 reduce_space_infiltration_by_percentage d8161857-8b77-4e1a-a76c-ae5deab7c1e0 - f30fd57a-cca1-45cb-91c8-ce93d536c353 - 20170216T204321Z - BCB7218E + 14813957-bd2e-4d0d-bba5-b004c03e6df5 + 2024-04-19T12:12:57Z + EACB548E ReduceSpaceInfiltrationByPercentage ReduceSpaceInfiltrationByPercentage This measure will reduce space infiltration rates by the requested percentage. A cost per square foot of building area can be added to the model. @@ -16,10 +17,10 @@ Choice true false - *Entire Building* + {5149c33c-574a-4aba-9d3b-22732b8150aa} - {5bc3b40d-9d19-4d4a-9029-1884b781ffb9} + {5149c33c-574a-4aba-9d3b-22732b8150aa} *Entire Building* @@ -89,8 +90,8 @@ 1 - - + + Envelope.Infiltration @@ -116,7 +117,7 @@ measure.rb rb script - 9A19772C + 2C707716 diff --git a/spec/files/extended_osw/example/measures/IncreaseRoofRValue/measure.xml b/spec/files/extended_osw/example/measures/IncreaseRoofRValue/measure.xml index ddc0714..f61648a 100644 --- a/spec/files/extended_osw/example/measures/IncreaseRoofRValue/measure.xml +++ b/spec/files/extended_osw/example/measures/IncreaseRoofRValue/measure.xml @@ -1,8 +1,10 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_roofs_by_percentage 807d3ebf-c89b-4b93-b400-110ca060b2bb - 2704be33-ea98-4896-a378-875b8af786f9 + 4a7275f5-e3aa-4ac2-b2d1-d326fe7ad8cc + 2024-04-19T12:12:33Z EB1A0C08 IncreaseInsulationRValueForRoofsByPercentage Increase R-value of Insulation for Roofs by a Specified Percentage. @@ -18,7 +20,8 @@ 30 - + + Envelope.Opaque @@ -45,18 +48,6 @@ - - EnvelopeAndLoadTestModel_01.osm - osm - test - 10AA8866 - - - ReverseTranslatedModel.osm - osm - test - 0B94403D - OpenStudio @@ -68,11 +59,5 @@ script DC927612 - - IncreaseInsulationRValueForRoofs_Test.rb - rb - test - 05883904 - diff --git a/spec/files/extended_osw/example/measures/IncreaseWallRValue/measure.xml b/spec/files/extended_osw/example/measures/IncreaseWallRValue/measure.xml index ac3e724..f250ef8 100644 --- a/spec/files/extended_osw/example/measures/IncreaseWallRValue/measure.xml +++ b/spec/files/extended_osw/example/measures/IncreaseWallRValue/measure.xml @@ -1,8 +1,10 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_exterior_walls_by_percentage 7508c563-22bd-49f4-b646-aac69b02a82d - 9dcca162-642a-4a06-a98a-3c9a5567a2b4 + b728f123-254c-4953-912c-328106af7f48 + 2024-04-19T12:12:35Z EB1A0C08 IncreaseInsulationRValueForExteriorWallsByPercentage Increase R-value of Insulation for Exterior Walls By a Specified Percentage @@ -18,7 +20,8 @@ 30 - + + Envelope.Opaque @@ -45,18 +48,6 @@ - - EnvelopeAndLoadTestModel_01.osm - osm - test - 10AA8866 - - - ReverseTranslatedModel.osm - osm - test - 0B94403D - OpenStudio @@ -68,11 +59,5 @@ script 2B0F0D0D - - IncreaseInsulationRValueForExteriorWalls_Test.rb - rb - test - 9D91D252 - diff --git a/spec/files/extended_osw/example/measures/SetEplusInfiltration/measure.xml b/spec/files/extended_osw/example/measures/SetEplusInfiltration/measure.xml index 39b64d9..5b411a7 100644 --- a/spec/files/extended_osw/example/measures/SetEplusInfiltration/measure.xml +++ b/spec/files/extended_osw/example/measures/SetEplusInfiltration/measure.xml @@ -1,15 +1,26 @@ + - 3.0 - Set EnergyPlus Infiltration Flow Rate Per Floor Area + 3.1 + set_energyplus_infiltration_flow_rate_per_floor_area 490a2af3-7b64-4915-bf9e-9a3a7b525a17 - 22c341d1-64e2-486d-a430-f30d3c6f9ad4 + 50d5cc1f-fea6-4769-9de5-35107e5a152c + 2024-04-19T12:12:35Z 2AC0F979 SetEnergyPlusInfiltrationFlowRatePerFloorArea - Set EnergyPlus Infiltration Flow Rate Per Floor Area + SetEnergyPlusInfiltrationFlowRatePerFloorArea Set the flow rate per floor area value for all infiltration objects in the model. Input values are in SI units. Affected infiltration objects will have "Design Flor Rate Calculation Method" set to "Flow/Area" and the "Flow per Zone Floor Area" set to the requested SI value. - - + + + flowPerZoneFloorArea + Flow per Zone Floor Area (m^3/s-m^2). + Double + true + false + + + + Envelope.Infiltration @@ -37,17 +48,5 @@ script 4BCA3C57 - - Test.osm - osm - test - BCF2DBB8 - - - SetEnergyPlusInfiltrationFlowRatePerFloorArea_Test.rb - rb - test - F47EC348 - diff --git a/spec/files/fast_osw/measures/IncreaseRoofRValue/measure.xml b/spec/files/fast_osw/measures/IncreaseRoofRValue/measure.xml index 50ac6bf..9a2cd7f 100644 --- a/spec/files/fast_osw/measures/IncreaseRoofRValue/measure.xml +++ b/spec/files/fast_osw/measures/IncreaseRoofRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_roofs_by_percentage 807d3ebf-c89b-4b93-b400-110ca060b2bb - 37c64835-408c-4ed9-9966-12667f2de25d - 20160426T215418Z - 350B6836 + b2c3654b-d6e3-4d7b-be94-a5e961c4487d + 2024-04-19T12:12:59Z + EB1A0C08 IncreaseInsulationRValueForRoofsByPercentage Increase R-value of Insulation for Roofs by a Specified Percentage. Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/fast_osw/measures/IncreaseWallRValue/measure.xml b/spec/files/fast_osw/measures/IncreaseWallRValue/measure.xml index d3a1a6f..b078884 100644 --- a/spec/files/fast_osw/measures/IncreaseWallRValue/measure.xml +++ b/spec/files/fast_osw/measures/IncreaseWallRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_exterior_walls_by_percentage 7508c563-22bd-49f4-b646-aac69b02a82d - 0abb166f-7a57-4ce2-87b4-39bf0c682522 - 20160426T215418Z - 350B6836 + d14f9be4-56c3-4c7d-a72e-8bb66c4662ac + 2024-04-19T12:13:01Z + EB1A0C08 IncreaseInsulationRValueForExteriorWallsByPercentage Increase R-value of Insulation for Exterior Walls By a Specified Percentage Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/fast_osw/measures/SetEplusInfiltration/measure.xml b/spec/files/fast_osw/measures/SetEplusInfiltration/measure.xml index 17669c7..8f301ee 100644 --- a/spec/files/fast_osw/measures/SetEplusInfiltration/measure.xml +++ b/spec/files/fast_osw/measures/SetEplusInfiltration/measure.xml @@ -1,10 +1,11 @@ + - 3.0 - set_energy_plus_infiltration_flow_rate_per_floor_area + 3.1 + set_energyplus_infiltration_flow_rate_per_floor_area 490a2af3-7b64-4915-bf9e-9a3a7b525a17 - 06858048-5304-40a3-90ed-db5beef2cf1e - 20160426T215418Z - C75AF51E + 10bf49e6-ae20-4e4e-9a88-7b004dd25097 + 2024-04-19T12:13:01Z + 2AC0F979 SetEnergyPlusInfiltrationFlowRatePerFloorArea SetEnergyPlusInfiltrationFlowRatePerFloorArea Set the flow rate per floor area value for all infiltration objects in the model. Input values are in SI units. @@ -18,8 +19,8 @@ false - - + + Envelope.Infiltration diff --git a/spec/files/full_measure_dir_osw/measures/Rotate Building Relative to Current Orientation/measure.xml b/spec/files/full_measure_dir_osw/measures/Rotate Building Relative to Current Orientation/measure.xml index e2040da..9179660 100644 --- a/spec/files/full_measure_dir_osw/measures/Rotate Building Relative to Current Orientation/measure.xml +++ b/spec/files/full_measure_dir_osw/measures/Rotate Building Relative to Current Orientation/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 rotate_building a5be6c96-4ecc-47fa-8d32-f4216ebc2e7d - 212f9705-e0e3-43d4-b5eb-f17e56dd3af8 - 20161103T203727Z - E8A47F56 + e9e753a1-fecf-4575-8304-0509d3914f36 + 2024-04-19T12:12:20Z + 49BEF039 RotateBuilding Rotate Building Rotate your building relative to its current orientation. This will not rotate site shading objects. @@ -19,8 +20,8 @@ 90 - - + + Envelope.Form @@ -58,17 +59,5 @@ script C0BBCFAD - - RotateBuilding_Test.rb - rb - test - 01BFBBC7 - - - RotateBuilding_TestModel_01.osm - osm - test - 550314F1 - diff --git a/spec/files/halt_workflow_osw/measures/IncreaseRoofRValue/measure.xml b/spec/files/halt_workflow_osw/measures/IncreaseRoofRValue/measure.xml index 50ac6bf..5305602 100644 --- a/spec/files/halt_workflow_osw/measures/IncreaseRoofRValue/measure.xml +++ b/spec/files/halt_workflow_osw/measures/IncreaseRoofRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_roofs_by_percentage 807d3ebf-c89b-4b93-b400-110ca060b2bb - 37c64835-408c-4ed9-9966-12667f2de25d - 20160426T215418Z - 350B6836 + 996e320b-24cb-48ba-b51a-8e40a2ee4295 + 2024-04-19T12:13:02Z + EB1A0C08 IncreaseInsulationRValueForRoofsByPercentage Increase R-value of Insulation for Roofs by a Specified Percentage. Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque @@ -56,7 +57,7 @@ measure.rb rb script - DC927612 + ADF2636B diff --git a/spec/files/halt_workflow_osw/measures/IncreaseWallRValue/measure.xml b/spec/files/halt_workflow_osw/measures/IncreaseWallRValue/measure.xml index d3a1a6f..a903b7f 100644 --- a/spec/files/halt_workflow_osw/measures/IncreaseWallRValue/measure.xml +++ b/spec/files/halt_workflow_osw/measures/IncreaseWallRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_exterior_walls_by_percentage 7508c563-22bd-49f4-b646-aac69b02a82d - 0abb166f-7a57-4ce2-87b4-39bf0c682522 - 20160426T215418Z - 350B6836 + 5fd1553d-2dfa-45c1-9abe-614c20425da0 + 2024-04-19T12:13:04Z + EB1A0C08 IncreaseInsulationRValueForExteriorWallsByPercentage Increase R-value of Insulation for Exterior Walls By a Specified Percentage Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque @@ -56,7 +57,7 @@ measure.rb rb script - 2B0F0D0D + E243CFB4 diff --git a/spec/files/halt_workflow_osw/measures/SetEplusInfiltration/measure.xml b/spec/files/halt_workflow_osw/measures/SetEplusInfiltration/measure.xml index 17669c7..eef1920 100644 --- a/spec/files/halt_workflow_osw/measures/SetEplusInfiltration/measure.xml +++ b/spec/files/halt_workflow_osw/measures/SetEplusInfiltration/measure.xml @@ -1,10 +1,11 @@ + - 3.0 - set_energy_plus_infiltration_flow_rate_per_floor_area + 3.1 + set_energyplus_infiltration_flow_rate_per_floor_area 490a2af3-7b64-4915-bf9e-9a3a7b525a17 - 06858048-5304-40a3-90ed-db5beef2cf1e - 20160426T215418Z - C75AF51E + 4f0013fb-8280-445a-8c4f-657201c1a98c + 2024-04-19T12:13:04Z + 2AC0F979 SetEnergyPlusInfiltrationFlowRatePerFloorArea SetEnergyPlusInfiltrationFlowRatePerFloorArea Set the flow rate per floor area value for all infiltration objects in the model. Input values are in SI units. @@ -18,8 +19,8 @@ false - - + + Envelope.Infiltration diff --git a/spec/files/measures_only_osw/measures/IncreaseRoofRValue/measure.xml b/spec/files/measures_only_osw/measures/IncreaseRoofRValue/measure.xml index 50ac6bf..960d086 100644 --- a/spec/files/measures_only_osw/measures/IncreaseRoofRValue/measure.xml +++ b/spec/files/measures_only_osw/measures/IncreaseRoofRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_roofs_by_percentage 807d3ebf-c89b-4b93-b400-110ca060b2bb - 37c64835-408c-4ed9-9966-12667f2de25d - 20160426T215418Z - 350B6836 + d9291df4-51d0-41c2-b04f-5e88ec68a993 + 2024-04-19T12:13:18Z + EB1A0C08 IncreaseInsulationRValueForRoofsByPercentage Increase R-value of Insulation for Roofs by a Specified Percentage. Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/measures_only_osw/measures/IncreaseWallRValue/measure.xml b/spec/files/measures_only_osw/measures/IncreaseWallRValue/measure.xml index d3a1a6f..f4330b4 100644 --- a/spec/files/measures_only_osw/measures/IncreaseWallRValue/measure.xml +++ b/spec/files/measures_only_osw/measures/IncreaseWallRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_exterior_walls_by_percentage 7508c563-22bd-49f4-b646-aac69b02a82d - 0abb166f-7a57-4ce2-87b4-39bf0c682522 - 20160426T215418Z - 350B6836 + 807fb4ff-4970-4fe6-9845-974156848499 + 2024-04-19T12:13:19Z + EB1A0C08 IncreaseInsulationRValueForExteriorWallsByPercentage Increase R-value of Insulation for Exterior Walls By a Specified Percentage Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/measures_only_osw/measures/SetEplusInfiltration/measure.xml b/spec/files/measures_only_osw/measures/SetEplusInfiltration/measure.xml index 17669c7..0d7fda4 100644 --- a/spec/files/measures_only_osw/measures/SetEplusInfiltration/measure.xml +++ b/spec/files/measures_only_osw/measures/SetEplusInfiltration/measure.xml @@ -1,10 +1,11 @@ + - 3.0 - set_energy_plus_infiltration_flow_rate_per_floor_area + 3.1 + set_energyplus_infiltration_flow_rate_per_floor_area 490a2af3-7b64-4915-bf9e-9a3a7b525a17 - 06858048-5304-40a3-90ed-db5beef2cf1e - 20160426T215418Z - C75AF51E + 7055434b-3d14-4d09-ba9d-2796fec88631 + 2024-04-19T12:13:19Z + 2AC0F979 SetEnergyPlusInfiltrationFlowRatePerFloorArea SetEnergyPlusInfiltrationFlowRatePerFloorArea Set the flow rate per floor area value for all infiltration objects in the model. Input values are in SI units. @@ -18,8 +19,8 @@ false - - + + Envelope.Infiltration diff --git a/spec/files/measures_only_osw/measures/ViewModel/measure.xml b/spec/files/measures_only_osw/measures/ViewModel/measure.xml index 6e7e9d4..7929f5b 100644 --- a/spec/files/measures_only_osw/measures/ViewModel/measure.xml +++ b/spec/files/measures_only_osw/measures/ViewModel/measure.xml @@ -1,16 +1,18 @@ + - 3.0 + 3.1 view_model f4669f10-fda5-489d-8e1c-7ca3c2d40378 - bee046af-2002-488a-8c20-e3b4d3efc278 - 20160321T212510Z + 93f5e0f0-36f9-462a-a231-2f9e6d3212b5 + 2024-04-19T12:13:17Z 1E1F8B97 ViewModel ViewModel Visualize an OpenStudio model in a web based viewer Converts the OpenStudio model to vA3C JSON format and renders using Three.js - - + + + Reporting.QAQC @@ -27,24 +29,6 @@ - - SimpleModel.osm - osm - test - AC094EF8 - - - ExampleModel.osm - osm - test - 10636DB9 - - - ViewModel_Test.rb - rb - test - 705A2705 - OpenStudio @@ -56,6 +40,12 @@ script 656ECCCB + + report.html.in + in + resource + 64866EE7 + va3c.rb rb @@ -63,10 +53,40 @@ 254BCDED - report.html.in - in - resource - 64866EE7 + ExampleModel.osm + osm + test + 2B03AA52 + + + SimpleModel/project.log + log + test + 150441D3 + + + SimpleModel/project.osp + osp + test + 8FEBA31B + + + SimpleModel/run.db + db + test + 406680D8 + + + SimpleModel.osm + osm + test + 0ADB62D9 + + + ViewModel_Test.rb + rb + test + 43A40DD9 diff --git a/spec/files/no_epw_file_osw/measures/IncreaseRoofRValue/measure.xml b/spec/files/no_epw_file_osw/measures/IncreaseRoofRValue/measure.xml index 50ac6bf..ccde581 100644 --- a/spec/files/no_epw_file_osw/measures/IncreaseRoofRValue/measure.xml +++ b/spec/files/no_epw_file_osw/measures/IncreaseRoofRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_roofs_by_percentage 807d3ebf-c89b-4b93-b400-110ca060b2bb - 37c64835-408c-4ed9-9966-12667f2de25d - 20160426T215418Z - 350B6836 + 99e4f11a-0f42-4f64-9a21-0985abed389f + 2024-04-19T12:13:21Z + EB1A0C08 IncreaseInsulationRValueForRoofsByPercentage Increase R-value of Insulation for Roofs by a Specified Percentage. Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/no_epw_file_osw/measures/IncreaseWallRValue/measure.xml b/spec/files/no_epw_file_osw/measures/IncreaseWallRValue/measure.xml index d3a1a6f..e90d778 100644 --- a/spec/files/no_epw_file_osw/measures/IncreaseWallRValue/measure.xml +++ b/spec/files/no_epw_file_osw/measures/IncreaseWallRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_exterior_walls_by_percentage 7508c563-22bd-49f4-b646-aac69b02a82d - 0abb166f-7a57-4ce2-87b4-39bf0c682522 - 20160426T215418Z - 350B6836 + ee9537e8-83b8-4078-bb0c-c199409c0881 + 2024-04-19T12:13:23Z + EB1A0C08 IncreaseInsulationRValueForExteriorWallsByPercentage Increase R-value of Insulation for Exterior Walls By a Specified Percentage Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/no_epw_file_osw/measures/SetEplusInfiltration/measure.xml b/spec/files/no_epw_file_osw/measures/SetEplusInfiltration/measure.xml index 17669c7..0e32668 100644 --- a/spec/files/no_epw_file_osw/measures/SetEplusInfiltration/measure.xml +++ b/spec/files/no_epw_file_osw/measures/SetEplusInfiltration/measure.xml @@ -1,10 +1,11 @@ + - 3.0 - set_energy_plus_infiltration_flow_rate_per_floor_area + 3.1 + set_energyplus_infiltration_flow_rate_per_floor_area 490a2af3-7b64-4915-bf9e-9a3a7b525a17 - 06858048-5304-40a3-90ed-db5beef2cf1e - 20160426T215418Z - C75AF51E + 4be6e3fe-f353-4bb9-a171-8c9208bbda84 + 2024-04-19T12:13:23Z + 2AC0F979 SetEnergyPlusInfiltrationFlowRatePerFloorArea SetEnergyPlusInfiltrationFlowRatePerFloorArea Set the flow rate per floor area value for all infiltration objects in the model. Input values are in SI units. @@ -18,8 +19,8 @@ false - - + + Envelope.Infiltration diff --git a/spec/files/no_epw_file_osw/measures/ViewModel/measure.xml b/spec/files/no_epw_file_osw/measures/ViewModel/measure.xml index 6e7e9d4..51de923 100644 --- a/spec/files/no_epw_file_osw/measures/ViewModel/measure.xml +++ b/spec/files/no_epw_file_osw/measures/ViewModel/measure.xml @@ -1,16 +1,18 @@ + - 3.0 + 3.1 view_model f4669f10-fda5-489d-8e1c-7ca3c2d40378 - bee046af-2002-488a-8c20-e3b4d3efc278 - 20160321T212510Z + aedeab72-4b5f-4df3-bc2c-ea54ef1cf634 + 2024-04-19T12:13:20Z 1E1F8B97 ViewModel ViewModel Visualize an OpenStudio model in a web based viewer Converts the OpenStudio model to vA3C JSON format and renders using Three.js - - + + + Reporting.QAQC @@ -27,24 +29,6 @@ - - SimpleModel.osm - osm - test - AC094EF8 - - - ExampleModel.osm - osm - test - 10636DB9 - - - ViewModel_Test.rb - rb - test - 705A2705 - OpenStudio @@ -56,6 +40,12 @@ script 656ECCCB + + report.html.in + in + resource + 64866EE7 + va3c.rb rb @@ -63,10 +53,40 @@ 254BCDED - report.html.in - in - resource - 64866EE7 + ExampleModel.osm + osm + test + 4E35C022 + + + SimpleModel/project.log + log + test + 150441D3 + + + SimpleModel/project.osp + osp + test + 8FEBA31B + + + SimpleModel/run.db + db + test + 406680D8 + + + SimpleModel.osm + osm + test + E0EC5948 + + + ViewModel_Test.rb + rb + test + 43A40DD9 diff --git a/spec/files/null_seed/measures/ReduceSpaceInfiltrationByPercentage/measure.xml b/spec/files/null_seed/measures/ReduceSpaceInfiltrationByPercentage/measure.xml index 8798043..836922d 100644 --- a/spec/files/null_seed/measures/ReduceSpaceInfiltrationByPercentage/measure.xml +++ b/spec/files/null_seed/measures/ReduceSpaceInfiltrationByPercentage/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 reduce_space_infiltration_by_percentage d8161857-8b77-4e1a-a76c-ae5deab7c1e0 - f30fd57a-cca1-45cb-91c8-ce93d536c353 - 20170216T204321Z - BCB7218E + 50e98d98-a5e8-4fa9-bb16-c09deac25fc6 + 2024-04-19T12:12:56Z + EACB548E ReduceSpaceInfiltrationByPercentage ReduceSpaceInfiltrationByPercentage This measure will reduce space infiltration rates by the requested percentage. A cost per square foot of building area can be added to the model. @@ -16,10 +17,10 @@ Choice true false - *Entire Building* + {75e4a192-68c7-4652-907c-24ceff4348c5} - {5bc3b40d-9d19-4d4a-9029-1884b781ffb9} + {75e4a192-68c7-4652-907c-24ceff4348c5} *Entire Building* @@ -89,8 +90,8 @@ 1 - - + + Envelope.Infiltration @@ -116,7 +117,7 @@ measure.rb rb script - 9A19772C + 2C707716 diff --git a/spec/files/output_request_osw/measures/IncreaseRoofRValue/measure.xml b/spec/files/output_request_osw/measures/IncreaseRoofRValue/measure.xml index 50ac6bf..02e5a7d 100644 --- a/spec/files/output_request_osw/measures/IncreaseRoofRValue/measure.xml +++ b/spec/files/output_request_osw/measures/IncreaseRoofRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_roofs_by_percentage 807d3ebf-c89b-4b93-b400-110ca060b2bb - 37c64835-408c-4ed9-9966-12667f2de25d - 20160426T215418Z - 350B6836 + d67e8e16-f060-41ee-8199-087b2ffa9566 + 2024-04-19T12:12:22Z + EB1A0C08 IncreaseInsulationRValueForRoofsByPercentage Increase R-value of Insulation for Roofs by a Specified Percentage. Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/output_request_osw/measures/IncreaseWallRValue/measure.xml b/spec/files/output_request_osw/measures/IncreaseWallRValue/measure.xml index d3a1a6f..b163b6f 100644 --- a/spec/files/output_request_osw/measures/IncreaseWallRValue/measure.xml +++ b/spec/files/output_request_osw/measures/IncreaseWallRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_exterior_walls_by_percentage 7508c563-22bd-49f4-b646-aac69b02a82d - 0abb166f-7a57-4ce2-87b4-39bf0c682522 - 20160426T215418Z - 350B6836 + 36f96a0f-edab-48db-b2fb-eb5ae028fd2e + 2024-04-19T12:12:32Z + EB1A0C08 IncreaseInsulationRValueForExteriorWallsByPercentage Increase R-value of Insulation for Exterior Walls By a Specified Percentage Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/output_request_osw/measures/SetEplusInfiltration/measure.xml b/spec/files/output_request_osw/measures/SetEplusInfiltration/measure.xml index 17669c7..32f0cfb 100644 --- a/spec/files/output_request_osw/measures/SetEplusInfiltration/measure.xml +++ b/spec/files/output_request_osw/measures/SetEplusInfiltration/measure.xml @@ -1,10 +1,11 @@ + - 3.0 - set_energy_plus_infiltration_flow_rate_per_floor_area + 3.1 + set_energyplus_infiltration_flow_rate_per_floor_area 490a2af3-7b64-4915-bf9e-9a3a7b525a17 - 06858048-5304-40a3-90ed-db5beef2cf1e - 20160426T215418Z - C75AF51E + 0cb6b0c0-e87b-41ea-bcd3-a0ce2a9e133a + 2024-04-19T12:12:24Z + 2AC0F979 SetEnergyPlusInfiltrationFlowRatePerFloorArea SetEnergyPlusInfiltrationFlowRatePerFloorArea Set the flow rate per floor area value for all infiltration objects in the model. Input values are in SI units. @@ -18,8 +19,8 @@ false - - + + Envelope.Infiltration diff --git a/spec/files/output_request_osw/measures/ViewModel/measure.xml b/spec/files/output_request_osw/measures/ViewModel/measure.xml index 6e7e9d4..36165b9 100644 --- a/spec/files/output_request_osw/measures/ViewModel/measure.xml +++ b/spec/files/output_request_osw/measures/ViewModel/measure.xml @@ -1,16 +1,18 @@ + - 3.0 + 3.1 view_model f4669f10-fda5-489d-8e1c-7ca3c2d40378 - bee046af-2002-488a-8c20-e3b4d3efc278 - 20160321T212510Z + 4ba4700d-b1fd-4dd6-866e-40bf4145303b + 2024-04-19T12:12:20Z 1E1F8B97 ViewModel ViewModel Visualize an OpenStudio model in a web based viewer Converts the OpenStudio model to vA3C JSON format and renders using Three.js - - + + + Reporting.QAQC @@ -27,24 +29,6 @@ - - SimpleModel.osm - osm - test - AC094EF8 - - - ExampleModel.osm - osm - test - 10636DB9 - - - ViewModel_Test.rb - rb - test - 705A2705 - OpenStudio @@ -56,6 +40,12 @@ script 656ECCCB + + report.html.in + in + resource + 64866EE7 + va3c.rb rb @@ -63,10 +53,40 @@ 254BCDED - report.html.in - in - resource - 64866EE7 + ExampleModel.osm + osm + test + C00C7964 + + + SimpleModel/project.log + log + test + 150441D3 + + + SimpleModel/project.osp + osp + test + 8FEBA31B + + + SimpleModel/run.db + db + test + 406680D8 + + + SimpleModel.osm + osm + test + 33763533 + + + ViewModel_Test.rb + rb + test + 43A40DD9 diff --git a/spec/files/output_request_osw/measures/Xcel EDA Reporting and QAQC/measure.xml b/spec/files/output_request_osw/measures/Xcel EDA Reporting and QAQC/measure.xml index 3b879ae..34051ba 100644 --- a/spec/files/output_request_osw/measures/Xcel EDA Reporting and QAQC/measure.xml +++ b/spec/files/output_request_osw/measures/Xcel EDA Reporting and QAQC/measure.xml @@ -1,17 +1,18 @@ + - 3.0 + 3.1 xcel_eda_reportingand_qaqc 92bee759-86ae-4617-92e2-f8e5aa9dc684 - 76c99d64-a74e-4bda-bce1-e2c98a0be8e9 - 20161121T171159Z - 9F9D8C87 + 667501a2-92f0-4716-8c02-4eebe7859e24 + 2024-04-19T12:12:21Z + 2C8A3EEF XcelEDAReportingandQAQC XcelEDAReportingandQAQC This measure extracts key simulation results and performs basic model QAQC checks necessary for the Xcel EDA Program. Reads the model and sql file to pull out the necessary information and run the model checks. The check results show up as Warning messages in the measure's output on the PAT run tab. - - - + + + Reporting.QAQC @@ -37,31 +38,19 @@ measure.rb rb script - 78A571C7 + CA3104D6 CreateResults.rb rb resource - 65271996 + 7D4DD803 - 0116_OfficeTest121_dev.osm - osm - test - 63E36762 - - - report.xml - xml - test - 87365E0C - - - XcelEDAReportingandQAQC_Test.rb + EUI.rb rb - test - 2B3F8653 + resource + 738BFA1A EndUseBreakdown.rb @@ -69,12 +58,6 @@ resource D9316A58 - - EUI.rb - rb - resource - 738BFA1A - FuelSwap.rb rb @@ -93,5 +76,23 @@ resource 05F6672F + + 0116_OfficeTest121_dev.osm + osm + test + 19EBDE51 + + + XcelEDAReportingandQAQC_Test.rb + rb + test + 2B3F8653 + + + report.xml + xml + test + 87365E0C + diff --git a/spec/files/output_request_osw/measures/openstudio_results/measure.xml b/spec/files/output_request_osw/measures/openstudio_results/measure.xml index ea3ec4f..a9e874a 100644 --- a/spec/files/output_request_osw/measures/openstudio_results/measure.xml +++ b/spec/files/output_request_osw/measures/openstudio_results/measure.xml @@ -1,10 +1,10 @@ - 3.0 + 3.1 openstudio_results a25386cd-60e4-46bc-8b11-c755f379d916 - f0fd2916-1c52-4c78-bf00-25b7c5e5ca3a - 20201001T065500Z + 0fede487-5ad7-48ba-a63b-5f4a0abd53e7 + 2024-04-19T12:12:24Z 557BF06F OpenStudioResults OpenStudio Results @@ -597,40 +597,16 @@ - USA_CO_Golden-NREL.724666_TMY3.epw - epw - test - BDF687C1 - - - EmptyModel.osm - osm - test - A597C804 - - - NoRunPeriod.osm - osm - test - 32622D37 - - - 1004_SmallHotel_a.osm - osm - test - C62949E8 - - - HeatingOnly.osm - osm - test - 99A21A4F + LICENSE.md + md + license + E0468DD6 - EdgeCaseModel.osm - osm - test - 4EEA709C + README.md + md + readme + 42709140 README.md.erb @@ -639,22 +615,27 @@ 4F81E2EA - LICENSE.md - md - license - E0468DD6 + + OpenStudio + 3.1.0 + 3.1.0 + + measure.rb + rb + script + 69737594 - os_lib_helper_methods.rb + Siz.AirConditionerVariableRefrigerantFlow.rb rb resource - 07B01D67 + CE884E2A - Siz.AirConditionerVariableRefrigerantFlow.rb + Siz.AirLoopHVAC.rb rb resource - CE884E2A + 14F8D189 Siz.AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass.rb @@ -680,6 +661,18 @@ resource A759860C + + Siz.AirTerminalDualDuctVAV.rb + rb + resource + 4B6819DC + + + Siz.AirTerminalSingleDuctConstantVolumeCooledBeam.rb + rb + resource + F96D6214 + Siz.AirTerminalSingleDuctConstantVolumeFourPipeInduction.rb rb @@ -704,12 +697,30 @@ resource 93F274F9 + + Siz.AirTerminalSingleDuctUncontrolled.rb + rb + resource + C7FD335A + + + Siz.AirTerminalSingleDuctVAVHeatAndCoolNoReheat.rb + rb + resource + B5BAC065 + Siz.AirTerminalSingleDuctVAVHeatAndCoolReheat.rb rb resource 0FBA2523 + + Siz.AirTerminalSingleDuctVAVNoReheat.rb + rb + resource + A1793E80 + Siz.AirTerminalSingleDuctVAVReheat.rb rb @@ -728,6 +739,36 @@ resource F56325B1 + + Siz.ChillerAbsorption.rb + rb + resource + 8D07361A + + + Siz.ChillerAbsorptionIndirect.rb + rb + resource + BD8F5F27 + + + Siz.ChillerElectricEIR.rb + rb + resource + A6354925 + + + Siz.ChillerHeaterPerformanceElectricEIR.rb + rb + resource + 42F8AE58 + + + Siz.CoilCoolingDXMultiSpeed.rb + rb + resource + E263E487 + Siz.CoilCoolingDXMultiSpeedStageData.rb rb @@ -746,12 +787,54 @@ resource 6709B0F6 + + Siz.CoilCoolingDXTwoStageWithHumidityControlMode.rb + rb + resource + C7886FF0 + + + Siz.CoilCoolingDXVariableRefrigerantFlow.rb + rb + resource + 37D275EB + + + Siz.CoilCoolingDXVariableSpeed.rb + rb + resource + AC0227FF + Siz.CoilCoolingDXVariableSpeedSpeedData.rb rb resource 7F46BB99 + + Siz.CoilCoolingLowTempRadiantVarFlow.rb + rb + resource + 5713AC88 + + + Siz.CoilCoolingWater.rb + rb + resource + F059E05B + + + Siz.CoilCoolingWaterToAirHeatPumpEquationFit.rb + rb + resource + 29C27996 + + + Siz.CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit.rb + rb + resource + 5A11AD77 + Siz.CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData.rb rb @@ -759,10 +842,10 @@ 1E8B4778 - Siz.CoilHeatingDesuperheater.rb + Siz.CoilHeatingDXMultiSpeed.rb rb resource - B004FD9D + 1AF45942 Siz.CoilHeatingDXMultiSpeedStageData.rb @@ -776,12 +859,30 @@ resource 3533D682 + + Siz.CoilHeatingDXVariableRefrigerantFlow.rb + rb + resource + FEF55D21 + + + Siz.CoilHeatingDXVariableSpeed.rb + rb + resource + 2F4D3805 + Siz.CoilHeatingDXVariableSpeedSpeedData.rb rb resource 79C62118 + + Siz.CoilHeatingDesuperheater.rb + rb + resource + B004FD9D + Siz.CoilHeatingElectric.rb rb @@ -794,6 +895,12 @@ resource 921B9368 + + Siz.CoilHeatingGasMultiStage.rb + rb + resource + E0A44A0E + Siz.CoilHeatingGasMultiStageStageData.rb rb @@ -806,6 +913,36 @@ resource D893C2CD + + Siz.CoilHeatingWater.rb + rb + resource + 960C3ADB + + + Siz.CoilHeatingWaterBaseboard.rb + rb + resource + A494F9CC + + + Siz.CoilHeatingWaterBaseboardRadiant.rb + rb + resource + 973E7BF4 + + + Siz.CoilHeatingWaterToAirHeatPumpEquationFit.rb + rb + resource + 20C873F5 + + + Siz.CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit.rb + rb + resource + CE0D3D54 + Siz.CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData.rb rb @@ -848,6 +985,42 @@ resource 754A681B + + Siz.ControllerOutdoorAir.rb + rb + resource + A4B81965 + + + Siz.CoolingTowerSingleSpeed.rb + rb + resource + B5E60361 + + + Siz.CoolingTowerTwoSpeed.rb + rb + resource + C8EE081E + + + Siz.CoolingTowerVariableSpeed.rb + rb + resource + 8009D2D7 + + + Siz.DistrictCooling.rb + rb + resource + A0A45BB2 + + + Siz.DistrictHeating.rb + rb + resource + E4BB69AB + Siz.ElectricLoadCenterInverterLookUpTable.rb rb @@ -884,6 +1057,18 @@ resource D9A064E7 + + Siz.EvaporativeFluidCoolerSingleSpeed.rb + rb + resource + 7964E64F + + + Siz.EvaporativeFluidCoolerTwoSpeed.rb + rb + resource + 052C7012 + Siz.FanConstantVolume.rb rb @@ -908,6 +1093,18 @@ resource F4C86E63 + + Siz.FluidCoolerSingleSpeed.rb + rb + resource + 29E594D2 + + + Siz.FluidCoolerTwoSpeed.rb + rb + resource + 087B28CA + Siz.GeneratorFuelCellElectricalStorage.rb rb @@ -938,6 +1135,12 @@ resource C6CDF7F3 + + Siz.HVACComponent.rb + rb + resource + C1FB6BC6 + Siz.HeaderedPumpsConstantSpeed.rb rb @@ -956,12 +1159,60 @@ resource 61C05436 + + Siz.HeatExchangerFluidToFluid.rb + rb + resource + 79A206AA + + + Siz.HeatPumpWaterToWaterEquationFitCooling.rb + rb + resource + F15CDDD5 + + + Siz.HeatPumpWaterToWaterEquationFitHeating.rb + rb + resource + 07DDB5E6 + + + Siz.HumidifierSteamElectric.rb + rb + resource + 3F1A8DFF + + + Siz.Model.rb + rb + resource + E453C1B0 + + + Siz.ModelObject.rb + rb + resource + A7D06578 + Siz.PhotovoltaicPerformanceSimple.rb rb resource 84ED6027 + + Siz.PlantComponentTemperatureSource.rb + rb + resource + 60776604 + + + Siz.PlantLoop.rb + rb + resource + C464E1E0 + Siz.PumpConstantSpeed.rb rb @@ -992,6 +1243,18 @@ resource FACF342B + + Siz.SizingSystem.rb + rb + resource + 1B86DEA6 + + + Siz.SolarCollectorFlatPlatePhotovoltaicThermal.rb + rb + resource + 4C7BF968 + Siz.SolarCollectorPerformancePhotovoltaicThermalSimple.rb rb @@ -1100,6 +1363,12 @@ resource E477D566 + + Siz.ZoneHVACTerminalUnitVariableRefrigerantFlow.rb + rb + resource + 8A8CE353 + Siz.ZoneHVACUnitHeater.rb rb @@ -1125,298 +1394,22 @@ 63CCD3D9 - Siz.AirLoopHVAC.rb - rb - resource - 14F8D189 - - - Siz.AirTerminalDualDuctVAV.rb - rb - resource - 4B6819DC - - - Siz.AirTerminalSingleDuctConstantVolumeCooledBeam.rb - rb - resource - F96D6214 - - - Siz.AirTerminalSingleDuctUncontrolled.rb - rb - resource - C7FD335A - - - Siz.AirTerminalSingleDuctVAVHeatAndCoolNoReheat.rb - rb - resource - B5BAC065 - - - Siz.AirTerminalSingleDuctVAVNoReheat.rb - rb - resource - A1793E80 - - - Siz.ChillerAbsorption.rb - rb - resource - 8D07361A - - - Siz.ChillerAbsorptionIndirect.rb - rb - resource - BD8F5F27 - - - Siz.CoilCoolingDXMultiSpeed.rb - rb - resource - E263E487 - - - Siz.CoilCoolingDXTwoStageWithHumidityControlMode.rb - rb - resource - C7886FF0 - - - Siz.CoilCoolingDXVariableRefrigerantFlow.rb - rb - resource - 37D275EB - - - Siz.CoilCoolingDXVariableSpeed.rb - rb - resource - AC0227FF - - - Siz.CoilCoolingLowTempRadiantVarFlow.rb - rb - resource - 5713AC88 - - - Siz.CoilCoolingWater.rb - rb - resource - F059E05B - - - Siz.CoilCoolingWaterToAirHeatPumpEquationFit.rb - rb - resource - 29C27996 - - - Siz.CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit.rb - rb - resource - 5A11AD77 - - - Siz.CoilHeatingDXMultiSpeed.rb - rb - resource - 1AF45942 - - - Siz.CoilHeatingDXVariableRefrigerantFlow.rb - rb - resource - FEF55D21 - - - Siz.CoilHeatingDXVariableSpeed.rb - rb - resource - 2F4D3805 - - - Siz.CoilHeatingGasMultiStage.rb - rb - resource - E0A44A0E - - - Siz.CoilHeatingWater.rb - rb - resource - 960C3ADB - - - Siz.CoilHeatingWaterBaseboard.rb - rb - resource - A494F9CC - - - Siz.CoilHeatingWaterBaseboardRadiant.rb - rb - resource - 973E7BF4 - - - Siz.CoilHeatingWaterToAirHeatPumpEquationFit.rb - rb - resource - 20C873F5 - - - Siz.CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit.rb - rb - resource - CE0D3D54 - - - Siz.ControllerOutdoorAir.rb - rb - resource - A4B81965 - - - Siz.CoolingTowerSingleSpeed.rb - rb - resource - B5E60361 - - - Siz.CoolingTowerTwoSpeed.rb - rb - resource - C8EE081E - - - Siz.CoolingTowerVariableSpeed.rb - rb - resource - 8009D2D7 - - - Siz.DistrictCooling.rb - rb - resource - A0A45BB2 - - - Siz.DistrictHeating.rb - rb - resource - E4BB69AB - - - Siz.EvaporativeFluidCoolerSingleSpeed.rb - rb - resource - 7964E64F - - - Siz.EvaporativeFluidCoolerTwoSpeed.rb - rb - resource - 052C7012 - - - Siz.FluidCoolerSingleSpeed.rb - rb - resource - 29E594D2 - - - Siz.FluidCoolerTwoSpeed.rb - rb - resource - 087B28CA - - - Siz.HeatExchangerFluidToFluid.rb - rb - resource - 79A206AA - - - Siz.HeatPumpWaterToWaterEquationFitCooling.rb - rb - resource - F15CDDD5 - - - Siz.HeatPumpWaterToWaterEquationFitHeating.rb - rb - resource - 07DDB5E6 - - - Siz.ModelObject.rb - rb - resource - A7D06578 - - - Siz.PlantComponentTemperatureSource.rb - rb - resource - 60776604 - - - Siz.PlantLoop.rb - rb - resource - C464E1E0 - - - Siz.SizingSystem.rb - rb - resource - 1B86DEA6 - - - Siz.SolarCollectorFlatPlatePhotovoltaicThermal.rb - rb - resource - 4C7BF968 - - - Siz.ZoneHVACTerminalUnitVariableRefrigerantFlow.rb - rb - resource - 8A8CE353 - - - Siz.HumidifierSteamElectric.rb - rb - resource - 3F1A8DFF - - - Siz.HVACComponent.rb - rb - resource - C1FB6BC6 - - - Siz.Model.rb + os_lib_helper_methods.rb rb resource - E453C1B0 + 07B01D67 - Siz.ChillerElectricEIR.rb + os_lib_reporting.rb rb resource - A6354925 + B0914832 - Siz.ChillerHeaterPerformanceElectricEIR.rb + os_lib_schedules.rb rb resource - 42F8AE58 + B38668F5 report.html.erb @@ -1424,64 +1417,5 @@ resource 0169F9F8 - - os_lib_schedules.rb - rb - resource - C82D00CC - - - PeriodInConstName.osm - osm - test - E41FBCFF - - - add_tariff.osw - osw - test - BF680A60 - - - os_results.osw - osw - test - 8BE06CC3 - - - ExampleModel.osm - osm - test - 42C65747 - - - - OpenStudio - 3.1.0 - 3.1.0 - - measure.rb - rb - script - CD87DF6C - - - OpenStudioResults_Test.rb - rb - test - B7FB7EB7 - - - os_lib_reporting.rb - rb - resource - 4A5657AB - - - README.md - md - readme - 42709140 - diff --git a/spec/files/repeated_measure_osw/measures/IncreaseRoofRValue/measure.xml b/spec/files/repeated_measure_osw/measures/IncreaseRoofRValue/measure.xml index 50ac6bf..ae4a352 100644 --- a/spec/files/repeated_measure_osw/measures/IncreaseRoofRValue/measure.xml +++ b/spec/files/repeated_measure_osw/measures/IncreaseRoofRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_roofs_by_percentage 807d3ebf-c89b-4b93-b400-110ca060b2bb - 37c64835-408c-4ed9-9966-12667f2de25d - 20160426T215418Z - 350B6836 + 976a312b-9e15-419b-a6f7-937fbb7d8797 + 2024-04-19T12:12:53Z + EB1A0C08 IncreaseInsulationRValueForRoofsByPercentage Increase R-value of Insulation for Roofs by a Specified Percentage. Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/repeated_measure_osw/measures/IncreaseWallRValue/measure.xml b/spec/files/repeated_measure_osw/measures/IncreaseWallRValue/measure.xml index d3a1a6f..f3e5610 100644 --- a/spec/files/repeated_measure_osw/measures/IncreaseWallRValue/measure.xml +++ b/spec/files/repeated_measure_osw/measures/IncreaseWallRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_exterior_walls_by_percentage 7508c563-22bd-49f4-b646-aac69b02a82d - 0abb166f-7a57-4ce2-87b4-39bf0c682522 - 20160426T215418Z - 350B6836 + b6b3dfb1-a10f-48bb-8d86-ac2e71ad542c + 2024-04-19T12:12:54Z + EB1A0C08 IncreaseInsulationRValueForExteriorWallsByPercentage Increase R-value of Insulation for Exterior Walls By a Specified Percentage Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/repeated_measure_osw/measures/SetEplusInfiltration/measure.xml b/spec/files/repeated_measure_osw/measures/SetEplusInfiltration/measure.xml index 17669c7..c2d2bc6 100644 --- a/spec/files/repeated_measure_osw/measures/SetEplusInfiltration/measure.xml +++ b/spec/files/repeated_measure_osw/measures/SetEplusInfiltration/measure.xml @@ -1,10 +1,11 @@ + - 3.0 - set_energy_plus_infiltration_flow_rate_per_floor_area + 3.1 + set_energyplus_infiltration_flow_rate_per_floor_area 490a2af3-7b64-4915-bf9e-9a3a7b525a17 - 06858048-5304-40a3-90ed-db5beef2cf1e - 20160426T215418Z - C75AF51E + 6bf08527-2290-47a4-a88a-eba3404adc6b + 2024-04-19T12:12:54Z + 2AC0F979 SetEnergyPlusInfiltrationFlowRatePerFloorArea SetEnergyPlusInfiltrationFlowRatePerFloorArea Set the flow rate per floor area value for all infiltration objects in the model. Input values are in SI units. @@ -18,8 +19,8 @@ false - - + + Envelope.Infiltration diff --git a/spec/files/reporting_measure_error/measures/Rotate Building Relative to Current Orientation/measure.xml b/spec/files/reporting_measure_error/measures/Rotate Building Relative to Current Orientation/measure.xml index e2040da..7a12c05 100644 --- a/spec/files/reporting_measure_error/measures/Rotate Building Relative to Current Orientation/measure.xml +++ b/spec/files/reporting_measure_error/measures/Rotate Building Relative to Current Orientation/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 rotate_building a5be6c96-4ecc-47fa-8d32-f4216ebc2e7d - 212f9705-e0e3-43d4-b5eb-f17e56dd3af8 - 20161103T203727Z - E8A47F56 + a058f6f7-3754-4464-a6ef-386b0469ff6e + 2024-04-19T12:12:37Z + 49BEF039 RotateBuilding Rotate Building Rotate your building relative to its current orientation. This will not rotate site shading objects. @@ -19,8 +20,8 @@ 90 - - + + Envelope.Form @@ -58,17 +59,5 @@ script C0BBCFAD - - RotateBuilding_Test.rb - rb - test - 01BFBBC7 - - - RotateBuilding_TestModel_01.osm - osm - test - 550314F1 - diff --git a/spec/files/reporting_measure_error/measures/Xcel EDA Reporting and QAQC/measure.xml b/spec/files/reporting_measure_error/measures/Xcel EDA Reporting and QAQC/measure.xml index 3b879ae..d141422 100644 --- a/spec/files/reporting_measure_error/measures/Xcel EDA Reporting and QAQC/measure.xml +++ b/spec/files/reporting_measure_error/measures/Xcel EDA Reporting and QAQC/measure.xml @@ -1,17 +1,18 @@ + - 3.0 + 3.1 xcel_eda_reportingand_qaqc 92bee759-86ae-4617-92e2-f8e5aa9dc684 - 76c99d64-a74e-4bda-bce1-e2c98a0be8e9 - 20161121T171159Z - 9F9D8C87 + 5cc749f6-d57d-4f3f-80e3-3f0695c9b531 + 2024-04-19T12:12:36Z + 2C8A3EEF XcelEDAReportingandQAQC XcelEDAReportingandQAQC This measure extracts key simulation results and performs basic model QAQC checks necessary for the Xcel EDA Program. Reads the model and sql file to pull out the necessary information and run the model checks. The check results show up as Warning messages in the measure's output on the PAT run tab. - - - + + + Reporting.QAQC @@ -37,7 +38,7 @@ measure.rb rb script - 78A571C7 + CA3104D6 CreateResults.rb @@ -46,22 +47,10 @@ 65271996 - 0116_OfficeTest121_dev.osm - osm - test - 63E36762 - - - report.xml - xml - test - 87365E0C - - - XcelEDAReportingandQAQC_Test.rb + EUI.rb rb - test - 2B3F8653 + resource + 738BFA1A EndUseBreakdown.rb @@ -69,12 +58,6 @@ resource D9316A58 - - EUI.rb - rb - resource - 738BFA1A - FuelSwap.rb rb diff --git a/spec/files/reporting_measure_error/measures/openstudio_results/measure.xml b/spec/files/reporting_measure_error/measures/openstudio_results/measure.xml index ea3ec4f..07714f0 100644 --- a/spec/files/reporting_measure_error/measures/openstudio_results/measure.xml +++ b/spec/files/reporting_measure_error/measures/openstudio_results/measure.xml @@ -1,10 +1,10 @@ - 3.0 + 3.1 openstudio_results a25386cd-60e4-46bc-8b11-c755f379d916 - f0fd2916-1c52-4c78-bf00-25b7c5e5ca3a - 20201001T065500Z + 58754f37-d579-4762-bd53-2270ae5df9c6 + 2024-04-19T12:12:38Z 557BF06F OpenStudioResults OpenStudio Results @@ -597,40 +597,16 @@ - USA_CO_Golden-NREL.724666_TMY3.epw - epw - test - BDF687C1 - - - EmptyModel.osm - osm - test - A597C804 - - - NoRunPeriod.osm - osm - test - 32622D37 - - - 1004_SmallHotel_a.osm - osm - test - C62949E8 - - - HeatingOnly.osm - osm - test - 99A21A4F + LICENSE.md + md + license + E0468DD6 - EdgeCaseModel.osm - osm - test - 4EEA709C + README.md + md + readme + 42709140 README.md.erb @@ -639,22 +615,27 @@ 4F81E2EA - LICENSE.md - md - license - E0468DD6 + + OpenStudio + 3.1.0 + 3.1.0 + + measure.rb + rb + script + 69737594 - os_lib_helper_methods.rb + Siz.AirConditionerVariableRefrigerantFlow.rb rb resource - 07B01D67 + CE884E2A - Siz.AirConditionerVariableRefrigerantFlow.rb + Siz.AirLoopHVAC.rb rb resource - CE884E2A + 14F8D189 Siz.AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass.rb @@ -680,6 +661,18 @@ resource A759860C + + Siz.AirTerminalDualDuctVAV.rb + rb + resource + 4B6819DC + + + Siz.AirTerminalSingleDuctConstantVolumeCooledBeam.rb + rb + resource + F96D6214 + Siz.AirTerminalSingleDuctConstantVolumeFourPipeInduction.rb rb @@ -704,12 +697,30 @@ resource 93F274F9 + + Siz.AirTerminalSingleDuctUncontrolled.rb + rb + resource + C7FD335A + + + Siz.AirTerminalSingleDuctVAVHeatAndCoolNoReheat.rb + rb + resource + B5BAC065 + Siz.AirTerminalSingleDuctVAVHeatAndCoolReheat.rb rb resource 0FBA2523 + + Siz.AirTerminalSingleDuctVAVNoReheat.rb + rb + resource + A1793E80 + Siz.AirTerminalSingleDuctVAVReheat.rb rb @@ -728,6 +739,36 @@ resource F56325B1 + + Siz.ChillerAbsorption.rb + rb + resource + 8D07361A + + + Siz.ChillerAbsorptionIndirect.rb + rb + resource + BD8F5F27 + + + Siz.ChillerElectricEIR.rb + rb + resource + A6354925 + + + Siz.ChillerHeaterPerformanceElectricEIR.rb + rb + resource + 42F8AE58 + + + Siz.CoilCoolingDXMultiSpeed.rb + rb + resource + E263E487 + Siz.CoilCoolingDXMultiSpeedStageData.rb rb @@ -746,12 +787,54 @@ resource 6709B0F6 + + Siz.CoilCoolingDXTwoStageWithHumidityControlMode.rb + rb + resource + C7886FF0 + + + Siz.CoilCoolingDXVariableRefrigerantFlow.rb + rb + resource + 37D275EB + + + Siz.CoilCoolingDXVariableSpeed.rb + rb + resource + AC0227FF + Siz.CoilCoolingDXVariableSpeedSpeedData.rb rb resource 7F46BB99 + + Siz.CoilCoolingLowTempRadiantVarFlow.rb + rb + resource + 5713AC88 + + + Siz.CoilCoolingWater.rb + rb + resource + F059E05B + + + Siz.CoilCoolingWaterToAirHeatPumpEquationFit.rb + rb + resource + 29C27996 + + + Siz.CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit.rb + rb + resource + 5A11AD77 + Siz.CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData.rb rb @@ -759,10 +842,10 @@ 1E8B4778 - Siz.CoilHeatingDesuperheater.rb + Siz.CoilHeatingDXMultiSpeed.rb rb resource - B004FD9D + 1AF45942 Siz.CoilHeatingDXMultiSpeedStageData.rb @@ -776,12 +859,30 @@ resource 3533D682 + + Siz.CoilHeatingDXVariableRefrigerantFlow.rb + rb + resource + FEF55D21 + + + Siz.CoilHeatingDXVariableSpeed.rb + rb + resource + 2F4D3805 + Siz.CoilHeatingDXVariableSpeedSpeedData.rb rb resource 79C62118 + + Siz.CoilHeatingDesuperheater.rb + rb + resource + B004FD9D + Siz.CoilHeatingElectric.rb rb @@ -794,6 +895,12 @@ resource 921B9368 + + Siz.CoilHeatingGasMultiStage.rb + rb + resource + E0A44A0E + Siz.CoilHeatingGasMultiStageStageData.rb rb @@ -806,6 +913,36 @@ resource D893C2CD + + Siz.CoilHeatingWater.rb + rb + resource + 960C3ADB + + + Siz.CoilHeatingWaterBaseboard.rb + rb + resource + A494F9CC + + + Siz.CoilHeatingWaterBaseboardRadiant.rb + rb + resource + 973E7BF4 + + + Siz.CoilHeatingWaterToAirHeatPumpEquationFit.rb + rb + resource + 20C873F5 + + + Siz.CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit.rb + rb + resource + CE0D3D54 + Siz.CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData.rb rb @@ -848,6 +985,42 @@ resource 754A681B + + Siz.ControllerOutdoorAir.rb + rb + resource + A4B81965 + + + Siz.CoolingTowerSingleSpeed.rb + rb + resource + B5E60361 + + + Siz.CoolingTowerTwoSpeed.rb + rb + resource + C8EE081E + + + Siz.CoolingTowerVariableSpeed.rb + rb + resource + 8009D2D7 + + + Siz.DistrictCooling.rb + rb + resource + A0A45BB2 + + + Siz.DistrictHeating.rb + rb + resource + E4BB69AB + Siz.ElectricLoadCenterInverterLookUpTable.rb rb @@ -884,6 +1057,18 @@ resource D9A064E7 + + Siz.EvaporativeFluidCoolerSingleSpeed.rb + rb + resource + 7964E64F + + + Siz.EvaporativeFluidCoolerTwoSpeed.rb + rb + resource + 052C7012 + Siz.FanConstantVolume.rb rb @@ -908,6 +1093,18 @@ resource F4C86E63 + + Siz.FluidCoolerSingleSpeed.rb + rb + resource + 29E594D2 + + + Siz.FluidCoolerTwoSpeed.rb + rb + resource + 087B28CA + Siz.GeneratorFuelCellElectricalStorage.rb rb @@ -938,6 +1135,12 @@ resource C6CDF7F3 + + Siz.HVACComponent.rb + rb + resource + C1FB6BC6 + Siz.HeaderedPumpsConstantSpeed.rb rb @@ -956,12 +1159,60 @@ resource 61C05436 + + Siz.HeatExchangerFluidToFluid.rb + rb + resource + 79A206AA + + + Siz.HeatPumpWaterToWaterEquationFitCooling.rb + rb + resource + F15CDDD5 + + + Siz.HeatPumpWaterToWaterEquationFitHeating.rb + rb + resource + 07DDB5E6 + + + Siz.HumidifierSteamElectric.rb + rb + resource + 3F1A8DFF + + + Siz.Model.rb + rb + resource + E453C1B0 + + + Siz.ModelObject.rb + rb + resource + A7D06578 + Siz.PhotovoltaicPerformanceSimple.rb rb resource 84ED6027 + + Siz.PlantComponentTemperatureSource.rb + rb + resource + 60776604 + + + Siz.PlantLoop.rb + rb + resource + C464E1E0 + Siz.PumpConstantSpeed.rb rb @@ -992,6 +1243,18 @@ resource FACF342B + + Siz.SizingSystem.rb + rb + resource + 1B86DEA6 + + + Siz.SolarCollectorFlatPlatePhotovoltaicThermal.rb + rb + resource + 4C7BF968 + Siz.SolarCollectorPerformancePhotovoltaicThermalSimple.rb rb @@ -1100,6 +1363,12 @@ resource E477D566 + + Siz.ZoneHVACTerminalUnitVariableRefrigerantFlow.rb + rb + resource + 8A8CE353 + Siz.ZoneHVACUnitHeater.rb rb @@ -1125,298 +1394,22 @@ 63CCD3D9 - Siz.AirLoopHVAC.rb - rb - resource - 14F8D189 - - - Siz.AirTerminalDualDuctVAV.rb - rb - resource - 4B6819DC - - - Siz.AirTerminalSingleDuctConstantVolumeCooledBeam.rb - rb - resource - F96D6214 - - - Siz.AirTerminalSingleDuctUncontrolled.rb - rb - resource - C7FD335A - - - Siz.AirTerminalSingleDuctVAVHeatAndCoolNoReheat.rb - rb - resource - B5BAC065 - - - Siz.AirTerminalSingleDuctVAVNoReheat.rb - rb - resource - A1793E80 - - - Siz.ChillerAbsorption.rb - rb - resource - 8D07361A - - - Siz.ChillerAbsorptionIndirect.rb - rb - resource - BD8F5F27 - - - Siz.CoilCoolingDXMultiSpeed.rb - rb - resource - E263E487 - - - Siz.CoilCoolingDXTwoStageWithHumidityControlMode.rb - rb - resource - C7886FF0 - - - Siz.CoilCoolingDXVariableRefrigerantFlow.rb - rb - resource - 37D275EB - - - Siz.CoilCoolingDXVariableSpeed.rb - rb - resource - AC0227FF - - - Siz.CoilCoolingLowTempRadiantVarFlow.rb - rb - resource - 5713AC88 - - - Siz.CoilCoolingWater.rb - rb - resource - F059E05B - - - Siz.CoilCoolingWaterToAirHeatPumpEquationFit.rb - rb - resource - 29C27996 - - - Siz.CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit.rb - rb - resource - 5A11AD77 - - - Siz.CoilHeatingDXMultiSpeed.rb - rb - resource - 1AF45942 - - - Siz.CoilHeatingDXVariableRefrigerantFlow.rb - rb - resource - FEF55D21 - - - Siz.CoilHeatingDXVariableSpeed.rb - rb - resource - 2F4D3805 - - - Siz.CoilHeatingGasMultiStage.rb - rb - resource - E0A44A0E - - - Siz.CoilHeatingWater.rb - rb - resource - 960C3ADB - - - Siz.CoilHeatingWaterBaseboard.rb - rb - resource - A494F9CC - - - Siz.CoilHeatingWaterBaseboardRadiant.rb - rb - resource - 973E7BF4 - - - Siz.CoilHeatingWaterToAirHeatPumpEquationFit.rb - rb - resource - 20C873F5 - - - Siz.CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit.rb - rb - resource - CE0D3D54 - - - Siz.ControllerOutdoorAir.rb - rb - resource - A4B81965 - - - Siz.CoolingTowerSingleSpeed.rb - rb - resource - B5E60361 - - - Siz.CoolingTowerTwoSpeed.rb - rb - resource - C8EE081E - - - Siz.CoolingTowerVariableSpeed.rb - rb - resource - 8009D2D7 - - - Siz.DistrictCooling.rb - rb - resource - A0A45BB2 - - - Siz.DistrictHeating.rb - rb - resource - E4BB69AB - - - Siz.EvaporativeFluidCoolerSingleSpeed.rb - rb - resource - 7964E64F - - - Siz.EvaporativeFluidCoolerTwoSpeed.rb - rb - resource - 052C7012 - - - Siz.FluidCoolerSingleSpeed.rb - rb - resource - 29E594D2 - - - Siz.FluidCoolerTwoSpeed.rb - rb - resource - 087B28CA - - - Siz.HeatExchangerFluidToFluid.rb - rb - resource - 79A206AA - - - Siz.HeatPumpWaterToWaterEquationFitCooling.rb - rb - resource - F15CDDD5 - - - Siz.HeatPumpWaterToWaterEquationFitHeating.rb - rb - resource - 07DDB5E6 - - - Siz.ModelObject.rb - rb - resource - A7D06578 - - - Siz.PlantComponentTemperatureSource.rb - rb - resource - 60776604 - - - Siz.PlantLoop.rb - rb - resource - C464E1E0 - - - Siz.SizingSystem.rb - rb - resource - 1B86DEA6 - - - Siz.SolarCollectorFlatPlatePhotovoltaicThermal.rb - rb - resource - 4C7BF968 - - - Siz.ZoneHVACTerminalUnitVariableRefrigerantFlow.rb - rb - resource - 8A8CE353 - - - Siz.HumidifierSteamElectric.rb - rb - resource - 3F1A8DFF - - - Siz.HVACComponent.rb - rb - resource - C1FB6BC6 - - - Siz.Model.rb + os_lib_helper_methods.rb rb resource - E453C1B0 + 07B01D67 - Siz.ChillerElectricEIR.rb + os_lib_reporting.rb rb resource - A6354925 + B0914832 - Siz.ChillerHeaterPerformanceElectricEIR.rb + os_lib_schedules.rb rb resource - 42F8AE58 + B38668F5 report.html.erb @@ -1424,64 +1417,5 @@ resource 0169F9F8 - - os_lib_schedules.rb - rb - resource - C82D00CC - - - PeriodInConstName.osm - osm - test - E41FBCFF - - - add_tariff.osw - osw - test - BF680A60 - - - os_results.osw - osw - test - 8BE06CC3 - - - ExampleModel.osm - osm - test - 42C65747 - - - - OpenStudio - 3.1.0 - 3.1.0 - - measure.rb - rb - script - CD87DF6C - - - OpenStudioResults_Test.rb - rb - test - B7FB7EB7 - - - os_lib_reporting.rb - rb - resource - 4A5657AB - - - README.md - md - readme - 42709140 - diff --git a/spec/files/reporting_measure_raise/measures/openstudio_results/measure.xml b/spec/files/reporting_measure_raise/measures/openstudio_results/measure.xml index ea3ec4f..46ddd0b 100644 --- a/spec/files/reporting_measure_raise/measures/openstudio_results/measure.xml +++ b/spec/files/reporting_measure_raise/measures/openstudio_results/measure.xml @@ -1,10 +1,10 @@ - 3.0 + 3.1 openstudio_results a25386cd-60e4-46bc-8b11-c755f379d916 - f0fd2916-1c52-4c78-bf00-25b7c5e5ca3a - 20201001T065500Z + d33afd15-dbc9-41d1-adcd-c2fdc68a4d91 + 2024-04-19T12:13:05Z 557BF06F OpenStudioResults OpenStudio Results @@ -597,40 +597,16 @@ - USA_CO_Golden-NREL.724666_TMY3.epw - epw - test - BDF687C1 - - - EmptyModel.osm - osm - test - A597C804 - - - NoRunPeriod.osm - osm - test - 32622D37 - - - 1004_SmallHotel_a.osm - osm - test - C62949E8 - - - HeatingOnly.osm - osm - test - 99A21A4F + LICENSE.md + md + license + E0468DD6 - EdgeCaseModel.osm - osm - test - 4EEA709C + README.md + md + readme + 42709140 README.md.erb @@ -639,22 +615,27 @@ 4F81E2EA - LICENSE.md - md - license - E0468DD6 + + OpenStudio + 3.1.0 + 3.1.0 + + measure.rb + rb + script + 69737594 - os_lib_helper_methods.rb + Siz.AirConditionerVariableRefrigerantFlow.rb rb resource - 07B01D67 + CE884E2A - Siz.AirConditionerVariableRefrigerantFlow.rb + Siz.AirLoopHVAC.rb rb resource - CE884E2A + 14F8D189 Siz.AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass.rb @@ -680,6 +661,18 @@ resource A759860C + + Siz.AirTerminalDualDuctVAV.rb + rb + resource + 4B6819DC + + + Siz.AirTerminalSingleDuctConstantVolumeCooledBeam.rb + rb + resource + F96D6214 + Siz.AirTerminalSingleDuctConstantVolumeFourPipeInduction.rb rb @@ -704,12 +697,30 @@ resource 93F274F9 + + Siz.AirTerminalSingleDuctUncontrolled.rb + rb + resource + C7FD335A + + + Siz.AirTerminalSingleDuctVAVHeatAndCoolNoReheat.rb + rb + resource + B5BAC065 + Siz.AirTerminalSingleDuctVAVHeatAndCoolReheat.rb rb resource 0FBA2523 + + Siz.AirTerminalSingleDuctVAVNoReheat.rb + rb + resource + A1793E80 + Siz.AirTerminalSingleDuctVAVReheat.rb rb @@ -728,6 +739,36 @@ resource F56325B1 + + Siz.ChillerAbsorption.rb + rb + resource + 8D07361A + + + Siz.ChillerAbsorptionIndirect.rb + rb + resource + BD8F5F27 + + + Siz.ChillerElectricEIR.rb + rb + resource + A6354925 + + + Siz.ChillerHeaterPerformanceElectricEIR.rb + rb + resource + 42F8AE58 + + + Siz.CoilCoolingDXMultiSpeed.rb + rb + resource + E263E487 + Siz.CoilCoolingDXMultiSpeedStageData.rb rb @@ -746,12 +787,54 @@ resource 6709B0F6 + + Siz.CoilCoolingDXTwoStageWithHumidityControlMode.rb + rb + resource + C7886FF0 + + + Siz.CoilCoolingDXVariableRefrigerantFlow.rb + rb + resource + 37D275EB + + + Siz.CoilCoolingDXVariableSpeed.rb + rb + resource + AC0227FF + Siz.CoilCoolingDXVariableSpeedSpeedData.rb rb resource 7F46BB99 + + Siz.CoilCoolingLowTempRadiantVarFlow.rb + rb + resource + 5713AC88 + + + Siz.CoilCoolingWater.rb + rb + resource + F059E05B + + + Siz.CoilCoolingWaterToAirHeatPumpEquationFit.rb + rb + resource + 29C27996 + + + Siz.CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit.rb + rb + resource + 5A11AD77 + Siz.CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData.rb rb @@ -759,10 +842,10 @@ 1E8B4778 - Siz.CoilHeatingDesuperheater.rb + Siz.CoilHeatingDXMultiSpeed.rb rb resource - B004FD9D + 1AF45942 Siz.CoilHeatingDXMultiSpeedStageData.rb @@ -776,12 +859,30 @@ resource 3533D682 + + Siz.CoilHeatingDXVariableRefrigerantFlow.rb + rb + resource + FEF55D21 + + + Siz.CoilHeatingDXVariableSpeed.rb + rb + resource + 2F4D3805 + Siz.CoilHeatingDXVariableSpeedSpeedData.rb rb resource 79C62118 + + Siz.CoilHeatingDesuperheater.rb + rb + resource + B004FD9D + Siz.CoilHeatingElectric.rb rb @@ -794,6 +895,12 @@ resource 921B9368 + + Siz.CoilHeatingGasMultiStage.rb + rb + resource + E0A44A0E + Siz.CoilHeatingGasMultiStageStageData.rb rb @@ -806,6 +913,36 @@ resource D893C2CD + + Siz.CoilHeatingWater.rb + rb + resource + 960C3ADB + + + Siz.CoilHeatingWaterBaseboard.rb + rb + resource + A494F9CC + + + Siz.CoilHeatingWaterBaseboardRadiant.rb + rb + resource + 973E7BF4 + + + Siz.CoilHeatingWaterToAirHeatPumpEquationFit.rb + rb + resource + 20C873F5 + + + Siz.CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit.rb + rb + resource + CE0D3D54 + Siz.CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData.rb rb @@ -848,6 +985,42 @@ resource 754A681B + + Siz.ControllerOutdoorAir.rb + rb + resource + A4B81965 + + + Siz.CoolingTowerSingleSpeed.rb + rb + resource + B5E60361 + + + Siz.CoolingTowerTwoSpeed.rb + rb + resource + C8EE081E + + + Siz.CoolingTowerVariableSpeed.rb + rb + resource + 8009D2D7 + + + Siz.DistrictCooling.rb + rb + resource + A0A45BB2 + + + Siz.DistrictHeating.rb + rb + resource + E4BB69AB + Siz.ElectricLoadCenterInverterLookUpTable.rb rb @@ -884,6 +1057,18 @@ resource D9A064E7 + + Siz.EvaporativeFluidCoolerSingleSpeed.rb + rb + resource + 7964E64F + + + Siz.EvaporativeFluidCoolerTwoSpeed.rb + rb + resource + 052C7012 + Siz.FanConstantVolume.rb rb @@ -908,6 +1093,18 @@ resource F4C86E63 + + Siz.FluidCoolerSingleSpeed.rb + rb + resource + 29E594D2 + + + Siz.FluidCoolerTwoSpeed.rb + rb + resource + 087B28CA + Siz.GeneratorFuelCellElectricalStorage.rb rb @@ -938,6 +1135,12 @@ resource C6CDF7F3 + + Siz.HVACComponent.rb + rb + resource + C1FB6BC6 + Siz.HeaderedPumpsConstantSpeed.rb rb @@ -956,12 +1159,60 @@ resource 61C05436 + + Siz.HeatExchangerFluidToFluid.rb + rb + resource + 79A206AA + + + Siz.HeatPumpWaterToWaterEquationFitCooling.rb + rb + resource + F15CDDD5 + + + Siz.HeatPumpWaterToWaterEquationFitHeating.rb + rb + resource + 07DDB5E6 + + + Siz.HumidifierSteamElectric.rb + rb + resource + 3F1A8DFF + + + Siz.Model.rb + rb + resource + E453C1B0 + + + Siz.ModelObject.rb + rb + resource + A7D06578 + Siz.PhotovoltaicPerformanceSimple.rb rb resource 84ED6027 + + Siz.PlantComponentTemperatureSource.rb + rb + resource + 60776604 + + + Siz.PlantLoop.rb + rb + resource + C464E1E0 + Siz.PumpConstantSpeed.rb rb @@ -992,6 +1243,18 @@ resource FACF342B + + Siz.SizingSystem.rb + rb + resource + 1B86DEA6 + + + Siz.SolarCollectorFlatPlatePhotovoltaicThermal.rb + rb + resource + 4C7BF968 + Siz.SolarCollectorPerformancePhotovoltaicThermalSimple.rb rb @@ -1100,6 +1363,12 @@ resource E477D566 + + Siz.ZoneHVACTerminalUnitVariableRefrigerantFlow.rb + rb + resource + 8A8CE353 + Siz.ZoneHVACUnitHeater.rb rb @@ -1125,298 +1394,22 @@ 63CCD3D9 - Siz.AirLoopHVAC.rb - rb - resource - 14F8D189 - - - Siz.AirTerminalDualDuctVAV.rb - rb - resource - 4B6819DC - - - Siz.AirTerminalSingleDuctConstantVolumeCooledBeam.rb - rb - resource - F96D6214 - - - Siz.AirTerminalSingleDuctUncontrolled.rb - rb - resource - C7FD335A - - - Siz.AirTerminalSingleDuctVAVHeatAndCoolNoReheat.rb - rb - resource - B5BAC065 - - - Siz.AirTerminalSingleDuctVAVNoReheat.rb - rb - resource - A1793E80 - - - Siz.ChillerAbsorption.rb - rb - resource - 8D07361A - - - Siz.ChillerAbsorptionIndirect.rb - rb - resource - BD8F5F27 - - - Siz.CoilCoolingDXMultiSpeed.rb - rb - resource - E263E487 - - - Siz.CoilCoolingDXTwoStageWithHumidityControlMode.rb - rb - resource - C7886FF0 - - - Siz.CoilCoolingDXVariableRefrigerantFlow.rb - rb - resource - 37D275EB - - - Siz.CoilCoolingDXVariableSpeed.rb - rb - resource - AC0227FF - - - Siz.CoilCoolingLowTempRadiantVarFlow.rb - rb - resource - 5713AC88 - - - Siz.CoilCoolingWater.rb - rb - resource - F059E05B - - - Siz.CoilCoolingWaterToAirHeatPumpEquationFit.rb - rb - resource - 29C27996 - - - Siz.CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit.rb - rb - resource - 5A11AD77 - - - Siz.CoilHeatingDXMultiSpeed.rb - rb - resource - 1AF45942 - - - Siz.CoilHeatingDXVariableRefrigerantFlow.rb - rb - resource - FEF55D21 - - - Siz.CoilHeatingDXVariableSpeed.rb - rb - resource - 2F4D3805 - - - Siz.CoilHeatingGasMultiStage.rb - rb - resource - E0A44A0E - - - Siz.CoilHeatingWater.rb - rb - resource - 960C3ADB - - - Siz.CoilHeatingWaterBaseboard.rb - rb - resource - A494F9CC - - - Siz.CoilHeatingWaterBaseboardRadiant.rb - rb - resource - 973E7BF4 - - - Siz.CoilHeatingWaterToAirHeatPumpEquationFit.rb - rb - resource - 20C873F5 - - - Siz.CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit.rb - rb - resource - CE0D3D54 - - - Siz.ControllerOutdoorAir.rb - rb - resource - A4B81965 - - - Siz.CoolingTowerSingleSpeed.rb - rb - resource - B5E60361 - - - Siz.CoolingTowerTwoSpeed.rb - rb - resource - C8EE081E - - - Siz.CoolingTowerVariableSpeed.rb - rb - resource - 8009D2D7 - - - Siz.DistrictCooling.rb - rb - resource - A0A45BB2 - - - Siz.DistrictHeating.rb - rb - resource - E4BB69AB - - - Siz.EvaporativeFluidCoolerSingleSpeed.rb - rb - resource - 7964E64F - - - Siz.EvaporativeFluidCoolerTwoSpeed.rb - rb - resource - 052C7012 - - - Siz.FluidCoolerSingleSpeed.rb - rb - resource - 29E594D2 - - - Siz.FluidCoolerTwoSpeed.rb - rb - resource - 087B28CA - - - Siz.HeatExchangerFluidToFluid.rb - rb - resource - 79A206AA - - - Siz.HeatPumpWaterToWaterEquationFitCooling.rb - rb - resource - F15CDDD5 - - - Siz.HeatPumpWaterToWaterEquationFitHeating.rb - rb - resource - 07DDB5E6 - - - Siz.ModelObject.rb - rb - resource - A7D06578 - - - Siz.PlantComponentTemperatureSource.rb - rb - resource - 60776604 - - - Siz.PlantLoop.rb - rb - resource - C464E1E0 - - - Siz.SizingSystem.rb - rb - resource - 1B86DEA6 - - - Siz.SolarCollectorFlatPlatePhotovoltaicThermal.rb - rb - resource - 4C7BF968 - - - Siz.ZoneHVACTerminalUnitVariableRefrigerantFlow.rb - rb - resource - 8A8CE353 - - - Siz.HumidifierSteamElectric.rb - rb - resource - 3F1A8DFF - - - Siz.HVACComponent.rb - rb - resource - C1FB6BC6 - - - Siz.Model.rb + os_lib_helper_methods.rb rb resource - E453C1B0 + 07B01D67 - Siz.ChillerElectricEIR.rb + os_lib_reporting.rb rb resource - A6354925 + B0914832 - Siz.ChillerHeaterPerformanceElectricEIR.rb + os_lib_schedules.rb rb resource - 42F8AE58 + B38668F5 report.html.erb @@ -1424,64 +1417,5 @@ resource 0169F9F8 - - os_lib_schedules.rb - rb - resource - C82D00CC - - - PeriodInConstName.osm - osm - test - E41FBCFF - - - add_tariff.osw - osw - test - BF680A60 - - - os_results.osw - osw - test - 8BE06CC3 - - - ExampleModel.osm - osm - test - 42C65747 - - - - OpenStudio - 3.1.0 - 3.1.0 - - measure.rb - rb - script - CD87DF6C - - - OpenStudioResults_Test.rb - rb - test - B7FB7EB7 - - - os_lib_reporting.rb - rb - resource - 4A5657AB - - - README.md - md - readme - 42709140 - diff --git a/spec/files/reporting_measure_raise/measures/purposefully_broken_reporting_measure/measure.xml b/spec/files/reporting_measure_raise/measures/purposefully_broken_reporting_measure/measure.xml index b2a8c3c..8fa19a8 100644 --- a/spec/files/reporting_measure_raise/measures/purposefully_broken_reporting_measure/measure.xml +++ b/spec/files/reporting_measure_raise/measures/purposefully_broken_reporting_measure/measure.xml @@ -1,10 +1,10 @@ - 3.0 + 3.1 purposefully_broken_reporting_measure 746384f0-4c48-4624-bb93-6ef73fda8c43 - 7b6571ca-cc2a-4ab0-b667-d5d923bf3d02 - 20191121T141349Z + 35845241-0705-4950-8f35-ac240fec86de + 2024-04-19T12:13:13Z 9BF1E6AC PurposefullyBrokenReportingMeasure Purposefully Broken Reporting Measure @@ -40,48 +40,18 @@ license CD7F5672 - - README.md.erb - erb - readmeerb - 703C9964 - - - .gitkeep - gitkeep - doc - 00000000 - - - purposefully_broken_reporting_measure_test.rb - rb - test - 8D1DDB6F - - - example_model.osm - osm - test - 39B6E26C - - - USA_CO_Golden-NREL.724666_TMY3.epw - epw - test - BDF687C1 - - - report.html.in - in - resource - 3F69E3FB - README.md md readme E2936A2E + + README.md.erb + erb + readmeerb + 703C9964 + OpenStudio @@ -91,7 +61,13 @@ measure.rb rb script - D811B5A7 + E4E41360 + + + report.html.in + in + resource + 3F69E3FB diff --git a/spec/files/results_in_order/measures/XcelEDAReportingandQAQC/measure.xml b/spec/files/results_in_order/measures/XcelEDAReportingandQAQC/measure.xml index 83d7413..7d8d27e 100644 --- a/spec/files/results_in_order/measures/XcelEDAReportingandQAQC/measure.xml +++ b/spec/files/results_in_order/measures/XcelEDAReportingandQAQC/measure.xml @@ -1,17 +1,18 @@ + - 3.0 + 3.1 xcel_eda_reportingand_qaqc 0e57574e-4acb-41b0-bae9-e8791c92b5a0 - 51bdc7b7-0dd5-4a8f-ab78-dd0924c8e91c - 20161118T174158Z - 9F9D8C87 + 9a65b1aa-d08d-4007-bda7-cfb0168c2e82 + 2024-04-19T12:12:07Z + 2C8A3EEF XcelEDAReportingandQAQC XcelEDAReportingandQAQC This measure extracts key simulation results and performs basic model QAQC checks necessary for the Xcel EDA Program. Reads the model and sql file to pull out the necessary information and run the model checks. The check results show up as Warning messages in the measure's output on the PAT run tab. - - - + + + Reporting.QAQC @@ -29,16 +30,27 @@ - FuelSwap.rb + + OpenStudio + 1.0.6 + 1.0.6 + + measure.rb + rb + script + 61B6334A + + + CreateResults.rb rb resource - 763666C3 + 65271996 - UnmetHrs.rb + CreateResults_2.rb rb resource - 05F6672F + CBC09130 EUI.rb @@ -47,10 +59,10 @@ 738BFA1A - PeakHeatCoolMonth.rb + EUI_2.rb rb resource - EF31513F + 738BFA1A EndUseBreakdown.rb @@ -59,69 +71,64 @@ D9316A58 - CreateResults.rb + EndUseBreakdown_2.rb rb resource - 65271996 + D9316A58 - - OpenStudio - 1.0.6 - 1.0.6 - - measure.rb + FuelSwap.rb rb - script - 0561E471 - - - 0116_OfficeTest121_dev.osm - osm - test - 99F3A11E + resource + 763666C3 - XcelEDAReportingandQAQC_Test.rb + FuelSwap_2.rb rb - test - 310FBD27 + resource + 763666C3 - CreateResults_2.rb + PeakHeatCoolMonth.rb rb resource - CBC09130 + EF31513F - EndUseBreakdown_2.rb + PeakHeatCoolMonth_2.rb rb resource - D9316A58 + EF31513F - EUI_2.rb + UnmetHrs.rb rb resource - 738BFA1A + 05F6672F - FuelSwap_2.rb + UnmetHrs_2.rb rb resource - 763666C3 + 05F6672F - PeakHeatCoolMonth_2.rb - rb - resource - EF31513F + 0116_OfficeTest121_dev/files/USA_CO_Golden-NREL.724666_TMY3.epw + epw + test + BDF687C1 - UnmetHrs_2.rb + 0116_OfficeTest121_dev.osm + osm + test + 411DFF10 + + + XcelEDAReportingandQAQC_Test.rb rb - resource - 05F6672F + test + 310FBD27 diff --git a/spec/files/results_in_order/measures/XcelEDATariffSelectionandModelSetup/measure.xml b/spec/files/results_in_order/measures/XcelEDATariffSelectionandModelSetup/measure.xml index 7bf547c..c0c1312 100644 --- a/spec/files/results_in_order/measures/XcelEDATariffSelectionandModelSetup/measure.xml +++ b/spec/files/results_in_order/measures/XcelEDATariffSelectionandModelSetup/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 xcel_eda_tariff_selectionand_model_setup f3e2d522-cd95-4691-afa0-aeebde4d0425 - 813b331b-a49d-484f-b97e-5091ada11d67 - 20161118T174158Z - 390FCA70 + 9e11fc52-45d2-4399-92c7-d0fc2b7ccbcd + 2024-04-19T12:12:06Z + 4FA703D1 XcelEDATariffSelectionandModelSetup XcelEDATariffSelectionandModelSetup Add the selected Xcel utility rate, as well as set the timestep and lifecycle costing parameters as required by the Xcel EDA program. @@ -103,8 +104,8 @@ - - + + Economics.Life Cycle Cost Analysis @@ -131,12 +132,6 @@ - - EnvelopeAndLoadTestModel_01.osm - osm - test - E11F67BD - OpenStudio @@ -146,115 +141,151 @@ measure.rb rb script - 805C6011 + D348E440 + + + Commercial.idf + idf + resource + DCF26ED5 Interruptible Industrial G.idf idf resource - 48C37F65 + C72FE11C - Commercial.idf + Large CG.idf idf resource - 628403F4 + 0EACF849 Non-Xcel Commercial.idf idf resource - DB30797C + 1E8C1DD4 + + + Non-Xcel Gas Firm.idf + idf + resource + C2DA172B + + + Non-Xcel Gas Interruptible.idf + idf + resource + 989B7C43 Non-Xcel Primary General.idf idf resource - 2400EE4B + FD23EBB6 Non-Xcel Secondary General Low Load Factor.idf idf resource - AF427317 + 479BDDF4 Non-Xcel Secondary General.idf idf resource - 34AA067F + E1D3AE9A Non-Xcel Transmission General.idf idf resource - 2EB42B2B + 56D86D03 Primary General.idf idf resource - D5FE39D1 + C649C788 + + + Residential Gas.idf + idf + resource + 3D80AE4E Residential General.idf idf resource - 927AF6DA + DFCC76CD Secondary General Low Load Factor.idf idf resource - 692CE305 + B9718F9A Secondary General.idf idf resource - 2C424945 + 3DD4022E - Transmission General.idf + Secondary Photovoltaic Time-of-Use.idf idf resource - B45065B9 + 4BB35650 - Large CG.idf + Small CG.idf idf resource - 1571AFB4 + E9566244 - Residential Gas.idf + Transmission General.idf idf resource - 9DE76D03 + 34B6A41B - Small CG.idf - idf - resource - 40BBFF87 + EnvelopeAndLoadTestModel_01/files/USA_CO_Golden-NREL.724666_TMY3.epw + epw + test + BDF687C1 - Secondary Photovoltaic Time-of-Use.idf - idf - resource - 707CC00A + EnvelopeAndLoadTestModel_01/project.log + log + test + 00000000 - Non-Xcel Gas Firm.idf - idf - resource - D53D2CEA + EnvelopeAndLoadTestModel_01/project.osp + osp + test + 2F951741 - Non-Xcel Gas Interruptible.idf - idf - resource - 3D6406B3 + EnvelopeAndLoadTestModel_01/project.osp-journal + osp-journal + test + FF136880 + + + EnvelopeAndLoadTestModel_01/run.db + db + test + 7042FFF4 + + + EnvelopeAndLoadTestModel_01.osm + osm + test + 78580169 XcelEDATariffSelectionandModelSetup_Test.rb diff --git a/spec/files/results_in_order/measures/add_rooftop_pv/measure.xml b/spec/files/results_in_order/measures/add_rooftop_pv/measure.xml index 54150ef..2720f12 100644 --- a/spec/files/results_in_order/measures/add_rooftop_pv/measure.xml +++ b/spec/files/results_in_order/measures/add_rooftop_pv/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 add_rooftop_pv 34550614-0c87-44db-9252-0ca0915b1e64 - ab47e01d-5c24-4d4c-a152-6b61a57a47fa - 20161115T220751Z - C78730CC + a3e05664-90e9-4400-ba59-88bfff761a50 + 2024-04-19T12:12:08Z + 178163B6 AddRooftopPV Add Rooftop PV This measure will create new shading surface geometry above the roof for each thermal zone inyour model where the surface azmith falls within the user specified range. Arguments are exposed for panel efficiency, inverter efficiency, and the fraction of each roof surface that has PV @@ -38,8 +39,8 @@ 0.98 - - + + Onsite Power Generation.Photovoltaic @@ -87,10 +88,15 @@ - pv_test_input.osm - osm - test - AB14A2B3 + + OpenStudio + 1.9.0 + 1.9.0 + + measure.rb + rb + script + CF290DDF os_lib_helper_methods.rb @@ -104,22 +110,17 @@ resource C4185CAA - - - OpenStudio - 1.9.0 - 1.9.0 - - measure.rb - rb - script - CF290DDF - add_rooftop_pv_test.rb rb test 039F06FA + + pv_test_input.osm + osm + test + FC25C43B + diff --git a/spec/files/run_options_osw/measures/IncreaseRoofRValue/measure.xml b/spec/files/run_options_osw/measures/IncreaseRoofRValue/measure.xml index 50ac6bf..e271565 100644 --- a/spec/files/run_options_osw/measures/IncreaseRoofRValue/measure.xml +++ b/spec/files/run_options_osw/measures/IncreaseRoofRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_roofs_by_percentage 807d3ebf-c89b-4b93-b400-110ca060b2bb - 37c64835-408c-4ed9-9966-12667f2de25d - 20160426T215418Z - 350B6836 + e4ce48bf-1d64-4536-84d9-97cf5174e37a + 2024-04-19T12:12:16Z + EB1A0C08 IncreaseInsulationRValueForRoofsByPercentage Increase R-value of Insulation for Roofs by a Specified Percentage. Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/run_options_osw/measures/IncreaseWallRValue/measure.xml b/spec/files/run_options_osw/measures/IncreaseWallRValue/measure.xml index d3a1a6f..e9d8a9e 100644 --- a/spec/files/run_options_osw/measures/IncreaseWallRValue/measure.xml +++ b/spec/files/run_options_osw/measures/IncreaseWallRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_exterior_walls_by_percentage 7508c563-22bd-49f4-b646-aac69b02a82d - 0abb166f-7a57-4ce2-87b4-39bf0c682522 - 20160426T215418Z - 350B6836 + 62d01f8c-bdfd-4b46-bc37-fbfa81394440 + 2024-04-19T12:12:18Z + EB1A0C08 IncreaseInsulationRValueForExteriorWallsByPercentage Increase R-value of Insulation for Exterior Walls By a Specified Percentage Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/run_options_osw/measures/SetEplusInfiltration/measure.xml b/spec/files/run_options_osw/measures/SetEplusInfiltration/measure.xml index 17669c7..4e315c2 100644 --- a/spec/files/run_options_osw/measures/SetEplusInfiltration/measure.xml +++ b/spec/files/run_options_osw/measures/SetEplusInfiltration/measure.xml @@ -1,10 +1,11 @@ + - 3.0 - set_energy_plus_infiltration_flow_rate_per_floor_area + 3.1 + set_energyplus_infiltration_flow_rate_per_floor_area 490a2af3-7b64-4915-bf9e-9a3a7b525a17 - 06858048-5304-40a3-90ed-db5beef2cf1e - 20160426T215418Z - C75AF51E + d89e3146-b159-4608-8c15-5a7f108a7ca5 + 2024-04-19T12:12:18Z + 2AC0F979 SetEnergyPlusInfiltrationFlowRatePerFloorArea SetEnergyPlusInfiltrationFlowRatePerFloorArea Set the flow rate per floor area value for all infiltration objects in the model. Input values are in SI units. @@ -18,8 +19,8 @@ false - - + + Envelope.Infiltration diff --git a/spec/files/script_error_osw/measures/IncreaseWallRValue/measure.xml b/spec/files/script_error_osw/measures/IncreaseWallRValue/measure.xml index d3a1a6f..a3fd54f 100644 --- a/spec/files/script_error_osw/measures/IncreaseWallRValue/measure.xml +++ b/spec/files/script_error_osw/measures/IncreaseWallRValue/measure.xml @@ -1,10 +1,12 @@ + - 3.0 + 3.1 + Failed to infer measure name from '/home/julien/Software/Others/openstudio_gems/OpenStudio-workflow-gem/spec/files/script_error_osw/measures/IncreaseWallRValue/measure.rb' increase_insulation_r_value_for_exterior_walls_by_percentage 7508c563-22bd-49f4-b646-aac69b02a82d - 0abb166f-7a57-4ce2-87b4-39bf0c682522 - 20160426T215418Z - 350B6836 + 822c3546-cfd5-4373-b82f-9e0fefb18895 + 2024-04-19T12:12:19Z + EB1A0C08 IncreaseInsulationRValueForExteriorWallsByPercentage Increase R-value of Insulation for Exterior Walls By a Specified Percentage Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +21,8 @@ 30 - - + + Envelope.Opaque @@ -56,7 +58,7 @@ measure.rb rb script - 2B0F0D0D + EC16D695 diff --git a/spec/files/skip_osw/measures/broken_measure/measure.xml b/spec/files/skip_osw/measures/broken_measure/measure.xml index 13ea62f..d02bc5b 100644 --- a/spec/files/skip_osw/measures/broken_measure/measure.xml +++ b/spec/files/skip_osw/measures/broken_measure/measure.xml @@ -1,9 +1,10 @@ + - 3.0 + 3.1 broken_measure 49d1132f-b6ee-413f-bea7-26cd5e910a5a - 3b6a6d19-25b8-47b5-b409-36cd94b00bbe - 20180216T052743Z + 04188fab-f6c1-4bca-8fff-b17275e08dc7 + 2024-04-19T12:13:27Z 2AF3A68E BrokenMeasure BrokenMeasure @@ -39,8 +40,8 @@ - - + + Envelope.Form @@ -67,18 +68,6 @@ - - broken_measure_test.rb - rb - test - BBC15C20 - - - example_model.osm - osm - test - 923B06C2 - OpenStudio @@ -90,5 +79,17 @@ script 11E22B3E + + broken_measure_test.rb + rb + test + BBC15C20 + + + example_model.osm + osm + test + C656A12A + diff --git a/spec/files/skip_zip_results_osw/measures/IncreaseRoofRValue/measure.xml b/spec/files/skip_zip_results_osw/measures/IncreaseRoofRValue/measure.xml index 50ac6bf..9def5d1 100644 --- a/spec/files/skip_zip_results_osw/measures/IncreaseRoofRValue/measure.xml +++ b/spec/files/skip_zip_results_osw/measures/IncreaseRoofRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_roofs_by_percentage 807d3ebf-c89b-4b93-b400-110ca060b2bb - 37c64835-408c-4ed9-9966-12667f2de25d - 20160426T215418Z - 350B6836 + 9cf0f22d-8f4e-4a98-9037-ecf710204dcd + 2024-04-19T12:13:24Z + EB1A0C08 IncreaseInsulationRValueForRoofsByPercentage Increase R-value of Insulation for Roofs by a Specified Percentage. Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/skip_zip_results_osw/measures/IncreaseWallRValue/measure.xml b/spec/files/skip_zip_results_osw/measures/IncreaseWallRValue/measure.xml index d3a1a6f..3df3bb6 100644 --- a/spec/files/skip_zip_results_osw/measures/IncreaseWallRValue/measure.xml +++ b/spec/files/skip_zip_results_osw/measures/IncreaseWallRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_exterior_walls_by_percentage 7508c563-22bd-49f4-b646-aac69b02a82d - 0abb166f-7a57-4ce2-87b4-39bf0c682522 - 20160426T215418Z - 350B6836 + 69fcde39-ff8a-4601-9cde-e17610c8d1e1 + 2024-04-19T12:13:26Z + EB1A0C08 IncreaseInsulationRValueForExteriorWallsByPercentage Increase R-value of Insulation for Exterior Walls By a Specified Percentage Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/skip_zip_results_osw/measures/SetEplusInfiltration/measure.xml b/spec/files/skip_zip_results_osw/measures/SetEplusInfiltration/measure.xml index 17669c7..d5463bd 100644 --- a/spec/files/skip_zip_results_osw/measures/SetEplusInfiltration/measure.xml +++ b/spec/files/skip_zip_results_osw/measures/SetEplusInfiltration/measure.xml @@ -1,10 +1,11 @@ + - 3.0 - set_energy_plus_infiltration_flow_rate_per_floor_area + 3.1 + set_energyplus_infiltration_flow_rate_per_floor_area 490a2af3-7b64-4915-bf9e-9a3a7b525a17 - 06858048-5304-40a3-90ed-db5beef2cf1e - 20160426T215418Z - C75AF51E + 280a54a3-63ec-4dfe-b264-6141da3c84ff + 2024-04-19T12:13:26Z + 2AC0F979 SetEnergyPlusInfiltrationFlowRatePerFloorArea SetEnergyPlusInfiltrationFlowRatePerFloorArea Set the flow rate per floor area value for all infiltration objects in the model. Input values are in SI units. @@ -18,8 +19,8 @@ false - - + + Envelope.Infiltration diff --git a/spec/files/socket_osw/measures/IncreaseRoofRValue/measure.xml b/spec/files/socket_osw/measures/IncreaseRoofRValue/measure.xml index 50ac6bf..737b745 100644 --- a/spec/files/socket_osw/measures/IncreaseRoofRValue/measure.xml +++ b/spec/files/socket_osw/measures/IncreaseRoofRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_roofs_by_percentage 807d3ebf-c89b-4b93-b400-110ca060b2bb - 37c64835-408c-4ed9-9966-12667f2de25d - 20160426T215418Z - 350B6836 + 8ffceb85-7368-4ae3-bfc8-8cd6ad551026 + 2024-04-19T12:12:13Z + EB1A0C08 IncreaseInsulationRValueForRoofsByPercentage Increase R-value of Insulation for Roofs by a Specified Percentage. Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/socket_osw/measures/IncreaseWallRValue/measure.xml b/spec/files/socket_osw/measures/IncreaseWallRValue/measure.xml index d3a1a6f..2cae3b6 100644 --- a/spec/files/socket_osw/measures/IncreaseWallRValue/measure.xml +++ b/spec/files/socket_osw/measures/IncreaseWallRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_exterior_walls_by_percentage 7508c563-22bd-49f4-b646-aac69b02a82d - 0abb166f-7a57-4ce2-87b4-39bf0c682522 - 20160426T215418Z - 350B6836 + de81774c-e4e7-4fa6-8840-12fac5c8403e + 2024-04-19T12:12:15Z + EB1A0C08 IncreaseInsulationRValueForExteriorWallsByPercentage Increase R-value of Insulation for Exterior Walls By a Specified Percentage Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/socket_osw/measures/SetEplusInfiltration/measure.xml b/spec/files/socket_osw/measures/SetEplusInfiltration/measure.xml index 17669c7..4af632e 100644 --- a/spec/files/socket_osw/measures/SetEplusInfiltration/measure.xml +++ b/spec/files/socket_osw/measures/SetEplusInfiltration/measure.xml @@ -1,10 +1,11 @@ + - 3.0 - set_energy_plus_infiltration_flow_rate_per_floor_area + 3.1 + set_energyplus_infiltration_flow_rate_per_floor_area 490a2af3-7b64-4915-bf9e-9a3a7b525a17 - 06858048-5304-40a3-90ed-db5beef2cf1e - 20160426T215418Z - C75AF51E + f91d5474-319d-495c-90a4-b0b692571366 + 2024-04-19T12:12:15Z + 2AC0F979 SetEnergyPlusInfiltrationFlowRatePerFloorArea SetEnergyPlusInfiltrationFlowRatePerFloorArea Set the flow rate per floor area value for all infiltration objects in the model. Input values are in SI units. @@ -18,8 +19,8 @@ false - - + + Envelope.Infiltration diff --git a/spec/files/socket_osw/measures/ViewModel/measure.xml b/spec/files/socket_osw/measures/ViewModel/measure.xml index 6e7e9d4..69baffa 100644 --- a/spec/files/socket_osw/measures/ViewModel/measure.xml +++ b/spec/files/socket_osw/measures/ViewModel/measure.xml @@ -1,16 +1,18 @@ + - 3.0 + 3.1 view_model f4669f10-fda5-489d-8e1c-7ca3c2d40378 - bee046af-2002-488a-8c20-e3b4d3efc278 - 20160321T212510Z + 8915dd8c-8e76-46e4-a5fc-a4f81d29c05a + 2024-04-19T12:12:12Z 1E1F8B97 ViewModel ViewModel Visualize an OpenStudio model in a web based viewer Converts the OpenStudio model to vA3C JSON format and renders using Three.js - - + + + Reporting.QAQC @@ -27,24 +29,6 @@ - - SimpleModel.osm - osm - test - AC094EF8 - - - ExampleModel.osm - osm - test - 10636DB9 - - - ViewModel_Test.rb - rb - test - 705A2705 - OpenStudio @@ -56,6 +40,12 @@ script 656ECCCB + + report.html.in + in + resource + 64866EE7 + va3c.rb rb @@ -63,10 +53,40 @@ 254BCDED - report.html.in - in - resource - 64866EE7 + ExampleModel.osm + osm + test + C54F5B60 + + + SimpleModel/project.log + log + test + 150441D3 + + + SimpleModel/project.osp + osp + test + 8FEBA31B + + + SimpleModel/run.db + db + test + 406680D8 + + + SimpleModel.osm + osm + test + 86B08A4A + + + ViewModel_Test.rb + rb + test + 43A40DD9 diff --git a/spec/files/urbanopt/measures/urban_opt_report/measure.xml b/spec/files/urbanopt/measures/urban_opt_report/measure.xml index 0a6cd3f..b1275de 100644 --- a/spec/files/urbanopt/measures/urban_opt_report/measure.xml +++ b/spec/files/urbanopt/measures/urban_opt_report/measure.xml @@ -1,10 +1,10 @@ - 3.0 + 3.1 urban_opt_report 744899a6-9da8-4888-870b-40bca78f505b - aa87fa65-ce1a-4717-8791-56471a32563c - 20200723T210551Z + e264374c-d3c0-4954-9c6f-cbde1ed02bbe + 2024-04-19T12:13:34Z 9BF1E6AC UrbanOptReport UrbanOptReport @@ -122,7 +122,19 @@ measure.rb rb script - 16D2BDCB + 8DB5162F + + + default_feature_reports.json + json + resource + 47CD59FE + + + default_scenario_report.json + json + resource + B1A9AA98 diff --git a/spec/files/value_or_displayname_choice_osw/measures/ReduceSpaceInfiltrationByPercentage/measure.xml b/spec/files/value_or_displayname_choice_osw/measures/ReduceSpaceInfiltrationByPercentage/measure.xml index e9363fc..39daf99 100644 --- a/spec/files/value_or_displayname_choice_osw/measures/ReduceSpaceInfiltrationByPercentage/measure.xml +++ b/spec/files/value_or_displayname_choice_osw/measures/ReduceSpaceInfiltrationByPercentage/measure.xml @@ -1,9 +1,10 @@ + - 3.0 + 3.1 reduce_space_infiltration_by_percentage d8161857-8b77-4e1a-a76c-ae5deab7c1e0 - 83e21dbf-635c-4c10-b016-cc4228d6d75b - 20160531T204353Z + 7e29a033-ec95-4692-b336-d0b2bc31b15b + 2024-04-19T12:12:59Z EACB548E ReduceSpaceInfiltrationByPercentage ReduceSpaceInfiltrationByPercentage @@ -16,10 +17,10 @@ Choice true false - {304de434-bc74-4228-b62f-e9b76f35d4ef} + {08d1f6c0-1d06-46d9-ba36-6213742baac8} - {304de434-bc74-4228-b62f-e9b76f35d4ef} + {08d1f6c0-1d06-46d9-ba36-6213742baac8} *Entire Building* @@ -57,7 +58,8 @@ 1 - + + Envelope.Infiltration @@ -83,7 +85,7 @@ measure.rb rb script - AB0C763C + 8937836D diff --git a/spec/files/weather_file/measures/EpChangeWeatherFile/measure.xml b/spec/files/weather_file/measures/EpChangeWeatherFile/measure.xml index a592348..26e756c 100644 --- a/spec/files/weather_file/measures/EpChangeWeatherFile/measure.xml +++ b/spec/files/weather_file/measures/EpChangeWeatherFile/measure.xml @@ -1,17 +1,18 @@ + - 3.0 + 3.1 ep_change_weather_file f41a3e12-d103-4224-a194-90077202df17 - b6344bbf-f45a-49a6-ae85-fdf0631422c9 - 20170120T222302Z - C75AF51E + 909bfc4a-9700-4ad9-9aab-eeaefe42216b + 2024-04-19T12:13:31Z + 2AC0F979 EpChangeWeatherFile EpChangeWeatherFile Set the flow rate per floor area value for all infiltration objects in the model. Input values are in SI units. Affected infiltration objects will have "Design Flor Rate Calculation Method" set to "Flow/Area" and the "Flow per Zone Floor Area" set to the requested SI value. - - - + + + Envelope.Infiltration diff --git a/spec/files/weather_file/measures/EpChangeWeatherFile2/measure.xml b/spec/files/weather_file/measures/EpChangeWeatherFile2/measure.xml index 7924b22..a98af6b 100644 --- a/spec/files/weather_file/measures/EpChangeWeatherFile2/measure.xml +++ b/spec/files/weather_file/measures/EpChangeWeatherFile2/measure.xml @@ -1,17 +1,18 @@ + - 3.0 + 3.1 ep_change_weather_file_2 f60adb07-4a3d-4998-be87-6fe88956ed98 - fd87284c-77c3-43a6-852b-6221c2696c87 - 20170120T222302Z - C75AF51E + ec522833-9047-4db8-8d15-a3c10924070b + 2024-04-19T12:13:32Z + 2AC0F979 EpChangeWeatherFile2 EpChangeWeatherFile2 Set the flow rate per floor area value for all infiltration objects in the model. Input values are in SI units. Affected infiltration objects will have "Design Flor Rate Calculation Method" set to "Flow/Area" and the "Flow per Zone Floor Area" set to the requested SI value. - - - + + + Envelope.Infiltration diff --git a/spec/files/weather_file/measures/OsChangeWeatherFile/measure.xml b/spec/files/weather_file/measures/OsChangeWeatherFile/measure.xml index 3d0f997..f96d2d1 100644 --- a/spec/files/weather_file/measures/OsChangeWeatherFile/measure.xml +++ b/spec/files/weather_file/measures/OsChangeWeatherFile/measure.xml @@ -1,17 +1,18 @@ + - 3.0 + 3.1 os_change_weather_file 59b9b836-71ef-4d48-888c-5c4663e05577 - 33b329e3-b11d-444c-974c-fffc162ee3bb - 20170120T204406Z - 350B6836 + 813e36c2-c0bb-4e8a-a356-7f0c7a394eff + 2024-04-19T12:13:33Z + EB1A0C08 OsChangeWeatherFile OsChangeWeatherFile Increase the R value of the insulation layer in roof constructinons by a percentage. Insulation later is inferred by finding the existing layer with the highest thermal resistance. - - - + + + Envelope.Opaque diff --git a/spec/files/weather_file/measures/OsChangeWeatherFile2/measure.xml b/spec/files/weather_file/measures/OsChangeWeatherFile2/measure.xml index 5e92127..1ee7da6 100644 --- a/spec/files/weather_file/measures/OsChangeWeatherFile2/measure.xml +++ b/spec/files/weather_file/measures/OsChangeWeatherFile2/measure.xml @@ -1,17 +1,18 @@ + - 3.0 + 3.1 os_change_weather_file_2 b96392da-26bf-493e-9d48-03466ea74d21 - 3ea7e702-c27f-46bc-a87e-3dc09f50e1df - 20170120T222302Z - 350B6836 + 88f83d3f-9960-4a52-9f0b-1fd432649737 + 2024-04-19T12:13:33Z + EB1A0C08 OsChangeWeatherFile2 OsChangeWeatherFile2 Increase the R value of the insulation layer in roof constructinons by a percentage. Insulation later is inferred by finding the existing layer with the highest thermal resistance. - - - + + + Envelope.Opaque diff --git a/spec/files/web_osw/measures/IncreaseRoofRValue/measure.xml b/spec/files/web_osw/measures/IncreaseRoofRValue/measure.xml index 50ac6bf..e20fb0c 100644 --- a/spec/files/web_osw/measures/IncreaseRoofRValue/measure.xml +++ b/spec/files/web_osw/measures/IncreaseRoofRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_roofs_by_percentage 807d3ebf-c89b-4b93-b400-110ca060b2bb - 37c64835-408c-4ed9-9966-12667f2de25d - 20160426T215418Z - 350B6836 + 0cd71e6a-b355-4e95-9058-3406b893776d + 2024-04-19T12:12:47Z + EB1A0C08 IncreaseInsulationRValueForRoofsByPercentage Increase R-value of Insulation for Roofs by a Specified Percentage. Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/web_osw/measures/IncreaseWallRValue/measure.xml b/spec/files/web_osw/measures/IncreaseWallRValue/measure.xml index d3a1a6f..cd01d97 100644 --- a/spec/files/web_osw/measures/IncreaseWallRValue/measure.xml +++ b/spec/files/web_osw/measures/IncreaseWallRValue/measure.xml @@ -1,10 +1,11 @@ + - 3.0 + 3.1 increase_insulation_r_value_for_exterior_walls_by_percentage 7508c563-22bd-49f4-b646-aac69b02a82d - 0abb166f-7a57-4ce2-87b4-39bf0c682522 - 20160426T215418Z - 350B6836 + 8626742b-d767-47f8-9224-09a545619748 + 2024-04-19T12:12:49Z + EB1A0C08 IncreaseInsulationRValueForExteriorWallsByPercentage Increase R-value of Insulation for Exterior Walls By a Specified Percentage Increase the R value of the insulation layer in roof constructinons by a percentage. @@ -19,8 +20,8 @@ 30 - - + + Envelope.Opaque diff --git a/spec/files/web_osw/measures/SetEplusInfiltration/measure.xml b/spec/files/web_osw/measures/SetEplusInfiltration/measure.xml index 17669c7..b4b51e0 100644 --- a/spec/files/web_osw/measures/SetEplusInfiltration/measure.xml +++ b/spec/files/web_osw/measures/SetEplusInfiltration/measure.xml @@ -1,10 +1,11 @@ + - 3.0 - set_energy_plus_infiltration_flow_rate_per_floor_area + 3.1 + set_energyplus_infiltration_flow_rate_per_floor_area 490a2af3-7b64-4915-bf9e-9a3a7b525a17 - 06858048-5304-40a3-90ed-db5beef2cf1e - 20160426T215418Z - C75AF51E + de76bcb4-cc01-4248-b4fb-197d9f000592 + 2024-04-19T12:12:49Z + 2AC0F979 SetEnergyPlusInfiltrationFlowRatePerFloorArea SetEnergyPlusInfiltrationFlowRatePerFloorArea Set the flow rate per floor area value for all infiltration objects in the model. Input values are in SI units. @@ -18,8 +19,8 @@ false - - + + Envelope.Infiltration diff --git a/spec/files/web_osw/measures/ViewModel/measure.xml b/spec/files/web_osw/measures/ViewModel/measure.xml index 6e7e9d4..7149a2d 100644 --- a/spec/files/web_osw/measures/ViewModel/measure.xml +++ b/spec/files/web_osw/measures/ViewModel/measure.xml @@ -1,16 +1,18 @@ + - 3.0 + 3.1 view_model f4669f10-fda5-489d-8e1c-7ca3c2d40378 - bee046af-2002-488a-8c20-e3b4d3efc278 - 20160321T212510Z + a083a5b2-2157-41b3-bca3-260d55e807af + 2024-04-19T12:12:46Z 1E1F8B97 ViewModel ViewModel Visualize an OpenStudio model in a web based viewer Converts the OpenStudio model to vA3C JSON format and renders using Three.js - - + + + Reporting.QAQC @@ -27,24 +29,6 @@ - - SimpleModel.osm - osm - test - AC094EF8 - - - ExampleModel.osm - osm - test - 10636DB9 - - - ViewModel_Test.rb - rb - test - 705A2705 - OpenStudio @@ -56,6 +40,12 @@ script 656ECCCB + + report.html.in + in + resource + 64866EE7 + va3c.rb rb @@ -63,10 +53,40 @@ 254BCDED - report.html.in - in - resource - 64866EE7 + ExampleModel.osm + osm + test + F87A1E18 + + + SimpleModel/project.log + log + test + 150441D3 + + + SimpleModel/project.osp + osp + test + 8FEBA31B + + + SimpleModel/run.db + db + test + 406680D8 + + + SimpleModel.osm + osm + test + 548EBD1D + + + ViewModel_Test.rb + rb + test + 43A40DD9 From a4376779304eba2578bc1ffdd1c296d07e0905cc Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Fri, 19 Apr 2024 14:15:37 +0200 Subject: [PATCH 21/25] Add a workflow to test it against openstudio 3.8.0beta with ruby 3.2.2 --- .github/workflows/test.yml | 69 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..cdc3882 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,69 @@ +name: Test workflow gem + +# trigger action on all branches, pull requests and tags +on: + pull_request: + branches: + - '*' + push: + branches: + - '*' + tags: + - '*' + +env: + TEST_WITH_OPENSTUDIO: true + +jobs: + test: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v4 + + - name: install openstudio + run: | + wget http://openstudio-ci-builds.s3-website-us-west-2.amazonaws.com/PR-5149/OpenStudio-3.8.0-beta%2B2bc25028a3-Ubuntu-22.04-x86_64.deb + sudo apt-get -qq install -y ./OpenStudio*.deb + rm -Rf ./OpenStudio*.deb + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.2.2' # Not needed with a .ruby-version file + bundler: '2.5.5' + bundler-cache: true # runs 'bundle install' and caches installed gems automatically. We should NOT change the Bundler path, because to perform caching, this action will use bundle config --local path $PWD/vendor/bundle. + env: + RUBYLIB: /usr/local/openstudio-3.8.0/Ruby + + - name: show enviroment + shell: bash + run: | + begin_group() { echo -e "::group::\033[93m$1\033[0m"; } + begin_group "Ruby and bundler" + echo "Ruby version" + ruby -v + echo "Bundle version" + bundle --version + echo "bundle config get path" + bundle config get path + echo "bundle list" + bundle list + echo "::endgroup::" + + begin_group "OpenStudio" + openstudio --version + openstudio gem_list + echo "::endgroup::" + + begin_group "System ruby is connected to openstudio" + # Don't rely on RUBYLIB env var + f=$(ruby -e "puts File.join(RbConfig::CONFIG['sitelibdir'], 'openstudio.rb')") + echo "require '/usr/local/openstudio-3.8.0/Ruby/openstudio.rb'" > $f + ruby -e "require 'openstudio'; puts OpenStudio::openStudioLongVersion" + echo "::endgroup::" + + + - name: test + shell: bash + run: | + bundle exec rake spec:unit From 09469a7d721e7e0f3c2e90b64d6147134b50b92b Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Fri, 19 Apr 2024 14:18:15 +0200 Subject: [PATCH 22/25] debug --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cdc3882..6b53f30 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,6 +51,8 @@ jobs: echo "::endgroup::" begin_group "OpenStudio" + which openstudio + ls -la $(which openstudio) openstudio --version openstudio gem_list echo "::endgroup::" From e8a2cbaae2c3a242bf0d6396e438d6f3a28314a9 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Fri, 19 Apr 2024 14:25:40 +0200 Subject: [PATCH 23/25] Ok that should fix it --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6b53f30..4b65c39 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,6 +53,8 @@ jobs: begin_group "OpenStudio" which openstudio ls -la $(which openstudio) + os_cli=$(readlink -f $(which openstudio)) + os_root=$(dirname $(dirname $os_cli)) openstudio --version openstudio gem_list echo "::endgroup::" @@ -60,7 +62,7 @@ jobs: begin_group "System ruby is connected to openstudio" # Don't rely on RUBYLIB env var f=$(ruby -e "puts File.join(RbConfig::CONFIG['sitelibdir'], 'openstudio.rb')") - echo "require '/usr/local/openstudio-3.8.0/Ruby/openstudio.rb'" > $f + echo "require '$os_root/Ruby/openstudio.rb'" > $f ruby -e "require 'openstudio'; puts OpenStudio::openStudioLongVersion" echo "::endgroup::" From 1fbf9c7f66ea154705c1402290a86fea9611c7c9 Mon Sep 17 00:00:00 2001 From: kflemin <2205659+kflemin@users.noreply.github.com> Date: Fri, 19 Apr 2024 11:26:59 -0600 Subject: [PATCH 24/25] pin bundler for ruby 3.2.2 --- openstudio-workflow.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openstudio-workflow.gemspec b/openstudio-workflow.gemspec index 6b1ef43..0715fe8 100644 --- a/openstudio-workflow.gemspec +++ b/openstudio-workflow.gemspec @@ -22,7 +22,7 @@ Gem::Specification.new do |s| s.required_ruby_version = '~> 3.2.2' s.add_development_dependency 'builder', '~> 3.2.4' - s.add_development_dependency 'bundler', '>= 2.5.5' + s.add_development_dependency 'bundler', '2.4.10' s.add_development_dependency 'ci_reporter', '~> 2.1.0' s.add_development_dependency 'ci_reporter_rspec', '~> 1.0.0' s.add_development_dependency 'coveralls', '~> 0.8.21' From 39c84e45f152446a92379a501807e2691dba15ab Mon Sep 17 00:00:00 2001 From: kflemin <2205659+kflemin@users.noreply.github.com> Date: Thu, 2 May 2024 22:22:52 -0600 Subject: [PATCH 25/25] cleanup gemfile for release --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index ed5f290..7e14f37 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,7 @@ source 'http://rubygems.org' # Specify your gem's dependencies in OpenStudio-workflow.gemspec gemspec -gem 'openstudio_measure_tester', '~> 0.4.0', :github => 'NREL/OpenStudio-measure-tester-gem', :ref => '1baa9e70254a0cdb6740ccf14052baada8cf9e1c' +# gem 'openstudio_measure_tester', '~> 0.4.0', :github => 'NREL/OpenStudio-measure-tester-gem', :ref => '1baa9e70254a0cdb6740ccf14052baada8cf9e1c' group :test do gem 'coveralls', require: false