-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix hours of operation schedule profiles missing for weekends #1794
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mdahlhausen
reviewed
Aug 16, 2024
mdahlhausen
approved these changes
Aug 16, 2024
lymereJ
added a commit
that referenced
this pull request
Aug 21, 2024
16 tasks
ckirney
added a commit
that referenced
this pull request
Oct 18, 2024
…into master (#1831) * add guard clause to fc factor methods Add check that construction_data is available; it may not be given some interactions with geometry, template, and climate zone. In that case, the building will use OpenStudio defaults for ground constructions. * Simplified primary and secondary loop staging strategy to simply sort the chillers by reference capacity and revert back to old naming convention. * Added test case for primary/secondary plant loops * Update Prototype.refrigeration.rb * add deer building type lookup - convert DOE to deer building type if the template is a deer template for the create bar method - convert arguments to symbol format for the create bar method * update expected results * Update regression tests with new name syntax "Water Heater Ambient Temp Schedule - 71.6 Default" -> " Water Heater Ambient Temp Schedule 71.6F Default" also, update necb qaqc report expected results * Final Changes zero error zero fail * adding the test file * the backend failures debugged * qaqc expected results overwrite * expected results corrected * Trailing white space was causing issues when looking up chiller capacities from the sizing run. This happens if there's no compressor type defined and it was causing issues in a handful of test cases. * Update version.rb to 0.6.2 * use scheduleday::timeseries * add nameless field to compare check * get model and set number of timesteps earlier * cleanup log messages * fix orig_timesteps * rubocop * Final Changes Before Pull Merge Request Approval * remove commas from dict remove commas from doe_to_deer_building_type dictionary * update schedule_mod test to catch hoo_target_index not found errors * fix hoo_target_index not found error: remove only previous rules that don't match * supress some parametric schedule debug/warnings * update ffactor construction area adjustment for a min Rfic ~= 1 * spelling * add lab elevator properties and schedules * formatting * relocate timestep change to avoid early return before resetting timestep * .name.get * add schedule.name.get to comments * update fix to pass test_schedule_day_get_hourly_values * fix logic error in Standards.ZoneHVACComponent.rb * Some tests revised for final merge * Made it such that only PRM methods utilized primary/secondary loops. The rest will use the legacy common_pipe configuration once again. * move chiller error handler to inside the heat exchanger code block * add custom height test cases * Default no ventilation in ptac/pthp * fix defaulted args check defaulted_args floor_height is a string in a string array, not a symbol * test for hours_of_operation rules that contain weekends * process day profiles by day type to separately include sat/sun * rubocop autocorrections * fix symbols in create bar The hash fields need to be cast as symbols, not strings * data_update (construction_propeties_only) 0546f80 * Change in chiller name caused unintended regression issues. Reverted this change. * Fix synthax issues introduced by #1794. * Add boiler_fuel and boiler_cap_ratio arguments to model_apply_standard. This allows the fuel type of the boiler to be set and to use an electric boiler rather than resistance heaters everywhere. The boiler_cap_ratio argument will be used when the ability to customize the backup boiler fuel type and capacities are implemented. * Revert ruby3 Rubocop changes. * Update btap_datapoint.rb with new boiler parameters, update boiler_fuel_type_sets.json with FuelOilNo2, remove forcing boiler to be electricity from necb_2011.rb. * Update constructions. * Revert unwanted changes. * new test for failed reset of electric equipment load fractions * reset load components before re-setting * add test for parametric schedule adjustment following timestep * add timestep check to full model adjusted schedules * ensure adjusted/interpolated schedule times land on timesteps * avoid float equality * add back keyword arguments Although this breaks new rubocop syntax, ruby 2.7 doesn't support the empty keyword argument syntax yet. Once all of stds minimum required version is 3.2, we can revert this commit * add back keyword argument * undo unrelated changes * Update add_cbecs_hvac_system to match ComStock - change 'DOAS with VRF' to system_zones and use elec Baseboards for heated only zones - update heating only fuel type to gas unit heaters for 'PTAC with gas coil' and 'PSZ-AC with gas coil' - for PVAV systems, use elec Baseboards for heating only zones - * update boiler properties update boiler properties for DOE ref templates and AEDG templates to match 90.1 schema * update furnace properties update furnace properties for DOE ref templates and AEDG templates to match 90.1 schema * Update constructions and construction sets. * protect against FfactorConstruction Rfic<minimum allowed * avoid Style/HashSyntax EnforcedShorthandSyntax cop * update chiller properties update chiller properties for DOE ref templates and AEDG templates to match 90.1 schema * update heat rejection .jsons update heat rejection jsons for DOE ref templates and AEDG templates to match 90.1 schema * update water heater .jsons update water heater jsons for DOE ref templates and AEDG templates to match 90.1 schema * add missing DEER construction properties - add ExteriorWall-Metal Building-Nonresidential properties for all templates and climate zones - add ExteriorRoof-WoodFramed-HighriseResidential for DEER Pre-1975 CEC3 * Update other construction sets and constructions files. * Fix typo in CBECS hvac * Set default boiler part load efficiency curve * Fix heating coil type search for DX coils * update DEER HVAC .jsons update DEER .jsons for boilers, chillers, heat rejection, and water heaters to match 90.1 schema * Add typical ComStock DEER test * revert regression indent * Fix wrong chiller curve name The method chiller_electric_eir_get_eir_f_plr_curve_name was incorrectly returning ChlrWtrPosDispPathAAllEIRRatio_fTchwsTcwsSI in the overloaded 90_1_2007 and 90_1_2010 versions of the method. Fixed to return ChlrWtrPosDispPathAAllEIRRatio_fQRatio. * Fix capacity rounding The capacity rounding in case of integer may incorrectly return a larger size class if the capacity is near the threshold. Instead, round to the nearest integer and explicitly convert to a float. Fixes issue #1677. * Add 90.1-2010 VAV minimum default Change the minimum damper position logic for 90.1-2010 VAV reheat dampers to follow later versions to account for instances where no reheat is supplied, defaulting to 0.2 as the minimum damper position. * Misc updates. * Convert capacity to float Convert capacity to float instead of rounding to nearest integer, which doesn't work for motor sizing where motor horsepower is typically fractional. * Update version.rb * Reimplement warehouse temperature setpoint changes Reimplements DEER warehouse temperature setpoints in #1688 that got overridden in #1758 * Fix inconsistencies. * Renaming constructions. * Sync with new data. * clean up EMS object names * Decimal place. * Add check and warning message for PTHP COPs When looking up PTHP COPs, give a warning message if the size is nil and default to a 7 kBtu/hr unit for efficiency. Expand the code to give warning messages if the equipment is less than 7 kBtu/hr or above 15 kBtu/hr, and use either 7 kBtu/hr or 15 kBtu/hr to determine equipment efficiency. This change may result in some regression and performance differences for models with PTHP units. * Handle zero airflow case for damper effectiveness The air_loop_hvac_adjust_minimum_vav_damper_positions method expects that zones have outdoor air and design air flow rate. If the space does not have a DesignSpecificationOutdoorAir object, or it is zero, then the calculation is unnecessary. If either the zone CoolingDesignAirFlowRate or HeatingDesignAirFlowRate are zero, then the zone discharge air fraction (z_d) could have a divide by zero and result in NaN. This crashes the code when trying to calculate the minimum zone ventilation effectiveness (e_vz). Add informative error messages that the zone CoolingDesignAirFlowRate or HeatingDesignAirFlowRate are zero, and default the zone discharge air fraction (z_d) to zero if either the zone minimum discharge airflow rate (v_dz) is zero, or the zone outdoor airflow rate is zero (v_oz). * add case / walkin name to defrost / dripdown schedule * Set defrost and dripdown schedules to 1 in mode When defrost and dripdown are active in refrigerated case and walkins, set their schedules to 1. Fixes issue #1646. * shorten refrigeration schedule names * update regression models update regression models with new refrigeration schedule names * Add informative note on 90.1 PTHP efficiencies * add guard clause for adj min damper position * rubocop edit * Missing decimal places for VT. * swh fuel discripancy revised * swh fuel revised * Add smart defaults for evap coolers Add smart defaults for evaporative cooler objects. This adds pumping energy, and slightly lowers water use. * Update expected PRM value. * ignore 'Any' ashrae_90_1_prm .jsons in update * move climate zone 0 first Move climate zone 0 to the front of the construction properties .jsons for ASHRAE 90.1 versions * Including code to adjust the capacities of boilers with dissimilar fuel types. Fixing boiler efficiency ECM so that efficiency changes are only applied to fuel fired boilers, not electrically heated boilers. * update doe ref window construction lookups * update deer constructions and materials remove all window constructions, and all but the one used simple glazing construction * rename extraneous simple glazing constructions Omit 'Window', 'Window Weighted', and 'Skylight' from 'Simple Glazing' constructions * update regression models * add methods to rename surfaces and subsurfaces * sort surfaces and subsurfaces before renaming * add office detailed space type ratios - add small, medium, and large office detailed space type ratios from example models - switch large office default to be an else statement in case the building_subtype is not specified * update regression models * Adding boiler fuel and capacity ratio options to run_options.yml in btap_cli test. * move model_add_heatpump_water_heater method * Enabling support for custom boiler fuel types and boilers with disimilar fuel types in ECM class. Removing some redundant arguments from ECM class. Fixing method that determines the boiler capacity ratios from the boiler_cap_ratio argument. * rename component.rb rename to create water heater * rename methods use create_object instead of model_add_object * Ensuring that hot-water loops are only added in ECMs if the baseboard heaters use hot-water. * Check if a SystemFuels object is defined before trying to use its methods. Update the system tests to include the backup boiler fueltype. * Updating the 'setup_hw_loop_with_components' method calls in unit tests to include additional backup boiler fueltype argument. * Adding backup boiler fueltype parameter for 'setup_hw_loop_with_components' method calls in some additional tests. * Updating regression test expected results and report unit test expected results. * Address naming inconsistency in 2013/2016 version of 90.1. * Update construction sets for 90.1-2013/2016. * Change current directory for CLI Use __dir__ instead of Dir.pwd for running with the CLI * Set stds_type value for windows based on template. * booster water loop method change model_add_swh_booster -> create_booster_water_heating_loop add tests change booster water method to look first to use the site water mains object for the source temperature instead of the default 50F * create_water_use method and refactor change method model_add_swh_end_uses -> create_water_use, place in a new module delete the model_add_booster_swh_end_uses method refactor model_add_swh_end_uses_by_space to use create_water_use add to docs and update tests * replace model_add_swh_end_uses_by_spaceonly replace model_add_swh_end_uses_by_spaceonly with the new create_water_use method delete the model_attach_water_fixtures_to_spaces? method, as it just returns true in all cases * add water_use_temperature_schedule check * change paths from Dir.pwd to __dir__ __dir__ is more appropriate for tests, where we want the measure to run where the test is. Also change the relative lookup for the weather file path. * Update test_create_water_use.rb * update test paths * move model_add_piping_losses_to_swh_system change method model_add_piping_losses_to_swh_system to create_service_water_heating_piping_losses and move ito the service_water_heating module * shorten loop name assignment * replace model_add_swh_loop replace model_add_swh_loop with create_water_heating_loop * remove Prototype.ServiceWaterHeating - move model_add_swh_end_uses_by_space to Prototype.Model.swh.rb, the last method in that file - delete Prototype.ServiceWaterHeating - remove references to Prototype.ServiceWaterHeating * move Prototype.Model.swh to Standards.ServiceWaterHeating * fix yard doc path * Update performance and regression test results. * service water heating module PR fixes - get Optional space name in necb code before .capitalize - remove redundant round(0) - remove orphaned parasitic_fuel_consumption_rate_w variable - set water use name flow rate in gpm to 1 decimal point precision instead of 2 - removed unncessary create_schedule_type_limits - changed logging messages origin from 'openstudio.model.Model' to 'openstudio.standards.ServiceWaterHeating' - changed default water use name from 'Main' to 'Main Water Use' - Adjusted so the user pipe length for piping losses will stay as provided and not get multiplied if there is more than 1 water heater. - changed to use setAmbientTemperatureSchedule and setAmbientAirVelocitySchedule, since that issue was fixed in OpenStudio - add error to booster code if service_water_loop isn't provided - added 'None' option to water heater for the create_service_water_heating_loop, and added option to use the formal 'HeatPump' water heater model. * get optional double * fix width and length conditionals in create_bar * Create test_performance_expected_dd_results.csv * update gpm rounding round to 2 decimals, as there are some tests that show as 0.0 instead of 0.01. * set pipe_length_m to provided pipe_length * fix pipe ambient air velocity schedule remove schedule type limit, because 'dimensionless' will cause the pipe.setAmbientAirVelocitySchedule() method to fail. * Update performance tests. * Update loop temperature limit Default to 60 C / 140 F, unless the user has specified a higher value. * update necb expected results * update necb shw regression results * update doe regression models * performance test update * update documentation update the documentation to reflect the new code architecture with modules, and add linux developer instructions * update online documentation site use gemdocs instead of rubydoc.info * update gem dependencies - fix public_suffix version to 5.1.1, as the >=6.0.0 versions require >= ruby 3.0 - remove google drive download rake methods; these have nasty dependency requirements, and we rarely use them. We are also phasing out the spreadsheets * Update openstudio-standards.gemspec * correct logic require_adjustment is true if the wwr is above the limit, not unless * Fixed the version of nokogiri. * correct prm lighting calculation `space_lighting_per_area = (lighting_per_length * space_height) + lighting_per_area` is dimensionally inconsistent. Need to divide by area to get W/m2. This was @dmaddoxwhite's suggestion. Fixes #1506. * remove aes, rest-client, and roo gem dependencies These were needed for google drive spreadsheets and are no longer used. * Correct prm_check log message * updatet the test case due to algorithm change. * Updating regression tests results to account for revisions to code. --------- Co-authored-by: Matthew Dahlhausen <matthew.dahlhausen@gmail.com> Co-authored-by: gonz102 <juan.gonzalez@pnnl.gov> Co-authored-by: navidshh <navid.shirzadi@nrcan-rncan.gc.ca> Co-authored-by: NavidSh67 <n.shirzadi67@gmail.com> Co-authored-by: Eric Ringold <ericringold@gmail.com> Co-authored-by: Navid Shirzadi <144144364+navidshh@users.noreply.github.com> Co-authored-by: Weili Xu <weili.xu@pnnl.gov> Co-authored-by: Xuechen (Jerry) Lei <xuechen.lei@pnnl.gov> Co-authored-by: Lerond, Jeremy <jeremy.lerond@pnnl.gov> Co-authored-by: Juan Gonzalez <jugonzal07@users.noreply.github.com> Co-authored-by: Jeremy L. <5149279+lymereJ@users.noreply.github.com> Co-authored-by: Wenyi Kuang <wkuang@nrel.gov>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull request overview
Observed in ComStock standards update test run that Hours of Operation schedules that had previously included separate Saturday and Sunday profiles, were now missing one, instead applying the default schedule to one of the weekend days. Since the 'weekend_start_time/duration' inputs are meant to operate on weekend schedules, but if the Hours of Operation schedule is missing a weekend rule, then that doesn't happen. This PR fixes the issue by ensuring that a separate saturday and sunday hours of operation schedule are created, even if those profiles end up being initially the same as the weekday (default) profile.
Pull Request Author
bundle exec rake doc
)bundle exec rake rubocop
)require
statements, ensure these are in core ruby or add to the gemspecReview Checklist
This will not be exhaustively relevant to every PR.