Measures/m_10_example_10_plant_loop_override_control/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
    condenser_plantloop_handles = OpenStudio::StringVector.new
    condenser_plantloop_display_names = OpenStudio::StringVector.new
    model.getPlantLoops.each do |plant_loop|
      show_loop = false
      if plant_loop.sizingPlant.loopType == "Condenser"
        show_loop = true
      end  
      if show_loop == true
        condenser_plantloop_handles << plant_loop.handle.to_s
        condenser_plantloop_display_names << plant_loop.name.to_s
      end
    end 
    building = model.getBuilding
    condenser_plantloop_handles << building.handle.to_s
    condenser_plantloop_display_names << '*All Condenser Plant Loops*'    
    condensor_plant_loop_objects = OpenStudio::Ruleset::OSArgument::makeChoiceArgument("condensor_plant_loop_objects", condenser_plantloop_handles, condenser_plantloop_display_names,true)
    condensor_plant_loop_objects.setDisplayName("Choose a Condenser Plant Loop to apply plant control overrides to.")
    condensor_plant_loop_objects.setDefaultValue('*All Condenser Plant Loops*') 
    args << condensor_plant_loop_objects
    oa_db_override_temp = OpenStudio::Ruleset::OSArgument::makeDoubleArgument("oa_db_override_temp",true)
    oa_db_override_temp.setDisplayName("The Outdoor Dry Bulb Temp (Deg F) below which the condenser plant loop will not be allowed to operate.")
    oa_db_override_temp.setDefaultValue(42.8)
    args << oa_db_override_temp
    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 condenser_plantloop_handles = OpenStudio :: StringVector . new condenser_plantloop_display_names = OpenStudio :: StringVector . new model . getPlantLoops . each do | plant_loop | show_loop = false if plant_loop . sizingPlant . loopType == "Condenser" show_loop = true end if show_loop == true condenser_plantloop_handles << plant_loop . handle . to_s condenser_plantloop_display_names << plant_loop . name . to_s end end building = model . getBuilding condenser_plantloop_handles << building . handle . to_s condenser_plantloop_display_names << '*All Condenser Plant Loops*' condensor_plant_loop_objects = OpenStudio :: Ruleset :: OSArgument :: makeChoiceArgument ( "condensor_plant_loop_objects" , condenser_plantloop_handles , condenser_plantloop_display_names , true ) condensor_plant_loop_objects . setDisplayName ( "Choose a Condenser Plant Loop to apply plant control overrides to." ) condensor_plant_loop_objects . setDefaultValue ( '*All Condenser Plant Loops*' ) args << condensor_plant_loop_objects oa_db_override_temp = OpenStudio :: Ruleset :: OSArgument :: makeDoubleArgument ( "oa_db_override_temp" , true ) oa_db_override_temp . setDisplayName ( "The Outdoor Dry Bulb Temp (Deg F) below which the condenser plant loop will not be allowed to operate." ) oa_db_override_temp . setDefaultValue ( 42.8 ) args << oa_db_override_temp 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 # Make arrays of qualified plant loops names and handles # end loop through plant loops    # Make an argument for condensor plant loop #make an argument for the OA DB temp below which to disable the condenser plant loop operation  # make a choice argument for setting EMS InternalVariableAvailabilityDictionaryReporting value # make a choice argument for setting EMSRuntimeLanguageDebugOutputLevel value # make a choice argument for setting EMS ActuatorAvailabilityDictionaryReportingvalue
model
<not_specific>