lib/measures/tbd/resources/conditioned.rb
##
# Return min & max values for schedule (constant).
#
# @param [OpenStudio::Model::ScheduleConstant] sched An OS schedule (constant)
#
# @return [Hash] :min & :max; nilled if invalid.
Return min & max values for schedule (constant).
Return min & max values for schedule ( constant ) .
def scheduleConstantMinMax(sched)
   github.com/NREL/openstudio-standards/blob/
   99cf713750661fe7d2082739f251269c2dfd9140/lib/openstudio-standards/
   standards/Standards.ScheduleConstant.rbL21
  result = { min: nil, max: nil }
  unless sched && sched.is_a?(OpenStudio::Model::ScheduleConstant)
    TBD.log(TBD::DEBUG,
      "Invalid constant MinMax schedule (argument) - skipping")
    return result
  end
  min = nil
  min = sched.value if sched.value.is_a?(Numeric)
  max = min
  result[:min] = min
  result[:max] = max
  result
end
def scheduleConstantMinMax ( sched ) result = { min : nil , max : nil } unless sched && sched . is_a? ( OpenStudio :: Model :: ScheduleConstant ) TBD . log ( TBD :: DEBUG , "Invalid constant MinMax schedule (argument) - skipping" ) return result end min = nil min = sched . value if sched . value . is_a? ( Numeric ) max = min result [ :min ] = min result [ :max ] = max result end
Return min & max values for schedule (constant).
Return min & max values for schedule ( constant ) .
# Largely inspired from David Goldwasser's # "schedule_constant_annual_min_max_value": # # github.com/NREL/openstudio-standards/blob/ # 99cf713750661fe7d2082739f251269c2dfd9140/lib/openstudio-standards/ # standards/Standards.ScheduleConstant.rb#L21
:min & :max; nilled if invalid.
: min & : max ; nilled if invalid .
Hash
sched
sched An OS schedule (constant)
sched An OS schedule ( constant )