Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into v23.2.0-IOFreeze
Browse files Browse the repository at this point in the history
Resolve conflicts manually
  • Loading branch information
jmarrec committed Sep 27, 2023
2 parents 455fc44 + 50fe58a commit 29ddbb6
Show file tree
Hide file tree
Showing 27 changed files with 2,419 additions and 472 deletions.
25 changes: 13 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,9 @@ if(APPLE)
# This appears to be a legacy choice by the cmake developers, and seems out of place,
# so the OpenStudio project will use the library suffix ".dylib"
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
add_definitions(-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
#add_definitions(-DBOOST_SYSTEM_NO_DEPRECATED)
# TODO: remove when bumping Boost to 1.81+, cf https://github.com/NREL/OpenStudio/issues/4978
add_definitions(-DBOOST_NO_CXX98_FUNCTION_BASE)
add_definitions(-D_HAS_AUTO_PTR_ETC=0)
endif()

if(UNIX AND NOT APPLE)
Expand Down Expand Up @@ -833,28 +834,28 @@ if(BUILD_CLI)
if(UNIX)
if(APPLE)
if (ARCH MATCHES arm64)
set(OPENSTUDIO_GEMS_ZIP_FILENAME "openstudio3-gems-20230427-darwin_arm64.tar.gz")
set(OPENSTUDIO_GEMS_ZIP_EXPECTED_MD5 "27ca992c6e5fe5347a7e342eb5b91511")
set(OPENSTUDIO_GEMS_ZIP_FILENAME "openstudio3-gems-20230918-darwin_arm64.tar.gz")
set(OPENSTUDIO_GEMS_ZIP_EXPECTED_MD5 "404783d585a63a07f2f9d5b4ba445d99")
else()
set(OPENSTUDIO_GEMS_ZIP_FILENAME "openstudio3-gems-20230427-darwin.tar.gz")
set(OPENSTUDIO_GEMS_ZIP_EXPECTED_MD5 "b6bf19e6958bd41be9788a7f16fd7f27")
set(OPENSTUDIO_GEMS_ZIP_FILENAME "openstudio3-gems-20230918-darwin.tar.gz")
set(OPENSTUDIO_GEMS_ZIP_EXPECTED_MD5 "71282202360c68cf9dd0f0d585d560f2")
endif()
else()
if (ARCH MATCHES "arm64")
set(OPENSTUDIO_GEMS_ZIP_FILENAME "openstudio3-gems-20230427-linux_arm64.tar.gz")
set(OPENSTUDIO_GEMS_ZIP_EXPECTED_MD5 "979a8839facf2fa1c4096dcbae39ddc2")
set(OPENSTUDIO_GEMS_ZIP_FILENAME "openstudio3-gems-20230918-linux_arm64.tar.gz")
set(OPENSTUDIO_GEMS_ZIP_EXPECTED_MD5 "c28e1b84051fbae2ae0a9f7a27416951")
else()
set(OPENSTUDIO_GEMS_ZIP_FILENAME "openstudio3-gems-20230427-linux.tar.gz")
set(OPENSTUDIO_GEMS_ZIP_EXPECTED_MD5 "957681cb4f3b5cf8ad95103a5fae9a72")
set(OPENSTUDIO_GEMS_ZIP_FILENAME "openstudio3-gems-20230918-linux.tar.gz")
set(OPENSTUDIO_GEMS_ZIP_EXPECTED_MD5 "f7279e86e0a9f41cfd0ce89060c4d836")
endif()
if (USE_OPENSTUDIO_GEMS_PR)
set(OPENSTUDIO_GEMS_BASEURL "${OPENSTUDIO_GEMS_BASEURL}/openstudio-gems-linux/${OPENSTUDIO_GEMS_PR_NUMBER}")
endif()
endif()
elseif(WIN32)
# OpenStudio gems are only supported on 64 bit windows
set(OPENSTUDIO_GEMS_ZIP_FILENAME "openstudio3-gems-20230427-windows.tar.gz")
set(OPENSTUDIO_GEMS_ZIP_EXPECTED_MD5 "e82889c296b7b76eb1f7b3fc7e22d2aa")
set(OPENSTUDIO_GEMS_ZIP_FILENAME "openstudio3-gems-20230918-windows.tar.gz")
set(OPENSTUDIO_GEMS_ZIP_EXPECTED_MD5 "1606f5db801064864c1dc22e8e23459e")
if (USE_OPENSTUDIO_GEMS_PR)
set(OPENSTUDIO_GEMS_BASEURL "${OPENSTUDIO_GEMS_BASEURL}/openstudio-gems-windows/${OPENSTUDIO_GEMS_PR_NUMBER}")
endif()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,19 @@ You can also refer to the [OpenStudio SDK Python Binding Version Compatibility M
## New Features, Major Fixes and API-breaking changes

* [#4827](https://github.com/NREL/OpenStudio/pull/4827) - #4748 #4817 - Validate BCLXML with schema when loading + make sorting of files in measure.xml consistent when saving
* [#4873](https://github.com/NREL/OpenStudio/pull/4873) - AirLoopHVACUnitarySystem set Method During XXX Operation
* [#4873](https://github.com/NREL/OpenStudio/pull/4873) & [#4971](https://github.com/NREL/OpenStudio/pull/4971) - AirLoopHVACUnitarySystem set Method During XXX Operation
* Fix #4695 - AirLoopHVACUnitarySystem: Supply Air Flow Rate Method During <XXX> Operation should be set via related setters/autosize
* Breaks the return of `supplyAirFlowRateMethodDuringCoolingOperation` and `supplyAirFlowRateMethodDuringHeatingOperation`: now returns `std::string` instead of `boost::optional<std::string>`
* Breaks the return of `supplyAirFlowRateMethodDuringCoolingOperation`, `supplyAirFlowRateMethodDuringHeatingOperation` and `supplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired()`: now returns `std::string` instead of `boost::optional<std::string>`
* Deprecates many set/reset methods
* These fields are now non-optional, and are set via the flow field setters and reset when the heating/cooling coils are reset.
* Example: `unitary.setSupplyAirFlowRatePerFloorAreaDuringCoolingOperation(1.0)` will set the "Supply Air Flow Rate Method During Cooling Operation" to "FlowPerFloorArea"

* [#4932](https://github.com/NREL/OpenStudio/pull/4932) - Support undisturbed ground temperature models on GroundHeatExchangerVertical
* Fix #4930 - Support undisturbed ground temperature models on GroundHeatExchangerVertical
* Update `GroundHeatExchanger:Vertical` to actually use the Ground Temeprature Model field
* [#4923](https://github.com/NREL/OpenStudio/pull/4923) - Fix #4692 - Modify `Model::load` to use the VersionTranslator instead of loading it assuming the version of the loaded OSM is the same as the current SDK version being used.
* [#4950](https://github.com/NREL/OpenStudio/pull/4950) - Addresses #4946, allow Table:Lookup curves for Coil:*:WaterToAirHeatPumpEquationFit objects
* `Coil:Cooling:WaterToAirHeatPumpEquationFit` and `Coil:Heating:WaterToAirHeatPumpEquationFit` have a few API-breaking changes related to its Curves. The types for the constructor, getters, and setters used to be explicit (e.g., `CurveQuadLinear`); it is now the base class, more generic, `Curve` type for added flexibility.
* [#4972](https://github.com/NREL/OpenStudio/pull/4972) - V23.2.0-IOFreeze - wrap `DistrictHeating:Steam` and rename `DistrictHeating` to `DistrictHeatingWater`
* The `DistrictHeating` class (and related Model getters such as `Model::getDistrictHeatings`) are deprecated but kept for backward Compatibility for now.

Expand Down
5 changes: 3 additions & 2 deletions resources/model/OpenStudio.idd
Original file line number Diff line number Diff line change
Expand Up @@ -11901,7 +11901,7 @@ OS:AirLoopHVAC:UnitarySystem,
\key FlowPerFloorArea
\key FractionOfAutosizedCoolingValue
\key FlowPerCoolingCapacity
\default None
\required-field
\note Enter the method used to determine the cooling supply air volume flow rate.
\note None is used when a cooling coil is not included in the unitary system or this field may be blank.
\note SupplyAirFlowRate is selected when the magnitude of the supply air volume is used.
Expand Down Expand Up @@ -11946,7 +11946,7 @@ OS:AirLoopHVAC:UnitarySystem,
\key FlowPerFloorArea
\key FractionOfAutosizedHeatingValue
\key FlowPerHeatingCapacity
\default None
\required-field
\note Enter the method used to determine the heating supply air volume flow rate.
\note None is used when a heating coil is not included in the unitary system or this field may be blank.
\note SupplyAirFlowRate is selected when the magnitude of the supply air volume is used.
Expand Down Expand Up @@ -11993,6 +11993,7 @@ OS:AirLoopHVAC:UnitarySystem,
\key FractionOfAutosizedHeatingValue
\key FlowPerCoolingCapacity
\key FlowPerHeatingCapacity
\required-field
\note Enter the method used to determine the supply air volume flow rate when no cooling or heating is required.
\note None is used when a cooling and heating coil is not included in the unitary system or this field may be blank.
\note SupplyAirFlowRate is selected when the magnitude of the supply air volume is used.
Expand Down
4 changes: 3 additions & 1 deletion src/cli/UpdateCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ sys.argv.append("{}")
}
cmd += fmt::format(R"python(
import importlib.util
spec = importlib.util.spec_from_file_location('__main__', r'{}')
module_name = '__main__'
spec = importlib.util.spec_from_file_location(module_name, r'{}')
module = importlib.util.module_from_spec(spec)
sys.modules[module_name] = module
spec.loader.exec_module(module)
)python",
pythonScriptPath.generic_string());
Expand Down
17 changes: 17 additions & 0 deletions src/cli/test/test_embedded_ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,21 @@ def test_msgpack
assert(data == data2)
end

def test_json_schemer
require 'json_schemer'

schema = {
'type' => 'object',
'properties' => {
'abc' => {
'type' => 'integer',
'minimum' => 11
}
}
}
schemer = JSONSchemer.schema(schema)
assert(schemer.valid?({ 'abc' => 11 }))
assert(!schemer.valid?({ 'abc' => 10 }))
end

end
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,8 @@ namespace energyplus {
}

// Supply Air Flow Rate Method When No Cooling or Heating is Required
s = modelObject.supplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired();
if (s) {
unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::NoLoadSupplyAirFlowRateMethod, s.get());
}
unitarySystem.setString(AirLoopHVAC_UnitarySystemFields::NoLoadSupplyAirFlowRateMethod,
modelObject.supplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired());

// Supply Air Flow Rate When No Cooling or Heating is Required
if (modelObject.isSupplyAirFlowRateWhenNoCoolingorHeatingisRequiredAutosized()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
#include "../../model/Node_Impl.hpp"
#include "../../model/CoilCoolingWaterToAirHeatPumpEquationFit.hpp"
#include "../../model/CoilCoolingWaterToAirHeatPumpEquationFit_Impl.hpp"
#include "../../model/CurveQuadLinear.hpp"
#include "../../model/CurveQuintLinear.hpp"
#include "../../model/Curve.hpp"

#include "../../utilities/core/Logger.hpp"
#include "../../utilities/core/Assert.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "../../model/Node_Impl.hpp"
#include "../../model/CoilHeatingWaterToAirHeatPumpEquationFit.hpp"
#include "../../model/CoilHeatingWaterToAirHeatPumpEquationFit_Impl.hpp"
#include "../../model/CurveQuadLinear.hpp"
#include "../../model/Curve.hpp"

#include "../../utilities/core/Logger.hpp"
#include "../../utilities/core/Assert.hpp"
Expand Down
Loading

0 comments on commit 29ddbb6

Please sign in to comment.