class URBANopt::Reporting::DefaultReports::QAQC
QAQC
flags for each feature
Attributes
Hash - Hash of flags raised by QAQC
measure for this feature during this reporting period
Hash - Hash of flags raised by QAQC
measure for this feature during this reporting period
Hash - Hash of flags raised by QAQC
measure for this feature during this reporting period
Hash - Hash of flags raised by QAQC
measure for this feature during this reporting period
Hash - Hash of flags raised by QAQC
measure for this feature during this reporting period
Hash - Hash of flags raised by QAQC
measure for this feature during this reporting period
Hash - Hash of flags raised by QAQC
measure for this feature during this reporting period
Hash - Hash of flags raised by QAQC
measure for this feature during this reporting period
Hash - Hash of flags raised by QAQC
measure for this feature during this reporting period
Hash - Hash of flags raised by QAQC
measure for this feature during this reporting period
Hash - Hash of flags raised by QAQC
measure for this feature during this reporting period
Public Class Methods
QAQC
class initialize quaqc attributes: :eui_reasonableness,
:end_use_by_category,+:mechanical_system_part_load_efficiency, +:simultaneous_heating_and_cooling , +:internal_loads , +:schedules, +:envelope_r_value, +:domestic_hot_water , +:mechanical_system_efficiency , +:supply_and_zone_air_temperature, +:total_qaqc_flags
- parameters:
-
hash
- Hash - A hash containing qaqc attributes listed above.
# File lib/urbanopt/reporting/default_reports/qaqc_flags.rb, line 33 def initialize(hash = {}) hash.delete_if { |k, v| v.nil? } hash = defaults.merge(hash) @eui_reasonableness = hash[:eui_reasonableness] @end_use_by_category = hash[:end_use_by_category] @mechanical_system_part_load_efficiency = hash[:mechanical_system_part_load_efficiency] @simultaneous_heating_and_cooling = hash[:simultaneous_heating_and_cooling] @supply_and_zone_air_temperature = hash[:supply_and_zone_air_temperature] @internal_loads = hash[:internal_loads] @schedules = hash[:schedules] @envelope_r_value = hash[:envelope_r_value] @domestic_hot_water = hash[:domestic_hot_water] @mechanical_system_efficiency = hash[:mechanical_system_efficiency] @total_qaqc_flags = hash[:total_qaqc_flags] # initialize class variables @@validator and @@schema @@validator ||= Validator.new @@schema ||= @@validator.schema end
Public Instance Methods
Merges qaqc_flags objects to each other by summing up values.
- parameters:
-
other
- QAQC - An object ofProgram
class.
# File lib/urbanopt/reporting/default_reports/qaqc_flags.rb, line 128 def add_qaqc_flags(other) @eui_reasonableness = add_values(@eui_reasonableness, other.eui_reasonableness) @end_use_by_category = add_values(@end_use_by_category, other.end_use_by_category) @mechanical_system_part_load_efficiency = add_values(@mechanical_system_part_load_efficiency, other.mechanical_system_part_load_efficiency) @simultaneous_heating_and_cooling = add_values(@simultaneous_heating_and_cooling, other.simultaneous_heating_and_cooling) @supply_and_zone_air_temperature = add_values(@supply_and_zone_air_temperature, other.supply_and_zone_air_temperature) @internal_loads = add_values(@internal_loads, other.internal_loads) @schedules = add_values(@schedules, other.schedules) @envelope_r_value = add_values(@envelope_r_value, other.envelope_r_value) @domestic_hot_water = add_values(@domestic_hot_water, other.domestic_hot_water) @mechanical_system_efficiency = add_values(@mechanical_system_efficiency, other.mechanical_system_efficiency) @total_qaqc_flags = add_values(@total_qaqc_flags, other.total_qaqc_flags) end
Assigns default values if values do not exist.
# File lib/urbanopt/reporting/default_reports/qaqc_flags.rb, line 60 def defaults hash = {} hash[:eui_reasonableness] = nil hash[:end_use_by_category] = nil hash[:mechanical_system_part_load_efficiency] = nil hash[:simultaneous_heating_and_cooling] = nil hash[:supply_and_zone_air_temperature] = nil hash[:internal_loads] = nil hash[:schedules] = nil hash[:envelope_r_value] = nil hash[:domestic_hot_water] = nil hash[:mechanical_system_efficiency] = nil hash[:total_qaqc_flags] = nil return hash end
Convert to a Hash equivalent for JSON serialization
# File lib/urbanopt/reporting/default_reports/qaqc_flags.rb, line 81 def to_hash result = {} result[:eui_reasonableness] = @eui_reasonableness result[:end_use_by_category] = @end_use_by_category result[:mechanical_system_part_load_efficiency] = @mechanical_system_part_load_efficiency result[:simultaneous_heating_and_cooling] = @simultaneous_heating_and_cooling result[:supply_and_zone_air_temperature] = @supply_and_zone_air_temperature result[:internal_loads] = @internal_loads result[:schedules] = @schedules result[:envelope_r_value] = @envelope_r_value result[:domestic_hot_water] = @domestic_hot_water result[:mechanical_system_efficiency] = @mechanical_system_efficiency result[:total_qaqc_flags] = @total_qaqc_flags # validate program properties against schema if @@validator.validate(@@schema[:definitions][:qaqc_flags][:properties], result).any? raise "qaqc properties does not match schema: #{@@validator.validate(@@schema[:definitions][:qaqc_flags][:properties], result)}" end return result end