urbanopt-reporting 0.3.3 → 0.4.0
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/CHANGELOG.md +36 -0
- data/Rakefile +16 -6
- data/doc_templates/copyright_ruby.txt +17 -7
- data/lib/measures/default_feature_reports/measure.rb +121 -97
- data/lib/measures/default_feature_reports/measure.xml +11 -11
- data/lib/measures/export_modelica_loads/LICENSE.md +23 -23
- data/lib/measures/export_modelica_loads/measure.rb +93 -96
- data/lib/measures/export_modelica_loads/measure.xml +21 -21
- data/lib/measures/export_time_series_modelica/LICENSE.md +27 -1
- data/lib/measures/export_time_series_modelica/measure.rb +165 -163
- data/lib/measures/export_time_series_modelica/measure.xml +18 -18
- data/lib/measures/export_time_series_modelica/resources/os_lib_helper_methods.rb +40 -35
- data/lib/urbanopt/reporting.rb +16 -6
- data/lib/urbanopt/reporting/default_reports.rb +16 -6
- data/lib/urbanopt/reporting/default_reports/construction_cost.rb +16 -6
- data/lib/urbanopt/reporting/default_reports/date.rb +16 -6
- data/lib/urbanopt/reporting/default_reports/distributed_generation.rb +16 -6
- data/lib/urbanopt/reporting/default_reports/end_use.rb +54 -23
- data/lib/urbanopt/reporting/default_reports/end_uses.rb +16 -6
- data/lib/urbanopt/reporting/default_reports/extension.rb +16 -6
- data/lib/urbanopt/reporting/default_reports/feature_report.rb +21 -7
- data/lib/urbanopt/reporting/default_reports/generator.rb +16 -6
- data/lib/urbanopt/reporting/default_reports/location.rb +16 -6
- data/lib/urbanopt/reporting/default_reports/logger.rb +16 -6
- data/lib/urbanopt/reporting/default_reports/power_distribution.rb +16 -6
- data/lib/urbanopt/reporting/default_reports/program.rb +17 -7
- data/lib/urbanopt/reporting/default_reports/reporting_period.rb +16 -6
- data/lib/urbanopt/reporting/default_reports/scenario_report.rb +25 -13
- data/lib/urbanopt/reporting/default_reports/schema/scenario_csv_columns.txt +11 -10
- data/lib/urbanopt/reporting/default_reports/schema/scenario_schema.json +4 -1
- data/lib/urbanopt/reporting/default_reports/solar_pv.rb +16 -6
- data/lib/urbanopt/reporting/default_reports/storage.rb +16 -6
- data/lib/urbanopt/reporting/default_reports/thermal_storage.rb +16 -6
- data/lib/urbanopt/reporting/default_reports/timeseries_csv.rb +17 -7
- data/lib/urbanopt/reporting/default_reports/validator.rb +16 -6
- data/lib/urbanopt/reporting/default_reports/wind.rb +16 -6
- data/lib/urbanopt/reporting/derived_extension.rb +16 -6
- data/lib/urbanopt/reporting/version.rb +17 -7
- data/urbanopt-reporting-gem.gemspec +3 -3
- metadata +9 -9
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.0</schema_version>
|
4
4
|
<name>export_time_series_loads_csv</name>
|
5
5
|
<uid>9fcf6116-c2eb-43d6-93f0-e1bdd822f768</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>61d25864-a1a9-4082-974c-d04057271848</version_id>
|
7
|
+
<version_modified>20210427T174739Z</version_modified>
|
8
8
|
<xml_checksum>9BF1E6AC</xml_checksum>
|
9
9
|
<class_name>ExportTimeSeriesLoadsCSV</class_name>
|
10
10
|
<display_name>ExportTimeSeriesLoadsCSV</display_name>
|
@@ -72,12 +72,6 @@
|
|
72
72
|
</attribute>
|
73
73
|
</attributes>
|
74
74
|
<files>
|
75
|
-
<file>
|
76
|
-
<filename>LICENSE.md</filename>
|
77
|
-
<filetype>md</filetype>
|
78
|
-
<usage_type>license</usage_type>
|
79
|
-
<checksum>CD7F5672</checksum>
|
80
|
-
</file>
|
81
75
|
<file>
|
82
76
|
<filename>README.md.erb</filename>
|
83
77
|
<filetype>erb</filetype>
|
@@ -108,23 +102,35 @@
|
|
108
102
|
<usage_type>test</usage_type>
|
109
103
|
<checksum>15AD3659</checksum>
|
110
104
|
</file>
|
105
|
+
<file>
|
106
|
+
<filename>README.md</filename>
|
107
|
+
<filetype>md</filetype>
|
108
|
+
<usage_type>readme</usage_type>
|
109
|
+
<checksum>08F470AC</checksum>
|
110
|
+
</file>
|
111
|
+
<file>
|
112
|
+
<filename>LICENSE.md</filename>
|
113
|
+
<filetype>md</filetype>
|
114
|
+
<usage_type>license</usage_type>
|
115
|
+
<checksum>BBD19F47</checksum>
|
116
|
+
</file>
|
111
117
|
<file>
|
112
118
|
<filename>os_lib_helper_methods.rb</filename>
|
113
119
|
<filetype>rb</filetype>
|
114
120
|
<usage_type>resource</usage_type>
|
115
|
-
<checksum>
|
121
|
+
<checksum>94DD761F</checksum>
|
116
122
|
</file>
|
117
123
|
<file>
|
118
124
|
<filename>export_time_series_modelica_test.rb</filename>
|
119
125
|
<filetype>rb</filetype>
|
120
126
|
<usage_type>test</usage_type>
|
121
|
-
<checksum>
|
127
|
+
<checksum>6B6CFF0B</checksum>
|
122
128
|
</file>
|
123
129
|
<file>
|
124
130
|
<filename>building_loads.csv</filename>
|
125
131
|
<filetype>csv</filetype>
|
126
132
|
<usage_type>test</usage_type>
|
127
|
-
<checksum>
|
133
|
+
<checksum>393EEB17</checksum>
|
128
134
|
</file>
|
129
135
|
<file>
|
130
136
|
<version>
|
@@ -135,13 +141,7 @@
|
|
135
141
|
<filename>measure.rb</filename>
|
136
142
|
<filetype>rb</filetype>
|
137
143
|
<usage_type>script</usage_type>
|
138
|
-
<checksum>
|
139
|
-
</file>
|
140
|
-
<file>
|
141
|
-
<filename>README.md</filename>
|
142
|
-
<filetype>md</filetype>
|
143
|
-
<usage_type>readme</usage_type>
|
144
|
-
<checksum>08F470AC</checksum>
|
144
|
+
<checksum>0FC4AA70</checksum>
|
145
145
|
</file>
|
146
146
|
</files>
|
147
147
|
</measure>
|
@@ -1,37 +1,42 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
# All rights reserved.
|
4
|
-
|
5
|
-
#
|
6
|
-
#
|
7
|
-
|
8
|
-
#
|
9
|
-
#
|
10
|
-
|
11
|
-
#
|
12
|
-
# and
|
13
|
-
#
|
14
|
-
|
15
|
-
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
|
19
|
-
# of
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
28
|
-
|
29
|
-
#
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
33
|
-
#
|
34
|
-
#
|
1
|
+
# *********************************************************************************
|
2
|
+
# URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
|
3
|
+
# contributors. All rights reserved.
|
4
|
+
|
5
|
+
# Redistribution and use in source and binary forms, with or without modification,
|
6
|
+
# are permitted provided that the following conditions are met:
|
7
|
+
|
8
|
+
# Redistributions of source code must retain the above copyright notice, this list
|
9
|
+
# of conditions and the following disclaimer.
|
10
|
+
|
11
|
+
# Redistributions in binary form must reproduce the above copyright notice, this
|
12
|
+
# list of conditions and the following disclaimer in the documentation and/or other
|
13
|
+
# materials provided with the distribution.
|
14
|
+
|
15
|
+
# Neither the name of the copyright holder nor the names of its contributors may be
|
16
|
+
# used to endorse or promote products derived from this software without specific
|
17
|
+
# prior written permission.
|
18
|
+
|
19
|
+
# Redistribution of this software, without modification, must refer to the software
|
20
|
+
# by the same designation. Redistribution of a modified version of this software
|
21
|
+
# (i) may not refer to the modified version by the same designation, or by any
|
22
|
+
# confusingly similar designation, and (ii) must refer to the underlying software
|
23
|
+
# originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
|
24
|
+
# the term “URBANopt”, or any confusingly similar designation may not be used to
|
25
|
+
# refer to any modified version of this software or any modified version of the
|
26
|
+
# underlying software originally provided by Alliance without the prior written
|
27
|
+
# consent of Alliance.
|
28
|
+
|
29
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
30
|
+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
31
|
+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
32
|
+
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
33
|
+
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
34
|
+
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
35
|
+
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
36
|
+
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
37
|
+
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
38
|
+
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
39
|
+
# *********************************************************************************
|
35
40
|
|
36
41
|
module OsLib_HelperMethods
|
37
42
|
# populate choice argument from model objects
|
@@ -396,4 +401,4 @@ module OsLib_HelperMethods
|
|
396
401
|
|
397
402
|
# OpenStudio has built in helper for unit conversion. That can be done using OpenStudio::convert() as shown below.
|
398
403
|
# OpenStudio::convert(double,"from unit string","to unit string").get
|
399
|
-
end
|
404
|
+
end
|
data/lib/urbanopt/reporting.rb
CHANGED
@@ -1,21 +1,31 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
2
|
+
# URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
|
3
3
|
# contributors. All rights reserved.
|
4
|
-
|
4
|
+
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
6
6
|
# are permitted provided that the following conditions are met:
|
7
|
-
|
7
|
+
|
8
8
|
# Redistributions of source code must retain the above copyright notice, this list
|
9
9
|
# of conditions and the following disclaimer.
|
10
|
-
|
10
|
+
|
11
11
|
# Redistributions in binary form must reproduce the above copyright notice, this
|
12
12
|
# list of conditions and the following disclaimer in the documentation and/or other
|
13
13
|
# materials provided with the distribution.
|
14
|
-
|
14
|
+
|
15
15
|
# Neither the name of the copyright holder nor the names of its contributors may be
|
16
16
|
# used to endorse or promote products derived from this software without specific
|
17
17
|
# prior written permission.
|
18
|
-
|
18
|
+
|
19
|
+
# Redistribution of this software, without modification, must refer to the software
|
20
|
+
# by the same designation. Redistribution of a modified version of this software
|
21
|
+
# (i) may not refer to the modified version by the same designation, or by any
|
22
|
+
# confusingly similar designation, and (ii) must refer to the underlying software
|
23
|
+
# originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
|
24
|
+
# the term “URBANopt”, or any confusingly similar designation may not be used to
|
25
|
+
# refer to any modified version of this software or any modified version of the
|
26
|
+
# underlying software originally provided by Alliance without the prior written
|
27
|
+
# consent of Alliance.
|
28
|
+
|
19
29
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
20
30
|
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
21
31
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
@@ -1,21 +1,31 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
2
|
+
# URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
|
3
3
|
# contributors. All rights reserved.
|
4
|
-
|
4
|
+
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
6
6
|
# are permitted provided that the following conditions are met:
|
7
|
-
|
7
|
+
|
8
8
|
# Redistributions of source code must retain the above copyright notice, this list
|
9
9
|
# of conditions and the following disclaimer.
|
10
|
-
|
10
|
+
|
11
11
|
# Redistributions in binary form must reproduce the above copyright notice, this
|
12
12
|
# list of conditions and the following disclaimer in the documentation and/or other
|
13
13
|
# materials provided with the distribution.
|
14
|
-
|
14
|
+
|
15
15
|
# Neither the name of the copyright holder nor the names of its contributors may be
|
16
16
|
# used to endorse or promote products derived from this software without specific
|
17
17
|
# prior written permission.
|
18
|
-
|
18
|
+
|
19
|
+
# Redistribution of this software, without modification, must refer to the software
|
20
|
+
# by the same designation. Redistribution of a modified version of this software
|
21
|
+
# (i) may not refer to the modified version by the same designation, or by any
|
22
|
+
# confusingly similar designation, and (ii) must refer to the underlying software
|
23
|
+
# originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
|
24
|
+
# the term “URBANopt”, or any confusingly similar designation may not be used to
|
25
|
+
# refer to any modified version of this software or any modified version of the
|
26
|
+
# underlying software originally provided by Alliance without the prior written
|
27
|
+
# consent of Alliance.
|
28
|
+
|
19
29
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
20
30
|
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
21
31
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
@@ -1,21 +1,31 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
2
|
+
# URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
|
3
3
|
# contributors. All rights reserved.
|
4
|
-
|
4
|
+
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
6
6
|
# are permitted provided that the following conditions are met:
|
7
|
-
|
7
|
+
|
8
8
|
# Redistributions of source code must retain the above copyright notice, this list
|
9
9
|
# of conditions and the following disclaimer.
|
10
|
-
|
10
|
+
|
11
11
|
# Redistributions in binary form must reproduce the above copyright notice, this
|
12
12
|
# list of conditions and the following disclaimer in the documentation and/or other
|
13
13
|
# materials provided with the distribution.
|
14
|
-
|
14
|
+
|
15
15
|
# Neither the name of the copyright holder nor the names of its contributors may be
|
16
16
|
# used to endorse or promote products derived from this software without specific
|
17
17
|
# prior written permission.
|
18
|
-
|
18
|
+
|
19
|
+
# Redistribution of this software, without modification, must refer to the software
|
20
|
+
# by the same designation. Redistribution of a modified version of this software
|
21
|
+
# (i) may not refer to the modified version by the same designation, or by any
|
22
|
+
# confusingly similar designation, and (ii) must refer to the underlying software
|
23
|
+
# originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
|
24
|
+
# the term “URBANopt”, or any confusingly similar designation may not be used to
|
25
|
+
# refer to any modified version of this software or any modified version of the
|
26
|
+
# underlying software originally provided by Alliance without the prior written
|
27
|
+
# consent of Alliance.
|
28
|
+
|
19
29
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
20
30
|
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
21
31
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
@@ -1,21 +1,31 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
2
|
+
# URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
|
3
3
|
# contributors. All rights reserved.
|
4
|
-
|
4
|
+
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
6
6
|
# are permitted provided that the following conditions are met:
|
7
|
-
|
7
|
+
|
8
8
|
# Redistributions of source code must retain the above copyright notice, this list
|
9
9
|
# of conditions and the following disclaimer.
|
10
|
-
|
10
|
+
|
11
11
|
# Redistributions in binary form must reproduce the above copyright notice, this
|
12
12
|
# list of conditions and the following disclaimer in the documentation and/or other
|
13
13
|
# materials provided with the distribution.
|
14
|
-
|
14
|
+
|
15
15
|
# Neither the name of the copyright holder nor the names of its contributors may be
|
16
16
|
# used to endorse or promote products derived from this software without specific
|
17
17
|
# prior written permission.
|
18
|
-
|
18
|
+
|
19
|
+
# Redistribution of this software, without modification, must refer to the software
|
20
|
+
# by the same designation. Redistribution of a modified version of this software
|
21
|
+
# (i) may not refer to the modified version by the same designation, or by any
|
22
|
+
# confusingly similar designation, and (ii) must refer to the underlying software
|
23
|
+
# originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
|
24
|
+
# the term “URBANopt”, or any confusingly similar designation may not be used to
|
25
|
+
# refer to any modified version of this software or any modified version of the
|
26
|
+
# underlying software originally provided by Alliance without the prior written
|
27
|
+
# consent of Alliance.
|
28
|
+
|
19
29
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
20
30
|
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
21
31
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
@@ -1,21 +1,31 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
2
|
+
# URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
|
3
3
|
# contributors. All rights reserved.
|
4
|
-
|
4
|
+
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
6
6
|
# are permitted provided that the following conditions are met:
|
7
|
-
|
7
|
+
|
8
8
|
# Redistributions of source code must retain the above copyright notice, this list
|
9
9
|
# of conditions and the following disclaimer.
|
10
|
-
|
10
|
+
|
11
11
|
# Redistributions in binary form must reproduce the above copyright notice, this
|
12
12
|
# list of conditions and the following disclaimer in the documentation and/or other
|
13
13
|
# materials provided with the distribution.
|
14
|
-
|
14
|
+
|
15
15
|
# Neither the name of the copyright holder nor the names of its contributors may be
|
16
16
|
# used to endorse or promote products derived from this software without specific
|
17
17
|
# prior written permission.
|
18
|
-
|
18
|
+
|
19
|
+
# Redistribution of this software, without modification, must refer to the software
|
20
|
+
# by the same designation. Redistribution of a modified version of this software
|
21
|
+
# (i) may not refer to the modified version by the same designation, or by any
|
22
|
+
# confusingly similar designation, and (ii) must refer to the underlying software
|
23
|
+
# originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
|
24
|
+
# the term “URBANopt”, or any confusingly similar designation may not be used to
|
25
|
+
# refer to any modified version of this software or any modified version of the
|
26
|
+
# underlying software originally provided by Alliance without the prior written
|
27
|
+
# consent of Alliance.
|
28
|
+
|
19
29
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
20
30
|
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
21
31
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
@@ -1,21 +1,31 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt
|
2
|
+
# URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
|
3
3
|
# contributors. All rights reserved.
|
4
|
-
|
4
|
+
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
6
6
|
# are permitted provided that the following conditions are met:
|
7
|
-
|
7
|
+
|
8
8
|
# Redistributions of source code must retain the above copyright notice, this list
|
9
9
|
# of conditions and the following disclaimer.
|
10
|
-
|
10
|
+
|
11
11
|
# Redistributions in binary form must reproduce the above copyright notice, this
|
12
12
|
# list of conditions and the following disclaimer in the documentation and/or other
|
13
13
|
# materials provided with the distribution.
|
14
|
-
|
14
|
+
|
15
15
|
# Neither the name of the copyright holder nor the names of its contributors may be
|
16
16
|
# used to endorse or promote products derived from this software without specific
|
17
17
|
# prior written permission.
|
18
|
-
|
18
|
+
|
19
|
+
# Redistribution of this software, without modification, must refer to the software
|
20
|
+
# by the same designation. Redistribution of a modified version of this software
|
21
|
+
# (i) may not refer to the modified version by the same designation, or by any
|
22
|
+
# confusingly similar designation, and (ii) must refer to the underlying software
|
23
|
+
# originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
|
24
|
+
# the term “URBANopt”, or any confusingly similar designation may not be used to
|
25
|
+
# refer to any modified version of this software or any modified version of the
|
26
|
+
# underlying software originally provided by Alliance without the prior written
|
27
|
+
# consent of Alliance.
|
28
|
+
|
19
29
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
20
30
|
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
21
31
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
@@ -38,7 +48,7 @@ module URBANopt
|
|
38
48
|
# Enduse class all enduse energy consumption results.
|
39
49
|
##
|
40
50
|
class EndUse
|
41
|
-
attr_accessor :heating, :cooling, :interior_lighting, :exterior_lighting, :interior_equipment, :exterior_equipment,
|
51
|
+
attr_accessor :heating, :cooling, :interior_lighting, :exterior_lighting, :interior_equipment, :exterior_equipment, :electric_vehicles,
|
42
52
|
:fans, :pumps, :heat_rejection, :humidification, :heat_recovery, :water_systems, :refrigeration, :generators # :nodoc:
|
43
53
|
|
44
54
|
##
|
@@ -59,6 +69,7 @@ module URBANopt
|
|
59
69
|
@exterior_lighting = hash[:exterior_lighting]
|
60
70
|
@interior_equipment = hash[:interior_equipment]
|
61
71
|
@exterior_equipment = hash[:exterior_equipment]
|
72
|
+
@electric_vehicles = hash[:electric_vehicles]
|
62
73
|
@fans = hash[:fans]
|
63
74
|
@pumps = hash[:pumps]
|
64
75
|
@heat_rejection = hash[:heat_rejection]
|
@@ -85,6 +96,7 @@ module URBANopt
|
|
85
96
|
hash[:exterior_lighting] = nil
|
86
97
|
hash[:interior_equipment] = nil
|
87
98
|
hash[:exterior_equipment] = nil
|
99
|
+
hash[:electric_vehicles] = nil
|
88
100
|
hash[:fans] = nil
|
89
101
|
hash[:pumps] = nil
|
90
102
|
hash[:heat_rejection] = nil
|
@@ -112,6 +124,7 @@ module URBANopt
|
|
112
124
|
result[:exterior_lighting] = @exterior_lighting
|
113
125
|
result[:interior_equipment] = @interior_equipment
|
114
126
|
result[:exterior_equipment] = @exterior_equipment
|
127
|
+
result[:electric_vehicles] = @electric_vehicles
|
115
128
|
result[:fans] = @fans
|
116
129
|
result[:pumps] = @pumps
|
117
130
|
result[:heat_rejection] = @heat_rejection
|
@@ -129,27 +142,45 @@ module URBANopt
|
|
129
142
|
return result
|
130
143
|
end
|
131
144
|
|
145
|
+
##
|
146
|
+
# Adds up +existing_value+ and +new_values+ if not nill.
|
147
|
+
##
|
148
|
+
# [parameter:]
|
149
|
+
# +existing_value+ - _Float_ - A value corresponding to a EndUse attribute.
|
150
|
+
##
|
151
|
+
# +new_value+ - _Float_ - A value corresponding to a EndUse attribute.
|
152
|
+
##
|
153
|
+
def add_values(existing_value, new_value)
|
154
|
+
if existing_value && new_value
|
155
|
+
existing_value += new_value
|
156
|
+
elsif new_value
|
157
|
+
existing_value = new_value
|
158
|
+
end
|
159
|
+
return existing_value
|
160
|
+
end
|
161
|
+
|
132
162
|
##
|
133
163
|
# Aggregate values of each EndUse attribute.
|
134
164
|
##
|
135
165
|
# [Parameters:]
|
136
|
-
# +
|
166
|
+
# +other+ - _EndUse_ - An object of EndUse class.
|
137
167
|
##
|
138
|
-
def merge_end_use!(
|
139
|
-
@heating
|
140
|
-
@cooling
|
141
|
-
@interior_lighting
|
142
|
-
@exterior_lighting
|
143
|
-
@interior_equipment
|
144
|
-
@exterior_equipment
|
145
|
-
@
|
146
|
-
@
|
147
|
-
@
|
148
|
-
@
|
149
|
-
@
|
150
|
-
@
|
151
|
-
@
|
152
|
-
@
|
168
|
+
def merge_end_use!(other)
|
169
|
+
@heating = add_values(@heating, other.heating)
|
170
|
+
@cooling = add_values(@cooling, other.cooling)
|
171
|
+
@interior_lighting = add_values(@interior_lighting, other.interior_lighting)
|
172
|
+
@exterior_lighting = add_values(@exterior_lighting, other.exterior_lighting)
|
173
|
+
@interior_equipment = add_values(@interior_equipment, other.interior_equipment)
|
174
|
+
@exterior_equipment = add_values(@exterior_equipment, other.exterior_equipment)
|
175
|
+
@electric_vehicles = add_values(@electric_vehicles, other.electric_vehicles)
|
176
|
+
@fans = add_values(@fans, other.fans)
|
177
|
+
@pumps = add_values(@pumps, other.pumps)
|
178
|
+
@heat_rejection = add_values(@heat_rejection, other.heat_rejection)
|
179
|
+
@humidification = add_values(@humidification, other.humidification)
|
180
|
+
@heat_recovery = add_values(@heat_recovery, other.heat_recovery)
|
181
|
+
@water_systems = add_values(@water_systems, other.water_systems)
|
182
|
+
@refrigeration = add_values(@refrigeration, other.refrigeration)
|
183
|
+
@generators = add_values(@generators, other.generators)
|
153
184
|
|
154
185
|
return self
|
155
186
|
end
|