lib/openstudio-standards.rb in openstudio-standards-0.2.12 vs lib/openstudio-standards.rb in openstudio-standards-0.2.13.rc3
- old
+ new
@@ -70,10 +70,12 @@
# ECM development
require_relative "#{stds}/necb/ECMS/ecms.rb"
require_relative "#{stds}/necb/ECMS/erv.rb"
require_relative "#{stds}/necb/ECMS/hvac_systems.rb"
+ require_relative "#{stds}/necb/ECMS/nv.rb"
+ require_relative "#{stds}/necb/ECMS/pv_ground.rb"
require_relative "#{stds}/ashrae_90_1/ashrae_90_1"
require_relative "#{stds}/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980"
require_relative "#{stds}/ashrae_90_1/doe_ref_pre_1980/comstock_doe_ref_pre_1980/comstock_doe_ref_pre_1980"
require_relative "#{stds}/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004"
@@ -84,10 +86,12 @@
require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2007/comstock_ashrae_90_1_2007/comstock_ashrae_90_1_2007"
require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010"
require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2010/comstock_ashrae_90_1_2010/comstock_ashrae_90_1_2010"
require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013"
require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2013/comstock_ashrae_90_1_2013/comstock_ashrae_90_1_2013"
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016"
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019"
require_relative "#{stds}/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017"
require_relative "#{stds}/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily"
require_relative "#{stds}/deer/deer"
require_relative "#{stds}/deer/deer_pre_1975/deer_pre_1975"
@@ -152,10 +156,12 @@
require_relative "#{stds}/Standards.CoilDX"
require_relative "#{stds}/Standards.Pump"
require_relative "#{stds}/Standards.CoolingTower"
require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.CoolingTower"
require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.CoolingTower"
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.CoolingTower"
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.CoolingTower"
require_relative "#{stds}/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.CoolingTower"
require_relative "#{stds}/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.CoolingTower"
# Model Objects
require_relative "#{stds}/Standards.AirLoopHVAC"
@@ -240,10 +246,30 @@
require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model"
require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.PlantLoop"
require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Space"
require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.ThermalZone"
require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.WaterHeaterMixed"
+ # 90.1-2016
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirLoopHVAC"
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirTerminalSingleDuctVAVReheat"
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.CoolingTower"
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.CoolingTowerSingleSpeed"
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.CoolingTowerTwoSpeed"
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.CoolingTowerVariableSpeed"
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.FanVariableVolume"
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Space"
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.ThermalZone"
+ # 90.1-2019
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirLoopHVAC"
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirTerminalSingleDuctVAVReheat"
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.CoolingTower"
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.CoolingTowerSingleSpeed"
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.CoolingTowerTwoSpeed"
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.CoolingTowerVariableSpeed"
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.FanVariableVolume"
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Space"
+ require_relative "#{stds}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.ThermalZone"
# DOE 1980-2004
require_relative "#{stds}/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.AirLoopHVAC"
require_relative "#{stds}/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.Model"
require_relative "#{stds}/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.PlantLoop"
# DOE Pre-1980
@@ -321,10 +347,11 @@
require_relative "#{proto}/common/buildings/Prototype.SmallOfficeDetailed"
require_relative "#{proto}/common/buildings/Prototype.Laboratory"
require_relative "#{proto}/common/buildings/Prototype.College"
require_relative "#{proto}/common/buildings/Prototype.TallBuilding"
require_relative "#{proto}/common/buildings/Prototype.SuperTallBuilding"
+ require_relative "#{proto}/common/buildings/Prototype.Courthouse"
# NECB Building Types
require_relative "#{proto}/common/prototype_metaprogramming.rb"
create_meta_classes
@@ -356,36 +383,60 @@
require_relative "#{proto}/common/objects/Prototype.Model.transformers"
require_relative "#{proto}/common/objects/Prototype.Model.exterior_lights"
require_relative "#{proto}/common/objects/Prototype.Model.hvac"
require_relative "#{proto}/common/objects/Prototype.Model"
require_relative "#{proto}/common/objects/Prototype.Model.swh"
+ require_relative "#{proto}/common/objects/Prototype.Pump"
+ require_relative "#{proto}/common/objects/Prototype.PumpVariableSpeed"
require_relative "#{proto}/common/objects/Prototype.refrigeration"
require_relative "#{proto}/common/objects/Prototype.ServiceWaterHeating"
require_relative "#{proto}/common/objects/Prototype.SizingSystem"
require_relative "#{proto}/common/objects/Prototype.utilities"
# 90.1-2004
require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.AirTerminalSingleDuctVAVReheat"
+ require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.PumpVariableSpeed"
# 90.1-2007
require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.FanConstantVolume"
require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.FanOnOff"
require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.FanVariableVolume"
require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.AirTerminalSingleDuctVAVReheat"
+ require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.PumpVariableSpeed"
# 90.1-2010
require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.FanConstantVolume"
require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.FanOnOff"
require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.FanVariableVolume"
require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.Model"
require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.Model.elevators"
require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirTerminalSingleDuctVAVReheat"
+ require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.PumpVariableSpeed"
# 90.1-2013
require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.FanConstantVolume"
require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.FanOnOff"
require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.FanVariableVolume"
require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model"
require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model.elevators"
require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.hvac_systems"
require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat"
+ require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.PumpVariableSpeed"
+ # 90.1-2016
+ require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.FanConstantVolume"
+ require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.FanOnOff"
+ require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.FanVariableVolume"
+ require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model"
+ require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.elevators"
+ require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.hvac_systems"
+ require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirTerminalSingleDuctVAVReheat"
+ require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.PumpVariableSpeed"
+ # 90.1-2019
+ require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.FanConstantVolume"
+ require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.FanOnOff"
+ require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.FanVariableVolume"
+ require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model"
+ require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.elevators"
+ require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.hvac_systems"
+ require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirTerminalSingleDuctVAVReheat"
+ require_relative "#{proto}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.PumpVariableSpeed"
# DOE Ref 1980-2004
require_relative "#{proto}/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.AirTerminalSingleDuctVAVReheat"
require_relative "#{proto}/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.Model.elevators"
require_relative "#{proto}/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.refrigeration"
# DOE Ref Pre-1980
@@ -420,11 +471,11 @@
require_relative "#{proto}/cbes/cbes_t24_2008/cbes_t24_2008.FanConstantVolume"
require_relative "#{proto}/cbes/cbes_t24_2008/cbes_t24_2008.FanOnOff"
require_relative "#{proto}/cbes/cbes_t24_2008/cbes_t24_2008.FanVariableVolume"
# DLM: not sure where this code should go
- def self.get_run_env()
+ def self.get_run_env
# blank out bundler and gem path modifications, will be re-setup by new call
new_env = {}
new_env['BUNDLER_ORIG_MANPATH'] = nil
new_env['BUNDLER_ORIG_PATH'] = nil
new_env['BUNDLER_VERSION'] = nil
@@ -436,51 +487,51 @@
# requires to ruby gems will work, will fail if we require a native gem
new_env['GEM_PATH'] = nil
new_env['GEM_HOME'] = nil
# DLM: for now, ignore current bundle in case it has binary dependencies in it
- #bundle_gemfile = ENV['BUNDLE_GEMFILE']
- #bundle_path = ENV['BUNDLE_PATH']
- #if bundle_gemfile.nil? || bundle_path.nil?
- new_env['BUNDLE_GEMFILE'] = nil
- new_env['BUNDLE_PATH'] = nil
- new_env['BUNDLE_WITHOUT'] = nil
- #else
- # new_env['BUNDLE_GEMFILE'] = bundle_gemfile
- # new_env['BUNDLE_PATH'] = bundle_path
- #end
+ # bundle_gemfile = ENV['BUNDLE_GEMFILE']
+ # bundle_path = ENV['BUNDLE_PATH']
+ # if bundle_gemfile.nil? || bundle_path.nil?
+ new_env['BUNDLE_GEMFILE'] = nil
+ new_env['BUNDLE_PATH'] = nil
+ new_env['BUNDLE_WITHOUT'] = nil
+ # else
+ # new_env['BUNDLE_GEMFILE'] = bundle_gemfile
+ # new_env['BUNDLE_PATH'] = bundle_path
+ # end
return new_env
end
def self.run_command(command)
- stdout_str, stderr_str, status = Open3.capture3(get_run_env(), command)
+ stdout_str, stderr_str, status = Open3.capture3(get_run_env, command)
if status.success?
OpenStudio.logFree(OpenStudio::Debug, 'openstudio.standards.command', "Successfully ran command: '#{command}'")
- #puts "stdout: #{stdout_str}"
- #puts "stderr: #{stderr_str}"
+ # puts "stdout: #{stdout_str}"
+ # puts "stderr: #{stderr_str}"
return true
else
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.command', "Error running command: '#{command}'")
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.command', "stdout: #{stdout_str}")
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.command', "stderr: #{stderr_str}")
# Print the ENV for debugging
final_env = []
- env_changes = get_run_env()
+ env_changes = get_run_env
ENV.each do |env_var, val|
next if env_changes.key?(env_var) && env_changes[env_var].nil?
+
final_env << "#{env_var} = #{val}"
end
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.command', "command's modified ENV: \n #{final_env.join("\n")}")
# List the gems available to openstudio at this point
cli_path = OpenStudio.getOpenStudioCLI
cmd = "\"#{cli_path}\" gem_list"
- stdout_str_2, stderr_str_2, status_2 = Open3.capture3(get_run_env(), cmd)
+ stdout_str_2, stderr_str_2, status_2 = Open3.capture3(get_run_env, cmd)
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.command', "Gems available to openstudio cli according to (openstudio gem_list): \n #{stdout_str_2}")
return false
end
end
-
end