Module: BTAP

Defined in:
lib/openstudio-standards/btap/btap.rb,
lib/openstudio-standards/btap/mpc.rb,
lib/openstudio-standards/btap/hvac.rb,
lib/openstudio-standards/btap/equest.rb,
lib/openstudio-standards/btap/fileio.rb,
lib/openstudio-standards/btap/analysis.rb,
lib/openstudio-standards/btap/envelope.rb,
lib/openstudio-standards/btap/geometry.rb,
lib/openstudio-standards/btap/measures.rb,
lib/openstudio-standards/btap/economics.rb,
lib/openstudio-standards/btap/reporting.rb,
lib/openstudio-standards/btap/schedules.rb,
lib/openstudio-standards/btap/compliance.rb,
lib/openstudio-standards/btap/simmanager.rb,
lib/openstudio-standards/btap/spaceloads.rb,
lib/openstudio-standards/btap/spacetypes.rb,
lib/openstudio-standards/btap/visualization.rb,
lib/openstudio-standards/weather/Weather.Model.rb

Overview

This module has been created to make it easier to manipulate weather files can contains region specific data.

Defined Under Namespace

Modules: Analysis, Common, Compliance, EQuest, Environment, FileIO, Geometry, MPC, Measures, Reporting, Reports, Resources, SimManager, SimulationSettings, Site, Visualization Classes: OpenStudioLibrary

Constant Summary collapse

ENERGY_PLUS_MAJOR_VERSION =

EnergyPlus version

8
ENERGY_PLUS_MINOR_VERSION =
3
OS_RUBY_PATH =

Path constants

File.expand_path("..\\..\\..", __FILE__)
TESTING_FOLDER =
"C:\\test"

Class Method Summary collapse

Class Method Details

.gut_building(model) ⇒ Object



153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/openstudio-standards/btap/btap.rb', line 153

def self.gut_building(model)
  #clean up any remaining items that we don't need for NECB.
  puts "Removing casual loads."
  BTAP::Resources::SpaceLoads::remove_all_casual_loads(model)
  puts "Removing space loads."
  BTAP::Resources::SpaceLoads::remove_all_SpaceLoads(model)
  puts "Removing OA loads."
  BTAP::Resources::SpaceLoads::remove_all_DesignSpecificationOutdoorAir(model)
  puts "Removing Envelope"
  BTAP::Resources::Envelope::remove_all_envelope_information(model)
  puts "Removing Infiltration"
  BTAP::Resources::SpaceLoads::remove_all_SpaceInfiltrationDesignFlowRate(model)
  puts "Removing all Schedules"
  BTAP::Resources::Schedules::remove_all_schedules( model )
  puts "Removing HVAC"
  BTAP::Resources::HVAC.clear_all_hvac_from_model( model )
end

.runner_register(type, text, runner = nil) ⇒ Object

A wrapper for outputing feedback to users and developers.

BTAP::runner_register("InitialCondition",   "Your Information Message Here", runner)
BTAP::runner_register("Info",    "Your Information Message Here", runner)
BTAP::runner_register("Warning", "Your Information Message Here", runner)
BTAP::runner_register("Error",   "Your Information Message Here", runner)
BTAP::runner_register("Debug",   "Your Information Message Here", runner)
BTAP::runner_register("FinalCondition",   "Your Information Message Here", runner)
@params type [String]
@params runner [OpenStudio::Ruleset::OSRunner] # or a nil.


112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/openstudio-standards/btap/btap.rb', line 112

def self.runner_register(type,text,runner = nil)

  #dump to console. 
  puts "#{type.upcase}: #{text}"
  #dump to runner. 
  if runner.is_a?(OpenStudio::Ruleset::OSRunner)
    case type.downcase
    when "info"
      runner.registerInfo(text)
    when "warning"
      runner.registerWarning(text)
    when "error"
      runner.registerError(text)
    when "notapplicable"
      runner.registerAsNotApplicable(text)
    when "finalcondition"
      runner.registerFinalCondition(text)
    when "initialcondition"
      runner.registerInitialCondition(text)
    when "debug"
    when "macro"
    else
      raise("Runner Register type #{type.downcase} not info,warning,error,notapplicable,finalcondition,initialcondition,macro.")
    end
  end
end

.runner_register_value(name, value, runner = nil) ⇒ Object



139
140
141
142
143
144
# File 'lib/openstudio-standards/btap/btap.rb', line 139

def self.runner_register_value(name,value,runner = nil)
  if runner.is_a?(OpenStudio::Ruleset::OSRunner)
    runner.registerValue( name,value.to_s)
    BTAP::runner_register("Info", "#{name} = #{value} has been registered in the runner", runner)
  end
end