Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update standards #244

Merged
merged 14 commits into from
Oct 8, 2020
Merged

Update standards #244

merged 14 commits into from
Oct 8, 2020

Conversation

macumber
Copy link
Collaborator

@macumber macumber commented Oct 7, 2020

@jmarrec i am just trying to hack this to get it to run right now

@macumber macumber marked this pull request as draft October 7, 2020 05:20
@macumber
Copy link
Collaborator Author

macumber commented Oct 7, 2020

@jmarrec i re-exported 90_1_2013.osm, if you have time to see if it makes sense tomorrow i could look at running to export all the other standards too

@macumber macumber requested a review from jmarrec October 7, 2020 05:49
@macumber
Copy link
Collaborator Author

macumber commented Oct 7, 2020

Whoops, accidentally exported with 2.9.1, re-doing with 3.1.0-rc1 now

@macumber
Copy link
Collaborator Author

macumber commented Oct 7, 2020

OK, updated with 3.1.0-rc1

@jmarrec
Copy link
Collaborator

jmarrec commented Oct 7, 2020

@macumber In order to have a cleaner history, I first copied the standards script as-is then cherry picked your commits atop of it, so I could better the changes you made to it. I then force-pushed so make sure to update your refs

@jmarrec
Copy link
Collaborator

jmarrec commented Oct 7, 2020

@macumber I copied the existing 90.1-2013.osm, and VT'ed it to 3.1.0-rc1. Then I copied yours.

I've ran a regular diff, but that's a bit hard to follow sometimes, so I made this small helper:

@m_ori = osload('90_1_2013_ori_vt.osm')
@m_mod = osload('90_1_2013_mod.osm')

@m_ori = osload('90_1_2013_ori_vt.osm')
@m_mod = osload('90_1_2013_mod.osm')

def compare(className, return_names=false)
  x_ori = eval("@m_ori.get#{className}s.map{|x| x.nameString}")
  x_mod = eval("@m_mod.get#{className}s.map{|x| x.nameString}")
  deleted = x_ori - x_mod
  if !deleted.empty?
    puts "Deleted #{className}:"
    puts deleted
    puts "\n\n"
  end
  added = x_mod - x_ori
  if !added.empty?
    puts "Added #{className}"
    puts added
    puts "\n\n"
  end

  return added, deleted, x_ori, x_mod if return_names
  return added, deleted
end

I didn't find any concerning differences.

Construction sets for eg are named per ASHRAE 169-2013 now versus ASHRAE 169-2006 before.

 compare("DefaultConstructionSet")
Deleted DefaultConstructionSet:
90.1-2013 - Warehouse - ASHRAE 169-2006-8B
[... plenty more ...]

Added DefaultConstructionSet
90.1-2013 - Warehouse - ASHRAE 169-2013-7B
[42] diff(main)> compare("BoilerHotWater")
=> [[], []]
[43] diff(main)> compare("ChillerElectricEIR")
=> [[], []]
[44] diff(main)> compare("SpaceType")
Added SpaceType
SmallDataCenterLowITE ComputerRoom
Laboratory Office
SmallDataCenterHighITE ComputerRoom
Laboratory Equipment corridor
Laboratory Lab with fume hood
Laboratory Open lab
LargeDataCenterHighITE StandaloneDataCenter
LargeDataCenterLowITE StandaloneDataCenter

Diff all object names:

added, deleted, x_ori, x_mod = compare("ModelObject")
File.open('ori_names.txt', 'w') {|f| f.puts x_ori.sort.uniq}
File.open('mod_names.txt', 'w') {|f| f.puts x_mod.sort.uniq}

@jmarrec
Copy link
Collaborator

jmarrec commented Oct 7, 2020

Generating a single template:

*** Finished all templates at: 2020-10-07 11:28:21 +0200, time elapsed = 15.5 min.

Testing is over, use the full number of templates
… option: in_processes is needed not in_threads!
…sing std=90.1.2013 std.standars_data now only contains that code, not all
@jmarrec
Copy link
Collaborator

jmarrec commented Oct 7, 2020

Ok, I ran all 16 templates after fixing the Parallel thing, took 36min.

real	36m3,144s
user	298m46,951s
sys	0m23,146s

DEER 2017 (and 2020) failed though.

$ du -sh developer/ruby/pkg/libraries/*.osm
9,5M	developer/ruby/pkg/libraries/90_1_2004.osm
9,5M	developer/ruby/pkg/libraries/90_1_2007.osm
9,6M	developer/ruby/pkg/libraries/90_1_2010.osm
9,4M	developer/ruby/pkg/libraries/90_1_2013.osm
12M	developer/ruby/pkg/libraries/DEER_1985.osm
12M	developer/ruby/pkg/libraries/DEER_1996.osm
12M	developer/ruby/pkg/libraries/DEER_2003.osm
12M	developer/ruby/pkg/libraries/DEER_2007.osm
12M	developer/ruby/pkg/libraries/DEER_2011.osm
12M	developer/ruby/pkg/libraries/DEER_2014.osm
12M	developer/ruby/pkg/libraries/DEER_2015.osm
12M	developer/ruby/pkg/libraries/DEER_Pre_1975.osm
6,5M	developer/ruby/pkg/libraries/DOE_Ref_1980_2004.osm
6,9M	developer/ruby/pkg/libraries/DOE_Ref_Pre_1980.osm


@jmarrec
Copy link
Collaborator

jmarrec commented Oct 8, 2020

Re #246 (review)

ad40208 should fix that

@macumber The "problem" with DEER 2017 is that the data doesn't contain the boilers.

template_name = "DEER 2017"
std_applier = Standard.build(template_name)
std_applier.standards_data.keys
=> ["parking",
 "hvac_inference",
 "climate_zone_sets",
 "materials",
 "climate_zones",
 "fans",
 "constructions",
 "size_category",
 "schedules",
 "curves",
 "entryways",
 "chillers",
 "refrigeration_walkins",
 "refrigeration_system_lineup",
 "prototype_inputs",
 "construction_properties",
 "elevators",
 "refrigerated_cases",
 "unitary_acs",
 "space_types",
 "refrigeration_condenser",
 "exterior_lighting",
 "refrigeration_compressors",
 "motors",
 "heat_pumps",
 "refrigeration_system",
 "heat_rejection",
 "heat_pumps_heating",
 "water_heaters",
 "economizers",
 "construction_sets"]

For DEER 2020, it's the space types that are missing

* Space Types *
Cannot add space_types, standards_data for DEER 2020 doesn't contain that key

@jmarrec jmarrec marked this pull request as ready for review October 8, 2020 07:40
@jmarrec jmarrec merged commit 98958f6 into develop Oct 8, 2020
@jmarrec jmarrec deleted the update_standards branch October 8, 2020 07:41
Comment on lines +15 to +43
class FakeSqlFile
end

module OpenStudio
module Model

class Model
def getAutosizedValue(object, str, units)
puts "OH YEAH"
STDOUT.flush

case str
when 'Design Size Rated Air Flow Rate'
return OpenStudio::OptionalDouble.new(1)
when 'Design Size Gross Rated Total Cooling Capacity'
return OpenStudio::OptionalDouble.new(1)
when 'Design Size Gross Rated Sensible Heat Ratio'
return OpenStudio::OptionalDouble.new(1)
end

super(object, str, units)
end

def sqlFile
return FakeSqlFile.new
end
end
end
end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@macumber I've merged the branch since this works now. But I'm curious why you added that bit, and whether we couldn't at least remove the "OH YEAH" or something.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code in Standards requires a sizing run so it can find sizes. I wanted to fake that out so we didn't have to do a sizing run to generate standards OSMs. I just left in OH YEAH so I could see where it was being called. It's just for debugging, can be removed

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants