openstudio-common-measures 0.8.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test_with_openstudio.yml +2 -2
- data/CHANGELOG.md +9 -0
- data/Gemfile +10 -5
- data/Jenkinsfile +1 -1
- data/README.md +2 -0
- data/lib/measures/.rubocop.yml +6 -0
- data/lib/measures/AddCostPerAreaToConstruction/measure.xml +21 -21
- data/lib/measures/AddCostPerFloorAreaToBuilding/measure.xml +25 -25
- data/lib/measures/AddCostPerFloorAreaToElectricEquipment/measure.xml +21 -21
- data/lib/measures/AddCostPerFloorAreaToLights/measure.xml +21 -21
- data/lib/measures/AddCostPerFloorAreaUnusedToLights/measure.xml +21 -21
- data/lib/measures/AddCostToSupplySideHVACComponentByAirLoop/measure.xml +24 -24
- data/lib/measures/AddCostperAreatoUnusedConstruction/measure.xml +21 -21
- data/lib/measures/AddExteriorLights/measure.xml +19 -19
- data/lib/measures/AddMeter/measure.xml +15 -15
- data/lib/measures/AddOutputDiagnostics/measure.xml +18 -18
- data/lib/measures/AddOutputVariable/measure.xml +15 -15
- data/lib/measures/AddSimplePvToShadingSurfacesByType/measure.xml +24 -24
- data/lib/measures/AddThermalComfortModelTypes/measure.xml +21 -21
- data/lib/measures/AdjustSystemEfficiencies/measure.xml +12 -12
- data/lib/measures/AdjustThermostatSetpointsByDegrees/measure.xml +23 -23
- data/lib/measures/ChangeBuildingLocation/README.md +1 -1
- data/lib/measures/ChangeBuildingLocation/measure.rb +8 -13
- data/lib/measures/ChangeBuildingLocation/measure.xml +89 -89
- data/lib/measures/EnableIdealAirLoadsForAllZones/measure.xml +22 -22
- data/lib/measures/ExportScheduleCSV/measure.xml +29 -29
- data/lib/measures/ImportEnvelopeAndInternalLoadsFromIdf/measure.xml +29 -29
- data/lib/measures/MeterFlodPlot/measure.xml +35 -35
- data/lib/measures/ModifyEnergyPlusCoilCoolingDXSingleSpeedObjects/measure.xml +24 -24
- data/lib/measures/ModifyEnergyPlusFanVariableVolumeObjects/measure.xml +24 -24
- data/lib/measures/PredictedMeanVote/measure.xml +23 -23
- data/lib/measures/RemoveInternalLoadsDirectlyAssignedToSpaces/measure.xml +21 -21
- data/lib/measures/RemoveUnusedDefaultProfiles/measure.xml +19 -19
- data/lib/measures/ReplaceExteriorWindowConstruction/measure.xml +29 -29
- data/lib/measures/ReplaceModel/README.md +1 -3
- data/lib/measures/ReplaceModel/measure.xml +32 -14
- data/lib/measures/ReplaceThermostatSchedules/measure.xml +17 -17
- data/lib/measures/ReportModelChanges/measure.xml +23 -23
- data/lib/measures/RunPeriod/measure.xml +14 -14
- data/lib/measures/RunPeriodMultiple/measure.xml +12 -12
- data/lib/measures/ServerDirectoryCleanup/measure.xml +30 -30
- data/lib/measures/SetCOPforSingleSpeedDXCoolingUnits/measure.xml +23 -23
- data/lib/measures/SetCOPforTwoSpeedDXCoolingUnits/measure.xml +23 -23
- data/lib/measures/SetEnergyPlusInfiltrationFlowRatePerFloorArea/measure.xml +24 -24
- data/lib/measures/SetEnergyPlusLightObjectsLPD/measure.xml +24 -24
- data/lib/measures/SetEnergyPlusMinimumOutdoorAirFlowRate/measure.xml +24 -24
- data/lib/measures/SetGasBurnerEfficiency/measure.xml +23 -23
- data/lib/measures/SetLifecycleCostParameters/measure.xml +15 -15
- data/lib/measures/SetLightingLoadsByLPD/measure.xml +35 -35
- data/lib/measures/SetSpaceInfiltrationByExteriorSurfaceArea/measure.xml +25 -25
- data/lib/measures/SetThermostatSchedules/measure.xml +17 -17
- data/lib/measures/ShiftScheduleProfileTime/measure.xml +23 -23
- data/lib/measures/SwapLightsDefinition/measure.xml +25 -25
- data/lib/measures/UnmetLoadHoursTroubleshooting/measure.xml +43 -43
- data/lib/measures/VentilationQAQC/measure.xml +31 -31
- data/lib/measures/XcelEDAReportingandQAQC/measure.xml +46 -46
- data/lib/measures/XcelEDAReportingandQAQC/resources/CreateResults.rb +2 -0
- data/lib/measures/XcelEDATariffSelectionandModelSetup/measure.xml +73 -73
- data/lib/measures/ZoneReport/measure.xml +35 -35
- data/lib/measures/add_ems_emissions_reporting/measure.rb +0 -2
- data/lib/measures/add_ems_emissions_reporting/measure.xml +23 -23
- data/lib/measures/add_ems_to_control_ev_charging/measure.rb +0 -2
- data/lib/measures/add_ems_to_control_ev_charging/measure.xml +21 -21
- data/lib/measures/add_ev_load/measure.xml +35 -35
- data/lib/measures/add_rooftop_pv/measure.rb +5 -7
- data/lib/measures/add_rooftop_pv/measure.xml +25 -25
- data/lib/measures/add_zone_mixing_object/measure.xml +19 -19
- data/lib/measures/add_zone_ventilation_design_flow_rate_object/measure.xml +21 -21
- data/lib/measures/air_wall_zone_mixing/measure.rb +4 -6
- data/lib/measures/air_wall_zone_mixing/measure.xml +27 -27
- data/lib/measures/create_csv_output/measure.xml +28 -28
- data/lib/measures/envelope_and_internal_load_breakdown/measure.rb +0 -4
- data/lib/measures/envelope_and_internal_load_breakdown/measure.xml +52 -52
- data/lib/measures/envelope_and_internal_load_breakdown/resources/report.html.erb +1 -0
- data/lib/measures/example_report/measure.rb +2 -5
- data/lib/measures/example_report/measure.xml +41 -41
- data/lib/measures/example_report/resources/report.html.erb +1 -0
- data/lib/measures/gem_env_report/measure.xml +32 -32
- data/lib/measures/generic_qaqc/measure.rb +8 -15
- data/lib/measures/generic_qaqc/measure.xml +175 -175
- data/lib/measures/generic_qaqc/resources/check_air_sys_temps.rb +2 -2
- data/lib/measures/generic_qaqc/resources/check_domestic_hot_water.rb +4 -4
- data/lib/measures/generic_qaqc/resources/check_envelope_conductance.rb +14 -5
- data/lib/measures/generic_qaqc/resources/check_internal_loads.rb +2 -2
- data/lib/measures/generic_qaqc/resources/check_mech_sys_type.rb +1 -1
- data/lib/measures/generic_qaqc/resources/check_plant_temps.rb +6 -6
- data/lib/measures/generic_qaqc/resources/check_schedules.rb +7 -7
- data/lib/measures/generic_qaqc/resources/check_supply_air_and_thermostat_temp_difference.rb +5 -2
- data/lib/measures/generic_qaqc/resources/report.html.erb +1 -0
- data/lib/measures/get_site_from_building_component_library/measure.rb +4 -8
- data/lib/measures/get_site_from_building_component_library/measure.xml +28 -28
- data/lib/measures/hvac_psychrometric_chart/measure.xml +29 -29
- data/lib/measures/hvac_psychrometric_chart/resources/report.html.erb +1 -0
- data/lib/measures/inject_idf_objects/measure.xml +31 -31
- data/lib/measures/openstudio_results/measure.rb +2 -6
- data/lib/measures/openstudio_results/measure.xml +348 -360
- data/lib/measures/openstudio_results/resources/os_lib_reporting.rb +8 -8
- data/lib/measures/openstudio_results/resources/report.html.erb +1 -0
- data/lib/measures/remove_orphan_objects_and_unused_resources/measure.xml +24 -24
- data/lib/measures/set_electric_equipment_loads_by_epd/measure.xml +33 -33
- data/lib/measures/set_exterior_walls_and_floors_to_adiabatic/measure.xml +19 -19
- data/lib/measures/set_run_period/measure.xml +19 -19
- data/lib/measures/set_space_infiltration_per_exterior_area/measure.xml +22 -22
- data/lib/measures/shadow_calculation/measure.xml +18 -18
- data/lib/measures/tariff_selection_block/measure.rb +2 -5
- data/lib/measures/tariff_selection_block/measure.xml +25 -25
- data/lib/measures/tariff_selection_flat/measure.rb +3 -5
- data/lib/measures/tariff_selection_flat/measure.xml +25 -25
- data/lib/measures/tariff_selection_generic/measure.rb +2 -5
- data/lib/measures/tariff_selection_generic/measure.xml +39 -39
- data/lib/measures/tariff_selection_time_and_date_dependant/measure.rb +19 -15
- data/lib/measures/tariff_selection_time_and_date_dependant/measure.xml +37 -25
- data/lib/measures/view_data/measure.xml +41 -41
- data/lib/measures/view_model/measure.xml +35 -35
- data/lib/openstudio/common_measures/version.rb +1 -1
- data/openstudio-common-measures.gemspec +11 -4
- metadata +72 -15
@@ -6,10 +6,6 @@
|
|
6
6
|
# see the URL below for information on how to write OpenStudio measures
|
7
7
|
# http://nrel.github.io/OpenStudio-user-documentation/measures/measure_writing_guide/
|
8
8
|
|
9
|
-
# load OpenStudio measure libraries from openstudio-extension gem
|
10
|
-
require 'openstudio-extension'
|
11
|
-
require 'openstudio/extension/core/os_lib_helper_methods'
|
12
|
-
|
13
9
|
# start the measure
|
14
10
|
class TariffSelectionFlat < OpenStudio::Measure::EnergyPlusMeasure
|
15
11
|
# human readable name
|
@@ -108,7 +104,9 @@ class TariffSelectionFlat < OpenStudio::Measure::EnergyPlusMeasure
|
|
108
104
|
super(workspace, runner, user_arguments)
|
109
105
|
|
110
106
|
# assign the user inputs to variables
|
111
|
-
args =
|
107
|
+
args = runner.getArgumentValues(arguments(workspace), user_arguments)
|
108
|
+
args = Hash[args.collect{ |k, v| [k.to_s, v] }]
|
109
|
+
|
112
110
|
if !args then return false end
|
113
111
|
|
114
112
|
# reporting initial condition of model
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<?xml version="1.0"?>
|
2
2
|
<measure>
|
3
|
-
<schema_version>3.
|
3
|
+
<schema_version>3.1</schema_version>
|
4
4
|
<name>tariff_selection_flat</name>
|
5
5
|
<uid>539c3e8e-6c41-4f50-ac61-6cbbf1ee1b55</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>30111c72-9467-4d48-92e9-084c1c3ebe44</version_id>
|
7
|
+
<version_modified>2024-07-11T14:32:14Z</version_modified>
|
8
8
|
<xml_checksum>FBDC6D11</xml_checksum>
|
9
9
|
<class_name>TariffSelectionFlat</class_name>
|
10
10
|
<display_name>Tariff Selection-Flat</display_name>
|
@@ -210,16 +210,10 @@
|
|
210
210
|
</attributes>
|
211
211
|
<files>
|
212
212
|
<file>
|
213
|
-
<filename>
|
214
|
-
<filetype>
|
215
|
-
<usage_type>
|
216
|
-
<checksum>
|
217
|
-
</file>
|
218
|
-
<file>
|
219
|
-
<filename>README.md.erb</filename>
|
220
|
-
<filetype>erb</filetype>
|
221
|
-
<usage_type>readmeerb</usage_type>
|
222
|
-
<checksum>703C9964</checksum>
|
213
|
+
<filename>LICENSE.md</filename>
|
214
|
+
<filetype>md</filetype>
|
215
|
+
<usage_type>license</usage_type>
|
216
|
+
<checksum>BFFB1AA6</checksum>
|
223
217
|
</file>
|
224
218
|
<file>
|
225
219
|
<filename>README.md</filename>
|
@@ -228,27 +222,33 @@
|
|
228
222
|
<checksum>A6339B0D</checksum>
|
229
223
|
</file>
|
230
224
|
<file>
|
231
|
-
<filename>
|
232
|
-
<filetype>
|
233
|
-
<usage_type>
|
234
|
-
<checksum>
|
235
|
-
</file>
|
236
|
-
<file>
|
237
|
-
<filename>tariff_selection_flat_test.rb</filename>
|
238
|
-
<filetype>rb</filetype>
|
239
|
-
<usage_type>test</usage_type>
|
240
|
-
<checksum>9104949F</checksum>
|
225
|
+
<filename>README.md.erb</filename>
|
226
|
+
<filetype>erb</filetype>
|
227
|
+
<usage_type>readmeerb</usage_type>
|
228
|
+
<checksum>703C9964</checksum>
|
241
229
|
</file>
|
242
230
|
<file>
|
243
231
|
<version>
|
244
232
|
<software_program>OpenStudio</software_program>
|
245
233
|
<identifier>2.0.0</identifier>
|
246
|
-
<min_compatible>
|
234
|
+
<min_compatible>3.8.0</min_compatible>
|
247
235
|
</version>
|
248
236
|
<filename>measure.rb</filename>
|
249
237
|
<filetype>rb</filetype>
|
250
238
|
<usage_type>script</usage_type>
|
251
|
-
<checksum>
|
239
|
+
<checksum>AE5AA325</checksum>
|
240
|
+
</file>
|
241
|
+
<file>
|
242
|
+
<filename>EnvelopeAndLoadTestModel_01.osm</filename>
|
243
|
+
<filetype>osm</filetype>
|
244
|
+
<usage_type>test</usage_type>
|
245
|
+
<checksum>E11F67BD</checksum>
|
246
|
+
</file>
|
247
|
+
<file>
|
248
|
+
<filename>tariff_selection_flat_test.rb</filename>
|
249
|
+
<filetype>rb</filetype>
|
250
|
+
<usage_type>test</usage_type>
|
251
|
+
<checksum>7DEEBDDA</checksum>
|
252
252
|
</file>
|
253
253
|
</files>
|
254
254
|
</measure>
|
@@ -6,10 +6,6 @@
|
|
6
6
|
# see the URL below for information on how to write OpenStuido measures
|
7
7
|
# http://openstudio.nrel.gov/openstudio-measure-writing-guide
|
8
8
|
|
9
|
-
# load OpenStudio measure libraries from openstudio-extension gem
|
10
|
-
require 'openstudio-extension'
|
11
|
-
require 'openstudio/extension/core/os_lib_helper_methods'
|
12
|
-
|
13
9
|
# start the measure
|
14
10
|
class TariffSelectionGeneric < OpenStudio::Measure::EnergyPlusMeasure
|
15
11
|
# define the name that a user will see, this method may be deprecated as
|
@@ -98,7 +94,8 @@ class TariffSelectionGeneric < OpenStudio::Measure::EnergyPlusMeasure
|
|
98
94
|
def run(workspace, runner, user_arguments)
|
99
95
|
super(workspace, runner, user_arguments)
|
100
96
|
|
101
|
-
args =
|
97
|
+
args = runner.getArgumentValues(arguments(workspace), user_arguments)
|
98
|
+
args = Hash[args.collect{ |k, v| [k.to_s, v] }]
|
102
99
|
if !args then return false end
|
103
100
|
|
104
101
|
# reporting initial condition of model
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<?xml version="1.0"?>
|
2
2
|
<measure>
|
3
|
-
<schema_version>3.
|
3
|
+
<schema_version>3.1</schema_version>
|
4
4
|
<name>tariff_selection_generic</name>
|
5
5
|
<uid>d65ae535-f0ea-4745-9f5b-8d42c7070741</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>63aaf453-3f25-42e9-a02b-67b47b9664f2</version_id>
|
7
|
+
<version_modified>2024-07-11T14:32:13Z</version_modified>
|
8
8
|
<xml_checksum>43564105</xml_checksum>
|
9
9
|
<class_name>TariffSelectionGeneric</class_name>
|
10
10
|
<display_name> Tariff Selection-Generic</display_name>
|
@@ -126,16 +126,33 @@
|
|
126
126
|
</attributes>
|
127
127
|
<files>
|
128
128
|
<file>
|
129
|
-
<filename>
|
130
|
-
<filetype>
|
131
|
-
<usage_type>
|
132
|
-
<checksum>
|
129
|
+
<filename>LICENSE.md</filename>
|
130
|
+
<filetype>md</filetype>
|
131
|
+
<usage_type>license</usage_type>
|
132
|
+
<checksum>BFFB1AA6</checksum>
|
133
133
|
</file>
|
134
134
|
<file>
|
135
|
-
<filename>
|
136
|
-
<filetype>
|
137
|
-
<usage_type>
|
138
|
-
<checksum>
|
135
|
+
<filename>README.md</filename>
|
136
|
+
<filetype>md</filetype>
|
137
|
+
<usage_type>readme</usage_type>
|
138
|
+
<checksum>27EC34FF</checksum>
|
139
|
+
</file>
|
140
|
+
<file>
|
141
|
+
<filename>README.md.erb</filename>
|
142
|
+
<filetype>erb</filetype>
|
143
|
+
<usage_type>readmeerb</usage_type>
|
144
|
+
<checksum>703C9964</checksum>
|
145
|
+
</file>
|
146
|
+
<file>
|
147
|
+
<version>
|
148
|
+
<software_program>OpenStudio</software_program>
|
149
|
+
<identifier>2.0.0</identifier>
|
150
|
+
<min_compatible>3.8.0</min_compatible>
|
151
|
+
</version>
|
152
|
+
<filename>measure.rb</filename>
|
153
|
+
<filetype>rb</filetype>
|
154
|
+
<usage_type>script</usage_type>
|
155
|
+
<checksum>04E8B27F</checksum>
|
139
156
|
</file>
|
140
157
|
<file>
|
141
158
|
<filename>Example_A.idf</filename>
|
@@ -161,6 +178,12 @@
|
|
161
178
|
<usage_type>resource</usage_type>
|
162
179
|
<checksum>DA5EBB8B</checksum>
|
163
180
|
</file>
|
181
|
+
<file>
|
182
|
+
<filename>Example_E.idf</filename>
|
183
|
+
<filetype>idf</filetype>
|
184
|
+
<usage_type>resource</usage_type>
|
185
|
+
<checksum>98AC420A</checksum>
|
186
|
+
</file>
|
164
187
|
<file>
|
165
188
|
<filename>Example_F.idf</filename>
|
166
189
|
<filetype>idf</filetype>
|
@@ -179,12 +202,6 @@
|
|
179
202
|
<usage_type>resource</usage_type>
|
180
203
|
<checksum>1F984D08</checksum>
|
181
204
|
</file>
|
182
|
-
<file>
|
183
|
-
<filename>README.md.erb</filename>
|
184
|
-
<filetype>erb</filetype>
|
185
|
-
<usage_type>readmeerb</usage_type>
|
186
|
-
<checksum>703C9964</checksum>
|
187
|
-
</file>
|
188
205
|
<file>
|
189
206
|
<filename>FlatEnergyCharge-Gas.idf</filename>
|
190
207
|
<filetype>idf</filetype>
|
@@ -198,33 +215,16 @@
|
|
198
215
|
<checksum>8DAD6C69</checksum>
|
199
216
|
</file>
|
200
217
|
<file>
|
201
|
-
<filename>
|
202
|
-
<filetype>
|
203
|
-
<usage_type>
|
204
|
-
<checksum>
|
205
|
-
</file>
|
206
|
-
<file>
|
207
|
-
<filename>LICENSE.md</filename>
|
208
|
-
<filetype>md</filetype>
|
209
|
-
<usage_type>license</usage_type>
|
210
|
-
<checksum>64FFEBDE</checksum>
|
218
|
+
<filename>EnvelopeAndLoadTestModel_01.osm</filename>
|
219
|
+
<filetype>osm</filetype>
|
220
|
+
<usage_type>test</usage_type>
|
221
|
+
<checksum>E11F67BD</checksum>
|
211
222
|
</file>
|
212
223
|
<file>
|
213
224
|
<filename>tariff_selection_generic_test.rb</filename>
|
214
225
|
<filetype>rb</filetype>
|
215
226
|
<usage_type>test</usage_type>
|
216
|
-
<checksum>
|
217
|
-
</file>
|
218
|
-
<file>
|
219
|
-
<version>
|
220
|
-
<software_program>OpenStudio</software_program>
|
221
|
-
<identifier>2.0.0</identifier>
|
222
|
-
<min_compatible>2.8.0</min_compatible>
|
223
|
-
</version>
|
224
|
-
<filename>measure.rb</filename>
|
225
|
-
<filetype>rb</filetype>
|
226
|
-
<usage_type>script</usage_type>
|
227
|
-
<checksum>AEAD3B25</checksum>
|
227
|
+
<checksum>1077D919</checksum>
|
228
228
|
</file>
|
229
229
|
</files>
|
230
230
|
</measure>
|
@@ -6,10 +6,6 @@
|
|
6
6
|
# see the URL below for information on how to write OpenStudio measures
|
7
7
|
# http://nrel.github.io/OpenStudio-user-documentation/measures/measure_writing_guide/
|
8
8
|
|
9
|
-
# load OpenStudio measure libraries from openstudio-extension gem
|
10
|
-
require 'openstudio-extension'
|
11
|
-
require 'openstudio/extension/core/os_lib_helper_methods'
|
12
|
-
|
13
9
|
# start the measure
|
14
10
|
class TariffSelectionTimeAndDateDependant < OpenStudio::Measure::EnergyPlusMeasure
|
15
11
|
# human readable name
|
@@ -49,6 +45,8 @@ class TariffSelectionTimeAndDateDependant < OpenStudio::Measure::EnergyPlusMeasu
|
|
49
45
|
summer_start_month.setDisplayName('Month Summer Begins')
|
50
46
|
summer_start_month.setDescription('1-12')
|
51
47
|
summer_start_month.setDefaultValue(5)
|
48
|
+
summer_start_month.setMinValue(1.0)
|
49
|
+
summer_start_month.setMaxValue(12.0)
|
52
50
|
args << summer_start_month
|
53
51
|
|
54
52
|
# adding argument for summer_start_day
|
@@ -56,6 +54,8 @@ class TariffSelectionTimeAndDateDependant < OpenStudio::Measure::EnergyPlusMeasu
|
|
56
54
|
summer_start_day.setDisplayName('Day Summer Begins')
|
57
55
|
summer_start_day.setDescription('1-31')
|
58
56
|
summer_start_day.setDefaultValue(1)
|
57
|
+
summer_start_day.setMinValue(1.0)
|
58
|
+
summer_start_day.setMaxValue(31.0)
|
59
59
|
args << summer_start_day
|
60
60
|
|
61
61
|
# adding argument for summer_end_month
|
@@ -63,6 +63,8 @@ class TariffSelectionTimeAndDateDependant < OpenStudio::Measure::EnergyPlusMeasu
|
|
63
63
|
summer_end_month.setDisplayName('Month Summer Ends')
|
64
64
|
summer_end_month.setDescription('1-12')
|
65
65
|
summer_end_month.setDefaultValue(9)
|
66
|
+
summer_end_month.setMinValue(1.0)
|
67
|
+
summer_end_month.setMaxValue(12.0)
|
66
68
|
args << summer_end_month
|
67
69
|
|
68
70
|
# adding argument for summer_end_day
|
@@ -70,6 +72,8 @@ class TariffSelectionTimeAndDateDependant < OpenStudio::Measure::EnergyPlusMeasu
|
|
70
72
|
summer_end_day.setDisplayName('Day Summer Ends')
|
71
73
|
summer_end_day.setDescription('1-31')
|
72
74
|
summer_end_day.setDefaultValue(1)
|
75
|
+
summer_end_day.setMinValue(1.0)
|
76
|
+
summer_end_day.setMaxValue(31.0)
|
73
77
|
args << summer_end_day
|
74
78
|
|
75
79
|
# adding argument for peak_start_hour
|
@@ -77,6 +81,8 @@ class TariffSelectionTimeAndDateDependant < OpenStudio::Measure::EnergyPlusMeasu
|
|
77
81
|
peak_start_hour.setDisplayName('Hour Peak Begins')
|
78
82
|
peak_start_hour.setDescription('1-24')
|
79
83
|
peak_start_hour.setDefaultValue(12)
|
84
|
+
peak_start_hour.setMinValue(0.0)
|
85
|
+
peak_start_hour.setMaxValue(24.0)
|
80
86
|
args << peak_start_hour
|
81
87
|
|
82
88
|
# adding argument for peak_end_hour
|
@@ -84,6 +90,8 @@ class TariffSelectionTimeAndDateDependant < OpenStudio::Measure::EnergyPlusMeasu
|
|
84
90
|
peak_end_hour.setDisplayName('Hour Peak Ends')
|
85
91
|
peak_end_hour.setDescription('1-24')
|
86
92
|
peak_end_hour.setDefaultValue(18)
|
93
|
+
peak_end_hour.setMinValue(0.0)
|
94
|
+
peak_end_hour.setMaxValue(24.0)
|
87
95
|
args << peak_end_hour
|
88
96
|
|
89
97
|
# adding argument for elec_rate_sum_peak
|
@@ -163,20 +171,16 @@ class TariffSelectionTimeAndDateDependant < OpenStudio::Measure::EnergyPlusMeasu
|
|
163
171
|
def run(workspace, runner, user_arguments)
|
164
172
|
super(workspace, runner, user_arguments)
|
165
173
|
|
174
|
+
# use the built-in error checking
|
175
|
+
if !runner.validateUserArguments(arguments(workspace), user_arguments)
|
176
|
+
return false
|
177
|
+
end
|
178
|
+
|
166
179
|
# assign the user inputs to variables
|
167
|
-
args =
|
180
|
+
args = runner.getArgumentValues(arguments(workspace), user_arguments)
|
181
|
+
args = Hash[args.collect{ |k, v| [k.to_s, v] }]
|
168
182
|
if !args then return false end
|
169
183
|
|
170
|
-
# check expected values of double arguments
|
171
|
-
zero_24 = OsLib_HelperMethods.checkDoubleAndIntegerArguments(runner, user_arguments, 'min' => 0.0, 'max' => 24.0, 'min_eq_bool' => true, 'max_eq_bool' => true, 'arg_array' => ['peak_start_hour', 'peak_end_hour'])
|
172
|
-
one_31 = OsLib_HelperMethods.checkDoubleAndIntegerArguments(runner, user_arguments, 'min' => 1.0, 'max' => 31.0, 'min_eq_bool' => true, 'max_eq_bool' => true, 'arg_array' => ['summer_start_day', 'summer_end_day'])
|
173
|
-
one_12 = OsLib_HelperMethods.checkDoubleAndIntegerArguments(runner, user_arguments, 'min' => 1.0, 'max' => 12.0, 'min_eq_bool' => true, 'max_eq_bool' => true, 'arg_array' => ['summer_start_month', 'summer_end_month'])
|
174
|
-
|
175
|
-
# return false if any errors fail
|
176
|
-
if !zero_24 then return false end
|
177
|
-
if !one_31 then return false end
|
178
|
-
if !one_12 then return false end
|
179
|
-
|
180
184
|
# reporting initial condition of model
|
181
185
|
starting_tariffs = workspace.getObjectsByType('UtilityCost:Tariff'.to_IddObjectType)
|
182
186
|
runner.registerInitialCondition("The model started with #{starting_tariffs.size} tariff objects.")
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<?xml version="1.0"?>
|
2
2
|
<measure>
|
3
|
-
<schema_version>3.
|
3
|
+
<schema_version>3.1</schema_version>
|
4
4
|
<name>tariff_selection_time_and_date_dependant</name>
|
5
5
|
<uid>a890e296-b357-432f-8d53-6428d9bf3c0a</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>3396540c-a309-4ace-9d97-788721c99057</version_id>
|
7
|
+
<version_modified>2024-07-11T14:32:09Z</version_modified>
|
8
8
|
<xml_checksum>135F7E88</xml_checksum>
|
9
9
|
<class_name>TariffSelectionTimeAndDateDependant</class_name>
|
10
10
|
<display_name>Tariff Selection-Time and Date Dependant</display_name>
|
@@ -41,6 +41,8 @@
|
|
41
41
|
<required>true</required>
|
42
42
|
<model_dependent>false</model_dependent>
|
43
43
|
<default_value>5</default_value>
|
44
|
+
<min_value>1</min_value>
|
45
|
+
<max_value>12</max_value>
|
44
46
|
</argument>
|
45
47
|
<argument>
|
46
48
|
<name>summer_start_day</name>
|
@@ -50,6 +52,8 @@
|
|
50
52
|
<required>true</required>
|
51
53
|
<model_dependent>false</model_dependent>
|
52
54
|
<default_value>1</default_value>
|
55
|
+
<min_value>1</min_value>
|
56
|
+
<max_value>31</max_value>
|
53
57
|
</argument>
|
54
58
|
<argument>
|
55
59
|
<name>summer_end_month</name>
|
@@ -59,6 +63,8 @@
|
|
59
63
|
<required>true</required>
|
60
64
|
<model_dependent>false</model_dependent>
|
61
65
|
<default_value>9</default_value>
|
66
|
+
<min_value>1</min_value>
|
67
|
+
<max_value>12</max_value>
|
62
68
|
</argument>
|
63
69
|
<argument>
|
64
70
|
<name>summer_end_day</name>
|
@@ -68,6 +74,8 @@
|
|
68
74
|
<required>true</required>
|
69
75
|
<model_dependent>false</model_dependent>
|
70
76
|
<default_value>1</default_value>
|
77
|
+
<min_value>1</min_value>
|
78
|
+
<max_value>31</max_value>
|
71
79
|
</argument>
|
72
80
|
<argument>
|
73
81
|
<name>peak_start_hour</name>
|
@@ -77,6 +85,8 @@
|
|
77
85
|
<required>true</required>
|
78
86
|
<model_dependent>false</model_dependent>
|
79
87
|
<default_value>12</default_value>
|
88
|
+
<min_value>0.000000</min_value>
|
89
|
+
<max_value>24.000000</max_value>
|
80
90
|
</argument>
|
81
91
|
<argument>
|
82
92
|
<name>peak_end_hour</name>
|
@@ -86,6 +96,8 @@
|
|
86
96
|
<required>true</required>
|
87
97
|
<model_dependent>false</model_dependent>
|
88
98
|
<default_value>18</default_value>
|
99
|
+
<min_value>0.000000</min_value>
|
100
|
+
<max_value>24.000000</max_value>
|
89
101
|
</argument>
|
90
102
|
<argument>
|
91
103
|
<name>elec_rate_sum_peak</name>
|
@@ -252,16 +264,10 @@
|
|
252
264
|
</attributes>
|
253
265
|
<files>
|
254
266
|
<file>
|
255
|
-
<filename>
|
256
|
-
<filetype>
|
257
|
-
<usage_type>
|
258
|
-
<checksum>
|
259
|
-
</file>
|
260
|
-
<file>
|
261
|
-
<filename>README.md.erb</filename>
|
262
|
-
<filetype>erb</filetype>
|
263
|
-
<usage_type>readmeerb</usage_type>
|
264
|
-
<checksum>703C9964</checksum>
|
267
|
+
<filename>LICENSE.md</filename>
|
268
|
+
<filetype>md</filetype>
|
269
|
+
<usage_type>license</usage_type>
|
270
|
+
<checksum>BFFB1AA6</checksum>
|
265
271
|
</file>
|
266
272
|
<file>
|
267
273
|
<filename>README.md</filename>
|
@@ -270,27 +276,33 @@
|
|
270
276
|
<checksum>C90B29ED</checksum>
|
271
277
|
</file>
|
272
278
|
<file>
|
273
|
-
<filename>
|
274
|
-
<filetype>
|
275
|
-
<usage_type>
|
276
|
-
<checksum>
|
277
|
-
</file>
|
278
|
-
<file>
|
279
|
-
<filename>tariff_selection_time_and_date_dependant_test.rb</filename>
|
280
|
-
<filetype>rb</filetype>
|
281
|
-
<usage_type>test</usage_type>
|
282
|
-
<checksum>ECB359F4</checksum>
|
279
|
+
<filename>README.md.erb</filename>
|
280
|
+
<filetype>erb</filetype>
|
281
|
+
<usage_type>readmeerb</usage_type>
|
282
|
+
<checksum>703C9964</checksum>
|
283
283
|
</file>
|
284
284
|
<file>
|
285
285
|
<version>
|
286
286
|
<software_program>OpenStudio</software_program>
|
287
287
|
<identifier>2.0.0</identifier>
|
288
|
-
<min_compatible>
|
288
|
+
<min_compatible>3.8.0</min_compatible>
|
289
289
|
</version>
|
290
290
|
<filename>measure.rb</filename>
|
291
291
|
<filetype>rb</filetype>
|
292
292
|
<usage_type>script</usage_type>
|
293
|
-
<checksum>
|
293
|
+
<checksum>D8EDD118</checksum>
|
294
|
+
</file>
|
295
|
+
<file>
|
296
|
+
<filename>EnvelopeAndLoadTestModel_01.osm</filename>
|
297
|
+
<filetype>osm</filetype>
|
298
|
+
<usage_type>test</usage_type>
|
299
|
+
<checksum>E11F67BD</checksum>
|
300
|
+
</file>
|
301
|
+
<file>
|
302
|
+
<filename>tariff_selection_time_and_date_dependant_test.rb</filename>
|
303
|
+
<filetype>rb</filetype>
|
304
|
+
<usage_type>test</usage_type>
|
305
|
+
<checksum>54B0534C</checksum>
|
294
306
|
</file>
|
295
307
|
</files>
|
296
308
|
</measure>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<?xml version="1.0"?>
|
2
2
|
<measure>
|
3
|
-
<schema_version>3.
|
3
|
+
<schema_version>3.1</schema_version>
|
4
4
|
<name>view_data</name>
|
5
5
|
<uid>18cf0de7-48b8-48dc-ab68-0dd29f0b8bd0</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>97fe9bbd-3ef0-4d15-a901-b9c11840fa4c</version_id>
|
7
|
+
<version_modified>2024-07-11T14:32:05Z</version_modified>
|
8
8
|
<xml_checksum>2C8A3EEF</xml_checksum>
|
9
9
|
<class_name>ViewData</class_name>
|
10
10
|
<display_name>ViewData</display_name>
|
@@ -91,22 +91,10 @@
|
|
91
91
|
</attributes>
|
92
92
|
<files>
|
93
93
|
<file>
|
94
|
-
<filename>
|
95
|
-
<filetype>
|
96
|
-
<usage_type>
|
97
|
-
<checksum>
|
98
|
-
</file>
|
99
|
-
<file>
|
100
|
-
<filename>USA_CO_Golden-NREL.724666_TMY3.epw</filename>
|
101
|
-
<filetype>epw</filetype>
|
102
|
-
<usage_type>test</usage_type>
|
103
|
-
<checksum>BDF687C1</checksum>
|
104
|
-
</file>
|
105
|
-
<file>
|
106
|
-
<filename>README.md.erb</filename>
|
107
|
-
<filetype>erb</filetype>
|
108
|
-
<usage_type>readmeerb</usage_type>
|
109
|
-
<checksum>703C9964</checksum>
|
94
|
+
<filename>LICENSE.md</filename>
|
95
|
+
<filetype>md</filetype>
|
96
|
+
<usage_type>license</usage_type>
|
97
|
+
<checksum>BFFB1AA6</checksum>
|
110
98
|
</file>
|
111
99
|
<file>
|
112
100
|
<filename>README.md</filename>
|
@@ -115,22 +103,10 @@
|
|
115
103
|
<checksum>70F4784D</checksum>
|
116
104
|
</file>
|
117
105
|
<file>
|
118
|
-
<filename>
|
119
|
-
<filetype>
|
120
|
-
<usage_type>
|
121
|
-
<checksum>
|
122
|
-
</file>
|
123
|
-
<file>
|
124
|
-
<filename>LICENSE.md</filename>
|
125
|
-
<filetype>md</filetype>
|
126
|
-
<usage_type>license</usage_type>
|
127
|
-
<checksum>64FFEBDE</checksum>
|
128
|
-
</file>
|
129
|
-
<file>
|
130
|
-
<filename>ViewData_Test.rb</filename>
|
131
|
-
<filetype>rb</filetype>
|
132
|
-
<usage_type>test</usage_type>
|
133
|
-
<checksum>6D2F71F0</checksum>
|
106
|
+
<filename>README.md.erb</filename>
|
107
|
+
<filetype>erb</filetype>
|
108
|
+
<usage_type>readmeerb</usage_type>
|
109
|
+
<checksum>703C9964</checksum>
|
134
110
|
</file>
|
135
111
|
<file>
|
136
112
|
<version>
|
@@ -141,19 +117,43 @@
|
|
141
117
|
<filename>measure.rb</filename>
|
142
118
|
<filetype>rb</filetype>
|
143
119
|
<usage_type>script</usage_type>
|
144
|
-
<checksum>
|
120
|
+
<checksum>1EFC6775</checksum>
|
121
|
+
</file>
|
122
|
+
<file>
|
123
|
+
<filename>report.html.in</filename>
|
124
|
+
<filetype>in</filetype>
|
125
|
+
<usage_type>resource</usage_type>
|
126
|
+
<checksum>98BCA605</checksum>
|
145
127
|
</file>
|
146
128
|
<file>
|
147
129
|
<filename>va3c.rb</filename>
|
148
130
|
<filetype>rb</filetype>
|
149
131
|
<usage_type>resource</usage_type>
|
150
|
-
<checksum>
|
132
|
+
<checksum>7B8C67AE</checksum>
|
151
133
|
</file>
|
152
134
|
<file>
|
153
|
-
<filename>
|
154
|
-
<filetype>
|
155
|
-
<usage_type>
|
156
|
-
<checksum>
|
135
|
+
<filename>ExampleModel.osm</filename>
|
136
|
+
<filetype>osm</filetype>
|
137
|
+
<usage_type>test</usage_type>
|
138
|
+
<checksum>FFFE0281</checksum>
|
139
|
+
</file>
|
140
|
+
<file>
|
141
|
+
<filename>SimpleModel.osm</filename>
|
142
|
+
<filetype>osm</filetype>
|
143
|
+
<usage_type>test</usage_type>
|
144
|
+
<checksum>AC094EF8</checksum>
|
145
|
+
</file>
|
146
|
+
<file>
|
147
|
+
<filename>USA_CO_Golden-NREL.724666_TMY3.epw</filename>
|
148
|
+
<filetype>epw</filetype>
|
149
|
+
<usage_type>test</usage_type>
|
150
|
+
<checksum>BDF687C1</checksum>
|
151
|
+
</file>
|
152
|
+
<file>
|
153
|
+
<filename>ViewData_Test.rb</filename>
|
154
|
+
<filetype>rb</filetype>
|
155
|
+
<usage_type>test</usage_type>
|
156
|
+
<checksum>1ACDE95E</checksum>
|
157
157
|
</file>
|
158
158
|
</files>
|
159
159
|
</measure>
|