lib/measures/tbd/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 = nil)
    args = OpenStudio::Measure::OSArgumentVector.new
    load_tbd_json = OpenStudio::Measure::OSArgument.makeBoolArgument("load_tbd_json", true, false)
    load_tbd_json.setDisplayName("Load 'tbd.json'")
    load_tbd_json.setDescription("Loads existing 'tbd.json' file from model 'files' directory, may override 'default thermal bridge' pull-down option.")
    load_tbd_json.setDefaultValue(false)
    args << load_tbd_json
    choices = OpenStudio::StringVector.new
    psi = PSI.new
    psi.set.keys.each { |k| choices << k.to_s }
    option = OpenStudio::Measure::OSArgument.makeChoiceArgument("option", choices, true)
    option.setDisplayName("Default thermal bridge option")
    option.setDescription("e.g. 'poor', 'regular', 'efficient', 'code' (may be overridden by 'tbd.json' file).")
    option.setDefaultValue("poor (BETBG)")
    args << option
    alter_model = OpenStudio::Measure::OSArgument.makeBoolArgument("alter_model", true, false)
    alter_model.setDisplayName("Alter OpenStudio model (Apply Measures Now)")
    alter_model.setDescription("For EnergyPlus simulations, leave checked. For iterative exploration with Apply Measures Now, uncheck to preserve original OpenStudio model.")
    alter_model.setDefaultValue(true)
    args << alter_model
    write_tbd_json = OpenStudio::Measure::OSArgument.makeBoolArgument("write_tbd_json", true, false)
    write_tbd_json.setDisplayName("Write 'tbd.out.json'")
    write_tbd_json.setDescription("Write 'tbd.out.json' file to customize for subsequent runs. Edit and place in model 'files' directory as 'tbd.json'.")
    write_tbd_json.setDefaultValue(false)
    args << write_tbd_json
    gen_UA_report = OpenStudio::Measure::OSArgument.makeBoolArgument("gen_UA_report", true, false)
    gen_UA_report.setDisplayName("Generate UA' report")
    gen_UA_report.setDescription("Compare ∑U•A + ∑PSI•L + ∑KHI•n (model vs UA' reference - see pull-down option below).")
    gen_UA_report.setDefaultValue(false)
    args << gen_UA_report
    ua_reference = OpenStudio::Measure::OSArgument.makeChoiceArgument("ua_reference", choices, true)
    ua_reference.setDisplayName("UA' reference")
    ua_reference.setDescription("e.g. 'poor', 'regular', 'efficient', 'code'.")
    ua_reference.setDefaultValue("code (Quebec)")
    args << ua_reference
    gen_kiva = OpenStudio::Measure::OSArgument.makeBoolArgument("gen_kiva", true, false)
    gen_kiva.setDisplayName("Generate Kiva inputs")
    gen_kiva.setDescription("Generate Kiva settings & objects for surfaces with 'foundation' boundary conditions (not 'ground').")
    gen_kiva.setDefaultValue(false)
    args << gen_kiva
    gen_kiva_force = OpenStudio::Measure::OSArgument.makeBoolArgument("gen_kiva_force", true, false)
    gen_kiva_force.setDisplayName("Force-generate Kiva inputs")
    gen_kiva_force.setDescription("Overwrites 'ground' boundary conditions as 'foundation' before generating Kiva inputs (recommended).")
    gen_kiva_force.setDefaultValue(false)
    args << gen_kiva_force
    return args
  end
def arguments ( model = nil ) args = OpenStudio :: Measure :: OSArgumentVector . new load_tbd_json = OpenStudio :: Measure :: OSArgument . makeBoolArgument ( "load_tbd_json" , true , false ) load_tbd_json . setDisplayName ( "Load 'tbd.json'" ) load_tbd_json . setDescription ( "Loads existing 'tbd.json' file from model 'files' directory, may override 'default thermal bridge' pull-down option." ) load_tbd_json . setDefaultValue ( false ) args << load_tbd_json choices = OpenStudio :: StringVector . new psi = PSI . new psi . set . keys . each { | k | choices << k . to_s } option = OpenStudio :: Measure :: OSArgument . makeChoiceArgument ( "option" , choices , true ) option . setDisplayName ( "Default thermal bridge option" ) option . setDescription ( "e.g. 'poor', 'regular', 'efficient', 'code' (may be overridden by 'tbd.json' file)." ) option . setDefaultValue ( "poor (BETBG)" ) args << option alter_model = OpenStudio :: Measure :: OSArgument . makeBoolArgument ( "alter_model" , true , false ) alter_model . setDisplayName ( "Alter OpenStudio model (Apply Measures Now)" ) alter_model . setDescription ( "For EnergyPlus simulations, leave checked. For iterative exploration with Apply Measures Now, uncheck to preserve original OpenStudio model." ) alter_model . setDefaultValue ( true ) args << alter_model write_tbd_json = OpenStudio :: Measure :: OSArgument . makeBoolArgument ( "write_tbd_json" , true , false ) write_tbd_json . setDisplayName ( "Write 'tbd.out.json'" ) write_tbd_json . setDescription ( "Write 'tbd.out.json' file to customize for subsequent runs. Edit and place in model 'files' directory as 'tbd.json'." ) write_tbd_json . setDefaultValue ( false ) args << write_tbd_json gen_UA_report = OpenStudio :: Measure :: OSArgument . makeBoolArgument ( "gen_UA_report" , true , false ) gen_UA_report . setDisplayName ( "Generate UA' report" ) gen_UA_report . setDescription ( "Compare ∑U•A + ∑PSI•L + ∑KHI•n (model vs UA' reference - see pull-down option below).") gen_UA_report . setDefaultValue ( false ) args << gen_UA_report ua_reference = OpenStudio :: Measure :: OSArgument . makeChoiceArgument ( "ua_reference" , choices , true ) ua_reference . setDisplayName ( "UA' reference" ) ua_reference . setDescription ( "e.g. 'poor', 'regular', 'efficient', 'code'." ) ua_reference . setDefaultValue ( "code (Quebec)" ) args << ua_reference gen_kiva = OpenStudio :: Measure :: OSArgument . makeBoolArgument ( "gen_kiva" , true , false ) gen_kiva . setDisplayName ( "Generate Kiva inputs" ) gen_kiva . setDescription ( "Generate Kiva settings & objects for surfaces with 'foundation' boundary conditions (not 'ground')." ) gen_kiva . setDefaultValue ( false ) args << gen_kiva gen_kiva_force = OpenStudio :: Measure :: OSArgument . makeBoolArgument ( "gen_kiva_force" , true , false ) gen_kiva_force . setDisplayName ( "Force-generate Kiva inputs" ) gen_kiva_force . setDescription ( "Overwrites 'ground' boundary conditions as 'foundation' before generating Kiva inputs (recommended)." ) gen_kiva_force . setDefaultValue ( false ) args << gen_kiva_force return args end
define the arguments that the user will input
define the arguments that the user will input
model