Skip to content

Commit

Permalink
Merge pull request #223 from urbanopt/develop
Browse files Browse the repository at this point in the history
Version 0.6.0
  • Loading branch information
kflemin authored May 2, 2021
2 parents 868949f + 2eba5df commit fed25a1
Show file tree
Hide file tree
Showing 799 changed files with 9,532 additions and 6,324 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## Version 0.6.0

Date Range 3/31/21 - 4/30/21

- Fixed [#179]( https://github.com/urbanopt/urbanopt-cli/issues/179 ), Visualization : Annual End Use graphs, updating end-use tags
- Fixed [#185]( https://github.com/urbanopt/urbanopt-cli/issues/185 ), Add additional fuels used by the residential workflow to the first chart (when they exist)
- Updated dependencies for OpenStudio 3.2.0 / Ruby 2.7

## Version 0.5.2

Date Range 3/9/21 - 3/31/21
Expand Down
8 changes: 4 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
# if allow_local && File.exist?('../urbanopt-scenario-gem')
# gem 'urbanopt-scenario', path: '../urbanopt-scenario-gem'
# elsif allow_local
# gem 'urbanopt-scenario', github: 'URBANopt/urbanopt-scenario-gem', branch: 'develop'
# gem 'urbanopt-scenario', github: 'URBANopt/urbanopt-scenario-gem', branch: 'develop'
# end

# if allow_local && File.exist?('../urbanopt-geojson-gem')
# gem 'urbanopt-geojson', path: '../urbanopt-geojson-gem'
# elsif allow_local
# gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: 'develop'
# gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: 'develop'
# end

# if allow_local && File.exist?('../urbanopt-reopt-gem')
# gem 'urbanopt-reopt', path: '../urbanopt-reopt-gem'
# elsif allow_local
# gem 'urbanopt-reopt', github: 'URBANopt/urbanopt-reopt-gem', branch: 'develop'
# gem 'urbanopt-reopt', github: 'URBANopt/urbanopt-reopt-gem', branch: 'develop'
# end

# if allow_local && File.exist?('../openstudio-load-flexibility-measures')
Expand All @@ -60,5 +60,5 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
# if allow_local && File.exist?('../urbanopt-reporting-gem')
# gem 'urbanopt-reporting', path: '../urbanopt-reporting-gem'
# elsif allow_local
# gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: 'develop'
# gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: 'develop'
# end
16 changes: 8 additions & 8 deletions example_files/Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'http://rubygems.org'

ruby '~> 2.5.0'
ruby '~> 2.7.0'

# Local gems are useful when developing and integrating the various dependencies.
# To favor the use of local gems, set the following environment variable:
Expand Down Expand Up @@ -31,53 +31,53 @@ if allow_local && File.exist?('../openstudio-common-measures-gem')
elsif allow_local
gem 'openstudio-common-measures', github: 'NREL/openstudio-common-measures-gem', branch: 'develop'
else
gem 'openstudio-common-measures', '~> 0.3.2'
gem 'openstudio-common-measures', '~> 0.4.0'
end

if allow_local && File.exist?('../openstudio-model-articulation-gem')
gem 'openstudio-model-articulation', path: '../openstudio-model-articulation-gem'
elsif allow_local
gem 'openstudio-model-articulation', github: 'NREL/openstudio-model-articulation-gem', branch: 'develop'
else
gem 'openstudio-model-articulation', '~> 0.3.1'
gem 'openstudio-model-articulation', '~> 0.4.0'
end

if allow_local && File.exist?('../openstudio-load-flexibility-measures-gem')
gem 'openstudio-load-flexibility-measures', path: '../openstudio-load-flexibility-measures-gem'
elsif allow_local
gem 'openstudio-load-flexibility-measures', github: 'NREL/openstudio-load-flexibility-measures-gem', branch: 'master'
else
gem 'openstudio-load-flexibility-measures', '~> 0.2.1'
gem 'openstudio-load-flexibility-measures', '~> 0.3.1'
end

if allow_local && File.exist?('../openstudio-ee-gem')
gem 'openstudio-ee', path: '../openstudio-ee-gem'
elsif allow_local
gem 'openstudio-ee', github: 'NREL/openstudio-ee-gem', branch: 'develop'
else
gem 'openstudio-ee', '~> 0.3.2'
gem 'openstudio-ee', '~> 0.4.0'
end

if allow_local && File.exist?('../openstudio-calibration-gem')
gem 'openstudio-calibration', path: '../openstudio-calibration-gem'
elsif allow_local
gem 'openstudio-calibration', github: 'NREL/openstudio-calibration-gem', branch: 'develop'
else
gem 'openstudio-calibration', '~> 0.3.1'
gem 'openstudio-calibration', '~> 0.4.0'
end

if allow_local && File.exists?('../urbanopt-geojson-gem')
gem 'urbanopt-geojson', path: '../urbanopt-geojson-gem'
elsif allow_local
gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: 'develop'
else
gem 'urbanopt-geojson', '~> 0.5.0'
gem 'urbanopt-geojson', '~> 0.6.1'
end

if allow_local && File.exists?('../urbanopt-reporting-gem')
gem 'urbanopt-reporting', path: '../urbanopt-reporting-gem'
elsif allow_local
gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: 'develop'
else
gem 'urbanopt-reporting', '~> 0.3.6'
gem 'urbanopt-reporting', '~> 0.4.0'
end
73 changes: 37 additions & 36 deletions example_files/mappers/Baseline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -443,48 +443,48 @@ def create_osw(scenario, features, feature_names)
args[:geometry_building_num_units] = 1
case building_type
when 'Single-Family Detached'
args[:geometry_unit_type] = "single-family detached"
args[:geometry_unit_type] = 'single-family detached'
when 'Single-Family Attached'
args[:geometry_building_num_units] = feature.number_of_residential_units
args[:geometry_unit_type] = "single-family attached"
args[:geometry_unit_type] = 'single-family attached'
when 'Multifamily'
args[:geometry_building_num_units] = feature.number_of_residential_units
args[:geometry_unit_type] = "apartment unit"
args[:geometry_unit_type] = 'apartment unit'
args[:geometry_corridor_position] = 'Double Exterior' # if we had an interior corridor, we'd have to subtract its area from the footprint area
end

args[:geometry_foundation_type] = "SlabOnGrade"
args[:geometry_foundation_type] = 'SlabOnGrade'
args[:geometry_foundation_height] = 0.0
case feature.foundation_type
when 'crawlspace - vented'
args[:geometry_foundation_type] = "VentedCrawlspace"
args[:geometry_foundation_type] = 'VentedCrawlspace'
args[:geometry_foundation_height] = 3.0
when 'crawlspace - unvented'
args[:geometry_foundation_type] = "UnventedCrawlspace"
args[:geometry_foundation_type] = 'UnventedCrawlspace'
args[:geometry_foundation_height] = 3.0
when 'basement - unconditioned'
args[:geometry_foundation_type] = "UnconditionedBasement"
args[:geometry_foundation_type] = 'UnconditionedBasement'
args[:geometry_foundation_height] = 8.0
when 'basement - conditioned'
args[:geometry_foundation_type] = "ConditionedBasement"
args[:geometry_foundation_type] = 'ConditionedBasement'
args[:geometry_foundation_height] = 8.0
when 'ambient'
args[:geometry_foundation_type] = "Ambient"
args[:geometry_foundation_type] = 'Ambient'
args[:geometry_foundation_height] = 8.0
end

args[:geometry_attic_type] = "VentedAttic"
args[:geometry_roof_type] = "flat"
args[:geometry_attic_type] = 'VentedAttic'
args[:geometry_roof_type] = 'flat'
begin
case feature.attic_type
when 'attic - vented'
args[:geometry_roof_type] = "gable"
args[:geometry_roof_type] = 'gable'
when 'attic - unvented'
args[:geometry_attic_type] = "UnventedAttic"
args[:geometry_roof_type] = "gable"
args[:geometry_attic_type] = 'UnventedAttic'
args[:geometry_roof_type] = 'gable'
when 'attic - conditioned'
args[:geometry_attic_type] = "ConditionedAttic"
args[:geometry_roof_type] = "gable"
args[:geometry_attic_type] = 'ConditionedAttic'
args[:geometry_roof_type] = 'gable'
end
rescue
end
Expand Down Expand Up @@ -522,50 +522,51 @@ def create_osw(scenario, features, feature_names)

args[:schedules_type] = 'stochastic'
args[:feature_id] = feature_id.hex
args[:schedules_variation] = 'building' # building or unit

# HVAC

system_type = "Residential - furnace and central air conditioner"
system_type = 'Residential - furnace and central air conditioner'
begin
system_type = feature.system_type
rescue
end

args[:heating_system_type] = "none"
args[:heating_system_type] = 'none'
if system_type.include?('electric resistance')
args[:heating_system_type] = "ElectricResistance"
args[:heating_system_type] = 'ElectricResistance'
elsif system_type.include?('furnace')
args[:heating_system_type] = "Furnace"
args[:heating_system_type] = 'Furnace'
elsif system_type.include?('boiler')
args[:heating_system_type] = "Boiler"
args[:heating_system_type] = 'Boiler'
end

args[:cooling_system_type] = "none"
args[:cooling_system_type] = 'none'
if system_type.include?('central air conditioner')
args[:cooling_system_type] = "central air conditioner"
args[:cooling_system_type] = 'central air conditioner'
elsif system_type.include?('room air conditioner')
args[:cooling_system_type] = "room air conditioner"
args[:cooling_system_type] = 'room air conditioner'
elsif system_type.include?('evaporative cooler')
args[:cooling_system_type] = "evaporative cooler"
args[:cooling_system_type] = 'evaporative cooler'
end

args[:heat_pump_type] = "none"
args[:heat_pump_type] = 'none'
if system_type.include?('air-to-air')
args[:heat_pump_type] = "air-to-air"
args[:heat_pump_type] = 'air-to-air'
elsif system_type.include?('mini-split')
args[:heat_pump_type] = "mini-split"
args[:heat_pump_type] = 'mini-split'
elsif system_type.include?('ground-to-air')
args[:heat_pump_type] = "ground-to-air"
args[:heat_pump_type] = 'ground-to-air'
end

args[:heating_system_fuel] = "natural gas"
args[:heating_system_fuel] = 'natural gas'
begin
args[:heating_system_fuel] = feature.heating_system_fuel_type
rescue
end

if args[:heating_system_type] == "ElectricResistance"
args[:heating_system_fuel] = "electricity"
if args[:heating_system_type] == 'ElectricResistance'
args[:heating_system_fuel] = 'electricity'
end

# APPLIANCES
Expand Down Expand Up @@ -618,21 +619,21 @@ def create_osw(scenario, features, feature_names)

# HVAC

if args[:heating_system_type] != "none"
if args[:heating_system_type] != 'none'
heating_system_filepath = File.join(File.dirname(__FILE__), 'residential/heating_system.tsv')
heating_system = get_lookup_tsv(args, heating_system_filepath)
row = get_lookup_row(args, heating_system, template_vals)
args.update(row) unless row.nil?
end

if args[:cooling_system_type] != "none"
if args[:cooling_system_type] != 'none'
cooling_system_filepath = File.join(File.dirname(__FILE__), 'residential/cooling_system.tsv')
cooling_system = get_lookup_tsv(args, cooling_system_filepath)
row = get_lookup_row(args, cooling_system, template_vals)
args.update(row) unless row.nil?
end

if args[:heat_pump_type] != "none"
if args[:heat_pump_type] != 'none'
heat_pump_filepath = File.join(File.dirname(__FILE__), 'residential/heat_pump.tsv')
heat_pump = get_lookup_tsv(args, heat_pump_filepath)
row = get_lookup_row(args, heat_pump, template_vals)
Expand Down Expand Up @@ -690,7 +691,7 @@ def create_osw(scenario, features, feature_names)

args.keys.each do |arg_name|
unless default_args.keys.include? arg_name
next if arg_name == 'feature_id'
next if [:feature_id, :schedules_variation].include?(arg_name)

puts "Argument '#{arg_name}' is unknown."
end
Expand Down
Loading

0 comments on commit fed25a1

Please sign in to comment.