diff --git a/src/EnergyPlus/ScheduleManager.cc b/src/EnergyPlus/ScheduleManager.cc index 99e28a739c3..344a4605d7c 100644 --- a/src/EnergyPlus/ScheduleManager.cc +++ b/src/EnergyPlus/ScheduleManager.cc @@ -1390,11 +1390,11 @@ namespace Sched { } For_exit:; - if (std::find(allDays.begin(), allDays.end(), false) != allDays.end()) { + if (std::find(&allDays[iDayType_Sun], &allDays[(int)DayType::Num], false) != &allDays[(int)DayType::Num]) { ShowWarningCustom(state, eoh, format("has missing day types in Through={}", CurrentThrough)); ShowContinueError(state, format("Last \"For\" field={}", LastFor)); std::string errmsg = "Missing day types=,"; - for (int kDayType = 0; kDayType < (int)DayType::Num; ++kDayType) { + for (int kDayType = 1; kDayType < (int)DayType::Num; ++kDayType) { if (allDays[kDayType]) continue; errmsg.erase(errmsg.length() - 1); errmsg = format("{} \"{}\",-", errmsg, dayTypeNames[kDayType]); diff --git a/tst/EnergyPlus/unit/AirflowNetworkConditions.unit.cc b/tst/EnergyPlus/unit/AirflowNetworkConditions.unit.cc index a6792b0271c..6523651aff7 100644 --- a/tst/EnergyPlus/unit/AirflowNetworkConditions.unit.cc +++ b/tst/EnergyPlus/unit/AirflowNetworkConditions.unit.cc @@ -216,7 +216,7 @@ TEST_F(EnergyPlusFixture, AirflowNetworkSimulationControl_DefaultSolver) state->dataHeatBal->People.allocate(state->dataHeatBal->TotPeople); state->dataHeatBal->People(1).ZonePtr = 1; state->dataHeatBal->People(1).NumberOfPeople = 100.0; - state->dataHeatBal->People(1).numberOfPeopleSched = Sched::GetScheduleAlwaysOn(*state); // From dataglobals, always returns a 1 for schedule value + state->dataHeatBal->People(1).sched = Sched::GetScheduleAlwaysOn(*state); // From dataglobals, always returns a 1 for schedule value state->dataHeatBal->People(1).AdaptiveCEN15251 = true; std::string const idf_objects = delimited_string({ @@ -312,7 +312,7 @@ TEST_F(EnergyPlusFixture, AirflowNetworkSimulationControl_SetSolver) state->dataHeatBal->People.allocate(state->dataHeatBal->TotPeople); state->dataHeatBal->People(1).ZonePtr = 1; state->dataHeatBal->People(1).NumberOfPeople = 100.0; - state->dataHeatBal->People(1).numberOfPeopleSched = Sched::GetScheduleAlwaysOn(*state); // From dataglobals, always returns a 1 for schedule value + state->dataHeatBal->People(1).sched = Sched::GetScheduleAlwaysOn(*state); // From dataglobals, always returns a 1 for schedule value state->dataHeatBal->People(1).AdaptiveCEN15251 = true; std::string const idf_objects = delimited_string({ diff --git a/tst/EnergyPlus/unit/AirflowNetworkHVAC.unit.cc b/tst/EnergyPlus/unit/AirflowNetworkHVAC.unit.cc index 121c0e971aa..4144a28e9b8 100644 --- a/tst/EnergyPlus/unit/AirflowNetworkHVAC.unit.cc +++ b/tst/EnergyPlus/unit/AirflowNetworkHVAC.unit.cc @@ -2366,7 +2366,7 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_TestZoneVentingSchWithAdaptiveCtrl) state->dataHeatBal->People.allocate(state->dataHeatBal->TotPeople); state->dataHeatBal->People(1).ZonePtr = 1; state->dataHeatBal->People(1).NumberOfPeople = 100.0; - state->dataHeatBal->People(1).numberOfPeopleSched = Sched::GetScheduleAlwaysOn(*state); // From dataglobals, always returns a 1 for schedule value + state->dataHeatBal->People(1).sched = Sched::GetScheduleAlwaysOn(*state); // From dataglobals, always returns a 1 for schedule value state->dataHeatBal->People(1).AdaptiveCEN15251 = true; state->afn->get_input(); diff --git a/tst/EnergyPlus/unit/DataSurfaces.unit.cc b/tst/EnergyPlus/unit/DataSurfaces.unit.cc index 33fb90fd24b..91d64044272 100644 --- a/tst/EnergyPlus/unit/DataSurfaces.unit.cc +++ b/tst/EnergyPlus/unit/DataSurfaces.unit.cc @@ -510,10 +510,8 @@ TEST_F(EnergyPlusFixture, SurfaceTest_HashMap) state->dataSurface->surfExtConv.allocate(numSurfs); std::fill(state->dataSurface->surfExtConv.begin(), state->dataSurface->surfExtConv.end(), SurfExtConv()); state->dataSurface->SurfWinStormWinConstr.dimension(numSurfs, 0); - state->dataSurface->SurfMaterialMovInsulExt.dimension(numSurfs, 0); - state->dataSurface->SurfMaterialMovInsulInt.dimension(numSurfs, 0); - state->dataSurface->SurfMovInsulExtScheds.dimension(numSurfs, nullptr); - state->dataSurface->SurfMovInsulIntScheds.dimension(numSurfs, nullptr); + state->dataSurface->intMovInsuls.allocate(numSurfs); + state->dataSurface->extMovInsuls.allocate(numSurfs); for (int SurfNum = 1; SurfNum <= numSurfs; SurfNum++) { state->dataSurface->Surface(SurfNum).set_representative_surface(*state, SurfNum); diff --git a/tst/EnergyPlus/unit/HVACStandaloneERV.unit.cc b/tst/EnergyPlus/unit/HVACStandaloneERV.unit.cc index 1642565cd40..a3ae7082d8d 100644 --- a/tst/EnergyPlus/unit/HVACStandaloneERV.unit.cc +++ b/tst/EnergyPlus/unit/HVACStandaloneERV.unit.cc @@ -121,10 +121,10 @@ TEST_F(EnergyPlusFixture, HVACStandAloneERV_Test1) state->dataHeatBal->People.allocate(state->dataHeatBal->TotPeople); state->dataHeatBal->People(1).ZonePtr = 1; state->dataHeatBal->People(1).NumberOfPeople = 100.0; - state->dataHeatBal->People(1).numberOfPeopleSched = Sched::GetScheduleAlwaysOn(*state); + state->dataHeatBal->People(1).sched = Sched::GetScheduleAlwaysOn(*state); state->dataHeatBal->People(2).ZonePtr = 1; state->dataHeatBal->People(2).NumberOfPeople = 200.0; - state->dataHeatBal->People(2).numberOfPeopleSched = Sched::GetScheduleAlwaysOn(*state); + state->dataHeatBal->People(2).sched = Sched::GetScheduleAlwaysOn(*state); state->dataHVACStandAloneERV->StandAloneERV.allocate(1); @@ -238,10 +238,10 @@ TEST_F(EnergyPlusFixture, HVACStandAloneERV_Test2) state->dataHeatBal->People.allocate(state->dataHeatBal->TotPeople); state->dataHeatBal->People(1).ZonePtr = 1; state->dataHeatBal->People(1).NumberOfPeople = 10.0; - state->dataHeatBal->People(1).numberOfPeopleSched = Sched::GetScheduleAlwaysOn(*state); + state->dataHeatBal->People(1).sched = Sched::GetScheduleAlwaysOn(*state); state->dataHeatBal->People(2).ZonePtr = 1; state->dataHeatBal->People(2).NumberOfPeople = 20.0; - state->dataHeatBal->People(2).numberOfPeopleSched = Sched::GetScheduleAlwaysOn(*state); + state->dataHeatBal->People(2).sched = Sched::GetScheduleAlwaysOn(*state); state->dataHVACStandAloneERV->StandAloneERV.allocate(1); auto &erv = state->dataHVACStandAloneERV->StandAloneERV(1); diff --git a/tst/EnergyPlus/unit/HeatBalanceIntRadExchange.unit.cc b/tst/EnergyPlus/unit/HeatBalanceIntRadExchange.unit.cc index 91dafeeebfa..2dc4b440dce 100644 --- a/tst/EnergyPlus/unit/HeatBalanceIntRadExchange.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceIntRadExchange.unit.cc @@ -396,16 +396,13 @@ TEST_F(EnergyPlusFixture, HeatBalanceIntRadExchange_UpdateMovableInsulationFlagT auto *mat = new Material::MaterialBase; state->dataMaterial->materials.push_back(mat); state->dataSurface->Surface.allocate(1); - state->dataSurface->SurfMaterialMovInsulInt.allocate(1); - state->dataHeatBalSurf->SurfMovInsulIntPresent.allocate(1); - state->dataHeatBalSurf->SurfMovInsulIntPresentPrevTS.allocate(1); - state->dataHeatBalSurf->SurfMovInsulIndexList.push_back(1); + state->dataSurface->intMovInsuls.allocate(1); SurfNum = 1; - state->dataHeatBalSurf->SurfMovInsulIntPresent(1) = false; - state->dataHeatBalSurf->SurfMovInsulIntPresentPrevTS(1) = false; + state->dataSurface->intMovInsuls(1).present = false; + state->dataSurface->intMovInsuls(1).presentPrevTS = false; state->dataSurface->Surface(1).Construction = 1; - state->dataSurface->SurfMaterialMovInsulInt(1) = 1; + state->dataSurface->intMovInsuls(1).matNum = 1; state->dataConstruction->Construct(1).InsideAbsorpThermal = 0.9; mat->AbsorpThermal = 0.5; @@ -418,13 +415,13 @@ TEST_F(EnergyPlusFixture, HeatBalanceIntRadExchange_UpdateMovableInsulationFlagT EXPECT_TRUE(!DidMIChange); // Test 2: Movable insulation present and was also present in previous time step. This should result in a false value since nothing has changed. - state->dataHeatBalSurf->SurfMovInsulIntPresentPrevTS(1) = true; + state->dataSurface->intMovInsuls(1).presentPrevTS = true; HeatBalanceIntRadExchange::UpdateMovableInsulationFlag(*state, DidMIChange, SurfNum); EXPECT_TRUE(DidMIChange); // Test 2: Movable insulation present but wasn't in previous time step. However, the emissivity of the movable insulation and that of the // construction are the same so nothing has actually changed. This should result in a false value. - state->dataHeatBalSurf->SurfMovInsulIntPresentPrevTS(1) = true; + state->dataSurface->intMovInsuls(1).presentPrevTS = true; mat->AbsorpThermal = state->dataConstruction->Construct(1).InsideAbsorpThermal; HeatBalanceIntRadExchange::UpdateMovableInsulationFlag(*state, DidMIChange, SurfNum); EXPECT_TRUE(!DidMIChange); diff --git a/tst/EnergyPlus/unit/HeatBalanceMovableInsulation.unit.cc b/tst/EnergyPlus/unit/HeatBalanceMovableInsulation.unit.cc index 6919431322e..b4d52fd10c4 100644 --- a/tst/EnergyPlus/unit/HeatBalanceMovableInsulation.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceMovableInsulation.unit.cc @@ -74,17 +74,14 @@ TEST_F(EnergyPlusFixture, HeatBalanceMovableInsulation_EvalOutsideMovableInsulat int SurfNum = 1; state->dataSurface->Surface.allocate(SurfNum); - state->dataSurface->SurfMovInsulExtScheds.allocate(SurfNum); - state->dataSurface->SurfMaterialMovInsulExt.allocate(SurfNum); - state->dataSurface->SurfMovInsulExtScheds(SurfNum) = Sched::GetScheduleAlwaysOn(*state); - state->dataSurface->SurfMaterialMovInsulExt(SurfNum) = 1; - state->dataHeatBalSurf->SurfMovInsulExtPresent.allocate(SurfNum); - state->dataHeatBalSurf->SurfMovInsulHExt.allocate(SurfNum); + state->dataSurface->extMovInsuls.allocate(SurfNum); + state->dataSurface->extMovInsuls(SurfNum).sched = Sched::GetScheduleAlwaysOn(*state); + state->dataSurface->extMovInsuls(SurfNum).matNum = 1; state->dataHeatBalSurf->SurfAbsSolarExt.allocate(SurfNum); state->dataHeatBalSurf->SurfAbsThermalExt.allocate(SurfNum); state->dataHeatBalSurf->SurfRoughnessExt.allocate(SurfNum); - state->dataHeatBalSurf->SurfMovInsulExtPresent(1) = true; - state->dataHeatBalSurf->SurfMovInsulIndexList.push_back(1); + state->dataSurface->extMovInsuls(SurfNum).present = true; + state->dataSurface->extMovInsulSurfNums.push_back(SurfNum); auto *mat1 = new Material::MaterialShade; s_mat->materials.push_back(mat1); @@ -105,7 +102,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceMovableInsulation_EvalOutsideMovableInsulat state->dataHeatBalSurf->SurfAbsSolarExt(1) = 0.0; HeatBalanceSurfaceManager::EvalOutsideMovableInsulation(*state); EXPECT_EQ(0.75, state->dataHeatBalSurf->SurfAbsSolarExt(1)); - EXPECT_EQ(0.8, state->dataHeatBalSurf->SurfMovInsulHExt(1)); + EXPECT_EQ(0.8, state->dataSurface->extMovInsuls(1).H); EXPECT_ENUM_EQ(Material::SurfaceRoughness::VeryRough, state->dataHeatBalSurf->SurfRoughnessExt(1)); EXPECT_EQ(0.75, state->dataHeatBalSurf->SurfAbsThermalExt(1)); @@ -154,15 +151,12 @@ TEST_F(EnergyPlusFixture, HeatBalanceMovableInsulation_EvalInsideMovableInsulati int SurfNum = 1; state->dataSurface->Surface.allocate(SurfNum); - state->dataSurface->SurfMovInsulIntScheds.allocate(SurfNum); - state->dataSurface->SurfMaterialMovInsulInt.allocate(SurfNum); - state->dataSurface->SurfMovInsulIntScheds(SurfNum) = Sched::GetScheduleAlwaysOn(*state); - state->dataSurface->SurfMaterialMovInsulInt(SurfNum) = 1; - state->dataHeatBalSurf->SurfMovInsulIntPresent.allocate(SurfNum); - state->dataHeatBalSurf->SurfMovInsulHInt.allocate(SurfNum); + state->dataSurface->intMovInsuls.allocate(SurfNum); + state->dataSurface->intMovInsuls(SurfNum).sched = Sched::GetScheduleAlwaysOn(*state); + state->dataSurface->intMovInsuls(SurfNum).matNum = 1; state->dataHeatBalSurf->SurfAbsSolarInt.allocate(SurfNum); state->dataHeatBalSurf->SurfAbsThermalInt.allocate(SurfNum); - state->dataHeatBalSurf->SurfMovInsulIndexList.push_back(1); + state->dataSurface->intMovInsulSurfNums.push_back(SurfNum); auto *mat = new Material::MaterialShade; state->dataMaterial->materials.push_back(mat); @@ -183,8 +177,8 @@ TEST_F(EnergyPlusFixture, HeatBalanceMovableInsulation_EvalInsideMovableInsulati state->dataHeatBalSurf->SurfAbsSolarInt(1) = 0.0; HeatBalanceSurfaceManager::EvalInsideMovableInsulation(*state); EXPECT_EQ(0.75, state->dataHeatBalSurf->SurfAbsSolarInt(1)); - EXPECT_EQ(0.8, state->dataHeatBalSurf->SurfMovInsulHInt(1)); - EXPECT_EQ(true, state->dataHeatBalSurf->SurfMovInsulIntPresent(1)); + EXPECT_EQ(0.8, state->dataSurface->intMovInsuls(1).H); + EXPECT_EQ(true, state->dataSurface->intMovInsuls(1).present); EXPECT_EQ(0.75, state->dataHeatBalSurf->SurfAbsThermalInt(1)); state->dataHeatBalSurf->SurfAbsSolarInt(1) = 0.0; @@ -313,14 +307,12 @@ TEST_F(EnergyPlusFixture, SurfaceControlMovableInsulation_InvalidWindowSimpleGla // set surface data state->dataSurface->TotSurfaces = 1; state->dataSurface->Surface.allocate(1); - state->dataSurface->SurfMaterialMovInsulExt.allocate(1); - state->dataSurface->SurfMovInsulExtScheds.allocate(1); - state->dataSurface->SurfMaterialMovInsulInt.allocate(1); - state->dataSurface->SurfMovInsulIntScheds.allocate(1); - state->dataSurface->SurfMaterialMovInsulExt = 0; - state->dataSurface->SurfMovInsulExtScheds(1) = nullptr; - state->dataSurface->SurfMaterialMovInsulInt = 0; - state->dataSurface->SurfMovInsulIntScheds(1) = nullptr; + state->dataSurface->extMovInsuls.allocate(1); + state->dataSurface->intMovInsuls.allocate(1); + state->dataSurface->extMovInsuls(1).matNum = 0; + state->dataSurface->extMovInsuls(1).sched = nullptr; + state->dataSurface->intMovInsuls(1).matNum = 0; + state->dataSurface->intMovInsuls(1).sched = nullptr; state->dataSurfaceGeometry->SurfaceTmp.allocate(1); int SurfNum = 0; int TotHTSurfs = state->dataSurface->TotSurfaces = 1; @@ -334,7 +326,7 @@ TEST_F(EnergyPlusFixture, SurfaceControlMovableInsulation_InvalidWindowSimpleGla SurfaceGeometry::GetMovableInsulationData(*state, ErrorsFound); // check movable insulation material EXPECT_EQ(state->dataSurfaceGeometry->SurfaceTmp(1).BaseSurfName, "ZN001:WALL001"); // base surface name - EXPECT_EQ(state->dataSurface->SurfMaterialMovInsulExt(1), 4); // index to movable insulation material + EXPECT_EQ(state->dataSurface->extMovInsuls(1).matNum, 4); // index to movable insulation material EXPECT_EQ(state->dataMaterial->materials(4)->Name, "SIMPLEGLAZINGSYSTEM"); // name of movable insulation material EXPECT_ENUM_EQ(state->dataMaterial->materials(4)->group, Material::Group::GlassSimple); // invalid material group type EXPECT_TRUE(ErrorsFound); // error found due to invalid material diff --git a/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc b/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc index d9a627d85d4..e5e4df41e10 100644 --- a/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc @@ -147,7 +147,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_CalcOutsideSurfTemp) state->dataHeatBalSurf->SurfQRadSWOutMvIns(SurfNum) = 1.0; state->dataHeatBalSurf->SurfQRadLWOutSrdSurfs(SurfNum) = 1.0; state->dataHeatBalSurf->SurfQAdditionalHeatSourceOutside(SurfNum) = 0.0; - state->dataSurface->SurfMaterialMovInsulExt(SurfNum) = 1; + state->dataSurface->extMovInsuls(SurfNum).matNum = 1; state->dataSurface->Surface(SurfNum).SurfHasSurroundingSurfProperty = false; state->dataSurface->SurfOutDryBulbTemp = 0; @@ -3072,19 +3072,19 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestReportIntMovInsInsideSur state->dataHeatBalSurf->SurfTempIn.allocate(state->dataSurface->TotSurfaces); state->dataHeatBalSurf->SurfTempInTmp.allocate(state->dataSurface->TotSurfaces); state->dataHeatBalSurf->SurfTempInMovInsRep.allocate(state->dataSurface->TotSurfaces); - state->dataHeatBalSurf->SurfMovInsulIntPresent.allocate(state->dataSurface->TotSurfaces); + state->dataSurface->intMovInsuls.allocate(state->dataSurface->TotSurfaces); state->dataSurface->AnyMovableInsulation = true; - state->dataHeatBalSurf->SurfMovInsulIndexList.push_back(1); - state->dataHeatBalSurf->SurfMovInsulIndexList.push_back(2); + state->dataSurface->intMovInsulSurfNums.push_back(1); + state->dataSurface->intMovInsulSurfNums.push_back(2); // Test 1 Data: Surface does NOT have movable insulation - state->dataHeatBalSurf->SurfMovInsulIntPresent(1) = false; // No movable insulation + state->dataSurface->intMovInsuls(1).present = false; // No movable insulation state->dataHeatBalSurf->SurfTempIn(1) = 23.0; state->dataHeatBalSurf->SurfTempInTmp(1) = 12.3; state->dataHeatBalSurf->SurfTempInMovInsRep(1) = 1.23; ExpectedResult1 = 23.0; // SurfTempInMovInsRep should be set to SurfTempIn // Test 2 Data: Surface has movable insulation - state->dataHeatBalSurf->SurfMovInsulIntPresent(2) = true; + state->dataSurface->intMovInsuls(2).present = true; state->dataHeatBalSurf->SurfTempIn(2) = 123.0; state->dataHeatBalSurf->SurfTempInTmp(2) = 12.3; state->dataHeatBalSurf->SurfTempInMovInsRep(2) = 1.23; @@ -3222,7 +3222,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestResilienceMetricReport) state->dataHeatBal->People(1).ZonePtr = 1; state->dataHeatBal->People(1).Pierce = true; state->dataHeatBal->People(1).NumberOfPeople = 2; - state->dataHeatBal->People(1).numberOfPeopleSched = Sched::AddScheduleConstant(*state, "Occupancy"); + state->dataHeatBal->People(1).sched = Sched::AddScheduleConstant(*state, "Occupancy"); state->dataHeatBal->People(1).ColdStressTempThresh = 15.0; state->dataHeatBal->People(1).HeatStressTempThresh = 29.5; state->dataHeatBalFanSys->zoneTstatSetpts(1).setptHi = 27.5; @@ -3231,7 +3231,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestResilienceMetricReport) state->dataThermalComforts->ThermalComfortData.allocate(state->dataHeatBal->TotPeople); state->dataThermalComforts->ThermalComfortData(1).PierceSET = 31; - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 0; + state->dataHeatBal->People(1).sched->currentVal = 0; // Heat Index Case 1: Zone T < 80 F; state->dataGlobal->HourOfDay = 1; @@ -3427,7 +3427,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestResilienceMetricReport) EXPECT_NEAR(0.0, state->dataHeatBal->Resilience(1).ZoneDiscomfortWtExceedOccupiedHourBins[3], 1e-8); // Very-hot Exceedance OccupiedHours state->dataThermalComforts->ThermalComfortData(1).PierceSET = 11.2; - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 0.4; + state->dataHeatBal->People(1).sched->currentVal = 0.4; state->dataZoneTempPredictorCorrector->zoneHeatBalance(1).ZTAV = 31; state->dataThermalComforts->ThermalComfortData(1).FangerPMV = -3.5; for (int hour = 5; hour <= 7; hour++) { @@ -3478,7 +3478,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestResilienceMetricReport) state->dataThermalComforts->ThermalComfortData(1).PierceSET = 32; state->dataZoneTempPredictorCorrector->zoneHeatBalance(1).ZTAV = 28; - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 1.0; + state->dataHeatBal->People(1).sched->currentVal = 1.0; state->dataThermalComforts->ThermalComfortData(1).FangerPMV = -1.2; for (int hour = 8; hour <= 10; hour++) { state->dataGlobal->HourOfDay = hour; @@ -3574,7 +3574,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestResilienceMetricReport) state->dataThermalComforts->ThermalComfortData(1).PierceSET = 11.2; state->dataZoneTempPredictorCorrector->zoneHeatBalance(1).ZTAV = 30; - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 0.4; + state->dataHeatBal->People(1).sched->currentVal = 0.4; state->dataThermalComforts->ThermalComfortData(1).FangerPMV = 1.2; for (int hour = 13; hour <= 18; hour++) { state->dataGlobal->HourOfDay = hour; @@ -3621,7 +3621,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestResilienceMetricReport) EXPECT_NEAR(3.0, state->dataHeatBal->Resilience(1).ZoneDiscomfortWtExceedOccupiedHourBins[2], 1e-8); // Warm Exceedance OccupiedHours EXPECT_NEAR(0.0, state->dataHeatBal->Resilience(1).ZoneDiscomfortWtExceedOccupiedHourBins[3], 1e-8); // Very-hot Exceedance OccupiedHours - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 0; + state->dataHeatBal->People(1).sched->currentVal = 0; state->dataZoneTempPredictorCorrector->zoneHeatBalance(1).ZTAV = 12; state->dataThermalComforts->ThermalComfortData(1).FangerPMV = 1.2; for (int hour = 19; hour <= 20; hour++) { @@ -3674,7 +3674,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestResilienceMetricReport) state->dataContaminantBalance->ZoneAirCO2Avg.allocate(state->dataGlobal->NumOfZones); state->dataContaminantBalance->Contaminant.CO2Simulation = true; - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 1; + state->dataHeatBal->People(1).sched->currentVal = 1; state->dataOutRptTab->displayCO2ResilienceSummary = true; state->dataContaminantBalance->ZoneAirCO2Avg(1) = 1100; ReportCO2Resilience(*state); @@ -3795,7 +3795,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestThermalResilienceReportR state->dataHeatBal->People(1).ZonePtr = 1; state->dataHeatBal->People(1).Pierce = true; state->dataHeatBal->People(1).NumberOfPeople = 2; - state->dataHeatBal->People(1).numberOfPeopleSched = Sched::AddScheduleConstant(*state, "Occupancy"); + state->dataHeatBal->People(1).sched = Sched::AddScheduleConstant(*state, "Occupancy"); state->dataHeatBal->People(1).ColdStressTempThresh = 15.0; state->dataHeatBal->People(1).HeatStressTempThresh = 29.5; state->dataHeatBalFanSys->zoneTstatSetpts(1).setptHi = 27.5; @@ -3809,7 +3809,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestThermalResilienceReportR state->dataHeatBalFanSys->lowSETLongestStartRepPeriod.allocate(state->dataGlobal->NumOfZones, state->dataWeather->TotThermalReportPers); state->dataHeatBalFanSys->highSETLongestStartRepPeriod.allocate(state->dataGlobal->NumOfZones, state->dataWeather->TotThermalReportPers); state->dataThermalComforts->ThermalComfortData(1).PierceSET = 31; - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 0; + state->dataHeatBal->People(1).sched->currentVal = 0; // --------------------------------------------------------------------- // Report Period I start @@ -3971,7 +3971,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestThermalResilienceReportR EXPECT_NEAR(0.0, state->dataHeatBalFanSys->ZoneDiscomfortWtExceedOccupiedHourBinsRepPeriod(1, 1)[3], 1e-8); // Very-hot Exceedance OccupiedHours state->dataThermalComforts->ThermalComfortData(1).PierceSET = 11.2; - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 0.4; + state->dataHeatBal->People(1).sched->currentVal = 0.4; state->dataZoneTempPredictorCorrector->zoneHeatBalance(1).ZTAV = 31; state->dataThermalComforts->ThermalComfortData(1).FangerPMV = -3.5; for (int hour = 5; hour <= 7; hour++) { @@ -4024,7 +4024,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestThermalResilienceReportR state->dataThermalComforts->ThermalComfortData(1).PierceSET = 32; state->dataZoneTempPredictorCorrector->zoneHeatBalance(1).ZTAV = 28; - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 1.0; + state->dataHeatBal->People(1).sched->currentVal = 1.0; state->dataThermalComforts->ThermalComfortData(1).FangerPMV = -1.2; for (int hour = 8; hour <= 10; hour++) { state->dataGlobal->HourOfDay = hour; @@ -4091,7 +4091,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestThermalResilienceReportR state->dataThermalComforts->ThermalComfortData(1).PierceSET = 11.2; state->dataZoneTempPredictorCorrector->zoneHeatBalance(1).ZTAV = 30; - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 0.4; + state->dataHeatBal->People(1).sched->currentVal = 0.4; state->dataThermalComforts->ThermalComfortData(1).FangerPMV = 1.2; for (int hour = 13; hour <= 18; hour++) { state->dataGlobal->HourOfDay = hour; @@ -4140,7 +4140,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestThermalResilienceReportR EXPECT_NEAR(3.0, state->dataHeatBalFanSys->ZoneDiscomfortWtExceedOccupiedHourBinsRepPeriod(1, 2)[2], 1e-8); // Warm Exceedance OccupiedHours EXPECT_NEAR(0.0, state->dataHeatBalFanSys->ZoneDiscomfortWtExceedOccupiedHourBinsRepPeriod(1, 2)[3], 1e-8); // Very-hot Exceedance OccupiedHours - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 0; + state->dataHeatBal->People(1).sched->currentVal = 0; state->dataZoneTempPredictorCorrector->zoneHeatBalance(1).ZTAV = 12; state->dataThermalComforts->ThermalComfortData(1).FangerPMV = 1.2; for (int hour = 19; hour <= 20; hour++) { @@ -4254,7 +4254,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestCO2ResilienceReportRepPe state->dataHeatBal->People.allocate(state->dataHeatBal->TotPeople); state->dataHeatBal->People(1).ZonePtr = 1; state->dataHeatBal->People(1).NumberOfPeople = 2; - state->dataHeatBal->People(1).numberOfPeopleSched = Sched::AddScheduleConstant(*state, "Occupancy"); + state->dataHeatBal->People(1).sched = Sched::AddScheduleConstant(*state, "Occupancy"); int NoBins = 3; @@ -4268,7 +4268,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestCO2ResilienceReportRepPe state->dataContaminantBalance->Contaminant.CO2Simulation = true; state->dataOutRptTab->displayCO2ResilienceSummary = true; - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 0; + state->dataHeatBal->People(1).sched->currentVal = 0; state->dataContaminantBalance->ZoneAirCO2Avg(1) = 900; for (int hour = 1; hour <= 4; hour++) { state->dataGlobal->HourOfDay = hour; @@ -4284,7 +4284,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestCO2ResilienceReportRepPe EXPECT_NEAR(0.0, state->dataHeatBalFanSys->ZoneCO2LevelOccupiedHourBinsRepPeriod(1, 1)[1], 1e-8); EXPECT_NEAR(0.0, state->dataHeatBalFanSys->ZoneCO2LevelOccupiedHourBinsRepPeriod(1, 1)[2], 1e-8); - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 0.4; + state->dataHeatBal->People(1).sched->currentVal = 0.4; state->dataContaminantBalance->ZoneAirCO2Avg(1) = 1100; for (int hour = 5; hour <= 7; hour++) { state->dataGlobal->HourOfDay = hour; @@ -4300,7 +4300,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestCO2ResilienceReportRepPe EXPECT_NEAR(3.0, state->dataHeatBalFanSys->ZoneCO2LevelOccupiedHourBinsRepPeriod(1, 1)[1], 1e-8); EXPECT_NEAR(0.0, state->dataHeatBalFanSys->ZoneCO2LevelOccupiedHourBinsRepPeriod(1, 1)[2], 1e-8); - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 1.0; + state->dataHeatBal->People(1).sched->currentVal = 1.0; state->dataContaminantBalance->ZoneAirCO2Avg(1) = 5500; state->dataGlobal->HourOfDay = 8; ReportCO2Resilience(*state); @@ -4315,7 +4315,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestCO2ResilienceReportRepPe EXPECT_NEAR(3.0, state->dataHeatBalFanSys->ZoneCO2LevelOccupiedHourBinsRepPeriod(1, 1)[1], 1e-8); EXPECT_NEAR(1.0, state->dataHeatBalFanSys->ZoneCO2LevelOccupiedHourBinsRepPeriod(1, 1)[2], 1e-8); - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 1.0; + state->dataHeatBal->People(1).sched->currentVal = 1.0; state->dataContaminantBalance->ZoneAirCO2Avg(1) = 2000; for (int hour = 9; hour <= 10; hour++) { state->dataGlobal->HourOfDay = hour; @@ -4331,7 +4331,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestCO2ResilienceReportRepPe EXPECT_NEAR(5.0, state->dataHeatBalFanSys->ZoneCO2LevelOccupiedHourBinsRepPeriod(1, 1)[1], 1e-8); EXPECT_NEAR(1.0, state->dataHeatBalFanSys->ZoneCO2LevelOccupiedHourBinsRepPeriod(1, 1)[2], 1e-8); - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 1.0; + state->dataHeatBal->People(1).sched->currentVal = 1.0; state->dataContaminantBalance->ZoneAirCO2Avg(1) = 1500; for (int hour = 13; hour <= 18; hour++) { state->dataGlobal->HourOfDay = hour; @@ -4407,7 +4407,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestVisualResilienceReportRe state->dataHeatBal->People.allocate(state->dataHeatBal->TotPeople); state->dataHeatBal->People(1).ZonePtr = 1; state->dataHeatBal->People(1).NumberOfPeople = 2; - state->dataHeatBal->People(1).numberOfPeopleSched = Sched::AddScheduleConstant(*state, "Occupancy"); + state->dataHeatBal->People(1).sched = Sched::AddScheduleConstant(*state, "Occupancy"); state->dataDayltg->ZoneDaylight.allocate(state->dataGlobal->NumOfZones); int totDaylightingControls = state->dataGlobal->NumOfZones; @@ -4432,7 +4432,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestVisualResilienceReportRe state->dataOutRptTab->displayVisualResilienceSummary = true; - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 0; + state->dataHeatBal->People(1).sched->currentVal = 0; state->dataDayltg->daylightControl(1).refPts(1).illumSetPoint = 250; for (int hour = 1; hour <= 4; hour++) { state->dataGlobal->HourOfDay = hour; @@ -4452,7 +4452,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestVisualResilienceReportRe EXPECT_NEAR(0.0, state->dataHeatBalFanSys->ZoneLightingLevelOccupiedHourBinsRepPeriod(1, 1)[2], 1e-8); EXPECT_NEAR(0.0, state->dataHeatBalFanSys->ZoneLightingLevelOccupiedHourBinsRepPeriod(1, 1)[3], 1e-8); - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 0.4; + state->dataHeatBal->People(1).sched->currentVal = 0.4; state->dataDayltg->daylightControl(1).refPts(1).illumSetPoint = 600; for (int hour = 5; hour <= 7; hour++) { state->dataGlobal->HourOfDay = hour; @@ -4472,7 +4472,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestVisualResilienceReportRe EXPECT_NEAR(0.0, state->dataHeatBalFanSys->ZoneLightingLevelOccupiedHourBinsRepPeriod(1, 1)[2], 1e-8); EXPECT_NEAR(3.0, state->dataHeatBalFanSys->ZoneLightingLevelOccupiedHourBinsRepPeriod(1, 1)[3], 1e-8); - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 1.0; + state->dataHeatBal->People(1).sched->currentVal = 1.0; state->dataDayltg->daylightControl(1).refPts(1).illumSetPoint = 70; for (int hour = 8; hour <= 10; hour++) { state->dataGlobal->HourOfDay = hour; @@ -4492,7 +4492,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestVisualResilienceReportRe EXPECT_NEAR(0.0, state->dataHeatBalFanSys->ZoneLightingLevelOccupiedHourBinsRepPeriod(1, 1)[2], 1e-8); EXPECT_NEAR(3.0, state->dataHeatBalFanSys->ZoneLightingLevelOccupiedHourBinsRepPeriod(1, 1)[3], 1e-8); - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 1.0; + state->dataHeatBal->People(1).sched->currentVal = 1.0; state->dataDayltg->daylightControl(1).refPts(1).illumSetPoint = 600; for (int hour = 13; hour <= 15; hour++) { state->dataGlobal->HourOfDay = hour; @@ -4512,7 +4512,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestVisualResilienceReportRe EXPECT_NEAR(0.0, state->dataHeatBalFanSys->ZoneLightingLevelOccupiedHourBinsRepPeriod(1, 2)[2], 1e-8); EXPECT_NEAR(3.0, state->dataHeatBalFanSys->ZoneLightingLevelOccupiedHourBinsRepPeriod(1, 2)[3], 1e-8); - state->dataHeatBal->People(1).numberOfPeopleSched->currentVal = 1.0; + state->dataHeatBal->People(1).sched->currentVal = 1.0; state->dataDayltg->daylightControl(1).refPts(1).illumSetPoint = 70; for (int hour = 16; hour <= 18; hour++) { state->dataGlobal->HourOfDay = hour; diff --git a/tst/EnergyPlus/unit/SQLite.unit.cc b/tst/EnergyPlus/unit/SQLite.unit.cc index 188f63200a4..e96ab31502d 100644 --- a/tst/EnergyPlus/unit/SQLite.unit.cc +++ b/tst/EnergyPlus/unit/SQLite.unit.cc @@ -756,7 +756,7 @@ TEST_F(SQLiteFixture, SQLiteProcedures_createZoneExtendedOutput) auto const peopleData0 = std::make_unique(); peopleData0->Name = "test people 1"; - peopleData0->numberOfPeopleSched = Sched::GetScheduleAlwaysOff(*state); + peopleData0->sched = Sched::GetScheduleAlwaysOff(*state); peopleData0->activityLevelSched = Sched::GetScheduleAlwaysOff(*state); peopleData0->workEffSched = Sched::GetScheduleAlwaysOff(*state); peopleData0->clothingSched = Sched::GetScheduleAlwaysOff(*state); @@ -766,7 +766,7 @@ TEST_F(SQLiteFixture, SQLiteProcedures_createZoneExtendedOutput) peopleData1->Name = "test people 2"; peopleData1->ZonePtr = 1; peopleData1->NumberOfPeople = 2; - peopleData1->numberOfPeopleSched = Sched::GetSchedule(*state, "SCHED-1"); + peopleData1->sched = Sched::GetSchedule(*state, "SCHED-1"); peopleData1->activityLevelSched = Sched::GetSchedule(*state, "SCHED-1"); peopleData1->FractionRadiant = 2; peopleData1->FractionConvected = 2; diff --git a/tst/EnergyPlus/unit/SwimmingPool.unit.cc b/tst/EnergyPlus/unit/SwimmingPool.unit.cc index 61d10cc5db5..75f231afda7 100644 --- a/tst/EnergyPlus/unit/SwimmingPool.unit.cc +++ b/tst/EnergyPlus/unit/SwimmingPool.unit.cc @@ -251,7 +251,7 @@ TEST_F(EnergyPlusFixture, SwimmingPool_ErrorCheckSetupPoolSurfaceTest) state->dataConstruction->Construct.allocate(1); state->dataSurface->SurfIsPool.allocate(1); state->dataSurface->SurfIsRadSurfOrVentSlabOrPool.allocate(1); - state->dataSurface->SurfMaterialMovInsulInt.allocate(1); + state->dataSurface->intMovInsuls.allocate(1); // testing variables static constexpr std::string_view Alpha1("FirstString"); static constexpr std::string_view Alpha2("SecondString"); @@ -304,7 +304,7 @@ TEST_F(EnergyPlusFixture, SwimmingPool_ErrorCheckSetupPoolSurfaceTest) state->dataSurface->SurfIsRadSurfOrVentSlabOrPool(poolReference.SurfacePtr) = false; state->dataSurface->Surface(poolReference.SurfacePtr).HeatTransferAlgorithm = DataSurfaces::HeatTransferModel::CTF; state->dataSurface->Surface(poolReference.SurfacePtr).Class = DataSurfaces::SurfaceClass::Floor; - state->dataSurface->SurfMaterialMovInsulInt(poolReference.SurfacePtr) = 1; + state->dataSurface->intMovInsuls(poolReference.SurfacePtr).matNum = 1; poolReference.ErrorCheckSetupPoolSurface(*state, Alpha1, Alpha2, AlphaField2, ErrFnd); @@ -316,7 +316,7 @@ TEST_F(EnergyPlusFixture, SwimmingPool_ErrorCheckSetupPoolSurfaceTest) state->dataSurface->SurfIsRadSurfOrVentSlabOrPool(poolReference.SurfacePtr) = false; state->dataSurface->Surface(poolReference.SurfacePtr).HeatTransferAlgorithm = DataSurfaces::HeatTransferModel::CTF; state->dataSurface->Surface(poolReference.SurfacePtr).Class = DataSurfaces::SurfaceClass::Floor; - state->dataSurface->SurfMaterialMovInsulInt(poolReference.SurfacePtr) = 1; + state->dataSurface->intMovInsuls(poolReference.SurfacePtr).matNum = 1; state->dataSurface->Surface(poolReference.SurfacePtr).Construction = 1; state->dataConstruction->Construct(state->dataSurface->Surface(poolReference.SurfacePtr).Construction).SourceSinkPresent = true; @@ -330,7 +330,7 @@ TEST_F(EnergyPlusFixture, SwimmingPool_ErrorCheckSetupPoolSurfaceTest) state->dataSurface->SurfIsRadSurfOrVentSlabOrPool(poolReference.SurfacePtr) = false; state->dataSurface->Surface(poolReference.SurfacePtr).HeatTransferAlgorithm = DataSurfaces::HeatTransferModel::CTF; state->dataSurface->Surface(poolReference.SurfacePtr).Class = DataSurfaces::SurfaceClass::Wall; - state->dataSurface->SurfMaterialMovInsulInt(poolReference.SurfacePtr) = 1; + state->dataSurface->intMovInsuls(poolReference.SurfacePtr).matNum = 1; state->dataConstruction->Construct(state->dataSurface->Surface(poolReference.SurfacePtr).Construction).SourceSinkPresent = false; poolReference.ErrorCheckSetupPoolSurface(*state, Alpha1, Alpha2, AlphaField2, ErrFnd); @@ -343,7 +343,7 @@ TEST_F(EnergyPlusFixture, SwimmingPool_ErrorCheckSetupPoolSurfaceTest) state->dataSurface->SurfIsRadSurfOrVentSlabOrPool(poolReference.SurfacePtr) = false; state->dataSurface->Surface(poolReference.SurfacePtr).HeatTransferAlgorithm = DataSurfaces::HeatTransferModel::CTF; state->dataSurface->Surface(poolReference.SurfacePtr).Class = DataSurfaces::SurfaceClass::Floor; - state->dataSurface->SurfMaterialMovInsulInt(poolReference.SurfacePtr) = 0; + state->dataSurface->intMovInsuls(poolReference.SurfacePtr).matNum = 0; state->dataConstruction->Construct(state->dataSurface->Surface(poolReference.SurfacePtr).Construction).SourceSinkPresent = false; state->dataSurface->Surface(poolReference.SurfacePtr).Zone = 7; state->dataSurface->SurfIsPool(poolReference.SurfacePtr) = false; diff --git a/tst/EnergyPlus/unit/ThermalComfort.unit.cc b/tst/EnergyPlus/unit/ThermalComfort.unit.cc index 470371ea2b0..e9f18a916fa 100644 --- a/tst/EnergyPlus/unit/ThermalComfort.unit.cc +++ b/tst/EnergyPlus/unit/ThermalComfort.unit.cc @@ -996,7 +996,7 @@ TEST_F(EnergyPlusFixture, ThermalComfort_CalcThermalComfortASH55) state->dataHeatBalFanSys->ZoneQElecBaseboardToPerson.allocate(state->dataGlobal->NumOfZones); state->dataHeatBal->People(1).ZonePtr = 1; - state->dataHeatBal->People(1).numberOfPeopleSched = Sched::GetScheduleAlwaysOn(*state); + state->dataHeatBal->People(1).sched = Sched::GetScheduleAlwaysOn(*state); state->dataHeatBal->People(1).NumberOfPeople = 5.0; state->dataHeatBal->People(1).NomMinNumberPeople = 5.0; state->dataHeatBal->People(1).NomMaxNumberPeople = 5.0;