openstudio-standards 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/openstudio-standards/exterior_lighting/create.rb +2 -2
- data/lib/openstudio-standards/exterior_lighting/data/convert_entryway_data.rb +94 -0
- data/lib/openstudio-standards/exterior_lighting/data/convert_parking_data.rb +82 -0
- data/lib/openstudio-standards/exterior_lighting/data/entryways.json +565 -0
- data/lib/openstudio-standards/exterior_lighting/data/parking.json +428 -0
- data/lib/openstudio-standards/exterior_lighting/information.rb +14 -14
- data/lib/openstudio-standards/hvac/components/create.rb +4 -4
- data/lib/openstudio-standards/hvac/components/modify.rb +2 -2
- data/lib/openstudio-standards/hvac/exhaust/create_exhaust_fan.rb +2 -2
- data/lib/openstudio-standards/hvac/exhaust/data/convert_typical_exhaust_data.rb +67 -0
- data/lib/openstudio-standards/infiltration/data/NISTInfiltrationCorrelations.json +3172 -0
- data/lib/openstudio-standards/infiltration/data/convert_infiltration_data.rb +87 -0
- data/lib/openstudio-standards/infiltration/infiltration.rb +3 -3
- data/lib/openstudio-standards/infiltration/nist_infiltration.rb +42 -42
- data/lib/openstudio-standards/refrigeration/create_case.rb +2 -2
- data/lib/openstudio-standards/refrigeration/create_typical_refrigeration.rb +22 -21
- data/lib/openstudio-standards/service_water_heating/create_typical.rb +1 -1
- data/lib/openstudio-standards/standards/Standards.Space.rb +3 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirLoopHVAC.rb +10 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.schedules.json +131 -107
- data/lib/openstudio-standards/standards/deer/data/deer.schedules.json +24 -24
- data/lib/openstudio-standards/utilities/ruleset_check.rb +1 -2
- data/lib/openstudio-standards/version.rb +1 -1
- data/lib/openstudio-standards/weather/stat_file.rb +13 -4
- metadata +9 -3
- data/lib/openstudio-standards/hvac/exhaust/data/convert_data.rb +0 -86
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 356ac612733e6da43abd0173fe00d2b880962387e5d10fd3006c795b076976c0
|
4
|
+
data.tar.gz: d396b6796de579678334ccc0a89fcb98349fbb2f58a2fa961e199f936733f804
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43ba928d87c142df22ec1317ea2d130666a50bc5d587ce06156f5cc1b11cb3f5b7ea6cff7b4a0de51c932239476080ec10221339721dba61035d92fb698a68f4
|
7
|
+
data.tar.gz: 4ba533fcbb4df176f0d09812715ad41258da203d4d273a715f86c20d81186a8efdcc40bf01ba27587bc74fc1b9a235bd728a1e9f61edde4578132f80c1a1dc76
|
@@ -116,7 +116,8 @@ module OpenstudioStandards
|
|
116
116
|
search_criteria = {
|
117
117
|
'template' => lookup_key,
|
118
118
|
'lighting_zone' => lighting_zone,
|
119
|
-
'allowance_type' => 'building facades'
|
119
|
+
'allowance_type' => 'building facades',
|
120
|
+
'allowance_unit' => 'W/ft2'
|
120
121
|
}
|
121
122
|
exterior_lighting_building_facade_req = standard.standards_lookup_table_first(table_name: 'exterior_lighting', search_criteria: search_criteria)
|
122
123
|
if exterior_lighting_building_facade_req['daylight_off_control'] == 'REQ'
|
@@ -136,7 +137,6 @@ module OpenstudioStandards
|
|
136
137
|
ext_lights_sch_facade_and_landscape = model.alwaysOnDiscreteSchedule
|
137
138
|
end
|
138
139
|
|
139
|
-
|
140
140
|
occupancy_setback_reduction = 0.0
|
141
141
|
if exterior_lighting_properties.has_key?('occupancy_setback_reduction')
|
142
142
|
if !exterior_lighting_properties['occupancy_setback_reduction'].nil? && (exterior_lighting_properties['occupancy_setback_reduction'] > 0.0)
|
@@ -0,0 +1,94 @@
|
|
1
|
+
# These methods convert entryway data to and from .csv for editing.
|
2
|
+
private
|
3
|
+
|
4
|
+
require 'csv'
|
5
|
+
require 'json'
|
6
|
+
|
7
|
+
def entryways_csv_to_json(input_csv = 'entryways.csv',
|
8
|
+
output_json = 'entryways.json')
|
9
|
+
# Initialize the structure
|
10
|
+
result = {
|
11
|
+
entryways: []
|
12
|
+
}
|
13
|
+
|
14
|
+
# Read the CSV file
|
15
|
+
CSV.foreach(input_csv, headers: true, header_converters: :symbol) do |row|
|
16
|
+
building_type = row[:building_type]
|
17
|
+
rollup_doors_per_10000_ft2 = row[:rollup_doors_per_10000_ft2]&.to_f
|
18
|
+
entrance_doors_per_10000_ft2 = row[:entrance_doors_per_10000_ft2]&.to_f
|
19
|
+
other_doors_per_10000_ft2 = row[:other_doors_per_10000_ft2]&.to_f
|
20
|
+
entrance_canopies = row[:entrance_canopies]&.to_f
|
21
|
+
emergency_canopies = row[:emergency_canopies]&.to_f
|
22
|
+
canopy_size = row[:canopy_size]&.to_f
|
23
|
+
floor_area_per_drive_through_window = row[:floor_area_per_drive_through_window]&.to_f
|
24
|
+
notes = row[:notes]
|
25
|
+
|
26
|
+
entryways_hash = {
|
27
|
+
building_type: building_type,
|
28
|
+
rollup_doors_per_10000_ft2: rollup_doors_per_10000_ft2,
|
29
|
+
entrance_doors_per_10000_ft2: entrance_doors_per_10000_ft2,
|
30
|
+
other_doors_per_10000_ft2: other_doors_per_10000_ft2,
|
31
|
+
entrance_canopies: entrance_canopies,
|
32
|
+
emergency_canopies: emergency_canopies,
|
33
|
+
canopy_size: canopy_size,
|
34
|
+
floor_area_per_drive_through_window: floor_area_per_drive_through_window,
|
35
|
+
notes: notes
|
36
|
+
}
|
37
|
+
|
38
|
+
# Add the space_type_hash to the result array
|
39
|
+
result[:entryways] << entryways_hash
|
40
|
+
end
|
41
|
+
|
42
|
+
# Write to the output JSON file
|
43
|
+
File.write(output_json, JSON.pretty_generate(result))
|
44
|
+
|
45
|
+
puts "Data has been converted to JSON and saved to #{output_json}"
|
46
|
+
end
|
47
|
+
|
48
|
+
# convert to json
|
49
|
+
entryways_csv_to_json
|
50
|
+
|
51
|
+
def entryways_json_to_csv(input_json = 'entryways.json',
|
52
|
+
output_csv = 'entryways.csv')
|
53
|
+
# Read the JSON file
|
54
|
+
data = JSON.parse(File.read(input_json), symbolize_names: true)
|
55
|
+
|
56
|
+
# Prepare the CSV headers
|
57
|
+
headers = [
|
58
|
+
:building_type,
|
59
|
+
:rollup_doors_per_10000_ft2,
|
60
|
+
:entrance_doors_per_10000_ft2,
|
61
|
+
:other_doors_per_10000_ft2,
|
62
|
+
:entrance_canopies,
|
63
|
+
:parking_area_pemergency_canopieser_spot
|
64
|
+
]
|
65
|
+
|
66
|
+
# Write the CSV file
|
67
|
+
CSV.open(output_csv, 'w', write_headers: true, headers: headers) do |csv|
|
68
|
+
data[:entryways].each do |entryways|
|
69
|
+
building_type = entryways[:building_type]
|
70
|
+
rollup_doors_per_10000_ft2 = entryways[:rollup_doors_per_10000_ft2]
|
71
|
+
entrance_doors_per_10000_ft2 = entryways[:entrance_doors_per_10000_ft2]
|
72
|
+
other_doors_per_10000_ft2 = entryways[:other_doors_per_10000_ft2]
|
73
|
+
entrance_canopies = entryways[:entrance_canopies]
|
74
|
+
emergency_canopies = entryways[:emergency_canopies]
|
75
|
+
canopy_size = entryways[:canopy_size]
|
76
|
+
floor_area_per_drive_through_window = entryways[:floor_area_per_drive_through_window]
|
77
|
+
notes = entryways[:notes]
|
78
|
+
|
79
|
+
csv << [
|
80
|
+
building_type,
|
81
|
+
rollup_doors_per_10000_ft2,
|
82
|
+
entrance_doors_per_10000_ft2,
|
83
|
+
other_doors_per_10000_ft2,
|
84
|
+
entrance_canopies,
|
85
|
+
emergency_canopies,
|
86
|
+
canopy_size,
|
87
|
+
floor_area_per_drive_through_window,
|
88
|
+
notes
|
89
|
+
]
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
puts "Data has been converted to CSV and saved to #{output_csv}"
|
94
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# These methods convert parking data to and from .csv for editing.
|
2
|
+
private
|
3
|
+
|
4
|
+
require 'csv'
|
5
|
+
require 'json'
|
6
|
+
|
7
|
+
def parking_csv_to_json(input_csv = 'parking.csv',
|
8
|
+
output_json = 'parking.json')
|
9
|
+
# Initialize the structure
|
10
|
+
result = {
|
11
|
+
parking: []
|
12
|
+
}
|
13
|
+
|
14
|
+
# Read the CSV file
|
15
|
+
CSV.foreach(input_csv, headers: true, header_converters: :symbol) do |row|
|
16
|
+
building_type = row[:building_type]
|
17
|
+
building_area_per_spot = row[:building_area_per_spot]&.to_f
|
18
|
+
units_per_spot = row[:units_per_spot]&.to_f
|
19
|
+
students_per_spot = row[:students_per_spot]&.to_f
|
20
|
+
beds_per_spot = row[:beds_per_spot]&.to_f
|
21
|
+
parking_area_per_spot = row[:parking_area_per_spot]&.to_f
|
22
|
+
|
23
|
+
parking_hash = {
|
24
|
+
building_type: building_type,
|
25
|
+
building_area_per_spot: building_area_per_spot,
|
26
|
+
units_per_spot: units_per_spot,
|
27
|
+
students_per_spot: students_per_spot,
|
28
|
+
beds_per_spot: beds_per_spot,
|
29
|
+
parking_area_per_spot: parking_area_per_spot
|
30
|
+
}
|
31
|
+
|
32
|
+
# Add the space_type_hash to the result array
|
33
|
+
result[:parking] << parking_hash
|
34
|
+
end
|
35
|
+
|
36
|
+
# Write to the output JSON file
|
37
|
+
File.write(output_json, JSON.pretty_generate(result))
|
38
|
+
|
39
|
+
puts "Data has been converted to JSON and saved to #{output_json}"
|
40
|
+
end
|
41
|
+
|
42
|
+
# convert to json
|
43
|
+
parking_csv_to_json
|
44
|
+
|
45
|
+
def parking_json_to_csv(input_json = 'parking.json',
|
46
|
+
output_csv = 'parking.csv')
|
47
|
+
# Read the JSON file
|
48
|
+
data = JSON.parse(File.read(input_json), symbolize_names: true)
|
49
|
+
|
50
|
+
# Prepare the CSV headers
|
51
|
+
headers = [
|
52
|
+
:building_type,
|
53
|
+
:building_area_per_spot,
|
54
|
+
:units_per_spot,
|
55
|
+
:students_per_spot,
|
56
|
+
:beds_per_spot,
|
57
|
+
:parking_area_per_spot
|
58
|
+
]
|
59
|
+
|
60
|
+
# Write the CSV file
|
61
|
+
CSV.open(output_csv, 'w', write_headers: true, headers: headers) do |csv|
|
62
|
+
data[:parking].each do |parking_entry|
|
63
|
+
building_type = parking_entry[:building_type]
|
64
|
+
building_area_per_spot = parking_entry[:building_area_per_spot]
|
65
|
+
units_per_spot = parking_entry[:units_per_spot]
|
66
|
+
students_per_spot = parking_entry[:students_per_spot]
|
67
|
+
beds_per_spot = parking_entry[:beds_per_spot]
|
68
|
+
parking_area_per_spot = parking_entry[:parking_area_per_spot]
|
69
|
+
|
70
|
+
csv << [
|
71
|
+
building_type,
|
72
|
+
building_area_per_spot,
|
73
|
+
units_per_spot,
|
74
|
+
students_per_spot,
|
75
|
+
beds_per_spot,
|
76
|
+
parking_area_per_spot
|
77
|
+
]
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
puts "Data has been converted to CSV and saved to #{output_csv}"
|
82
|
+
end
|