Skip to content

Fix #4219 - Fix #4628 - DesignSpecificationOutdoorAir (use a DSOA:SpaceList if appropriate insead of using first dsoa found) and ControllerMechanicalVentilation upgrades #5384

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

Merged
merged 17 commits into from
May 26, 2025

Conversation

jmarrec
Copy link
Collaborator

@jmarrec jmarrec commented Mar 21, 2025

Pull request overview

TODO

  • Investigate failure of EnergyPlusFixture.ForwardTranslator_DesignSpecificationOutdoorAir
  • Write more tests

Pull Request Author

  • Model API Changes / Additions
  • Any new or modified fields have been implemented in the EnergyPlus ForwardTranslator (and ReverseTranslator as appropriate)
  • Model API methods are tested (in src/model/test)
  • EnergyPlus ForwardTranslator Tests (in src/energyplus/Test)
  • If a new object or method, added a test in NREL/OpenStudio-resources: Add Link
  • If needed, added VersionTranslation rules for the objects (src/osversion/VersionTranslator.cpp)
  • Verified that C# bindings built fine on Windows, partial classes used as needed, etc.
  • All new and existing tests passes
  • If methods have been deprecated, update rest of code to use the new methods

Labels:

  • If change to an IDD file, add the label IDDChange
  • If breaking existing API, add the label APIChange
  • If deemed ready, add label Pull Request - Ready for CI so that CI builds your PR

Review Checklist

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • Code Style, strip trailing whitespace, etc.
  • All related changes have been implemented: model changes, model tests, FT changes, FT tests, VersionTranslation, OS App
  • Labeling is ok
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified

@jmarrec jmarrec added component - IDF Translation Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. labels Mar 21, 2025
@jmarrec jmarrec self-assigned this Mar 21, 2025
Comment on lines 244 to 245
/// return all spaces that have a design specification outdoor air assigned
std::vector<Space> spacesWithDesignSpecificationOutdoorAir() const;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

helper

Comment on lines 797 to 801
std::vector<Space> ThermalZone_Impl::spacesWithDesignSpecificationOutdoorAir() const {
auto spaces = this->spaces();
spaces.erase(std::remove_if(spaces.begin(), spaces.end(), [](const auto& s) { return !s.designSpecificationOutdoorAir(); }), spaces.end());
return spaces;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Helper implementation

Comment on lines 81 to 82
// Convenience method to check whether it links to zones that have DesignSpecificationOutdoorAir(s) assigned
bool hasZonesWithDesignSpecificationOutdoorAir() const;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another helper, which we'll use to determine whether we should write a COntroller:MV to the IDF or not

Comment on lines 197 to 206
bool ControllerMechanicalVentilation_Impl::hasZonesWithDesignSpecificationOutdoorAir() const {
auto oa_controller = controllerOutdoorAir();
if (auto oa_sys_ = oa_controller.airLoopHVACOutdoorAirSystem()) {
if (auto a_ = oa_sys_->airLoopHVAC()) {
auto zones = a_->thermalZones();
return std::any_of(zones.cbegin(), zones.cend(), [](const auto& z) { return !z.spacesWithDesignSpecificationOutdoorAir().empty(); });
}
}
return false;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We traverse the objects to check if we've got zones with some DSOAs

Comment on lines 37 to 42
boost::optional<IdfObject> ForwardTranslator::translateControllerMechanicalVentilation(ControllerMechanicalVentilation& modelObject) {

// NOTE: don't translate it if it has no DSOA
if (!modelObject.hasZonesWithDesignSpecificationOutdoorAir()) {
return boost::none;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will avoid getting the error

   ** Severe  ** GetOAControllerInputs: Controller:MechanicalVentilation="CONTROLLER MECHANICAL VENTILATION 1", invalid input. At least one Zone or ZoneList Name must be entered.

#4219 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Comment on lines 112 to 126
// DSOA:SpaceList
IdfObject dsoa_sp(IddObjectType::DesignSpecification_OutdoorAir_SpaceList);
dsoa_sp.setName(z.nameString() + " DSOA Space List");

for (const auto& s : spaces) {
auto dsoa = *(s.designSpecificationOutdoorAir());
if (auto dsoa_ = translateAndMapDSOA(dsoa)) {
dsoa_sp.pushExtensibleGroup({s.nameString(), dsoa_->nameString()});
}
}

m_idfObjects.push_back(dsoa_sp);
result = dsoa_sp;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have more than one space with DSOAs: make a DSOA:SpaceList of course.

Comment on lines 211 to 214
if (auto dsoaOrList_ = getOrCreateThermalZoneDSOA(zone->cast<ThermalZone>())) {
// set the field to reference the design specification outdoor air
zoneHVACIdealLoadsAirSystem.setString(ZoneHVAC_IdealLoadsAirSystemFields::DesignSpecificationOutdoorAirObjectName,
designSpecificationOutdoorAirIdf->name().get());
}
dsoaOrList_->nameString());
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simple changes

Comment on lines 252 to 254
if (auto dsoaOrList_ = getOrCreateThermalZoneDSOA(thermalZone)) {
IdfExtensibleGroup eg =
_controllerMechanicalVentilation->pushExtensibleGroup({name, dsoaOrList_->nameString(), isDSZADTranslated ? dSZADName : ""});
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where the ControllerMV extensible fields are filled, and if it wasn't translated, nothing is done.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is the big change, review carefully...

shorowit added a commit to NREL/OpenStudio-HPXML that referenced this pull request Mar 21, 2025
@jmarrec jmarrec force-pushed the 4219-DSOA branch 2 times, most recently from 78eca84 to 2f2a790 Compare March 31, 2025 21:57
Comment on lines 94 to 96
// TODO: Without a DesignDay, the translateSizingZone is never called, and in turn the Controller:MechanicalVentilation does NOT receive the DSOAs
// This has been the case since the first ever commit of OS SDK on github, but it is wrong IMHO.
DesignDay d(m);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -243,7 +243,7 @@ namespace energyplus {
// This would be done in forwardTranslateControllerMechanicalVentilation except doing it here maintains proper order of the idf file.

// Now that Multiple AirLoopHVACs serving the same zone are possible, need to loop on all
// NOTE: translateControllerMechnicalVentilation ensures ControllerMechanicalVentilation doesn't end up with no extensible groups!
// NOTE: translateControllerMechanicalVentilation ensures ControllerMechanicalVentilation doesn't end up with no extensible groups!
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kbenne I noticed this. The Controller:MechanicalVentilation extensible groups (the Zone/DSOA groups) are NOT filled if the Sizing:Zone object isn't translated, and it's been like this since the first github commit:

// Add ThermalZone and associated design objects to ControllerMechanicalVentilation.
// This would be done in forwardTranslateControllerMechanicalVentilation except doing it here maintains proper order of the idf file.
boost::optional<model::ControllerMechanicalVentilation> controllerMechanicalVentilation;
boost::optional<IdfObject> _controllerMechanicalVentilation;
if( boost::optional<model::AirLoopHVAC> airLoopHVAC = thermalZone.airLoopHVAC() )
{
if( boost::optional<model::AirLoopHVACOutdoorAirSystem> oaSystem = airLoopHVAC->airLoopHVACOutdoorAirSystem() )
{
model::ControllerOutdoorAir controllerOutdoorAir = oaSystem->getControllerOutdoorAir();
controllerMechanicalVentilation = controllerOutdoorAir.controllerMechanicalVentilation();
}
}
if( controllerMechanicalVentilation )
{
_controllerMechanicalVentilation = translateAndMapModelObject(controllerMechanicalVentilation.get());
}
if( _controllerMechanicalVentilation && _thermalZone )
{
IdfExtensibleGroup eg = _controllerMechanicalVentilation->pushExtensibleGroup();
// Thermal Zone Name
eg.setString(Controller_MechanicalVentilationExtensibleFields::ZoneName,_thermalZone->name().get());
// DesignSpecificationOutdoorAir
std::vector<model::Space> spaces = thermalZone.spaces();
if( spaces.size() > 0 )
{
if( boost::optional<model::DesignSpecificationOutdoorAir> designOASpec = spaces.front().designSpecificationOutdoorAir() )
{
if( boost::optional<IdfObject> _designOASpec = translateAndMapModelObject(designOASpec.get()) )
{
eg.setString(Controller_MechanicalVentilationExtensibleFields::DesignSpecificationOutdoorAirObjectName,_designOASpec->name().get());
}
}
}

Comment on lines +1518 to +1523
// Helper for the DesignSpecification:ZoneAirDistribution, returns empty when the DSZAD is not needed,
// which is when fields on Sizing:Zone related to it are all defaulted (Implemeted in ForwardTranslateSizingZone)
boost::optional<std::string> zoneDSZADName(const model::ThermalZone& zone);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New helper.

Comment on lines +40 to +54
boost::optional<std::string> ForwardTranslator::zoneDSZADName(const ThermalZone& zone) {
// If any of the DSZAD fields is non-default, then it's worth it to translate it. Otherwise it has no effect.
auto sizingZone = zone.sizingZone();

const bool isDSZADTranslated =
!(sizingZone.isDesignZoneAirDistributionEffectivenessinCoolingModeDefaulted()
&& sizingZone.isDesignZoneAirDistributionEffectivenessinHeatingModeDefaulted()
&& sizingZone.isDesignZoneSecondaryRecirculationFractionDefaulted() && sizingZone.isDesignMinimumZoneVentilationEfficiencyDefaulted());

if (!isDSZADTranslated) {
return boost::none;
}

return zone.nameString() + " Design Spec Zone Air Dist";
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to be using in two places, hence why the helper is needed

std::string dSZADName;

if (isDSZADTranslated) {
if (auto dSZADName_ = zoneDSZADName(thermalZone)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SizingZone will translate the DesignSpecification_ZoneAirDistribution.

Comment on lines 242 to 276
// Add ThermalZone and associated design objects to ControllerMechanicalVentilation.
// This would be done in forwardTranslateControllerMechanicalVentilation except doing it here maintains proper order of the idf file.

// Now that Multiple AirLoopHVACs serving the same zone are possible, need to loop on all
// NOTE: translateControllerMechanicalVentilation ensures ControllerMechanicalVentilation doesn't end up with no extensible groups!
for (const auto& airLoopHVAC : thermalZone.airLoopHVACs()) {
if (boost::optional<model::AirLoopHVACOutdoorAirSystem> oaSystem = airLoopHVAC.airLoopHVACOutdoorAirSystem()) {
model::ControllerOutdoorAir controllerOutdoorAir = oaSystem->getControllerOutdoorAir();
model::ControllerMechanicalVentilation controllerMechanicalVentilation = controllerOutdoorAir.controllerMechanicalVentilation();
if (boost::optional<IdfObject> _controllerMechanicalVentilation = translateAndMapModelObject(controllerMechanicalVentilation)) {
if (auto dsoaOrList_ = getOrCreateThermalZoneDSOA(thermalZone)) {
IdfExtensibleGroup eg =
_controllerMechanicalVentilation->pushExtensibleGroup({name, dsoaOrList_->nameString(), isDSZADTranslated ? dSZADName : ""});
}
}
}
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BUT IT WILL NO LONGER fill up the ControllerMechanicalVentilation!

Comment on lines +101 to +115
// Extensible Groups for DSOAs are no longer pushed in translateSizingZone to retain order of the file, because:
// 1) Thermal Zones are translated before AirLoopHVACs, so we guarantee proper order (unless we mess something up, like adding a new always
// translated object early on that will call it)
// 2) Doing it in translateSizingZone means that it will NOT be written if the Sizing:Zone isn't, for eg when you have no design days
// but that is a valid use case
auto oa_controller = modelObject.controllerOutdoorAir();
if (auto oa_sys_ = oa_controller.airLoopHVACOutdoorAirSystem()) {
if (auto a_ = oa_sys_->airLoopHVAC()) {
for (const auto& z : a_->thermalZones()) {
if (auto dsoaOrList_ = getOrCreateThermalZoneDSOA(z)) {
IdfExtensibleGroup eg = idfObject.pushExtensibleGroup({z.nameString(), dsoaOrList_->nameString(), zoneDSZADName(z).value_or("")});
}
}
}
}
Copy link
Collaborator Author

@jmarrec jmarrec Mar 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ControllerMV now fills its own extensible groups.

as you can see, ThermalZone is translated before AirLoopHVAC, and I have no reasons to believe any other object will trigger a weird order where Controller:MechanicalVentilation will end up being translated before the ThermalZone, thus produces a DSOA:SpaceList that is placed BEFORE the thermal zone. The test I added in /src/energyplus/Test/ControllerOutdoorAir_GTest.cpp at least has no IDF change

std::vector<IddObjectType> ForwardTranslator::iddObjectsToTranslate() {
static const std::vector<IddObjectType> result{
IddObjectType::OS_Version,
IddObjectType::OS_ComponentData,
IddObjectType::OS_LifeCycleCost_Parameters,
IddObjectType::OS_CurrencyType,
IddObjectType::OS_ComponentCost_Adjustments,
IddObjectType::OS_LifeCycleCost_UsePriceEscalation,
IddObjectType::OS_SimulationControl,
IddObjectType::OS_ProgramControl,
IddObjectType::OS_ConvergenceLimits,
IddObjectType::OS_HeatBalanceAlgorithm,
IddObjectType::OS_RunPeriod,
IddObjectType::OS_RunPeriodControl_DaylightSavingTime,
IddObjectType::OS_RunPeriodControl_SpecialDays,
IddObjectType::OS_ShadowCalculation,
IddObjectType::OS_SurfaceConvectionAlgorithm_Inside,
IddObjectType::OS_SurfaceConvectionAlgorithm_Outside,
IddObjectType::OS_SurfaceProperty_ConvectionCoefficients_MultipleSurface,
IddObjectType::OS_Timestep,
IddObjectType::OS_Sizing_Parameters,
IddObjectType::OS_ZoneAirContaminantBalance,
IddObjectType::OS_ZoneAirHeatBalanceAlgorithm,
IddObjectType::OS_ZoneAirMassFlowConservation,
IddObjectType::OS_ZoneCapacitanceMultiplier_ResearchSpecial,
IddObjectType::OS_OutputControl_Files,
IddObjectType::OS_OutputControl_ReportingTolerances,
IddObjectType::OS_OutputControl_ResilienceSummaries,
IddObjectType::OS_OutputControl_Table_Style,
IddObjectType::OS_OutputControl_Timestamp,
IddObjectType::OS_Output_Constructions,
IddObjectType::OS_Output_DebuggingData,
IddObjectType::OS_Output_Diagnostics,
IddObjectType::OS_Output_JSON,
IddObjectType::OS_Output_Schedules,
IddObjectType::OS_Output_SQLite,
// Note: we just always translate Output:EnvironmentalImpactFactors, and in there (it exists), then trigger translatation of the two others
IddObjectType::OS_Output_EnvironmentalImpactFactors,
// IddObjectType::OS_EnvironmentalImpactFactors,
// IddObjectType::OS_FuelFactors,
IddObjectType::OS_Output_Table_SummaryReports,
IddObjectType::OS_Output_Table_Annual,
IddObjectType::OS_Output_Table_Monthly,
IddObjectType::OS_PerformancePrecisionTradeoffs,
IddObjectType::OS_Site,
IddObjectType::OS_Site_GroundReflectance,
IddObjectType::OS_Site_GroundTemperature_BuildingSurface,
IddObjectType::OS_Site_GroundTemperature_Deep,
IddObjectType::OS_Site_GroundTemperature_FCfactorMethod,
IddObjectType::OS_Site_GroundTemperature_Shallow,
IddObjectType::OS_Site_WaterMainsTemperature,
IddObjectType::OS_ClimateZones,
IddObjectType::OS_SizingPeriod_DesignDay,
IddObjectType::OS_SizingPeriod_WeatherFileConditionType,
IddObjectType::OS_SizingPeriod_WeatherFileDays,
IddObjectType::OS_Foundation_Kiva,
IddObjectType::OS_Foundation_Kiva_Settings,
// TODO: once UtilityCost objects are wrapped
// IddObjectType::OS_UtilityCost_Charge_Block,
// IddObjectType::OS_UtilityCost_Charge_Simple,
// IddObjectType::OS_UtilityCost_Computation,
// IddObjectType::OS_UtilityCost_Qualify,
// IddObjectType::OS_UtilityCost_Ratchet,
// IddObjectType::OS_UtilityCost_Tariff,
// IddObjectType::OS_UtilityCost_Variable,
IddObjectType::OS_WeatherFile,
IddObjectType::OS_WeatherProperty_SkyTemperature,
IddObjectType::OS_Rendering_Color,
IddObjectType::OS_SpaceType,
IddObjectType::OS_Facility,
IddObjectType::OS_Building,
IddObjectType::OS_BuildingStory,
IddObjectType::OS_LightingSimulationZone,
IddObjectType::OS_ThermalZone,
IddObjectType::OS_Space,
IddObjectType::OS_Surface,
IddObjectType::OS_SubSurface,
IddObjectType::OS_InteriorPartitionSurfaceGroup,
IddObjectType::OS_InteriorPartitionSurface,
IddObjectType::OS_ShadingSurfaceGroup,
IddObjectType::OS_ShadingSurface,
IddObjectType::OS_ZoneProperty_UserViewFactors_BySurfaceName,
IddObjectType::OS_Daylighting_Control,
IddObjectType::OS_DaylightingDevice_Shelf,
IddObjectType::OS_DaylightingDevice_Tubular,
IddObjectType::OS_DaylightingDevice_LightWell,
IddObjectType::OS_IlluminanceMap,
// Definition objects will be translated as needed by instance objects.
IddObjectType::OS_InternalMass,
IddObjectType::OS_People,
IddObjectType::OS_Lights,
IddObjectType::OS_Luminaire,
IddObjectType::OS_ElectricEquipment,
IddObjectType::OS_ElectricEquipment_ITE_AirCooled,
IddObjectType::OS_GasEquipment,
IddObjectType::OS_HotWaterEquipment,
IddObjectType::OS_SteamEquipment,
IddObjectType::OS_OtherEquipment,
IddObjectType::OS_SpaceInfiltration_DesignFlowRate,
IddObjectType::OS_SpaceInfiltration_EffectiveLeakageArea,
IddObjectType::OS_SpaceInfiltration_FlowCoefficient,
IddObjectType::OS_Exterior_Lights,
IddObjectType::OS_Exterior_FuelEquipment,
IddObjectType::OS_Exterior_WaterEquipment,
IddObjectType::OS_AirLoopHVAC,

@jmarrec
Copy link
Collaborator Author

jmarrec commented Apr 1, 2025

I ran all the OpenStudio-Resources Ruby tests (174 tests):

  • for develop and this PR
    • both With and Without E+ Spaces

no diffs in failures no diffs in EUI

@jmarrec
Copy link
Collaborator Author

jmarrec commented Apr 1, 2025

CI is so broken...

@jmarrec jmarrec requested a review from Copilot April 7, 2025 09:16
Copilot

This comment was marked as off-topic.

@jmarrec
Copy link
Collaborator Author

jmarrec commented Apr 29, 2025

@shorowit
Copy link
Contributor

Note that at a minimum we still need the part of this PR that fixes this. (Would it make sense to spin this bugfix off into a separate PR that can be merged?)

@DavidGoldwasser
Copy link
Collaborator

@tijcolem is working on getting Windows installer in CI

@jmarrec
Copy link
Collaborator Author

jmarrec commented Apr 29, 2025

Note that at a minimum we still need the part of this PR that fixes this. (Would it make sense to spin this bugfix off into a separate PR that can be merged?)

I guess I'm going to have to show my Git-fu skills here. Let me see what I can do.

@jmarrec
Copy link
Collaborator Author

jmarrec commented Apr 29, 2025

@shorowit
Copy link
Contributor

Separated the mininal fix in:

* [#4219 - Mininal Fix: do NOT add a Controller:MEchanicalVentilation if it does not have any DSOA on it (E+ error) #5403](https://github.com/NREL/OpenStudio/pull/5403)

Thank you!!

@tijcolem
Copy link
Collaborator

tijcolem commented May 7, 2025

I'm working on moving the windows CI box as it keeps hitting a permission denied error, but on replay it's hitting a linker error, which I think is a valid error. See below.

FAILED: Products/openstudio_epjson_tests.exe src/epjson/openstudio_epjson_tests[1]_tests.cmake D:/git/OS-build-release-v2/src/epjson/openstudio_epjson_tests[1]_tests.cmake

cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=src\epjson\CMakeFiles\openstudio_epjson_tests.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~4\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\openstudio_epjson_tests.rsp  /out:Products\openstudio_epjson_tests.exe /implib:Products\openstudio_epjson_tests.lib /pdb:Products\openstudio_epjson_tests.pdb /version:0.0 /machine:x64 /OPT:REF /OPT:NOICF /INCREMENTAL:NO /subsystem:console  && cmd.exe /C "cd /D D:\git\OS-build-release-v2\src\epjson && "C:\Program Files\CMake\bin\cmake.exe" -D TEST_TARGET=openstudio_epjson_tests -D TEST_EXECUTABLE=D:/git/OS-build-release-v2/Products/openstudio_epjson_tests.exe -D TEST_EXECUTOR= -D TEST_WORKING_DIR=D:/git/OS-build-release-v2/src/epjson -D TEST_EXTRA_ARGS= -D TEST_PROPERTIES=TIMEOUT;660 -D TEST_PREFIX= -D TEST_SUFFIX= -D TEST_FILTER= -D NO_PRETTY_TYPES=FALSE -D NO_PRETTY_VALUES=FALSE -D TEST_LIST=openstudio_epjson_tests_TESTS -D CTEST_FILE=D:/git/OS-build-release-v2/src/epjson/openstudio_epjson_tests[1]_tests.cmake -D TEST_DISCOVERY_TIMEOUT=60 -D TEST_XML_OUTPUT_DIR= -P "C:/Program Files/CMake/share/cmake-3.25/Modules/GoogleTestAddTests.cmake"""

LINK: command "C:\PROGRA~2\MICROS~4\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\openstudio_epjson_tests.rsp /out:Products\openstudio_epjson_tests.exe /implib:Products\openstudio_epjson_tests.lib /pdb:Products\openstudio_epjson_tests.pdb /version:0.0 /machine:x64 /OPT:REF /OPT:NOICF /INCREMENTAL:NO /subsystem:console /MANIFEST /MANIFESTFILE:Products\openstudio_epjson_tests.exe.manifest" failed (exit code 1120) with the following output:

epJSONTranslator_GTest.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void * __cdecl openstudio::IdfObject::`scalar deleting destructor'(unsigned int)" (??_GIdfObject@openstudio@@UEAAPEAXI@Z)


epJSONTranslator_GTest.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void * __cdecl openstudio::IdfObject::`vector deleting destructor'(unsigned int)" (??_EIdfObject@openstudio@@UEAAPEAXI@Z)


Products\openstudio_epjson_tests.exe : fatal error LNK1120: 2 unresolved externals

shorowit added a commit to NREL/OpenStudio-ERI that referenced this pull request May 8, 2025
c4a12be3ca Latest results.
8b887f9730 Update test values
bbdfc1fc3b Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into resnet_heat_pump
9f9b76d8f1 Merge pull request #2004 from NREL/duct_design_loads
16ccf84a1a Merge pull request #2005 from NREL/duct_defaults
8f83b551dd Latest results.
e195513a9f Merge branch 'duct_defaults' of https://github.com/NREL/OpenStudio-HPXML into duct_design_loads
29efad5813 Latest results.
5715446202 BuildResidentialHPXML measure: Improves default duct areas/locations for 1-story buildings with a conditioned basement and ducts located in the attic.
79a6edd50c Add warnings and test.
af0d8c6471 Less aggressive solution
dd92aa7fd8 Update a couple tests
00430e0fcf Latest results.
71e4106a13 Attempt to improve duct design load calculations.
849ce966d9 Merge branch 'os1_10_0' of https://github.com/NREL/OpenStudio-HPXML into resnet_heat_pump
facf4b7bca Latest results.
528a581097 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into os1_10_0
66b08cd602 Merge pull request #2003 from NREL/sample_hpxmls_ducts
5dac11722a Latest results.
32bec01ad9 Another one
cd600ea042 Bump HVAC capacity
a057f1cca1 Minor cleanup
42d94e3cee Latest results.
a9c394000f Bugfix
6307f96116 Bugfix.
e2edb24450 Merge branch 'os1_10_0' of https://github.com/NREL/OpenStudio-HPXML into resnet_heat_pump
05135c7e84 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into os1_10_0
5762be77e3 Merge pull request #2001 from NREL/master_resnet_heat_pump_conflicts
1df18348a5 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into sample_hpxmls_ducts
2b298f0dac Bugfixes.
6070707c53 Merge pull request #1958 from NREL/model_output_requests
f45c1ab8b3 Another try.
ce7ad07333 Attempted fix for unused schedule
b6a3acda19 Merge branch 'os1_10_0' of https://github.com/NREL/OpenStudio-HPXML into model_output_requests
239c095001 Merge pull request #1900 from NREL/schematron_sch
df3ff49663 Bugfix for OS-ERI. [ci skip]
0e4b05eaaa Bugfixes.
1d28a3d698 Hello GHA?
0a7b864e33 Fix docs
d910430c8d Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into sample_hpxmls_ducts
818e255a76 Use duct area fractions instead of duct areas in sample files. Update duct leakages to XX cfm25 per 100 ft2.
012b2af8d2 Disable test
1b4270dafd OSW bugfix
9bfcc6475f Merge branch 'os1_10_0' of https://github.com/NREL/OpenStudio-HPXML into schematron_sch
79413b9e2b Update new output variables
2246fee528 Merge branch 'os1_10_0' of https://github.com/NREL/OpenStudio-HPXML into model_output_requests
f1747e1202 Merge pull request #2002 from NREL/resnet_81_and_90f_take2
46ee7fc002 Latest results.
0fd511281b Tiny cleanup [ci skip]
3820c2d8b5 Try CI w/ develop docker container
60dd79da0c Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into os1_10_0
cec4f8b937 use iq curve coefficients
c7cdffaca8 address comments
d5a275a532 Preserve previous existing for older ERI versions.
310e20b475 Latest results.
2c96bc1bcf Merge branch 'resnet_heat_pump' of https://github.com/NREL/OpenStudio-HPXML into master_resnet_heat_pump_conflicts
8bcc9f0a0a Merge pull request #2000 from NREL/resnet_heat_pump_ci
5c8d92b2a2 Latest results.
873103a6a2 Fix CI test.
f6d74adff6 update measures
8b9d546d62 Merge branch 'resnet_heat_pump' of https://github.com/NREL/OpenStudio-HPXML into master_resnet_heat_pump_conflicts
5cbc80ddd5 further conflicts to resolve
e111136b6a Trigger CI
0d52404bad Fix heating vs cooling coefficients in HVAC installation quality EMS program. Remove get_charge_fault methods and set upfront in defaults.rb.
06318c9158 Update years [ci skip]
78dc1fa7a9 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into master_resnet_heat_pump_conflicts
6d274c4fd3 Merge pull request #1995 from NREL/resnet_81_and_90f
c239b3ba3d Merge branch 'resnet_81_and_90f' of https://github.com/NREL/OpenStudio-HPXML into resnet_81_and_90f
2e57dc9abd Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into resnet_81_and_90f
cd564a117f Merge pull request #1998 from NREL/buildresschedfile_hpxml_class3
2cf4b018b8 Latest results.
dd19602314 And now the fix.
8ebe79b5fc Disable checks.
9ae5742fe4 Add test demonstrating the problem when using a defaulted HPXML file.
f229e0c999 Update Changelog and docs [ci skip]
b33a7a146c Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into resnet_81_and_90f
66aa581d5e Update/cleanup tests.
739629c534 Merge pull request #1997 from NREL/buildresschedfile_hpxml_class2
4281729395 Pull out a new method to make the code clearer.
a64e357c61 Smartly avoid creating a backup file when it's not needed.
033f2d3819 Updates hot water equations per RESNET MINHERS 81 and 90f. Simplify method signatures. [ci skip]
090a26a12c Merge pull request #1878 from NREL/ghp-two-speed-var-speed
263e4c7362 Couldn't help myself, just a little code simplification.
279ba39612 Just a few minor things.
70b5f0cf03 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
22917ab705 rename simple to standard, fix unit test
6928fc936f Merge pull request #1994 from NREL/reportsimoutput_digits
113cb84ed8 Merge branch 'ghp-two-speed-var-speed' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
a4994f09b4 intermittent pump for all
135100aa76 Latest results.
bb50cf73f0 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
749b76ee62 Merge branch 'ghp-two-speed-var-speed' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
a75b331bf7 address comments
3c78906142 Cleans up number of digits used for different outputs plus some misc code refactor/cleanup/documentation.
32703c9661 Latest results.
3f6adad88d Super tiny cleanup of a few things. [ci skip]
db6c22d549 Latest results.
8cf2c44098 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
682c4f5f98 clean up hvac sizing, revert plr curve for simple model and advanced var speed
6286e57505 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into os1_10_0
b09b416f84 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
ae37284689 Merge branch 'ghp-two-speed-var-speed' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
1485a600fa Address comments
fb5914051f Update Changelog.md
b33da16ed0 Update docs/source/workflow_inputs.rst
b14485ca05 Latest results.
eca9abb0d6 fix curve type
6b80019e59 update plr curves for var speed and simple models
d32ed72490 remove print statement
3b9abd8ab0 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
7733fcf4ea Merge branch 'ghp-two-speed-var-speed' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
9b2695e545 address comments
00ae4b435c Latest results.
c915c0c152 more tests and docs changes
feb0257f26 fixmes and todos
da825c16b8 Merge branch 'ghp-two-speed-var-speed' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
1aa9adc2b7 ghp unit tests
2a322f1d14 Latest results.
ef80cc14a3 remove 75% adjustment for advanced ghp models
eeb59b8cae Latest results.
775a55a9e6 update measures
bbeafed48d hvac sizing unit test
38bcadb642 unit test revert
f5bb9349da Merge branch 'ghp-two-speed-var-speed' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
907f02ec43 revert the gshp test file efficiencies
0734e1f0a1 fix EMS vfr/mfr, set limits to fwf curves so it doesn't go below the data we have
0d91612361 Latest results.
acb4b24f4e Merge branch 'ghp-two-speed-var-speed' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
7b2d4f6255 update pump mfr ems
c060c49b4d Latest results.
e6cce37fca Merge branch 'ghp-two-speed-var-speed' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
16443106a5 update fplr curve for cooling as well
6ccb063622 Latest results.
bd7f7420de fix min_y, max_y
155845f509 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
8301e024b9 Merge branch 'ghp-two-speed-var-speed' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
56ee01af29 update re-normalized fwf curves, add plffplr curves, temporarily remove var speed workaround
ef4b73c533 Latest results.
5b7b3aa612 replace performance curves and assumptions based on waterfurnace data
6e5ed41ce5 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
a3d7eb0458 Latest results.
613c7e331a fix a typo
d8faacd1b8 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into os1_10_0
99a13f7a02 Latest results.
a3e59be536 Pass hpxml_header through.
fded43345d Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
0e19763bd3 fix ci failure?
4217da26fa Merge branch 'ghp-two-speed-var-speed' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
0d8e13d63a Use predicted load for pump mfr EMS to partially workaround the temperature errors
34176f3a0f Latest results.
deb758b453 Merge branch 'ghp-two-speed-var-speed' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
05282c16fa update measures
dce75eecde fix unit issue in hvac sizing, draft pump mfr EMS(not passing yet)
aaee229151 Latest results.
2a608ecb23 Merge branch 'ghp-two-speed-var-speed' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
08c871a7a1 pump power bugfix using coil speed level, speed ratio, part load ratio instead of unitary plr
e14dd0a55f using net shr for now
de35c3976a Latest results.
e533401454 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
f9588c1e33 fix argument error
62b06d46e8 iq test file using advanced for two speed system
132ff8c506 Merge branch 'ghp-two-speed-var-speed' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
7338de9880 first cut to add optional geothermal model type input
0344237cde Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed and small cleanup
6b8bd42a4d Use NREL/OpenStudio#5384 [ci skip]
03ddf2f303 Set GSHP bore hole top depth. Temporary workaround for evap cooler issue. [ci skip]
cd146b6505 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into os1_10_0
d856eed9c9 Handle OutputTableMonthly objects, cleanup. [ci skip]
52f6669269 Update ReportUtilityBills and meta_measure.rb [ci skip]
a622ca85ed Testing NREL/OpenStudio#5367... not complete because Output:Table:Monthly is not wrapped.
cc43622b96 Latest results.
f4aa3f999a Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
cf7afd9c22 Merge branch 'ghp-two-speed-var-speed' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
a837c44d7c update varspeed performance curves, change pump control type to continuous for var speed system
6c6e2da79c Latest results.
7f10ef2c70 hers unit test
ddc61f91e7 Merge branch 'ghp-two-speed-var-speed' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
c15161d54f remove exclusion of hvac sizing test for var speed system
5fb94c5c81 Latest results.
80ef26ba84 one more test file with compressor type
8db955128d add var speed system
9d717ad0f1 add compressor type to one more gshp test file
e282f37162 revert making compressor type required in BuildHPXML,
77ef6e7f3d buildHPXML
fbf72b3d28 require compressortype inputs, fix unit tests, add docs and changelog
c8ef094538 Merge branch 'ghp-two-speed-var-speed' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
fecc6950ea Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
941a0596ae For two speed, set water flow curves to constant 1.0 values
05243cd79b Merge branch 'ghp-two-speed-var-speed' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
35cce9ab54 change the ghp efficiencies
52aa253151 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
af35dedfb4 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
8d087caf3e Update warnings.
da40be9e52 Skip more warnings. [ci skip]
b7922d74dc Temporary warning exception [ci skip]
8499a00f59 Update docs [ci skip]
2090b59ca2 Revert [ci skip]
287da47f53 Initial test of OS 1.10.0 [ci skip]
130e448fa5 Latest results.
00aa08d2de Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
f7b74a3969 Latest results.
ec12831b72 fix test validation
302d4a8d07 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
7cabcbc9a7 iq ems
1010b16a29 fix sizing unit test
ab22fcc208 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
d1d0cc8ba6 oops, remove debugging statements
b1512e2687 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
7facd8860d bugfixes, installation quality program(haven't finished yet)
58e8142907 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
ed642d8914 Added temperature max/min values to curves, fixed airflow and water flow quadratic curves (fixed coefficients orders, and fixed some curves that are not normalized).
c883e62211 bugfix
4615f89ab3 hvac sizing cleanups for two speed GSHP, added rated cop ratios at each speed
cba4f31077 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
2182a8f489 updated performance curves, capacity ratios, cfm/tons based on E+ rated conditions, added more inputs, a few questions, store progress
346d8c935f added performance curves for two speed gshp, more assumptions and inputs added.
0788320b44 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
74e100c817 fix issues, add heating coil object
f41d4f1cdb Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
8fe19e51d3 Renames the schematron file extension to .sch.
6c0629b205 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into ghp-two-speed-var-speed
100e02a40f added test files, create coil object with placeholders

git-subtree-dir: hpxml-measures
git-subtree-split: c4a12be3ca5a1b8b1b3625a47a0685103cad1d36
@jmarrec
Copy link
Collaborator Author

jmarrec commented May 12, 2025

@tijcolem I just built fine on my windows VM, no link error. I built develop, not this branch though, are you getting the error on develop or this branch specifically?

@joseph-robertson is using MSVC too, are you hitting error?

Edit: I built this branch successfully too on Windows.

@jmarrec
Copy link
Collaborator Author

jmarrec commented May 22, 2025

Ok, I hit an issue with the E+ PR which I've fixed on this:

I ran some examples. I am producing a model that mimic Matt's:

  • A PSZ-AC serves a single zone which has two spaces
  • A Sys5 (PVAV) serves two zones: one has a single space, and the other has two spaces.

I am assigning a DSOA to every space and testing two things:

  • I am assigning the outdoor air flow per floor area (0.01 m3/m2-s)
  • I am assigning the outdoor air flow as absolute value as 0.01 * space.floorArea()

So both cases should produce the same output.

I am running with develop, and with this PR.

As expected, this PR fixes the issue.

EUI:

EUI DSOA per floor area DSOA absolute
develop 397.57 279.74
PR 397.57 397.57

Outdoor Air for Zone1_2

Outdoor Air For Zone1_2 DSOA per floor area DSOA absolute
develop 1 0.5
PR 1 1

Diff of develop versus this PR

Controller:MechanicalVentilation,
  Controller Mechanical Ventilation 1,    !- Name
  Always On Discrete,                     !- Availability Schedule Name
  No,                                     !- Demand Controlled Ventilation
  ZoneSum,                                !- System Outdoor Air Method
  ,                                       !- Zone Maximum Outdoor Air Fraction {dimensionless}
  Zone1_2,                                !- Zone or ZoneList Name 1
- Space2 DSOA,                            !- Design Specification Outdoor Air Object Name 1
+ Zone1_2 DSOA Space List,                !- Design Specification Outdoor Air Object Name 1
  ;                                       !- Design Specification Zone Air Distribution Object Name 1

Controller:MechanicalVentilation,
  Controller Mechanical Ventilation 2,    !- Name
  Always On Discrete,                     !- Availability Schedule Name
  No,                                     !- Demand Controlled Ventilation
  ZoneSum,                                !- System Outdoor Air Method
  ,                                       !- Zone Maximum Outdoor Air Fraction {dimensionless}
  Zone3,                                  !- Zone or ZoneList Name 1
  Space3 DSOA,                            !- Design Specification Outdoor Air Object Name 1
  ,                                       !- Design Specification Zone Air Distribution Object Name 1
  Zone4_5,                                !- Zone or ZoneList Name 2
- Space5 DSOA,                            !- Design Specification Outdoor Air Object Name 2
+ Zone4_5 DSOA Space List,                !- Design Specification Outdoor Air Object Name 2
  ;                                       !- Design Specification Zone Air Distribution Object Name 2

jmarrec and others added 16 commits May 26, 2025 16:01
…the DSOAs

Without a DesignDay, the translateSizingZone is never called, and in turn the Controller:MechanicalVentilation does NOT receive the DSOAs
This has been the case since the first ever commit of OS SDK on github, but it is wrong IMHO.
…location

   // Extensible Groups for DSOAs are no longer pushed in translateSizingZone to retain order of the file, because:
    // 1) Thermal Zones are translated before AirLoopHVACs, so we guarantee proper order (unless we mess something up, like adding a new always
    // translated object early on that will call it)
    // 2) Doing it in translateSizingZone means that it will NOT be written if the Sizing:Zone isn't, for eg when you have no design days
    //    but that is a valid use case
jmarrec added a commit to NREL/OpenStudio-resources that referenced this pull request May 26, 2025
jmarrec added a commit to NREL/OpenStudio-resources that referenced this pull request May 26, 2025
Comment on lines +206 to +208
set(ENERGYPLUS_RELEASE_NAME "v25.1.0-WithDSOASpaceListFixes")

set(ENERGYPLUS_REPO "NREL")
set(ENERGYPLUS_REPO "jmarrec")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jmarrec added a commit to NREL/OpenStudio-resources that referenced this pull request May 26, 2025
@jmarrec
Copy link
Collaborator Author

jmarrec commented May 26, 2025

@jmarrec jmarrec merged commit 7ca784d into develop May 26, 2025
2 of 6 checks passed
@jmarrec jmarrec deleted the 4219-DSOA branch May 26, 2025 16:19
jmarrec added a commit to NREL/OpenStudio-resources that referenced this pull request May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component - IDF Translation Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge.
Projects
None yet
7 participants