Class: ElectricBaseboardEfficiencyAndCapacity
- Inherits:
-
OpenStudio::Measure::ModelMeasure
- Object
- OpenStudio::Measure::ModelMeasure
- ElectricBaseboardEfficiencyAndCapacity
- Defined in:
- lib/measures/ElectricBaseboardEfficiencyAndCapacity/measure.rb
Overview
start the measure
Instance Method Summary collapse
-
#arguments(_model) ⇒ Object
define the arguments that the user will input.
-
#description ⇒ Object
human readable description.
-
#modeler_description ⇒ Object
human readable description of modeling approach.
-
#name ⇒ Object
human readable name.
-
#run(model, runner, user_arguments) ⇒ Object
define what happens when the measure is run.
Instance Method Details
#arguments(_model) ⇒ Object
define the arguments that the user will input
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/measures/ElectricBaseboardEfficiencyAndCapacity/measure.rb', line 27 def arguments(_model) args = OpenStudio::Measure::OSArgumentVector.new # efficiency base_eff = OpenStudio::Measure::OSArgument.makeDoubleArgument('base_eff', true) base_eff.setDisplayName('efficiency') base_eff.setDefaultValue(1.0) args << base_eff # capacity nom_cap = OpenStudio::Measure::OSArgument.makeDoubleArgument('nom_cap', true) nom_cap.setDisplayName('Nominal Capacity (W)') nom_cap.setDefaultValue(1500) args << nom_cap args end |
#description ⇒ Object
human readable description
17 18 19 |
# File 'lib/measures/ElectricBaseboardEfficiencyAndCapacity/measure.rb', line 17 def description 'Electric Baseboard Efficiency And Capacity' end |
#modeler_description ⇒ Object
human readable description of modeling approach
22 23 24 |
# File 'lib/measures/ElectricBaseboardEfficiencyAndCapacity/measure.rb', line 22 def modeler_description 'Electric Baseboard Efficiency And Capacity' end |
#name ⇒ Object
human readable name
12 13 14 |
# File 'lib/measures/ElectricBaseboardEfficiencyAndCapacity/measure.rb', line 12 def name 'Electric Baseboard Efficiency And Capacity' end |
#run(model, runner, user_arguments) ⇒ Object
define what happens when the measure is run
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/measures/ElectricBaseboardEfficiencyAndCapacity/measure.rb', line 46 def run(model, runner, user_arguments) super(model, runner, user_arguments) # use the built-in error checking unless runner.validateUserArguments(arguments(model), user_arguments) return false end # assign the user inputs to variables base_eff = runner.getDoubleArgumentValue('base_eff', user_arguments) nom_cap = runner.getDoubleArgumentValue('nom_cap', user_arguments) model.getZoneHVACBaseboardConvectiveElectrics.each do |zone| # base_eff = OpenStudio::Double.new(base_eff) # nom_cap = OpenStudio::OptionalDouble.new(nom_cap) zone.setEfficiency(base_eff) zone.setNominalCapacity(nom_cap) runner.registerInfo("Changing the base_eff to #{zone.getEfficiency} ") runner.registerInfo("Changing the nominal capacity to #{zone.getNominalCapacity} ") end true end |