Class: HardSizeHVAC

Inherits:
OpenStudio::Measure::ModelMeasure
  • Object
show all
Defined in:
lib/measures/HardSizeHvac/measure.rb

Overview

start the measure

Instance Method Summary collapse

Instance Method Details

#arguments(_model) ⇒ Object

define the arguments that the user will input



29
30
31
# File 'lib/measures/HardSizeHvac/measure.rb', line 29

def arguments(_model)
  OpenStudio::Measure::OSArgumentVector.new
end

#descriptionObject

human readable description



19
20
21
# File 'lib/measures/HardSizeHvac/measure.rb', line 19

def description
  'Run a simulation to autosize HVAC equipment and then apply these autosized values back to the model.'
end

#modeler_descriptionObject

human readable description of modeling approach



24
25
26
# File 'lib/measures/HardSizeHvac/measure.rb', line 24

def modeler_description
  'Run a simulation to autosize HVAC equipment and then apply these autosized values back to the model.'
end

#nameObject

human readable name



14
15
16
# File 'lib/measures/HardSizeHvac/measure.rb', line 14

def name
  'Hard Size HVAC'
end

#run(model, runner, user_arguments) ⇒ Object

define what happens when the measure is run



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/measures/HardSizeHvac/measure.rb', line 34

def run(model, runner, user_arguments)
  super(model, runner, user_arguments)

  # Make the standard applier
  standard = Standard.build('90.1-2004') # template choice doesn't matter

  # Perform a sizing run (2.5.1 and later)
  sizing_run_path = OpenStudio::Path.new("#{File.dirname(__FILE__)}/output/SR1").to_s
  runner.registerInfo("Performing sizing run at #{sizing_run_path}.")
  if standard.model_run_sizing_run(model, sizing_run_path) == false
    return false
  end

  # Hard sizing every object in the model.
  model.applySizingValues

  # Log the openstudio-standards messages to the runner
  log_messages_to_runner(runner, false)

  true
end