Measures/m_12_example_12_variable_refrigerant_flow_system_override/measure.rb
# define the arguments that the user will input
define the arguments that the user will input
define the arguments that the user will input
def arguments(model)
    args = OpenStudio::Measure::OSArgumentVector.new
	verbose_info_statements = OpenStudio::Ruleset::OSArgument::makeBoolArgument("verbose_info_statements", false)
	verbose_info_statements.setDisplayName("Check to allow measure to generate verbose runner.registerInfo statements.")
	verbose_info_statements.setDefaultValue(false)
	args << verbose_info_statements
    vrf_outdoor_unit_handles = OpenStudio::StringVector.new
    vrf_outdoor_unit_display_names = OpenStudio::StringVector.new
    vrf_outdoor_unit_hash = {}
    model.getAirConditionerVariableRefrigerantFlows.each do |outdoor_vrf_unit|
      vrf_outdoor_unit_hash[outdoor_vrf_unit.name.to_s] = outdoor_vrf_unit
    end
    vrf_outdoor_unit_hash.sort.map do |outdoor_vrf_unit_name, outdoor_vrf_unit|
      vrf_outdoor_unit_handles << outdoor_vrf_unit.handle.to_s
      vrf_outdoor_unit_display_names << outdoor_vrf_unit_name
    end
    building = model.getBuilding
    vrf_outdoor_unit_handles << building.handle.to_s
    vrf_outdoor_unit_display_names << '*All Outdoor VRF Units*'  
    outdoor_vrf_units_to_modify = OpenStudio::Measure::OSArgument.makeChoiceArgument('outdoor_vrf_units_to_modify', vrf_outdoor_unit_handles, vrf_outdoor_unit_display_names, true)
    outdoor_vrf_units_to_modify.setDisplayName('Choose Outdoor VRF Units to apply EMS Program T-stat control changes to.')
    outdoor_vrf_units_to_modify.setDefaultValue('*All Outdoor VRF Units*') 
    args << outdoor_vrf_units_to_modify
    indoor_vrf_unit_fixed_plr_value = OpenStudio::Ruleset::OSArgument::makeDoubleArgument("indoor_vrf_unit_fixed_plr_value",true)
    indoor_vrf_unit_fixed_plr_value.setDisplayName("The fixed PLR value to apply to ALL indoor vrf terminal units attached to the selected outdoor VRF unit(s).")
    indoor_vrf_unit_fixed_plr_value.setDefaultValue(0.5) 
    args << indoor_vrf_unit_fixed_plr_value
    int_var_avail_dict_rep_chs = OpenStudio::StringVector.new
    int_var_avail_dict_rep_chs << 'None'
    int_var_avail_dict_rep_chs << 'NotByUniqueKeyNames'
    int_var_avail_dict_rep_chs << 'Verbose'
    internal_variable_availability_dictionary_reporting = OpenStudio::Measure::OSArgument.makeChoiceArgument('internal_variable_availability_dictionary_reporting', int_var_avail_dict_rep_chs, true)
    internal_variable_availability_dictionary_reporting.setDisplayName('Level of output reporting related to the EMS internal variables that are available.')
    internal_variable_availability_dictionary_reporting.setDefaultValue('None')
    args << internal_variable_availability_dictionary_reporting
    ems_runtime_language_debug_level_chs = OpenStudio::StringVector.new
    ems_runtime_language_debug_level_chs << 'None'
    ems_runtime_language_debug_level_chs << 'ErrorsOnly'
    ems_runtime_language_debug_level_chs << 'Verbose'
    ems_runtime_language_debug_output_level = OpenStudio::Measure::OSArgument.makeChoiceArgument('ems_runtime_language_debug_output_level', ems_runtime_language_debug_level_chs, true)
    ems_runtime_language_debug_output_level.setDisplayName('Level of output reporting related to the execution of EnergyPlus Runtime Language, written to .edd file.')
    ems_runtime_language_debug_output_level.setDefaultValue('None')
    args << ems_runtime_language_debug_output_level
    actuator_avail_dict_rep_chs = OpenStudio::StringVector.new
    actuator_avail_dict_rep_chs << 'None'
    actuator_avail_dict_rep_chs << 'NotByUniqueKeyNames'
    actuator_avail_dict_rep_chs << 'Verbose'
    actuator_availability_dictionary_reporting = OpenStudio::Measure::OSArgument.makeChoiceArgument('actuator_availability_dictionary_reporting', actuator_avail_dict_rep_chs, true)
    actuator_availability_dictionary_reporting.setDisplayName('Level of output reporting related to the EMS actuators that are available.')
    actuator_availability_dictionary_reporting.setDefaultValue('None')
    args << actuator_availability_dictionary_reporting
    return args
  end
def arguments ( model ) args = OpenStudio :: Measure :: OSArgumentVector . new verbose_info_statements = OpenStudio :: Ruleset :: OSArgument :: makeBoolArgument ( "verbose_info_statements" , false ) verbose_info_statements . setDisplayName ( "Check to allow measure to generate verbose runner.registerInfo statements." ) verbose_info_statements . setDefaultValue ( false ) args << verbose_info_statements vrf_outdoor_unit_handles = OpenStudio :: StringVector . new vrf_outdoor_unit_display_names = OpenStudio :: StringVector . new vrf_outdoor_unit_hash = { } model . getAirConditionerVariableRefrigerantFlows . each do | outdoor_vrf_unit | vrf_outdoor_unit_hash [ outdoor_vrf_unit . name . to_s ] = outdoor_vrf_unit end vrf_outdoor_unit_hash . sort . map do | outdoor_vrf_unit_name , outdoor_vrf_unit | vrf_outdoor_unit_handles << outdoor_vrf_unit . handle . to_s vrf_outdoor_unit_display_names << outdoor_vrf_unit_name end building = model . getBuilding vrf_outdoor_unit_handles << building . handle . to_s vrf_outdoor_unit_display_names << '*All Outdoor VRF Units*' outdoor_vrf_units_to_modify = OpenStudio :: Measure :: OSArgument . makeChoiceArgument ( 'outdoor_vrf_units_to_modify' , vrf_outdoor_unit_handles , vrf_outdoor_unit_display_names , true ) outdoor_vrf_units_to_modify . setDisplayName ( 'Choose Outdoor VRF Units to apply EMS Program T-stat control changes to.' ) outdoor_vrf_units_to_modify . setDefaultValue ( '*All Outdoor VRF Units*' ) args << outdoor_vrf_units_to_modify indoor_vrf_unit_fixed_plr_value = OpenStudio :: Ruleset :: OSArgument :: makeDoubleArgument ( "indoor_vrf_unit_fixed_plr_value" , true ) indoor_vrf_unit_fixed_plr_value . setDisplayName ( "The fixed PLR value to apply to ALL indoor vrf terminal units attached to the selected outdoor VRF unit(s)." ) indoor_vrf_unit_fixed_plr_value . setDefaultValue ( 0.5 ) args << indoor_vrf_unit_fixed_plr_value int_var_avail_dict_rep_chs = OpenStudio :: StringVector . new int_var_avail_dict_rep_chs << 'None' int_var_avail_dict_rep_chs << 'NotByUniqueKeyNames' int_var_avail_dict_rep_chs << 'Verbose' internal_variable_availability_dictionary_reporting = OpenStudio :: Measure :: OSArgument . makeChoiceArgument ( 'internal_variable_availability_dictionary_reporting' , int_var_avail_dict_rep_chs , true ) internal_variable_availability_dictionary_reporting . setDisplayName ( 'Level of output reporting related to the EMS internal variables that are available.' ) internal_variable_availability_dictionary_reporting . setDefaultValue ( 'None' ) args << internal_variable_availability_dictionary_reporting ems_runtime_language_debug_level_chs = OpenStudio :: StringVector . new ems_runtime_language_debug_level_chs << 'None' ems_runtime_language_debug_level_chs << 'ErrorsOnly' ems_runtime_language_debug_level_chs << 'Verbose' ems_runtime_language_debug_output_level = OpenStudio :: Measure :: OSArgument . makeChoiceArgument ( 'ems_runtime_language_debug_output_level' , ems_runtime_language_debug_level_chs , true ) ems_runtime_language_debug_output_level . setDisplayName ( 'Level of output reporting related to the execution of EnergyPlus Runtime Language, written to .edd file.' ) ems_runtime_language_debug_output_level . setDefaultValue ( 'None' ) args << ems_runtime_language_debug_output_level actuator_avail_dict_rep_chs = OpenStudio :: StringVector . new actuator_avail_dict_rep_chs << 'None' actuator_avail_dict_rep_chs << 'NotByUniqueKeyNames' actuator_avail_dict_rep_chs << 'Verbose' actuator_availability_dictionary_reporting = OpenStudio :: Measure :: OSArgument . makeChoiceArgument ( 'actuator_availability_dictionary_reporting' , actuator_avail_dict_rep_chs , true ) actuator_availability_dictionary_reporting . setDisplayName ( 'Level of output reporting related to the EMS actuators that are available.' ) actuator_availability_dictionary_reporting . setDefaultValue ( 'None' ) args << actuator_availability_dictionary_reporting return args end
define the arguments that the user will input
define the arguments that the user will input
# Add a check box for specifying verbose info statements # 1) make a choice argument for qualifying VRF outdoor unit # put qualifying VRF outdoor unit names into a hash # looping through a sorted hash of outdoor vrf units # add building to string vector with outdoor vrf units # if no outdoor VRF unit is chosen this will run on all zones # 2) make a Double Precision Argument for the fixed PLR value to apply to the attached indoor vrf terminal unit # 3) make a choice argument for setting EMS InternalVariableAvailabilityDictionaryReporting value # 4) make a choice argument for setting EMSRuntimeLanguageDebugOutputLevel value # 5) make a choice argument for setting EMS ActuatorAvailabilityDictionaryReportingvalue
model
<not_specific>