lib/measures/GEB Metrics Report/resources/os_lib_reporting.rb in openstudio-geb-0.3.2 vs lib/measures/GEB Metrics Report/resources/os_lib_reporting.rb in openstudio-geb-0.3.3

- old
+ new

@@ -1,10 +1,10 @@ -# ******************************************************************************* -# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. -# See also https://openstudio.net/license -# ******************************************************************************* - +# ******************************************************************************* +# OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC. +# See also https://openstudio.net/license +# ******************************************************************************* + require 'json' require 'openstudio-standards' require 'yaml' require 'date' require 'matrix' @@ -445,11 +445,10 @@ summer_demand_geb_values = [] winter_demand_base_values = [] winter_demand_geb_values = [] step_per_h = model.getTimestep.numberOfTimestepsPerHour.to_f floor_area_ft2 = OpenStudio.convert(model.building.get.floorArea.to_f, 'm^2', 'ft^2').get - puts "*************step 1*************" datetimes.each_with_index do |time, idx| # get results for the event day if time.month == event_month && time.day == event_day event_day_times << time.strftime("%H:%M") @@ -477,18 +476,10 @@ event_day_base_values = event_day_base_values.rotate(-4) # shift the load profile one hour later, 15min output so rotate the last four to the front event_day_geb_values = event_day_geb_values.rotate(-4) end end - puts "event_day_times: #{event_day_times.inspect}" - puts "event_day_base_values: #{event_day_base_values.inspect}" - puts "event_day_geb_values: #{event_day_geb_values.inspect}" - puts "summer_demand_base_values.size: #{summer_demand_base_values.size}" - puts "summer_demand_geb_values.size: #{summer_demand_geb_values.size}" - puts "winter_demand_base_values.size: #{winter_demand_base_values.size}" - puts "winter_demand_geb_values.size: #{winter_demand_geb_values.size}" - if (shed_start.is_a?Time) && (shed_end.is_a?Time) shed_range = [shed_start.strftime("%H:%M"), shed_end.strftime("%H:%M")] demand_decrease_shed_period = [] demand_base_shed_period = [] event_day_times.each_with_index do |time, idx| @@ -512,15 +503,10 @@ end end end end - puts "demand_base_shed_period: #{demand_base_shed_period.inspect}" - puts "demand_decrease_shed_period: #{demand_decrease_shed_period.inspect}" - puts "demand_base_take_period: #{demand_base_take_period.inspect}" - puts "demand_increase_take_period: #{demand_increase_take_period.inspect}" - # table: list all the primary DF metrics demand_decrease_primary_metrics_table = {} demand_decrease_primary_metrics_table[:title] = 'Demand Decrease (Shed) Primary Metrics' demand_decrease_primary_metrics_table[:header] = ['P1-Base: Summer Peak Demand Intensity - baseline', 'P1-GEB: Summer Peak Demand Intensity - GEB measures', @@ -567,12 +553,10 @@ (demand_increase_take*1000/floor_area_ft2).round(2), ((demand_increase_take_period.sum/demand_base_take_period.sum) * 100).round(2)]) # % end end - puts "demand_decrease_primary_metrics_table[:data]: #{demand_decrease_primary_metrics_table[:data].inspect}" - # plot: event day timestep demand profiles of baseline and GEB measures bldg_demand_chart = {} bldg_demand_chart[:title] = 'Whole Building Net Electricity Consumption on selected day (W)' bldg_demand_chart[:chart_div] = 'bldg_demand_chart' bldg_demand_chart[:xaxis_label] = 'Time' @@ -599,12 +583,9 @@ mode: "lines", name: 'GEB measures', x: event_day_times, y: event_day_geb_values ) - - puts "demand_decrease_primary_metrics_table: #{demand_decrease_primary_metrics_table.inspect}" - puts "bldg_demand_chart: #{bldg_demand_chart.inspect}" @geb_metrics_section[:tables] << demand_decrease_primary_metrics_table @geb_metrics_section[:bldg_demand_charts] << bldg_demand_chart # @geb_metrics_section[:tables] << demand_increase_primary_metrics_table