Measures/m_13_example_13_surface_construction_actuator_for_thermochromatic_window/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
    fixed_window_subsurface_handles = OpenStudio::StringVector.new
    fixed_window_subsurface_display_names = OpenStudio::StringVector.new
    subsurface_array = []
    model.getSurfaces.each do |surface|
      surface.subSurfaces.each do |sub_surface|
        subsurface_array << sub_surface
      end
    end
    subsurface_array.each do |subsurface|
      if subsurface.subSurfaceType == "FixedWindow"
        fixed_window_subsurface_handles << subsurface.handle.to_s
        fixed_window_subsurface_display_names << subsurface.name.to_s
      end
    end
    fixed_window_subsurface = OpenStudio::Measure::OSArgument.makeChoiceArgument('fixed_window_subsurface', fixed_window_subsurface_handles, fixed_window_subsurface_display_names, true)
    fixed_window_subsurface.setDisplayName('Choose a Fixed Window Subsurface to Replace with an EMS generated thermochromic window construction.')
    fixed_window_subsurface.setDefaultValue('Perimeter_ZN_1_wall_south_Window_1')
    args << fixed_window_subsurface    
    internal_variable_availability_dictionary_reporting_choice = OpenStudio::StringVector.new
    internal_variable_availability_dictionary_reporting_choice << 'None'
    internal_variable_availability_dictionary_reporting_choice << 'NotByUniqueKeyNames'
    internal_variable_availability_dictionary_reporting_choice << 'Verbose'
    internal_variable_availability_dictionary_reporting = OpenStudio::Measure::OSArgument.makeChoiceArgument('internal_variable_availability_dictionary_reporting', internal_variable_availability_dictionary_reporting_choice, 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_output_level_choice = OpenStudio::StringVector.new
    ems_runtime_language_debug_output_level_choice << 'None'
    ems_runtime_language_debug_output_level_choice << 'ErrorsOnly'
    ems_runtime_language_debug_output_level_choice << 'Verbose'
    ems_runtime_language_debug_output_level = OpenStudio::Measure::OSArgument.makeChoiceArgument('ems_runtime_language_debug_output_level', ems_runtime_language_debug_output_level_choice, 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_availability_dictionary_reporting_choice = OpenStudio::StringVector.new
    actuator_availability_dictionary_reporting_choice << 'None'
    actuator_availability_dictionary_reporting_choice << 'NotByUniqueKeyNames'
    actuator_availability_dictionary_reporting_choice << 'Verbose'
    actuator_availability_dictionary_reporting = OpenStudio::Measure::OSArgument.makeChoiceArgument('actuator_availability_dictionary_reporting', actuator_availability_dictionary_reporting_choice, 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 fixed_window_subsurface_handles = OpenStudio :: StringVector . new fixed_window_subsurface_display_names = OpenStudio :: StringVector . new subsurface_array = [ ] model . getSurfaces . each do | surface | surface . subSurfaces . each do | sub_surface | subsurface_array << sub_surface end end subsurface_array . each do | subsurface | if subsurface . subSurfaceType == "FixedWindow" fixed_window_subsurface_handles << subsurface . handle . to_s fixed_window_subsurface_display_names << subsurface . name . to_s end end fixed_window_subsurface = OpenStudio :: Measure :: OSArgument . makeChoiceArgument ( 'fixed_window_subsurface' , fixed_window_subsurface_handles , fixed_window_subsurface_display_names , true ) fixed_window_subsurface . setDisplayName ( 'Choose a Fixed Window Subsurface to Replace with an EMS generated thermochromic window construction.' ) fixed_window_subsurface . setDefaultValue ( 'Perimeter_ZN_1_wall_south_Window_1' ) args << fixed_window_subsurface internal_variable_availability_dictionary_reporting_choice = OpenStudio :: StringVector . new internal_variable_availability_dictionary_reporting_choice << 'None' internal_variable_availability_dictionary_reporting_choice << 'NotByUniqueKeyNames' internal_variable_availability_dictionary_reporting_choice << 'Verbose' internal_variable_availability_dictionary_reporting = OpenStudio :: Measure :: OSArgument . makeChoiceArgument ( 'internal_variable_availability_dictionary_reporting' , internal_variable_availability_dictionary_reporting_choice , 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_output_level_choice = OpenStudio :: StringVector . new ems_runtime_language_debug_output_level_choice << 'None' ems_runtime_language_debug_output_level_choice << 'ErrorsOnly' ems_runtime_language_debug_output_level_choice << 'Verbose' ems_runtime_language_debug_output_level = OpenStudio :: Measure :: OSArgument . makeChoiceArgument ( 'ems_runtime_language_debug_output_level' , ems_runtime_language_debug_output_level_choice , 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_availability_dictionary_reporting_choice = OpenStudio :: StringVector . new actuator_availability_dictionary_reporting_choice << 'None' actuator_availability_dictionary_reporting_choice << 'NotByUniqueKeyNames' actuator_availability_dictionary_reporting_choice << 'Verbose' actuator_availability_dictionary_reporting = OpenStudio :: Measure :: OSArgument . makeChoiceArgument ( 'actuator_availability_dictionary_reporting' , actuator_availability_dictionary_reporting_choice , 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) Choice List of a FixedWindow subsurface to apply a thermochromic window construction to  # put all model subsurfaces and names into arrays # make a choice argument for a subsurface of type FixedWindow # make a choice argument for setting InternalVariableAvailabilityDictionaryReporting value # make a choice argument for setting EMSRuntimeLanguageDebugOutputLevel value # make a choice argument for setting ActuatorAvailabilityDictionaryReportingvalue
model
<not_specific>