openstudio-common-measures 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +44 -0
- data/Rakefile +3 -0
- data/lib/measures/ChangeBuildingLocation/measure.xml +11 -11
- data/lib/measures/ExportScheduleCSV/measure.rb +1 -1
- data/lib/measures/ExportScheduleCSV/measure.xml +16 -15
- data/lib/measures/ImportEnvelopeAndInternalLoadsFromIdf/measure.xml +7 -6
- data/lib/measures/MeterFlodPlot/measure.rb +1 -1
- data/lib/measures/MeterFlodPlot/measure.xml +16 -15
- data/lib/measures/ReportModelChanges/measure.xml +2 -2
- data/lib/measures/RunPeriodMultiple/measure.xml +12 -11
- data/lib/measures/ServerDirectoryCleanup/README.md +97 -3
- data/lib/measures/ServerDirectoryCleanup/measure.rb +1 -1
- data/lib/measures/ServerDirectoryCleanup/measure.xml +10 -59
- data/lib/measures/UnmetLoadHoursTroubleshooting/README.md +9 -3
- data/lib/measures/UnmetLoadHoursTroubleshooting/measure.rb +1 -1
- data/lib/measures/UnmetLoadHoursTroubleshooting/measure.xml +66 -17
- data/lib/measures/VentilationQAQC/README.md +9 -3
- data/lib/measures/VentilationQAQC/measure.rb +52 -45
- data/lib/measures/VentilationQAQC/measure.xml +25 -30
- data/lib/measures/ZoneReport/README.md +2 -2
- data/lib/measures/ZoneReport/measure.rb +1 -1
- data/lib/measures/ZoneReport/measure.xml +10 -11
- data/lib/measures/add_ems_to_control_ev_charging/LICENSE.MD.txt +15 -0
- data/lib/measures/{AddDaylightSensors → add_ems_to_control_ev_charging}/LICENSE.md +0 -0
- data/lib/measures/add_ems_to_control_ev_charging/ReadMe.MD +29 -0
- data/lib/measures/add_ems_to_control_ev_charging/measure.rb +288 -0
- data/lib/measures/add_ems_to_control_ev_charging/measure.xml +87 -0
- data/lib/measures/add_ev_load/LICENSE.MD.txt +15 -0
- data/lib/measures/{EnableDemandControlledVentilation → add_ev_load}/LICENSE.md +0 -0
- data/lib/measures/add_ev_load/ReadMe.MD +34 -0
- data/lib/measures/add_ev_load/measure.rb +328 -0
- data/lib/measures/add_ev_load/measure.xml +153 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/PSN_BuildingKey.csv +104 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/PSN_BuildingKey_v2.csv +104 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow1_flex1.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow1_flex2.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow1_flex3.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow2_flex1.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow2_flex2.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow2_flex3.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow3_flex1.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow3_flex2.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow3_flex3.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow1_flex1.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow1_flex2.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow1_flex3.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow2_flex1.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow2_flex2.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow2_flex3.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow3_flex1.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow3_flex2.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow3_flex3.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow1_flex1.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow1_flex2.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow1_flex3.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow2_flex1.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow2_flex2.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow2_flex3.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow3_flex1.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow3_flex2.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow3_flex3.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/fast_charge_15min_Saturday.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/fast_charge_15min_Sunday.csv +96 -0
- data/lib/measures/add_ev_load/resources/EV_Load_Profiles/fast_charge_15min_Weekday.csv +96 -0
- data/lib/measures/envelope_and_internal_load_breakdown/README.md +4 -3
- data/lib/measures/envelope_and_internal_load_breakdown/measure.rb +7 -4
- data/lib/measures/envelope_and_internal_load_breakdown/measure.xml +16 -17
- data/lib/measures/envelope_and_internal_load_breakdown/resources/report.html.erb +1 -0
- data/lib/measures/example_report/README.md +27 -5
- data/lib/measures/example_report/measure.rb +7 -4
- data/lib/measures/example_report/measure.xml +16 -29
- data/lib/measures/example_report/resources/report.html.erb +1 -0
- data/lib/measures/gem_env_report/measure.xml +1 -1
- data/lib/measures/generic_qaqc/README.md +187 -5
- data/lib/measures/generic_qaqc/measure.rb +1 -1
- data/lib/measures/generic_qaqc/measure.xml +15 -85
- data/lib/measures/generic_qaqc/resources/report.html.erb +1 -0
- data/lib/measures/hvac_psychrometric_chart/README.md +11 -5
- data/lib/measures/hvac_psychrometric_chart/measure.rb +1 -1
- data/lib/measures/hvac_psychrometric_chart/measure.xml +13 -18
- data/lib/measures/hvac_psychrometric_chart/resources/report.html.erb +1 -0
- data/lib/measures/inject_idf_objects/measure.xml +25 -24
- data/lib/measures/openstudio_results/README.md +195 -5
- data/lib/measures/openstudio_results/measure.rb +2 -2
- data/lib/measures/openstudio_results/measure.xml +30 -154
- data/lib/measures/openstudio_results/resources/report.html.erb +1 -0
- data/lib/measures/set_run_period/measure.xml +2 -2
- data/lib/measures/{EnableEconomizerControl → view_data}/LICENSE.md +0 -0
- data/lib/measures/view_data/README.md +64 -0
- data/lib/measures/{AddDaylightSensors → view_data}/README.md.erb +0 -0
- data/lib/measures/view_data/measure.rb +454 -0
- data/lib/measures/view_data/measure.xml +159 -0
- data/lib/measures/view_data/resources/report.html.in +2881 -0
- data/lib/measures/view_data/resources/va3c.rb +1021 -0
- data/lib/measures/{ImproveFanBeltEfficiency → view_model}/LICENSE.md +0 -0
- data/lib/measures/view_model/README.md +26 -0
- data/lib/measures/{EnableDemandControlledVentilation → view_model}/README.md.erb +0 -0
- data/lib/measures/view_model/measure.rb +146 -0
- data/lib/measures/view_model/measure.xml +98 -0
- data/lib/measures/view_model/resources/report.html.in +2881 -0
- data/lib/measures/view_model/resources/va3c.rb +1021 -0
- data/lib/openstudio/common_measures/version.rb +1 -1
- data/openstudio-common-measures.gemspec +1 -1
- metadata +61 -71
- data/lib/measures/AddDaylightSensors/README.md +0 -136
- data/lib/measures/AddDaylightSensors/measure.rb +0 -521
- data/lib/measures/AddDaylightSensors/measure.xml +0 -233
- data/lib/measures/EnableDemandControlledVentilation/README.md +0 -32
- data/lib/measures/EnableDemandControlledVentilation/measure.rb +0 -154
- data/lib/measures/EnableDemandControlledVentilation/measure.xml +0 -99
- data/lib/measures/EnableEconomizerControl/README.md +0 -48
- data/lib/measures/EnableEconomizerControl/README.md.erb +0 -42
- data/lib/measures/EnableEconomizerControl/measure.rb +0 -172
- data/lib/measures/EnableEconomizerControl/measure.xml +0 -124
- data/lib/measures/ImproveFanBeltEfficiency/README.md +0 -104
- data/lib/measures/ImproveFanBeltEfficiency/README.md.erb +0 -42
- data/lib/measures/ImproveFanBeltEfficiency/measure.rb +0 -366
- data/lib/measures/ImproveFanBeltEfficiency/measure.xml +0 -185
- data/lib/measures/ImproveMotorEfficiency/LICENSE.md +0 -27
- data/lib/measures/ImproveMotorEfficiency/README.md +0 -104
- data/lib/measures/ImproveMotorEfficiency/README.md.erb +0 -42
- data/lib/measures/ImproveMotorEfficiency/measure.rb +0 -365
- data/lib/measures/ImproveMotorEfficiency/measure.xml +0 -182
- data/lib/measures/IncreaseInsulationRValueForExteriorWalls/LICENSE.md +0 -27
- data/lib/measures/IncreaseInsulationRValueForExteriorWalls/README.md +0 -64
- data/lib/measures/IncreaseInsulationRValueForExteriorWalls/README.md.erb +0 -42
- data/lib/measures/IncreaseInsulationRValueForExteriorWalls/measure.rb +0 -422
- data/lib/measures/IncreaseInsulationRValueForExteriorWalls/measure.xml +0 -150
- data/lib/measures/IncreaseInsulationRValueForRoofs/LICENSE.md +0 -27
- data/lib/measures/IncreaseInsulationRValueForRoofs/README.md +0 -64
- data/lib/measures/IncreaseInsulationRValueForRoofs/README.md.erb +0 -42
- data/lib/measures/IncreaseInsulationRValueForRoofs/measure.rb +0 -422
- data/lib/measures/IncreaseInsulationRValueForRoofs/measure.xml +0 -143
- data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/LICENSE.md +0 -27
- data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/README.md +0 -97
- data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/README.md.erb +0 -42
- data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/measure.rb +0 -450
- data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/measure.xml +0 -186
- data/lib/measures/ReduceLightingLoadsByPercentage/LICENSE.md +0 -27
- data/lib/measures/ReduceLightingLoadsByPercentage/README.md +0 -96
- data/lib/measures/ReduceLightingLoadsByPercentage/README.md.erb +0 -42
- data/lib/measures/ReduceLightingLoadsByPercentage/measure.rb +0 -513
- data/lib/measures/ReduceLightingLoadsByPercentage/measure.xml +0 -191
- data/lib/measures/ReduceSpaceInfiltrationByPercentage/LICENSE.md +0 -27
- data/lib/measures/ReduceSpaceInfiltrationByPercentage/README.md +0 -104
- data/lib/measures/ReduceSpaceInfiltrationByPercentage/README.md.erb +0 -42
- data/lib/measures/ReduceSpaceInfiltrationByPercentage/measure.rb +0 -349
- data/lib/measures/ReduceSpaceInfiltrationByPercentage/measure.xml +0 -181
- data/lib/measures/ReduceVentilationByPercentage/LICENSE.md +0 -27
- data/lib/measures/ReduceVentilationByPercentage/README.md +0 -40
- data/lib/measures/ReduceVentilationByPercentage/README.md.erb +0 -42
- data/lib/measures/ReduceVentilationByPercentage/measure.rb +0 -291
- data/lib/measures/ReduceVentilationByPercentage/measure.xml +0 -96
- data/lib/measures/VentilationQAQC/ExampleModel.osm +0 -28468
- data/lib/measures/create_variable_speed_rtu/LICENSE.md +0 -27
- data/lib/measures/create_variable_speed_rtu/README.md +0 -120
- data/lib/measures/create_variable_speed_rtu/README.md.erb +0 -42
- data/lib/measures/create_variable_speed_rtu/measure.rb +0 -539
- data/lib/measures/create_variable_speed_rtu/measure.xml +0 -207
- data/lib/measures/radiant_slab_with_doas/LICENSE.md +0 -27
- data/lib/measures/radiant_slab_with_doas/README.md +0 -156
- data/lib/measures/radiant_slab_with_doas/README.md.erb +0 -42
- data/lib/measures/radiant_slab_with_doas/measure.rb +0 -403
- data/lib/measures/radiant_slab_with_doas/measure.xml +0 -345
@@ -1,42 +0,0 @@
|
|
1
|
-
<%#= README.md.erb is used to auto-generate README.md. %>
|
2
|
-
<%#= To manually maintain README.md throw away README.md.erb and manually edit README.md %>
|
3
|
-
###### (Automatically generated documentation)
|
4
|
-
|
5
|
-
# <%= name %>
|
6
|
-
|
7
|
-
## Description
|
8
|
-
<%= description %>
|
9
|
-
|
10
|
-
## Modeler Description
|
11
|
-
<%= modelerDescription %>
|
12
|
-
|
13
|
-
## Measure Type
|
14
|
-
<%= measureType %>
|
15
|
-
|
16
|
-
## Taxonomy
|
17
|
-
<%= taxonomy %>
|
18
|
-
|
19
|
-
## Arguments
|
20
|
-
|
21
|
-
<% arguments.each do |argument| %>
|
22
|
-
### <%= argument[:display_name] %>
|
23
|
-
<%= argument[:description] %>
|
24
|
-
**Name:** <%= argument[:name] %>,
|
25
|
-
**Type:** <%= argument[:type] %>,
|
26
|
-
**Units:** <%= argument[:units] %>,
|
27
|
-
**Required:** <%= argument[:required] %>,
|
28
|
-
**Model Dependent:** <%= argument[:model_dependent] %>
|
29
|
-
<% end %>
|
30
|
-
|
31
|
-
<% if arguments.size == 0 %>
|
32
|
-
<%= "This measure does not have any user arguments" %>
|
33
|
-
<% end %>
|
34
|
-
|
35
|
-
<% if outputs.size > 0 %>
|
36
|
-
## Outputs
|
37
|
-
<% output_names = [] %>
|
38
|
-
<% outputs.each do |output| %>
|
39
|
-
<% output_names << output[:display_name] %>
|
40
|
-
<% end %>
|
41
|
-
<%= output_names.join(", ") %>
|
42
|
-
<% end %>
|
@@ -1,366 +0,0 @@
|
|
1
|
-
# *******************************************************************************
|
2
|
-
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
|
3
|
-
# All rights reserved.
|
4
|
-
# Redistribution and use in source and binary forms, with or without
|
5
|
-
# modification, are permitted provided that the following conditions are met:
|
6
|
-
#
|
7
|
-
# (1) Redistributions of source code must retain the above copyright notice,
|
8
|
-
# this list of conditions and the following disclaimer.
|
9
|
-
#
|
10
|
-
# (2) Redistributions in binary form must reproduce the above copyright notice,
|
11
|
-
# this list of conditions and the following disclaimer in the documentation
|
12
|
-
# and/or other materials provided with the distribution.
|
13
|
-
#
|
14
|
-
# (3) Neither the name of the copyright holder nor the names of any contributors
|
15
|
-
# may be used to endorse or promote products derived from this software without
|
16
|
-
# specific prior written permission from the respective party.
|
17
|
-
#
|
18
|
-
# (4) Other than as required in clauses (1) and (2), distributions in any form
|
19
|
-
# of modifications or other derivative works may not use the "OpenStudio"
|
20
|
-
# trademark, "OS", "os", or any other confusingly similar designation without
|
21
|
-
# specific prior written permission from Alliance for Sustainable Energy, LLC.
|
22
|
-
#
|
23
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS
|
24
|
-
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
25
|
-
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
26
|
-
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE
|
27
|
-
# UNITED STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF
|
28
|
-
# THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
29
|
-
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
30
|
-
# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
31
|
-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
32
|
-
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
33
|
-
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
34
|
-
# *******************************************************************************
|
35
|
-
|
36
|
-
# start the measure
|
37
|
-
class ImproveFanBeltEfficiency < OpenStudio::Measure::ModelMeasure
|
38
|
-
# define the name that a user will see, this method may be deprecated as
|
39
|
-
# the display name in PAT comes from the name field in measure.xml
|
40
|
-
def name
|
41
|
-
return 'Improve Fan Belt Efficiency'
|
42
|
-
end
|
43
|
-
|
44
|
-
# define the arguments that the user will input
|
45
|
-
def arguments(model)
|
46
|
-
args = OpenStudio::Measure::OSArgumentVector.new
|
47
|
-
|
48
|
-
# populate choice argument for constructions that are applied to surfaces in the model
|
49
|
-
loop_handles = OpenStudio::StringVector.new
|
50
|
-
loop_display_names = OpenStudio::StringVector.new
|
51
|
-
|
52
|
-
# putting air loops and names into hash
|
53
|
-
loop_args = model.getAirLoopHVACs
|
54
|
-
loop_args_hash = {}
|
55
|
-
loop_args.each do |loop_arg|
|
56
|
-
loop_args_hash[loop_arg.name.to_s] = loop_arg
|
57
|
-
end
|
58
|
-
|
59
|
-
# looping through sorted hash of air loops
|
60
|
-
loop_args_hash.sort.map do |key, value|
|
61
|
-
show_loop = false
|
62
|
-
components = value.supplyComponents
|
63
|
-
components.each do |component|
|
64
|
-
if !component.to_FanConstantVolume.empty?
|
65
|
-
show_loop = true
|
66
|
-
end
|
67
|
-
if !component.to_FanVariableVolume.empty?
|
68
|
-
show_loop = true
|
69
|
-
end
|
70
|
-
if !component.to_FanOnOff.empty?
|
71
|
-
show_loop = true
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
# if loop as object of correct type then add to hash.
|
76
|
-
if show_loop == true
|
77
|
-
loop_handles << value.handle.to_s
|
78
|
-
loop_display_names << key
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
# add building to string vector with air loops
|
83
|
-
building = model.getBuilding
|
84
|
-
loop_handles << building.handle.to_s
|
85
|
-
loop_display_names << '*All Air Loops*'
|
86
|
-
|
87
|
-
# make an argument for air loops
|
88
|
-
object = OpenStudio::Measure::OSArgument.makeChoiceArgument('object', loop_handles, loop_display_names, true)
|
89
|
-
object.setDisplayName('Choose an Air Loop to Alter.')
|
90
|
-
object.setDefaultValue('*All Air Loops*') # if no loop is chosen this will run on all air loops
|
91
|
-
args << object
|
92
|
-
|
93
|
-
# TODO: - change this to choice list from design document
|
94
|
-
# make an argument to add new space true/false
|
95
|
-
motor_eff = OpenStudio::Measure::OSArgument.makeDoubleArgument('motor_eff', true)
|
96
|
-
motor_eff.setDisplayName('Motor Efficiency Improvement Due to Fan Belt Improvements(%).')
|
97
|
-
motor_eff.setDefaultValue(3.0)
|
98
|
-
args << motor_eff
|
99
|
-
|
100
|
-
# bool argument to remove existing costs
|
101
|
-
remove_costs = OpenStudio::Measure::OSArgument.makeBoolArgument('remove_costs', true)
|
102
|
-
remove_costs.setDisplayName('Remove Baseline Costs From Effected Fans?')
|
103
|
-
remove_costs.setDefaultValue(false)
|
104
|
-
args << remove_costs
|
105
|
-
|
106
|
-
# make an argument for material and installation cost
|
107
|
-
material_cost = OpenStudio::Measure::OSArgument.makeDoubleArgument('material_cost', true)
|
108
|
-
material_cost.setDisplayName('Material and Installation Costs per Motor ($).')
|
109
|
-
material_cost.setDefaultValue(0.0)
|
110
|
-
args << material_cost
|
111
|
-
|
112
|
-
# make an argument for demolition cost
|
113
|
-
demolition_cost = OpenStudio::Measure::OSArgument.makeDoubleArgument('demolition_cost', true)
|
114
|
-
demolition_cost.setDisplayName('Demolition Costs per Motor ($).')
|
115
|
-
demolition_cost.setDefaultValue(0.0)
|
116
|
-
args << demolition_cost
|
117
|
-
|
118
|
-
# make an argument for duration in years until costs start
|
119
|
-
years_until_costs_start = OpenStudio::Measure::OSArgument.makeIntegerArgument('years_until_costs_start', true)
|
120
|
-
years_until_costs_start.setDisplayName('Years Until Costs Start (whole years).')
|
121
|
-
years_until_costs_start.setDefaultValue(0)
|
122
|
-
args << years_until_costs_start
|
123
|
-
|
124
|
-
# make an argument to determine if demolition costs should be included in initial construction
|
125
|
-
demo_cost_initial_const = OpenStudio::Measure::OSArgument.makeBoolArgument('demo_cost_initial_const', true)
|
126
|
-
demo_cost_initial_const.setDisplayName('Demolition Costs Occur During Initial Construction?')
|
127
|
-
demo_cost_initial_const.setDefaultValue(false)
|
128
|
-
args << demo_cost_initial_const
|
129
|
-
|
130
|
-
# make an argument for expected life
|
131
|
-
expected_life = OpenStudio::Measure::OSArgument.makeIntegerArgument('expected_life', true)
|
132
|
-
expected_life.setDisplayName('Expected Life (whole years).')
|
133
|
-
expected_life.setDefaultValue(20)
|
134
|
-
args << expected_life
|
135
|
-
|
136
|
-
# make an argument for o&m cost
|
137
|
-
om_cost = OpenStudio::Measure::OSArgument.makeDoubleArgument('om_cost', true)
|
138
|
-
om_cost.setDisplayName('O & M Costs per Motor ($).')
|
139
|
-
om_cost.setDefaultValue(0.0)
|
140
|
-
args << om_cost
|
141
|
-
|
142
|
-
# make an argument for o&m frequency
|
143
|
-
om_frequency = OpenStudio::Measure::OSArgument.makeIntegerArgument('om_frequency', true)
|
144
|
-
om_frequency.setDisplayName('O & M Frequency (whole years).')
|
145
|
-
om_frequency.setDefaultValue(1)
|
146
|
-
args << om_frequency
|
147
|
-
|
148
|
-
return args
|
149
|
-
end
|
150
|
-
|
151
|
-
# define what happens when the measure is cop
|
152
|
-
def run(model, runner, user_arguments)
|
153
|
-
super(model, runner, user_arguments)
|
154
|
-
|
155
|
-
# use the built-in error checking
|
156
|
-
if !runner.validateUserArguments(arguments(model), user_arguments)
|
157
|
-
return false
|
158
|
-
end
|
159
|
-
|
160
|
-
# assign the user inputs to variables
|
161
|
-
object = runner.getOptionalWorkspaceObjectChoiceValue('object', user_arguments, model) # model is passed in because of argument type
|
162
|
-
motor_eff = runner.getDoubleArgumentValue('motor_eff', user_arguments)
|
163
|
-
remove_costs = runner.getBoolArgumentValue('remove_costs', user_arguments)
|
164
|
-
material_cost = runner.getDoubleArgumentValue('material_cost', user_arguments)
|
165
|
-
demolition_cost = runner.getDoubleArgumentValue('demolition_cost', user_arguments)
|
166
|
-
years_until_costs_start = runner.getIntegerArgumentValue('years_until_costs_start', user_arguments)
|
167
|
-
demo_cost_initial_const = runner.getBoolArgumentValue('demo_cost_initial_const', user_arguments)
|
168
|
-
expected_life = runner.getIntegerArgumentValue('expected_life', user_arguments)
|
169
|
-
om_cost = runner.getDoubleArgumentValue('om_cost', user_arguments)
|
170
|
-
om_frequency = runner.getIntegerArgumentValue('om_frequency', user_arguments)
|
171
|
-
|
172
|
-
# check the loop for reasonableness
|
173
|
-
apply_to_all_loops = false
|
174
|
-
loop = nil
|
175
|
-
if object.empty?
|
176
|
-
handle = runner.getStringArgumentValue('loop', user_arguments)
|
177
|
-
if handle.empty?
|
178
|
-
runner.registerError('No loop was chosen.')
|
179
|
-
else
|
180
|
-
runner.registerError("The selected loop with handle '#{handle}' was not found in the model. It may have been removed by another measure.")
|
181
|
-
end
|
182
|
-
return false
|
183
|
-
else
|
184
|
-
if !object.get.to_Loop.empty?
|
185
|
-
loop = object.get.to_Loop.get
|
186
|
-
elsif !object.get.to_Building.empty?
|
187
|
-
apply_to_all_loops = true
|
188
|
-
else
|
189
|
-
runner.registerError('Script Error - argument not showing up as loop.')
|
190
|
-
return false
|
191
|
-
end
|
192
|
-
end
|
193
|
-
|
194
|
-
# check the user_name for reasonableness
|
195
|
-
if (motor_eff <= 1) || (motor_eff >= 5)
|
196
|
-
runner.registerWarning('Requested motor efficiency improvement is not between expected values of 1% and 5%')
|
197
|
-
end
|
198
|
-
# motor efficiency will be checked motor by motor to see warn if higher than 0.96 and error if not between or equal to 0 and 1
|
199
|
-
|
200
|
-
# set flags to use later
|
201
|
-
costs_requested = false
|
202
|
-
|
203
|
-
# set values to use later
|
204
|
-
yr0_capital_totalCosts_baseline = 0
|
205
|
-
yr0_capital_totalCosts_proposed = 0
|
206
|
-
|
207
|
-
# If demo_cost_initial_const is true then will be applied once in the lifecycle. Future replacements use the demo cost of the new construction.
|
208
|
-
demo_costs_of_baseline_objects = 0
|
209
|
-
|
210
|
-
# check costs for reasonableness
|
211
|
-
if material_cost.abs + demolition_cost.abs + om_cost.abs == 0
|
212
|
-
runner.registerInfo('No costs were requested for motors improvements.')
|
213
|
-
else
|
214
|
-
costs_requested = true
|
215
|
-
end
|
216
|
-
|
217
|
-
# check lifecycle arguments for reasonableness
|
218
|
-
if (years_until_costs_start < 0) && (years_until_costs_start > expected_life)
|
219
|
-
runner.registerError('Years until costs start should be a non-negative integer less than Expected Life.')
|
220
|
-
end
|
221
|
-
if (expected_life < 1) && (expected_life > 100)
|
222
|
-
runner.registerError('Choose an integer greater than 0 and less than or equal to 100 for Expected Life.')
|
223
|
-
end
|
224
|
-
if om_frequency < 1
|
225
|
-
runner.registerError('Choose an integer greater than 0 for O & M Frequency.')
|
226
|
-
end
|
227
|
-
|
228
|
-
# short def to make numbers pretty (converts 4125001.25641 to 4,125,001.26 or 4,125,001). The definition be called through this measure
|
229
|
-
def neat_numbers(number, roundto = 2) # round to 0 or 2)
|
230
|
-
if roundto == 2
|
231
|
-
number = format '%.2f', number
|
232
|
-
else
|
233
|
-
number = number.round
|
234
|
-
end
|
235
|
-
# regex to add commas
|
236
|
-
number.to_s.reverse.gsub(/([0-9]{3}(?=([0-9])))/, '\\1,').reverse
|
237
|
-
end
|
238
|
-
|
239
|
-
# helper that loops through lifecycle costs getting total costs under "Construction" or "Salvage" category and add to counter if occurs during year 0
|
240
|
-
def get_total_costs_for_objects(objects)
|
241
|
-
counter = 0
|
242
|
-
objects.each do |object|
|
243
|
-
object_LCCs = object.lifeCycleCosts
|
244
|
-
object_LCCs.each do |object_LCC|
|
245
|
-
if (object_LCC.category == 'Construction') || (object_LCC.category == 'Salvage')
|
246
|
-
if object_LCC.yearsFromStart == 0
|
247
|
-
counter += object_LCC.totalCost
|
248
|
-
end
|
249
|
-
end
|
250
|
-
end
|
251
|
-
end
|
252
|
-
return counter
|
253
|
-
end
|
254
|
-
|
255
|
-
# get loops for measure
|
256
|
-
if apply_to_all_loops
|
257
|
-
loops = model.getAirLoopHVACs
|
258
|
-
else
|
259
|
-
loops = []
|
260
|
-
loops << loop # only run on a single space type
|
261
|
-
end
|
262
|
-
|
263
|
-
# get cop values
|
264
|
-
initial_motor_efficiency_values = []
|
265
|
-
missing_initial_motor_efficiency = 0
|
266
|
-
|
267
|
-
# loop through air loops
|
268
|
-
loops.each do |loop|
|
269
|
-
supply_components = loop.supplyComponents
|
270
|
-
|
271
|
-
# find fans on loop
|
272
|
-
supply_components.each do |supply_component|
|
273
|
-
hVACComponent = supply_component.to_FanConstantVolume
|
274
|
-
if hVACComponent.empty?
|
275
|
-
hVACComponent = supply_component.to_FanVariableVolume
|
276
|
-
end
|
277
|
-
if hVACComponent.empty?
|
278
|
-
hVACComponent = supply_component.to_FanOnOff
|
279
|
-
end
|
280
|
-
|
281
|
-
# alter components of correct type
|
282
|
-
if !hVACComponent.empty?
|
283
|
-
hVACComponent = hVACComponent.get
|
284
|
-
|
285
|
-
# change and report changes to fans and motors
|
286
|
-
initial_motor_efficiency = hVACComponent.motorEfficiency
|
287
|
-
target_motor_efficiency = initial_motor_efficiency + motor_eff * 0.01
|
288
|
-
initial_motor_efficiency_values << initial_motor_efficiency
|
289
|
-
if target_motor_efficiency > 1
|
290
|
-
hVACComponent.setMotorEfficiency(1.0)
|
291
|
-
runner.registerWarning("Requested efficiency of #{target_motor_efficiency * 100}% for #{hVACComponent.name} is not possible. Setting motor efficiency to 100%.")
|
292
|
-
elsif target_motor_efficiency < 0
|
293
|
-
hVACComponent.setMotorEfficiency(0.0)
|
294
|
-
runner.registerWarning("Requested efficiency of #{target_motor_efficiency * 100}% for #{hVACComponent.name} is not possible. Setting motor efficiency to 0%.")
|
295
|
-
else
|
296
|
-
hVACComponent.setMotorEfficiency(target_motor_efficiency)
|
297
|
-
runner.registerInfo("Changing the motor efficiency from #{initial_motor_efficiency * 100}% to #{target_motor_efficiency * 100}% for '#{hVACComponent.name}' onloop '#{loop.name}.'")
|
298
|
-
if target_motor_efficiency > 0.96
|
299
|
-
runner.registerWarning("Requested efficiency for #{hVACComponent.name} is greater than 96%.")
|
300
|
-
end
|
301
|
-
end
|
302
|
-
|
303
|
-
# get initial year 0 cost
|
304
|
-
yr0_capital_totalCosts_baseline += get_total_costs_for_objects([hVACComponent])
|
305
|
-
|
306
|
-
# demo value of baseline costs associated with unit
|
307
|
-
demo_LCCs = hVACComponent.lifeCycleCosts
|
308
|
-
demo_LCCs.each do |demo_LCC|
|
309
|
-
if demo_LCC.category == 'Salvage'
|
310
|
-
demo_costs_of_baseline_objects += demo_LCC.totalCost
|
311
|
-
end
|
312
|
-
end
|
313
|
-
|
314
|
-
# remove all old costs
|
315
|
-
if !hVACComponent.lifeCycleCosts.empty? && (remove_costs == true)
|
316
|
-
runner.registerInfo("Removing existing lifecycle cost objects associated with #{hVACComponent.name}")
|
317
|
-
removed_costs = hVACComponent.removeLifeCycleCosts
|
318
|
-
end
|
319
|
-
|
320
|
-
# add new costs
|
321
|
-
if costs_requested == true
|
322
|
-
|
323
|
-
# adding new cost items
|
324
|
-
lcc_mat = OpenStudio::Model::LifeCycleCost.createLifeCycleCost("LCC_Mat - #{hVACComponent.name}", hVACComponent, material_cost, 'CostPerEach', 'Construction', expected_life, years_until_costs_start)
|
325
|
-
# cost for if demo_initial_Construction == true is added at the end of the measure
|
326
|
-
lcc_demo = OpenStudio::Model::LifeCycleCost.createLifeCycleCost("LCC_Demo - #{hVACComponent.name}", hVACComponent, demolition_cost, 'CostPerEach', 'Salvage', expected_life, years_until_costs_start + expected_life)
|
327
|
-
lcc_om = OpenStudio::Model::LifeCycleCost.createLifeCycleCost("LCC_OM - #{hVACComponent.name}", hVACComponent, om_cost, 'CostPerEach', 'Maintenance', om_frequency, 0)
|
328
|
-
|
329
|
-
# get final year 0 cost
|
330
|
-
yr0_capital_totalCosts_proposed += get_total_costs_for_objects([hVACComponent])
|
331
|
-
|
332
|
-
end
|
333
|
-
|
334
|
-
end
|
335
|
-
end
|
336
|
-
end
|
337
|
-
|
338
|
-
# add one time demo cost of removed windows if appropriate
|
339
|
-
if demo_cost_initial_const == true
|
340
|
-
building = model.getBuilding
|
341
|
-
lcc_baseline_demo = OpenStudio::Model::LifeCycleCost.createLifeCycleCost('LCC_baseline_demo', building, demo_costs_of_baseline_objects, 'CostPerEach', 'Salvage', 0, years_until_costs_start).get # using 0 for repeat period since one time cost.
|
342
|
-
runner.registerInfo("Adding one time cost of $#{neat_numbers(lcc_baseline_demo.totalCost, 0)} related to demolition of baseline objects.")
|
343
|
-
|
344
|
-
# if demo occurs on year 0 then add to initial capital cost counter
|
345
|
-
if lcc_baseline_demo.yearsFromStart == 0
|
346
|
-
yr0_capital_totalCosts_proposed += lcc_baseline_demo.totalCost
|
347
|
-
end
|
348
|
-
end
|
349
|
-
|
350
|
-
if initial_motor_efficiency_values.size + missing_initial_motor_efficiency == 0
|
351
|
-
runner.registerAsNotApplicable('The affected loop(s) does not contain any fans, the model will not be altered.')
|
352
|
-
return true
|
353
|
-
end
|
354
|
-
|
355
|
-
# reporting initial condition of model
|
356
|
-
runner.registerInitialCondition("The starting motor efficiency values in affected loop(s) range from #{initial_motor_efficiency_values.min * 100}% to #{initial_motor_efficiency_values.max * 100}%. Initial year 0 capital costs for affected fans is $#{neat_numbers(yr0_capital_totalCosts_baseline, 0)}.")
|
357
|
-
|
358
|
-
# reporting final condition of model
|
359
|
-
runner.registerFinalCondition("#{initial_motor_efficiency_values.size + missing_initial_motor_efficiency} fans had motor efficiency values set to altered. Final year 0 capital costs for affected fans is $#{neat_numbers(yr0_capital_totalCosts_proposed, 0)}.")
|
360
|
-
|
361
|
-
return true
|
362
|
-
end
|
363
|
-
end
|
364
|
-
|
365
|
-
# this allows the measure to be used by the application
|
366
|
-
ImproveFanBeltEfficiency.new.registerWithApplication
|
@@ -1,185 +0,0 @@
|
|
1
|
-
<measure>
|
2
|
-
<schema_version>3.0</schema_version>
|
3
|
-
<name>improve_fan_belt_efficiency</name>
|
4
|
-
<uid>ebeca0aa-a432-4283-a714-17116f7c8f8c</uid>
|
5
|
-
<version_id>48c68838-44c3-40b1-8f56-732c034f4764</version_id>
|
6
|
-
<version_modified>20200229T024321Z</version_modified>
|
7
|
-
<xml_checksum>F78494F2</xml_checksum>
|
8
|
-
<class_name>ImproveFanBeltEfficiency</class_name>
|
9
|
-
<display_name>Improve Fan Belt Efficiency</display_name>
|
10
|
-
<description>The assessment team observed opportunities for fan belt improvements on HVAC fan drives. These motors are asynchronous induction motors.





|
11
|
-






|
12
|
-
Improvements in belt efficiency result in energy savings at the motor. The three common belt efficiency measures are belt tightening (1%-5% savings per motor), replace standard v-belts with cogged v-belts (2% savings per motor), and replace standard belts with synchronous belts (3% savings per motor).





|
13
|
-






|
14
|
-
Well-adjusted belts run cooler, last longer, and operate at higher efficiency than standard belts. The belts associated with the largest motors, longest run times, and that are run closest to full load should be given priority when making replacements.





|
15
|
-
</description>
|
16
|
-
<modeler_description>This measure alters fans on all or a single air loop in the building. The three belt ECMs options are then exposed as three user argument fields with a default populated for each. The range of efficiency improvements will be listed in the user argument description. The three user arguments will be summed and added to the existing motor efficiency. The cost arguments are user arguments that are also populated with a default. If arguments are left blank, the user is notified that the model has not changed in the run manager. A warning is issued if the motor efficiency >96% and an error is issued if efficiency is >100%.</modeler_description>
|
17
|
-
<arguments>
|
18
|
-
<argument>
|
19
|
-
<name>object</name>
|
20
|
-
<display_name>Choose an Air Loop to Alter.</display_name>
|
21
|
-
<type>Choice</type>
|
22
|
-
<required>true</required>
|
23
|
-
<model_dependent>false</model_dependent>
|
24
|
-
<default_value>*All Air Loops*</default_value>
|
25
|
-
<choices>
|
26
|
-
<choice>
|
27
|
-
<value>{8e9617e2-ac3d-457c-9735-ae1662b21b1b}</value>
|
28
|
-
<display_name>*All Air Loops*</display_name>
|
29
|
-
</choice>
|
30
|
-
</choices>
|
31
|
-
</argument>
|
32
|
-
<argument>
|
33
|
-
<name>motor_eff</name>
|
34
|
-
<display_name>Motor Efficiency Improvement Due to Fan Belt Improvements(%).</display_name>
|
35
|
-
<type>Double</type>
|
36
|
-
<required>true</required>
|
37
|
-
<model_dependent>false</model_dependent>
|
38
|
-
<default_value>3</default_value>
|
39
|
-
</argument>
|
40
|
-
<argument>
|
41
|
-
<name>remove_costs</name>
|
42
|
-
<display_name>Remove Baseline Costs From Effected Fans?</display_name>
|
43
|
-
<type>Boolean</type>
|
44
|
-
<required>true</required>
|
45
|
-
<model_dependent>false</model_dependent>
|
46
|
-
<default_value>false</default_value>
|
47
|
-
<choices>
|
48
|
-
<choice>
|
49
|
-
<value>true</value>
|
50
|
-
<display_name>true</display_name>
|
51
|
-
</choice>
|
52
|
-
<choice>
|
53
|
-
<value>false</value>
|
54
|
-
<display_name>false</display_name>
|
55
|
-
</choice>
|
56
|
-
</choices>
|
57
|
-
</argument>
|
58
|
-
<argument>
|
59
|
-
<name>material_cost</name>
|
60
|
-
<display_name>Material and Installation Costs per Motor ($).</display_name>
|
61
|
-
<type>Double</type>
|
62
|
-
<required>true</required>
|
63
|
-
<model_dependent>false</model_dependent>
|
64
|
-
<default_value>0</default_value>
|
65
|
-
</argument>
|
66
|
-
<argument>
|
67
|
-
<name>demolition_cost</name>
|
68
|
-
<display_name>Demolition Costs per Motor ($).</display_name>
|
69
|
-
<type>Double</type>
|
70
|
-
<required>true</required>
|
71
|
-
<model_dependent>false</model_dependent>
|
72
|
-
<default_value>0</default_value>
|
73
|
-
</argument>
|
74
|
-
<argument>
|
75
|
-
<name>years_until_costs_start</name>
|
76
|
-
<display_name>Years Until Costs Start (whole years).</display_name>
|
77
|
-
<type>Integer</type>
|
78
|
-
<required>true</required>
|
79
|
-
<model_dependent>false</model_dependent>
|
80
|
-
<default_value>0</default_value>
|
81
|
-
</argument>
|
82
|
-
<argument>
|
83
|
-
<name>demo_cost_initial_const</name>
|
84
|
-
<display_name>Demolition Costs Occur During Initial Construction?</display_name>
|
85
|
-
<type>Boolean</type>
|
86
|
-
<required>true</required>
|
87
|
-
<model_dependent>false</model_dependent>
|
88
|
-
<default_value>false</default_value>
|
89
|
-
<choices>
|
90
|
-
<choice>
|
91
|
-
<value>true</value>
|
92
|
-
<display_name>true</display_name>
|
93
|
-
</choice>
|
94
|
-
<choice>
|
95
|
-
<value>false</value>
|
96
|
-
<display_name>false</display_name>
|
97
|
-
</choice>
|
98
|
-
</choices>
|
99
|
-
</argument>
|
100
|
-
<argument>
|
101
|
-
<name>expected_life</name>
|
102
|
-
<display_name>Expected Life (whole years).</display_name>
|
103
|
-
<type>Integer</type>
|
104
|
-
<required>true</required>
|
105
|
-
<model_dependent>false</model_dependent>
|
106
|
-
<default_value>20</default_value>
|
107
|
-
</argument>
|
108
|
-
<argument>
|
109
|
-
<name>om_cost</name>
|
110
|
-
<display_name>O & M Costs per Motor ($).</display_name>
|
111
|
-
<type>Double</type>
|
112
|
-
<required>true</required>
|
113
|
-
<model_dependent>false</model_dependent>
|
114
|
-
<default_value>0</default_value>
|
115
|
-
</argument>
|
116
|
-
<argument>
|
117
|
-
<name>om_frequency</name>
|
118
|
-
<display_name>O & M Frequency (whole years).</display_name>
|
119
|
-
<type>Integer</type>
|
120
|
-
<required>true</required>
|
121
|
-
<model_dependent>false</model_dependent>
|
122
|
-
<default_value>1</default_value>
|
123
|
-
</argument>
|
124
|
-
</arguments>
|
125
|
-
<outputs/>
|
126
|
-
<provenances/>
|
127
|
-
<tags>
|
128
|
-
<tag>HVAC.Distribution</tag>
|
129
|
-
</tags>
|
130
|
-
<attributes>
|
131
|
-
<attribute>
|
132
|
-
<name>Measure Type</name>
|
133
|
-
<value>ModelMeasure</value>
|
134
|
-
<datatype>string</datatype>
|
135
|
-
</attribute>
|
136
|
-
<attribute>
|
137
|
-
<name>Uses SketchUp API</name>
|
138
|
-
<value>false</value>
|
139
|
-
<datatype>boolean</datatype>
|
140
|
-
</attribute>
|
141
|
-
</attributes>
|
142
|
-
<files>
|
143
|
-
<file>
|
144
|
-
<filename>0320_ModelWithHVAC_01.osm</filename>
|
145
|
-
<filetype>osm</filetype>
|
146
|
-
<usage_type>test</usage_type>
|
147
|
-
<checksum>4A5352A1</checksum>
|
148
|
-
</file>
|
149
|
-
<file>
|
150
|
-
<filename>README.md.erb</filename>
|
151
|
-
<filetype>erb</filetype>
|
152
|
-
<usage_type>readmeerb</usage_type>
|
153
|
-
<checksum>703C9964</checksum>
|
154
|
-
</file>
|
155
|
-
<file>
|
156
|
-
<filename>README.md</filename>
|
157
|
-
<filetype>md</filetype>
|
158
|
-
<usage_type>readme</usage_type>
|
159
|
-
<checksum>0A5ECB03</checksum>
|
160
|
-
</file>
|
161
|
-
<file>
|
162
|
-
<version>
|
163
|
-
<software_program>OpenStudio</software_program>
|
164
|
-
<identifier>2.0.0</identifier>
|
165
|
-
<min_compatible>2.0.0</min_compatible>
|
166
|
-
</version>
|
167
|
-
<filename>measure.rb</filename>
|
168
|
-
<filetype>rb</filetype>
|
169
|
-
<usage_type>script</usage_type>
|
170
|
-
<checksum>D17557CD</checksum>
|
171
|
-
</file>
|
172
|
-
<file>
|
173
|
-
<filename>ImproveFanBeltEfficiency_Test.rb</filename>
|
174
|
-
<filetype>rb</filetype>
|
175
|
-
<usage_type>test</usage_type>
|
176
|
-
<checksum>7D820170</checksum>
|
177
|
-
</file>
|
178
|
-
<file>
|
179
|
-
<filename>LICENSE.md</filename>
|
180
|
-
<filetype>md</filetype>
|
181
|
-
<usage_type>license</usage_type>
|
182
|
-
<checksum>E0468DD6</checksum>
|
183
|
-
</file>
|
184
|
-
</files>
|
185
|
-
</measure>
|