lib/measures/tariff_selection_block/measure.rb in openstudio-common-measures-0.9.0 vs lib/measures/tariff_selection_block/measure.rb in openstudio-common-measures-0.10.0
- old
+ new
@@ -4,14 +4,10 @@
# *******************************************************************************
# see the URL below for information on how to write OpenStudio measures
# http://nrel.github.io/OpenStudio-user-documentation/measures/measure_writing_guide/
-# load OpenStudio measure libraries from openstudio-extension gem
-require 'openstudio-extension'
-require 'openstudio/extension/core/os_lib_helper_methods'
-
# start the measure
class TariffSelectionBlock < OpenStudio::Measure::EnergyPlusMeasure
# human readable name
def name
return ' Tariff Selection-Block'
@@ -102,10 +98,11 @@
# define what happens when the measure is run
def run(workspace, runner, user_arguments)
super(workspace, runner, user_arguments)
# assign the user inputs to variables
- args = OsLib_HelperMethods.createRunVariables(runner, workspace, user_arguments, arguments(workspace))
+ args = runner.getArgumentValues(arguments(workspace), user_arguments)
+ args = Hash[args.collect{ |k, v| [k.to_s, v] }]
if !args then return false end
# make arrays out of comma separated string inputs
block_size_array = args['elec_block_values'].split(',')
block_rate_array = args['elec_block_costs'].split(',')