diff --git a/CHANGELOG.md b/CHANGELOG.md index 97549bc..fce7c1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # URBANopt Reporting Gem +## Version 0.4.2 +Date Range: 07/01/21 - 10/15/21 + +- Fixed [#86]( https://github.com/urbanopt/urbanopt-reporting-gem/issues/86 ), Add location of PV to Scenario and Feature optimization reopt reports #86 +- Fixed [#77]( https://github.com/urbanopt/urbanopt-reporting-gem/issues/77 ), Fix test_with_openstudio model failures + ## Version 0.4.1 Date Range: 04/27/23 - 07/01/21 diff --git a/lib/urbanopt/reporting/default_reports/schema/scenario_schema.json b/lib/urbanopt/reporting/default_reports/schema/scenario_schema.json index ac47c27..ab07443 100644 --- a/lib/urbanopt/reporting/default_reports/schema/scenario_schema.json +++ b/lib/urbanopt/reporting/default_reports/schema/scenario_schema.json @@ -128,6 +128,15 @@ "size_kw": { "description": "rated power in kW", "type": "string" + }, + "location": { + "description": "Location of PV. Available options are roof, ground or both.", + "type": "string", + "enum": [ + "roof", + "ground", + "both" + ] } } }, diff --git a/lib/urbanopt/reporting/default_reports/solar_pv.rb b/lib/urbanopt/reporting/default_reports/solar_pv.rb index 1f96442..d6b33b0 100644 --- a/lib/urbanopt/reporting/default_reports/solar_pv.rb +++ b/lib/urbanopt/reporting/default_reports/solar_pv.rb @@ -52,6 +52,7 @@ class SolarPV # _Float_ - power capacity in kilowatts # attr_accessor :size_kw + attr_accessor :location ## # Initialize SolarPV attributes from a hash. Solar PV attributes currently are limited to power capacity. @@ -65,6 +66,7 @@ def initialize(hash = {}) @size_kw = hash[:size_kw] @id = hash[:id] + @location = hash[:location] # initialize class variables @@validator and @@schema @@validator ||= Validator.new @@ -81,6 +83,7 @@ def to_hash result = {} result[:size_kw] = @size_kw if @size_kw + result[:location] = @location if @location return result end diff --git a/lib/urbanopt/reporting/version.rb b/lib/urbanopt/reporting/version.rb index d9a9afa..6b00678 100644 --- a/lib/urbanopt/reporting/version.rb +++ b/lib/urbanopt/reporting/version.rb @@ -40,6 +40,6 @@ module URBANopt module Reporting - VERSION = '0.4.1'.freeze + VERSION = '0.4.2'.freeze end end diff --git a/spec/urbanopt/reporting/reporting_spec.rb b/spec/urbanopt/reporting/reporting_spec.rb index 026dc26..3ee825f 100644 --- a/spec/urbanopt/reporting/reporting_spec.rb +++ b/spec/urbanopt/reporting/reporting_spec.rb @@ -243,4 +243,11 @@ # puts "\nfinal periods: #{existing_periods}" end + + it 'can report solarPV results' do + solar_pv = URBANopt::Reporting::DefaultReports::SolarPV.new({ size_kw: 100, id: 1, location: 'roof' }) + expect(solar_pv.size_kw).to eq 100 + expect(solar_pv.location).to eq 'roof' + end + end