From a673de60e3b28a1f1fcc46a07203e879f91d879f Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Wed, 13 Mar 2024 16:54:23 -0500 Subject: [PATCH 01/21] Add new function for min max by daytype and new EIO/initialization report columns to use it. --- src/EnergyPlus/InternalHeatGains.cc | 29 +++++++++++++---- src/EnergyPlus/ScheduleManager.cc | 49 +++++++++++++++++++++++++++++ src/EnergyPlus/ScheduleManager.hh | 11 +++++++ 3 files changed, 83 insertions(+), 6 deletions(-) diff --git a/src/EnergyPlus/InternalHeatGains.cc b/src/EnergyPlus/InternalHeatGains.cc index 46d29f18df9..5c839836a0e 100644 --- a/src/EnergyPlus/InternalHeatGains.cc +++ b/src/EnergyPlus/InternalHeatGains.cc @@ -3723,8 +3723,11 @@ namespace InternalHeatGains { Format_723, "People", "Number of People {},People/Floor Area {person/m2},Floor Area per person {m2/person},Fraction Radiant,Fraction " - "Convected,Sensible Fraction Calculation,Activity level,ASHRAE 55 Warnings,Carbon Dioxide Generation Rate,Nominal Minimum " - "Number of People,Nominal Maximum Number of People"); + "Convected,Sensible Fraction Calculation,Activity level,ASHRAE 55 Warnings,Carbon Dioxide Generation Rate," + "Minimum Number of People for All Day Types,Maximum Number of People for All Day Types," + "Minimum Number of People for Weekdays, Maximum Number of People for Weekdays, " + "Minimum Number of People for Weekends/Holidays, Maximum Number of People for Weekends /Holidays," + "Minimum Number of People for Design Days, Maximum Number of People for Design Days"); if (state.dataHeatBal->People(Loop).Fanger || state.dataHeatBal->People(Loop).Pierce || state.dataHeatBal->People(Loop).KSU || state.dataHeatBal->People(Loop).CoolingEffectASH55 || state.dataHeatBal->People(Loop).AnkleDraftASH55) { print(state.files.eio, @@ -3777,11 +3780,27 @@ namespace InternalHeatGains { print(state.files.eio, "No,"); } print(state.files.eio, "{:.4R},", state.dataHeatBal->People(Loop).CO2RateFactor); - print(state.files.eio, "{:.0R},", state.dataHeatBal->People(Loop).NomMinNumberPeople); + print(state.files.eio, "{:.1R},", state.dataHeatBal->People(Loop).NomMinNumberPeople); + print(state.files.eio, "{:.1R},", state.dataHeatBal->People(Loop).NomMaxNumberPeople); + + auto &thisPeople = state.dataHeatBal->People(Loop); + // weekdays + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, thisPeople.NumberOfPeoplePtr, DayTypeGroup::Weekday); + print(state.files.eio, "{:.1R},", thisPeople.NumberOfPeople * SchMin); + print(state.files.eio, "{:.1R},", thisPeople.NumberOfPeople * SchMax); + + // weekends/holidays + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, thisPeople.NumberOfPeoplePtr, DayTypeGroup::WeekEndHoliday); + print(state.files.eio, "{:.1R},", thisPeople.NumberOfPeople * SchMin); + print(state.files.eio, "{:.1R},", thisPeople.NumberOfPeople * SchMax); + + //design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, thisPeople.NumberOfPeoplePtr, DayTypeGroup::DesignDay); + print(state.files.eio, "{:.1R},", thisPeople.NumberOfPeople * SchMin); + print(state.files.eio, "{:.1R},", thisPeople.NumberOfPeople * SchMax); if (state.dataHeatBal->People(Loop).Fanger || state.dataHeatBal->People(Loop).Pierce || state.dataHeatBal->People(Loop).KSU || state.dataHeatBal->People(Loop).CoolingEffectASH55 || state.dataHeatBal->People(Loop).AnkleDraftASH55) { - print(state.files.eio, "{:.0R},", state.dataHeatBal->People(Loop).NomMaxNumberPeople); if (state.dataHeatBal->People(Loop).MRTCalcType == DataHeatBalance::CalcMRT::EnclosureAveraged) { print(state.files.eio, "Zone Averaged,"); @@ -3830,8 +3849,6 @@ namespace InternalHeatGains { } else { print(state.files.eio, "No\n"); } - } else { - print(state.files.eio, "{:.0R}\n", state.dataHeatBal->People(Loop).NomMaxNumberPeople); } } for (int Loop = 1; Loop <= state.dataHeatBal->TotLights; ++Loop) { diff --git a/src/EnergyPlus/ScheduleManager.cc b/src/EnergyPlus/ScheduleManager.cc index 7cf3efe6b93..4e2b13f695e 100644 --- a/src/EnergyPlus/ScheduleManager.cc +++ b/src/EnergyPlus/ScheduleManager.cc @@ -4491,6 +4491,55 @@ namespace ScheduleManager { return MaximumValue; } + std::pair getScheduleMinMaxByDayType(EnergyPlusData &state, int const ScheduleIndex, DayTypeGroup const days) + { + // J. Glazer - March 2024 + // finds the minimum and maximum for a specific set of day types for a given schedule + Real64 MinValue = Constant::BigNumber; + Real64 MaxValue = -Constant::BigNumber; + if (ScheduleIndex == -1) { + MinValue = 1.0; + MaxValue = 1.0; + } else if (ScheduleIndex == 0) { + MinValue = 0.0; + MaxValue = 0.0; + } else if (ScheduleIndex < 1 || ScheduleIndex > state.dataScheduleMgr->NumSchedules) { + ShowFatalError(state, "getScheduleMinMaxByDayType called with ScheduleIndex out of range"); + } else if (ScheduleIndex > 0) { + std::vector dayTypeFilter(maxDayTypes); + std::fill(dayTypeFilter.begin(), dayTypeFilter.end(), false); + switch (days) { + case DayTypeGroup::Weekday: + dayTypeFilter = {false, true, true, true, true, true, false, false, false, false, false, false}; + break; + case DayTypeGroup::WeekEndHoliday: + dayTypeFilter = {true, false, false, false, false, false, true, true, false, false, false, false}; + break; + case DayTypeGroup::DesignDay: + dayTypeFilter = {false, false, false, false, false, false, false, false, true, true, false, false}; + break; + default: + dayTypeFilter = {false, false, false, false, false, false, false, false, false, false, false, false}; + break; + } + for (int iDayOfYear = 1; iDayOfYear <= 366; ++iDayOfYear) { + int WkSch = state.dataScheduleMgr->Schedule(ScheduleIndex).WeekSchedulePointer(iDayOfYear); + auto &weekSch = state.dataScheduleMgr->WeekSchedule(WkSch); + for (int jType = 1; jType <= maxDayTypes; ++jType) { + if (dayTypeFilter[jType -1]) { + auto &daySch = state.dataScheduleMgr->DaySchedule; + MinValue = min(MinValue, minval(daySch(weekSch.DaySchedulePointer(jType)).TSValue)); + MaxValue = max(MaxValue, maxval(daySch(weekSch.DaySchedulePointer(jType)).TSValue)); + } + } + } + if (MinValue == Constant::BigNumber) MinValue = 0; + if (MaxValue == -Constant::BigNumber) MaxValue = 0; + } + return std::make_pair(MinValue, MaxValue); + } + + std::string GetScheduleName(EnergyPlusData &state, int const ScheduleIndex) { // FUNCTION INFORMATION: diff --git a/src/EnergyPlus/ScheduleManager.hh b/src/EnergyPlus/ScheduleManager.hh index 44b9f2bdc0a..fa5a83c8176 100644 --- a/src/EnergyPlus/ScheduleManager.hh +++ b/src/EnergyPlus/ScheduleManager.hh @@ -93,6 +93,15 @@ namespace ScheduleManager { extern const std::array(DayType::Num)> dayTypeNames; extern const std::array(DayType::Num)> dayTypeNamesUC; + enum class DayTypeGroup + { + Invalid = -1, + Weekday = 1, + WeekEndHoliday, + DesignDay, + Num + }; + enum class SchedType : int { Invalid = -1, @@ -339,6 +348,8 @@ namespace ScheduleManager { Real64 GetScheduleMaxValue(EnergyPlusData &state, int const ScheduleIndex); // Which Schedule being tested + std::pair getScheduleMinMaxByDayType(EnergyPlusData &state, int const ScheduleIndex, DayTypeGroup const days); + std::string GetScheduleName(EnergyPlusData &state, int const ScheduleIndex); void ReportScheduleValues(EnergyPlusData &state); From 60fe6f9ec0a688e4bab92edd4b1bf8edb75d04ef Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Thu, 14 Mar 2024 07:41:16 -0500 Subject: [PATCH 02/21] Add unit test --- src/EnergyPlus/ScheduleManager.cc | 4 +- tst/EnergyPlus/unit/ScheduleManager.unit.cc | 99 +++++++++++++++++++++ 2 files changed, 101 insertions(+), 2 deletions(-) diff --git a/src/EnergyPlus/ScheduleManager.cc b/src/EnergyPlus/ScheduleManager.cc index 4e2b13f695e..0ee9fa10718 100644 --- a/src/EnergyPlus/ScheduleManager.cc +++ b/src/EnergyPlus/ScheduleManager.cc @@ -4510,6 +4510,7 @@ namespace ScheduleManager { std::fill(dayTypeFilter.begin(), dayTypeFilter.end(), false); switch (days) { case DayTypeGroup::Weekday: + // Sun Mon Tues Wed Thur Fri Sat Sun Summer Winter Cust1 Cust2 dayTypeFilter = {false, true, true, true, true, true, false, false, false, false, false, false}; break; case DayTypeGroup::WeekEndHoliday: @@ -4526,7 +4527,7 @@ namespace ScheduleManager { int WkSch = state.dataScheduleMgr->Schedule(ScheduleIndex).WeekSchedulePointer(iDayOfYear); auto &weekSch = state.dataScheduleMgr->WeekSchedule(WkSch); for (int jType = 1; jType <= maxDayTypes; ++jType) { - if (dayTypeFilter[jType -1]) { + if (dayTypeFilter[jType - 1]) { auto &daySch = state.dataScheduleMgr->DaySchedule; MinValue = min(MinValue, minval(daySch(weekSch.DaySchedulePointer(jType)).TSValue)); MaxValue = max(MaxValue, maxval(daySch(weekSch.DaySchedulePointer(jType)).TSValue)); @@ -4539,7 +4540,6 @@ namespace ScheduleManager { return std::make_pair(MinValue, MaxValue); } - std::string GetScheduleName(EnergyPlusData &state, int const ScheduleIndex) { // FUNCTION INFORMATION: diff --git a/tst/EnergyPlus/unit/ScheduleManager.unit.cc b/tst/EnergyPlus/unit/ScheduleManager.unit.cc index ca623a18d3d..f815e6f114d 100644 --- a/tst/EnergyPlus/unit/ScheduleManager.unit.cc +++ b/tst/EnergyPlus/unit/ScheduleManager.unit.cc @@ -1563,3 +1563,102 @@ TEST_F(EnergyPlusFixture, ShadowCalculation_CSV_extra_parenthesis) iHour = 24; EXPECT_EQ(0.00000000, state->dataScheduleMgr->DaySchedule(iDay).TSValue(TS, iHour)); } + +TEST_F(EnergyPlusFixture, getScheduleMinMaxByDayType_test) +{ + // J.Glazer - March 2024 + + std::string const idf_objects = delimited_string({ + "ScheduleTypeLimits,", + " Any Number; !- Name", + " ", + "Schedule:Compact,", + " HighLow01,", + " Any Number,", + " Through: 12/31,", + " For: WeekDays CustomDay1 CustomDay2,", + " Until: 8:00,0.42,", + " Until: 11:00,0.75,", + " Until: 12:00,0.80,", + " Until: 13:00,0.40,", + " Until: 14:00,0.87,", + " Until: 18:00,0.75,", + " Until: 19:00,0.50,", + " Until: 24:00,0.40,", + " For: Weekends Holiday,", + " Until: 8:00,0.30,", + " Until: 24:00,0.83,", + " For: SummerDesignDay,", + " Until: 24:00,0.95,", + " For: WinterDesignDay,", + " Until: 24:00,0.15;", + " ", + "Schedule:Compact,", + " HighLow02,", + " Any Number,", + " Through: 4/30,", + " For: WeekDays CustomDay1 CustomDay2,", + " Until: 24:00,0.21,", + " For: Weekends Holiday,", + " Until: 24:00,0.65,", + " For: SummerDesignDay,", + " Until: 24:00,0.79,", + " For: WinterDesignDay,", + " Until: 24:00,0.18,", + " Through: 12/31,", + " For: WeekDays CustomDay1 CustomDay2,", + " Until: 24:00,0.73,", + " For: Weekends Holiday,", + " Until: 24:00,0.27,", + " For: SummerDesignDay,", + " Until: 24:00,0.85,", + " For: WinterDesignDay,", + " Until: 24:00,0.25;", + " ", + }); + + ASSERT_TRUE(process_idf(idf_objects)); + + state->dataGlobal->NumOfTimeStepInHour = 4; + state->dataGlobal->MinutesPerTimeStep = 15; + state->dataGlobal->TimeStepZone = 0.25; + + Real64 schMin; + Real64 schMax; + + std::tie(schMin, schMax) = getScheduleMinMaxByDayType(*state, -1, DayTypeGroup::Weekday); + EXPECT_EQ(1.0, schMin); + EXPECT_EQ(1.0, schMax); + + std::tie(schMin, schMax) = getScheduleMinMaxByDayType(*state, 0, DayTypeGroup::Weekday); + EXPECT_EQ(0.0, schMin); + EXPECT_EQ(0.0, schMax); + + int index = GetScheduleIndex(*state, "HIGHLOW01"); + + std::tie(schMin, schMax) = getScheduleMinMaxByDayType(*state, index, DayTypeGroup::Weekday); + EXPECT_EQ(0.40, schMin); + EXPECT_EQ(0.87, schMax); + + std::tie(schMin, schMax) = getScheduleMinMaxByDayType(*state, index, DayTypeGroup::WeekEndHoliday); + EXPECT_EQ(0.30, schMin); + EXPECT_EQ(0.83, schMax); + + std::tie(schMin, schMax) = getScheduleMinMaxByDayType(*state, index, DayTypeGroup::DesignDay); + EXPECT_EQ(0.15, schMin); + EXPECT_EQ(0.95, schMax); + + index = GetScheduleIndex(*state, "HIGHLOW02"); + + std::tie(schMin, schMax) = getScheduleMinMaxByDayType(*state, index, DayTypeGroup::Weekday); + EXPECT_EQ(0.21, schMin); + EXPECT_EQ(0.73, schMax); + + std::tie(schMin, schMax) = getScheduleMinMaxByDayType(*state, index, DayTypeGroup::WeekEndHoliday); + EXPECT_EQ(0.27, schMin); + EXPECT_EQ(0.65, schMax); + + std::tie(schMin, schMax) = getScheduleMinMaxByDayType(*state, index, DayTypeGroup::DesignDay); + EXPECT_EQ(0.18, schMin); + EXPECT_EQ(0.85, schMax); +} From 26f96b0f6bd9f1a24e9833c65937e04312145fba Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Thu, 14 Mar 2024 12:50:07 -0500 Subject: [PATCH 03/21] Add support for other internal load equipment. --- src/EnergyPlus/InternalHeatGains.cc | 173 +++++++++++++++++++++++++--- 1 file changed, 158 insertions(+), 15 deletions(-) diff --git a/src/EnergyPlus/InternalHeatGains.cc b/src/EnergyPlus/InternalHeatGains.cc index 5c839836a0e..006102a0018 100644 --- a/src/EnergyPlus/InternalHeatGains.cc +++ b/src/EnergyPlus/InternalHeatGains.cc @@ -3794,7 +3794,7 @@ namespace InternalHeatGains { print(state.files.eio, "{:.1R},", thisPeople.NumberOfPeople * SchMin); print(state.files.eio, "{:.1R},", thisPeople.NumberOfPeople * SchMax); - //design days + // design days std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, thisPeople.NumberOfPeoplePtr, DayTypeGroup::DesignDay); print(state.files.eio, "{:.1R},", thisPeople.NumberOfPeople * SchMin); print(state.files.eio, "{:.1R},", thisPeople.NumberOfPeople * SchMax); @@ -3849,6 +3849,8 @@ namespace InternalHeatGains { } else { print(state.files.eio, "No\n"); } + } else { + print(state.files.eio, "\n"); } } for (int Loop = 1; Loop <= state.dataHeatBal->TotLights; ++Loop) { @@ -3857,8 +3859,11 @@ namespace InternalHeatGains { Format_723, "Lights", "Lighting Level {W},Lights/Floor Area {W/m2},Lights per person {W/person},Fraction Return " - "Air,Fraction Radiant,Fraction Short Wave,Fraction Convected,Fraction Replaceable,End-Use " - "Category,Nominal Minimum Lighting Level {W},Nominal Maximum Lighting Level {W}\n"); + "Air,Fraction Radiant,Fraction Short Wave,Fraction Convected,Fraction Replaceable,End-Use, " + "Minimum Lighting Level for All Day Types {W},Maximum Lighting Level for All Day Types {W}," + "Minimum Lighting Level for Weekdays {W}, Maximum Lighting Level for Weekdays {W}," + "Minimum Lighting Level for Weekends/Holidays {W}, Maximum Lighting Level for Weekends /Holidays {W}," + "Minimum Lighting Level for Design Days {W}, Maximum Lighting Level for Design Days {W}\n"); } int ZoneNum = state.dataHeatBal->Lights(Loop).ZonePtr; @@ -3888,7 +3893,23 @@ namespace InternalHeatGains { print(state.files.eio, "{:.3R},", state.dataHeatBal->Lights(Loop).FractionReplaceable); print(state.files.eio, "{},", state.dataHeatBal->Lights(Loop).EndUseSubcategory); print(state.files.eio, "{:.3R},", state.dataHeatBal->Lights(Loop).NomMinDesignLevel); - print(state.files.eio, "{:.3R}\n", state.dataHeatBal->Lights(Loop).NomMaxDesignLevel); + print(state.files.eio, "{:.3R},", state.dataHeatBal->Lights(Loop).NomMaxDesignLevel); + + auto &light = state.dataHeatBal->Lights(Loop); + // weekdays + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, light.SchedPtr, DayTypeGroup::Weekday); + print(state.files.eio, "{:.3R},", light.DesignLevel * SchMin); + print(state.files.eio, "{:.1R},", light.DesignLevel * SchMax); + + // weekends/holidays + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, light.SchedPtr, DayTypeGroup::WeekEndHoliday); + print(state.files.eio, "{:.3R},", light.DesignLevel * SchMin); + print(state.files.eio, "{:.3R},", light.DesignLevel * SchMax); + + // design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, light.SchedPtr, DayTypeGroup::DesignDay); + print(state.files.eio, "{:.3R},", light.DesignLevel * SchMin); + print(state.files.eio, "{:.3R}\n", light.DesignLevel * SchMax); } for (int Loop = 1; Loop <= state.dataHeatBal->TotElecEquip; ++Loop) { if (Loop == 1) { @@ -3896,7 +3917,11 @@ namespace InternalHeatGains { Format_723, "ElectricEquipment", "Equipment Level {W},Equipment/Floor Area {W/m2},Equipment per person {W/person},Fraction Latent,Fraction Radiant,Fraction " - "Lost,Fraction Convected,End-Use SubCategory,Nominal Minimum Equipment Level {W},Nominal Maximum Equipment Level {W}\n"); + "Lost,Fraction Convected,End-Use SubCategory," + "Minimum Equipment Level for All Day Types {W},Maximum Equipment Level for All Day Types {W}," + "Minimum Equipment Level for Weekdays {W}, Maximum Equipment Level for Weekdays {W}," + "Minimum Equipment Level for Weekends/Holidays {W}, Maximum Equipment Level for Weekends /Holidays {W}," + "Minimum Equipment Level for Design Days {W}, Maximum Equipment Level for Design Days {W}\n"); } int ZoneNum = state.dataHeatBal->ZoneElectric(Loop).ZonePtr; @@ -3925,7 +3950,23 @@ namespace InternalHeatGains { print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneElectric(Loop).FractionConvected); print(state.files.eio, "{},", state.dataHeatBal->ZoneElectric(Loop).EndUseSubcategory); print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneElectric(Loop).NomMinDesignLevel); - print(state.files.eio, "{:.3R}\n", state.dataHeatBal->ZoneElectric(Loop).NomMaxDesignLevel); + print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneElectric(Loop).NomMaxDesignLevel); + + auto &electric = state.dataHeatBal->ZoneElectric(Loop); + // weekdays + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, electric.SchedPtr, DayTypeGroup::Weekday); + print(state.files.eio, "{:.3R},", electric.DesignLevel * SchMin); + print(state.files.eio, "{:.3R},", electric.DesignLevel * SchMax); + + // weekends/holidays + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, electric.SchedPtr, DayTypeGroup::WeekEndHoliday); + print(state.files.eio, "{:.3R},", electric.DesignLevel * SchMin); + print(state.files.eio, "{:.3R},", electric.DesignLevel * SchMax); + + // design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, electric.SchedPtr, DayTypeGroup::DesignDay); + print(state.files.eio, "{:.3R},", electric.DesignLevel * SchMin); + print(state.files.eio, "{:.3R}\n", electric.DesignLevel * SchMax); } for (int Loop = 1; Loop <= state.dataHeatBal->TotGasEquip; ++Loop) { if (Loop == 1) { @@ -3933,7 +3974,11 @@ namespace InternalHeatGains { Format_723, "GasEquipment", "Equipment Level {W},Equipment/Floor Area {W/m2},Equipment per person {W/person},Fraction Latent,Fraction Radiant,Fraction " - "Lost,Fraction Convected,End-Use SubCategory,Nominal Minimum Equipment Level {W},Nominal Maximum Equipment Level {W}\n"); + "Lost,Fraction Convected,End-Use SubCategory," + "Minimum Equipment Level for All Day Types {W},Maximum Equipment Level for All Day Types {W}," + "Minimum Equipment Level for Weekdays {W}, Maximum Equipment Level for Weekdays {W}," + "Minimum Equipment Level for Weekends/Holidays {W}, Maximum Equipment Level for Weekends /Holidays {W}," + "Minimum Equipment Level for Design Days {W}, Maximum Equipment Level for Design Days {W}\n"); } int ZoneNum = state.dataHeatBal->ZoneGas(Loop).ZonePtr; @@ -3963,7 +4008,23 @@ namespace InternalHeatGains { print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneGas(Loop).FractionConvected); print(state.files.eio, "{},", state.dataHeatBal->ZoneGas(Loop).EndUseSubcategory); print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneGas(Loop).NomMinDesignLevel); - print(state.files.eio, "{:.3R}\n", state.dataHeatBal->ZoneGas(Loop).NomMaxDesignLevel); + print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneGas(Loop).NomMaxDesignLevel); + + auto &gas = state.dataHeatBal->ZoneGas(Loop); + // weekdays + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, gas.SchedPtr, DayTypeGroup::Weekday); + print(state.files.eio, "{:.3R},", gas.DesignLevel * SchMin); + print(state.files.eio, "{:.3R},", gas.DesignLevel * SchMax); + + // weekends/holidays + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, gas.SchedPtr, DayTypeGroup::WeekEndHoliday); + print(state.files.eio, "{:.3R},", gas.DesignLevel * SchMin); + print(state.files.eio, "{:.3R},", gas.DesignLevel * SchMax); + + // design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, gas.SchedPtr, DayTypeGroup::DesignDay); + print(state.files.eio, "{:.3R},", gas.DesignLevel * SchMin); + print(state.files.eio, "{:.3R}\n", gas.DesignLevel * SchMax); } for (int Loop = 1; Loop <= state.dataHeatBal->TotHWEquip; ++Loop) { @@ -3972,7 +4033,11 @@ namespace InternalHeatGains { Format_723, "HotWaterEquipment", "Equipment Level {W},Equipment/Floor Area {W/m2},Equipment per person {W/person},Fraction Latent,Fraction Radiant,Fraction " - "Lost,Fraction Convected,End-Use SubCategory,Nominal Minimum Equipment Level {W},Nominal Maximum Equipment Level {W}\n"); + "Lost,Fraction Convected,End-Use SubCategory," + "Minimum Equipment Level for All Day Types {W},Maximum Equipment Level for All Day Types {W}," + "Minimum Equipment Level for Weekdays {W}, Maximum Equipment Level for Weekdays {W}," + "Minimum Equipment Level for Weekends/Holidays {W}, Maximum Equipment Level for Weekends /Holidays {W}," + "Minimum Equipment Level for Design Days {W}, Maximum Equipment Level for Design Days {W}\n"); } int ZoneNum = state.dataHeatBal->ZoneHWEq(Loop).ZonePtr; @@ -4002,7 +4067,23 @@ namespace InternalHeatGains { print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneHWEq(Loop).FractionConvected); print(state.files.eio, "{},", state.dataHeatBal->ZoneHWEq(Loop).EndUseSubcategory); print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneHWEq(Loop).NomMinDesignLevel); - print(state.files.eio, "{:.3R}\n", state.dataHeatBal->ZoneHWEq(Loop).NomMaxDesignLevel); + print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneHWEq(Loop).NomMaxDesignLevel); + + auto &hweq = state.dataHeatBal->ZoneHWEq(Loop); + // weekdays + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, hweq.SchedPtr, DayTypeGroup::Weekday); + print(state.files.eio, "{:.3R},", hweq.DesignLevel * SchMin); + print(state.files.eio, "{:.3R},", hweq.DesignLevel * SchMax); + + // weekends/holidays + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, hweq.SchedPtr, DayTypeGroup::WeekEndHoliday); + print(state.files.eio, "{:.3R},", hweq.DesignLevel * SchMin); + print(state.files.eio, "{:.3R},", hweq.DesignLevel * SchMax); + + // design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, hweq.SchedPtr, DayTypeGroup::DesignDay); + print(state.files.eio, "{:.3R},", hweq.DesignLevel * SchMin); + print(state.files.eio, "{:.3R}\n", hweq.DesignLevel * SchMax); } for (int Loop = 1; Loop <= state.dataHeatBal->TotStmEquip; ++Loop) { @@ -4011,7 +4092,11 @@ namespace InternalHeatGains { Format_723, "SteamEquipment", "Equipment Level {W},Equipment/Floor Area {W/m2},Equipment per person {W/person},Fraction Latent,Fraction Radiant,Fraction " - "Lost,Fraction Convected,End-Use SubCategory,Nominal Minimum Equipment Level {W},Nominal Maximum Equipment Level {W}\n"); + "Lost,Fraction Convected,End-Use SubCategory," + "Minimum Equipment Level for All Day Types {W},Maximum Equipment Level for All Day Types {W}," + "Minimum Equipment Level for Weekdays {W}, Maximum Equipment Level for Weekdays {W}," + "Minimum Equipment Level for Weekends/Holidays {W}, Maximum Equipment Level for Weekends /Holidays {W}," + "Minimum Equipment Level for Design Days {W}, Maximum Equipment Level for Design Days {W}\n"); } int ZoneNum = state.dataHeatBal->ZoneSteamEq(Loop).ZonePtr; @@ -4041,7 +4126,23 @@ namespace InternalHeatGains { print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneSteamEq(Loop).FractionConvected); print(state.files.eio, "{},", state.dataHeatBal->ZoneSteamEq(Loop).EndUseSubcategory); print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneSteamEq(Loop).NomMinDesignLevel); - print(state.files.eio, "{:.3R}\n", state.dataHeatBal->ZoneSteamEq(Loop).NomMaxDesignLevel); + print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneSteamEq(Loop).NomMaxDesignLevel); + + auto &stmeq = state.dataHeatBal->ZoneSteamEq(Loop); + // weekdays + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, stmeq.SchedPtr, DayTypeGroup::Weekday); + print(state.files.eio, "{:.3R},", stmeq.DesignLevel * SchMin); + print(state.files.eio, "{:.3R},", stmeq.DesignLevel * SchMax); + + // weekends/holidays + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, stmeq.SchedPtr, DayTypeGroup::WeekEndHoliday); + print(state.files.eio, "{:.3R},", stmeq.DesignLevel * SchMin); + print(state.files.eio, "{:.3R},", stmeq.DesignLevel * SchMax); + + // design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, stmeq.SchedPtr, DayTypeGroup::DesignDay); + print(state.files.eio, "{:.3R},", stmeq.DesignLevel * SchMin); + print(state.files.eio, "{:.3R}\n", stmeq.DesignLevel * SchMax); } for (int Loop = 1; Loop <= state.dataHeatBal->TotOthEquip; ++Loop) { @@ -4050,7 +4151,11 @@ namespace InternalHeatGains { Format_723, "OtherEquipment", "Equipment Level {W},Equipment/Floor Area {W/m2},Equipment per person {W/person},Fraction Latent,Fraction Radiant,Fraction " - "Lost,Fraction Convected,Nominal Minimum Equipment Level {W},Nominal Maximum Equipment Level {W}\n"); + "Lost,Fraction Convected," + "Minimum Equipment Level for All Day Types {W},Maximum Equipment Level for All Day Types {W}," + "Minimum Equipment Level for Weekdays {W}, Maximum Equipment Level for Weekdays {W}," + "Minimum Equipment Level for Weekends/Holidays {W}, Maximum Equipment Level for Weekends /Holidays {W}," + "Minimum Equipment Level for Design Days {W}, Maximum Equipment Level for Design Days {W}\n"); } int ZoneNum = state.dataHeatBal->ZoneOtherEq(Loop).ZonePtr; @@ -4079,7 +4184,23 @@ namespace InternalHeatGains { print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneOtherEq(Loop).FractionLost); print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneOtherEq(Loop).FractionConvected); print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneOtherEq(Loop).NomMinDesignLevel); - print(state.files.eio, "{:.3R}\n", state.dataHeatBal->ZoneOtherEq(Loop).NomMaxDesignLevel); + print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneOtherEq(Loop).NomMaxDesignLevel); + + auto &other = state.dataHeatBal->ZoneOtherEq(Loop); + // weekdays + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, other.SchedPtr, DayTypeGroup::Weekday); + print(state.files.eio, "{:.3R},", other.DesignLevel * SchMin); + print(state.files.eio, "{:.3R},", other.DesignLevel * SchMax); + + // weekends/holidays + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, other.SchedPtr, DayTypeGroup::WeekEndHoliday); + print(state.files.eio, "{:.3R},", other.DesignLevel * SchMin); + print(state.files.eio, "{:.3R},", other.DesignLevel * SchMax); + + // design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, other.SchedPtr, DayTypeGroup::DesignDay); + print(state.files.eio, "{:.3R},", other.DesignLevel * SchMin); + print(state.files.eio, "{:.3R}\n", other.DesignLevel * SchMax); } for (int Loop = 1; Loop <= state.dataHeatBal->TotITEquip; ++Loop) { @@ -4090,7 +4211,11 @@ namespace InternalHeatGains { "Equipment Level {W}," "Equipment/Floor Area {W/m2},Equipment per person {W/person}," "Fraction Convected,CPU End-Use SubCategory,Fan End-Use SubCategory,UPS End-Use SubCategory," - "Nominal Minimum Equipment Level {W},Nominal Maximum Equipment Level {W}, Design Air Volume Flow Rate {m3/s}\n"); + "Minimum Equipment Level for All Day Types {W},Maximum Equipment Level for All Day Types {W}," + "Minimum Equipment Level for Weekdays {W}, Maximum Equipment Level for Weekdays {W}," + "Minimum Equipment Level for Weekends/Holidays {W}, Maximum Equipment Level for Weekends /Holidays {W}," + "Minimum Equipment Level for Design Days {W}, Maximum Equipment Level for Design Days {W}," + "Design Air Volume Flow Rate {m3/s}\n"); } int ZoneNum = state.dataHeatBal->ZoneITEq(Loop).ZonePtr; @@ -4111,6 +4236,7 @@ namespace InternalHeatGains { print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneITEq(Loop).DesignTotalPower); print_and_divide_if_greater_than_zero(state.dataHeatBal->ZoneITEq(Loop).DesignTotalPower, state.dataHeatBal->Zone(ZoneNum).FloorArea); + print_and_divide_if_greater_than_zero(state.dataHeatBal->ZoneITEq(Loop).DesignTotalPower, state.dataHeatBal->Zone(ZoneNum).TotOccupants); // ElectricEquipment:ITE:AirCooled is 100% convective print(state.files.eio, "1.0,"); @@ -4120,6 +4246,23 @@ namespace InternalHeatGains { print(state.files.eio, "{},", state.dataHeatBal->ZoneITEq(Loop).EndUseSubcategoryUPS); print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneITEq(Loop).NomMinDesignLevel); print(state.files.eio, "{:.3R},", state.dataHeatBal->ZoneITEq(Loop).NomMaxDesignLevel); + + auto &iteq = state.dataHeatBal->ZoneITEq(Loop); + // weekdays + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, iteq.OperSchedPtr, DayTypeGroup::Weekday); + print(state.files.eio, "{:.3R},", iteq.DesignTotalPower * SchMin); + print(state.files.eio, "{:.3R},", iteq.DesignTotalPower * SchMax); + + // weekends/holidays + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, iteq.OperSchedPtr, DayTypeGroup::WeekEndHoliday); + print(state.files.eio, "{:.3R},", iteq.DesignTotalPower * SchMin); + print(state.files.eio, "{:.3R},", iteq.DesignTotalPower * SchMax); + + // design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, iteq.OperSchedPtr, DayTypeGroup::DesignDay); + print(state.files.eio, "{:.3R},", iteq.DesignTotalPower * SchMin); + print(state.files.eio, "{:.3R},", iteq.DesignTotalPower * SchMax); + print(state.files.eio, "{:.10R}\n", state.dataHeatBal->ZoneITEq(Loop).DesignAirVolFlowRate); } From ed9c634511aea2785778ae37e202e30917a51ed7 Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Mon, 18 Mar 2024 08:03:45 -0500 Subject: [PATCH 04/21] Update output-details-and-examples for People --- .../src/output-files/eplusout-eio.tex | 44 ++++++++++++++----- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/doc/output-details-and-examples/src/output-files/eplusout-eio.tex b/doc/output-details-and-examples/src/output-files/eplusout-eio.tex index 3bd674ccea3..b75952cab5a 100644 --- a/doc/output-details-and-examples/src/output-files/eplusout-eio.tex +++ b/doc/output-details-and-examples/src/output-files/eplusout-eio.tex @@ -1019,17 +1019,17 @@ \subsubsection{Field: Outdoor Controlled Baseboard Heat}\label{field-outdoor-con \subsection{People Gains}\label{people-gains} -! \textless{}People Internal Gains - Nominal\textgreater{},Name,Schedule Name,Zone Name,Zone Floor Area \{m2\},\# Zone Occupants,Number of People \{\},People/Floor Area \{person/m2\},Floor Area per person \{m2/person\},Fraction Radiant,Fraction Convected,Sensible Fraction Calculation,Activity level,ASHRAE 55 Warnings,Carbon Dioxide Generation Rate,Nominal Minimum Number of People,Nominal Maximum Number of People +! \textless{}People Internal Gains - Nominal\textgreater{}, Name, Schedule Name, Zone Name, Zone Floor Area \{m2\}, # Zone Occupants, Number of People \{\}, People/Floor Area \{person/m2\}, Floor Area per person \{m2/person\}, Fraction Radiant, Fraction Convected, Sensible Fraction Calculation, Activity level, ASHRAE 55 Warnings, Carbon Dioxide Generation Rate, Minimum Number of People for All Day Types, Maximum Number of People for All Day Types, Minimum Number of People for Weekdays, Maximum Number of People for Weekdays, Minimum Number of People for Weekends/Holidays, Maximum Number of People for Weekends /Holidays, Minimum Number of People for Design Days, Maximum Number of People for Design Days -People Internal Gains,~ SPACE1-1 PEOPLE 1, OCCUPY-1, SPACE1-1, 99.16, 11.0, 11.0, 0.111, 9.015, 0.300, 0.700, AutoCalculate, ACTSCHD, No, 3.8200E-008, 0, 11 +People Internal Gains Nominal,~ SPACE1-1 PEOPLE 1, OCCUPY-1, SPACE1-1, 90.00, 10.0, 10.0, 0.111, 9.009, 0.300, 0.700, 0.550, ACTSCHD, No, 3.8200E-008, 0.0, 10.0, 0.0, 10.0, 0.0, 0.0, 0.0, 10.0 -~People Internal Gains,~ SPACE2-1 PEOPLE 1, OCCUPY-1, SPACE2-1, 42.74, 5.0, 5.0, 0.117, 8.547, 0.300, 0.700, AutoCalculate, ACTSCHD, No, 3.8200E-008, 0, 5 +~People Internal Gains Nominal,~ SPACE2-1 PEOPLE 1, OCCUPY-1, SPACE2-1, 42.37, 5.0, 5.0, 0.117, 8.547, 0.300, 0.700, 0.550, ACTSCHD, No, 3.8200E-008, 0.0, 5.0, 0.0, 5.0, 0.0, 0.0, 0.0, 5.0 -~People Internal Gains,~ SPACE3-1 PEOPLE 1, OCCUPY-1, SPACE3-1, 96.48, 11.0, 11.0, 0.114, 8.771, 0.300, 0.700, AutoCalculate, ACTSCHD, No, 3.8200E-008, 0, 11 +~People Internal Gains Nominal,~ SPACE3-1 PEOPLE 1, OCCUPY-1, SPACE3-1, 96.48, 11.0, 11.0, 0.114, 8.771, 0.300, 0.700, 0.550, ACTSCHD, No, 3.8200E-008, 0.0, 11.0, 0.0, 11.0, 0.0, 0.0, 0.0, 11.0 -~People Internal Gains,~ SPACE4-1 PEOPLE 1, OCCUPY-1, SPACE4-1, 42.74, 5.0, 5.0, 0.117, 8.547, 0.300, 0.700, AutoCalculate, ACTSCHD, No, 3.8200E-008, 0, 5 +~People Internal Gains Nominal,~ SPACE4-1 PEOPLE 1, OCCUPY-1, SPACE4-1, 42.74, 5.0, 5.0, 0.117, 8.547, 0.300, 0.700, 0.550, ACTSCHD, No, 3.8200E-008, 0.0, 5.0, 0.0, 5.0, 0.0, 0.0, 0.0, 5.0 -~People Internal Gains,~ SPACE5-1 PEOPLE 1, OCCUPY-1, SPACE5-1, 182.49, 20.0, 20.0, 0.110, 9.125, 0.300, 0.700, AutoCalculate, ACTSCHD, No, 3.8200E-008, 0, 20 +~ People Internal Gains Nominal,~ SPACE5-1 PEOPLE 1, OCCUPY-1, SPACE5-1, 182.49, 20.0, 20.0, 0.110, 9.125, 0.300, 0.700, 0.550, ACTSCHD, No, 3.8200E-008, 0.0, 20.0, 0.0, 20.0, 0.0, 0.0, 0.0, 20.0 \subsubsection{Field: \textless{}People Internal Gains - Nominal\textgreater{}}\label{field-people-internal-gains---nominal} @@ -1123,13 +1123,37 @@ \subsubsection{Field: Carbon Dioxide Generation Rate}\label{field-carbon-dioxide Number of People * People Schedule * People Activity * Carbon Dioxide Generation Rate. The default value is 3.82E-8 m3/s-W (obtained from ASHRAE Standard 62.1-2007 value at 0.0084 cfm/met/person over the general adult population). The maximum value can be 10 times the default value. -\subsubsection{Field: Nominal Minimum Number of People}\label{field-nominal-minimum-number-of-people} +\subsubsection{Field: Minimum Number of People for All Day Types}\label{field-minimum-number-of-people-for-all-day-types} -This numeric field is the calculated minimum number of people based on the number of people field * the minimum value (annual) for the people schedule. It may be useful in diagnosing errors that occur during simulation. +This numeric field is the calculated minimum number of people based on the number of people field * the minimum value for the people schedule across all day types (weekday, weekends, holidays, design days and custom days). It may be useful in diagnosing errors that occur during simulation. -\subsubsection{Field: Nominal Maximum Number of People}\label{field-nominal-maximum-number-of-people} +\subsubsection{Field: Maximum Number of People for All Day Types}\label{field-maximum-number-of-people-for-all-day-types} -This numeric field is the calculated maximum number of people based on the number of people field * the maxnimum value (annual) for the people schedule. It may be useful in diagnosing errors that occur during simulation. +This numeric field is the calculated maximum number of people based on the number of people field * the maximum value for the people schedule across all day types (weekday, weekends, holidays, design days and custom days). It may be useful in diagnosing errors that occur during simulation. + +\subsubsection{Field: Minimum Number of People for Weekdays}\label{field-minimum-number-of-people-for-weekdays} + +This numeric field is the calculated minimum number of people based on the number of people field * the minimum value for the people schedule for weekday day types (Monday through Friday). + +\subsubsection{Field: Maximum Number of People for Weekdays}\label{field-maximum-number-of-people-for-weekdays} + +This numeric field is the calculated maximum number of people based on the number of people field * the maximum value for the people schedule for weekend day types (Monday through Friday). + +\subsubsection{Field: Minimum Number of People for Weekends/Holidays}\label{field-minimum-number-of-people-for-weekends-holidays} + +This numeric field is the calculated minimum number of people based on the number of people field * the minimum value for the people schedule for weekend (Saturday and Sunday) or holiday day types. + +\subsubsection{Field: Maximum Number of People for Weekends/Holidays}\label{field-maximum-number-of-people-for-weekends-holidays} + +This numeric field is the calculated maximum number of people based on the number of people field * the maximum value for the people schedule for weekend (Saturday and Sunday) or holiday day types + +\subsubsection{Field: Minimum Number of People for Design Days}\label{field-minimum-number-of-people-for-designdays} + +This numeric field is the calculated minimum number of people based on the number of people field * the minimum value for the people schedule for design day types (SummerDesignDay and WinterDesignDay). + +\subsubsection{Field: Maximum Number of People for Design Days}\label{field-maximum-number-of-people-for-designdays} + +This numeric field is the calculated maximum number of people based on the number of people field * the maximum value for the people schedule for design day types (SummerDesignDay and WinterDesignDay). \subsection{Lights Gains}\label{lights-gains} From 895537498b0faa14e8574a5444cc57b3e89f87c0 Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Mon, 18 Mar 2024 10:55:38 -0500 Subject: [PATCH 05/21] Add new EIO outputs for remaining changes to output-details-and-examples --- .../src/output-files/eplusout-eio.tex | 132 ++++++++++++++---- 1 file changed, 103 insertions(+), 29 deletions(-) diff --git a/doc/output-details-and-examples/src/output-files/eplusout-eio.tex b/doc/output-details-and-examples/src/output-files/eplusout-eio.tex index b75952cab5a..9ecf831f6f5 100644 --- a/doc/output-details-and-examples/src/output-files/eplusout-eio.tex +++ b/doc/output-details-and-examples/src/output-files/eplusout-eio.tex @@ -1019,7 +1019,7 @@ \subsubsection{Field: Outdoor Controlled Baseboard Heat}\label{field-outdoor-con \subsection{People Gains}\label{people-gains} -! \textless{}People Internal Gains - Nominal\textgreater{}, Name, Schedule Name, Zone Name, Zone Floor Area \{m2\}, # Zone Occupants, Number of People \{\}, People/Floor Area \{person/m2\}, Floor Area per person \{m2/person\}, Fraction Radiant, Fraction Convected, Sensible Fraction Calculation, Activity level, ASHRAE 55 Warnings, Carbon Dioxide Generation Rate, Minimum Number of People for All Day Types, Maximum Number of People for All Day Types, Minimum Number of People for Weekdays, Maximum Number of People for Weekdays, Minimum Number of People for Weekends/Holidays, Maximum Number of People for Weekends /Holidays, Minimum Number of People for Design Days, Maximum Number of People for Design Days +! \textless{}People Internal Gains - Nominal\textgreater{}, Name, Schedule Name, Zone Name, Zone Floor Area \{m2\}, \# Zone Occupants, Number of People \{\}, People/Floor Area \{person/m2\}, Floor Area per person \{m2/person\}, Fraction Radiant, Fraction Convected, Sensible Fraction Calculation, Activity level, ASHRAE 55 Warnings, Carbon Dioxide Generation Rate, Minimum Number of People for All Day Types, Maximum Number of People for All Day Types, Minimum Number of People for Weekdays, Maximum Number of People for Weekdays, Minimum Number of People for Weekends/Holidays, Maximum Number of People for Weekends /Holidays, Minimum Number of People for Design Days, Maximum Number of People for Design Days People Internal Gains Nominal,~ SPACE1-1 PEOPLE 1, OCCUPY-1, SPACE1-1, 90.00, 10.0, 10.0, 0.111, 9.009, 0.300, 0.700, 0.550, ACTSCHD, No, 3.8200E-008, 0.0, 10.0, 0.0, 10.0, 0.0, 0.0, 0.0, 10.0 @@ -1137,7 +1137,7 @@ \subsubsection{Field: Minimum Number of People for Weekdays}\label{field-minimum \subsubsection{Field: Maximum Number of People for Weekdays}\label{field-maximum-number-of-people-for-weekdays} -This numeric field is the calculated maximum number of people based on the number of people field * the maximum value for the people schedule for weekend day types (Monday through Friday). +This numeric field is the calculated maximum number of people based on the number of people field * the maximum value for the people schedule for weekday day types (Monday through Friday). \subsubsection{Field: Minimum Number of People for Weekends/Holidays}\label{field-minimum-number-of-people-for-weekends-holidays} @@ -1157,17 +1157,15 @@ \subsubsection{Field: Maximum Number of People for Design Days}\label{field-maxi \subsection{Lights Gains}\label{lights-gains} -! \textless{}Lights Internal Gains - Nominal\textgreater{}, Name, Schedule Name, Zone Name, Zone Floor Area \{m2\}, \# Zone Occupants, Lighting Level \{W\}, Lights/Floor Area \{W/m2\}, Lights per person \{W/person\}, Fraction Return Air, Fraction Radiant, Fraction Short Wave, Fraction Convected, Fraction Replaceable, End-Use Category, Nominal Minimum Lighting Level \{W\}, Nominal Maximum Lighting Level \{W\} +! \textless{}Lights Internal Gains Nominal\textgreater{}, Name, Schedule Name, Zone Name, Zone Floor Area \{m2\}, \# Zone Occupants, Lighting Level \{W\}, Lights/Floor Area \{W/m2\}, Lights per person \{W/person\}, Fraction Return Air, Fraction Radiant, Fraction Short Wave, Fraction Convected, Fraction Replaceable, End-Use, Minimum Lighting Level for All Day Types \{W\}, Maximum Lighting Level for All Day Types \{W\}, Minimum Lighting Level for Weekdays \{W\}, Maximum Lighting Level for Weekdays \{W\}, Minimum Lighting Level for Weekends/Holidays \{W\}, Maximum Lighting Level for Weekends /Holidays \{W\}, Minimum Lighting Level for Design Days \{W\}, Maximum Lighting Level for Design Days \{W\} -Lights Internal Gains,~ SPACE1-1 LIGHTS 1, LIGHTS-1, SPACE1-1, 99.16, 11.0, 1584.000, 15.974, 144.000, 0.200, 0.590, 0.200, 1.000E-002, 0.000, GeneralLights, 79.200, 1584.000 +Lights Internal Gains Nominal,~ SPACE1-1 LIGHTS 1, LIGHTS-1, SPACE1-1, 90.00, 10.0, 1437.660, 15.974, 143.910, 0.200, 0.590, 0.200, 1.000E-002, 1.000, General, 71.883, 1437.660, 71.883, 1437.7, 71.883, 71.883, 71.883, 1437.660 -~Lights Internal Gains,~ SPACE2-1 LIGHTS 1, LIGHTS-1, SPACE2-1, 42.74, 5.0, 684.000, 16.006, 136.800, 0.200, 0.590, 0.200, 1.000E-002, 0.000, GeneralLights, 34.200, 684.000 +~Lights Internal Gains Nominal,~ SPACE1-1 LIGHTS 2, LIGHTS-1, SPACE1-1, 90.00, 10.0, 480.000, 5.333, 48.048, 0.200, 0.590, 0.200, 1.000E-002, 0.000, Task Lights, 24.000, 480.000, 24.000, 480.0, 24.000, 24.000, 24.000, 480.000 -~Lights Internal Gains,~ SPACE3-1 LIGHTS 1, LIGHTS-1, SPACE3-1, 96.48, 11.0, 1584.000, 16.418, 144.000, 0.200, 0.590, 0.200, 1.000E-002, 0.000, GeneralLights, 79.200, 1584.000 +~Lights Internal Gains Nominal,~ SPACE2-1 LIGHTS 1, LIGHTS-1, SPACE2-1, 42.37, 5.0, 678.142, 16.006, 136.800, 0.200, 0.590, 0.200, 1.000E-002, 1.000, General, 33.907, 678.142, 33.907, 678.1, 33.907, 33.907, 33.907, 678.142 -~Lights Internal Gains,~ SPACE4-1 LIGHTS 1, LIGHTS-1, SPACE4-1, 42.74, 5.0, 684.000, 16.006, 136.800, 0.200, 0.590, 0.200, 1.000E-002, 0.000, GeneralLights, 34.200, 684.000 - -~Lights Internal Gains,~ SPACE5-1 LIGHTS 1, LIGHTS-1, SPACE5-1, 182.49, 20.0, 2964.000, 16.242, 148.200, 0.200, 0.590, 0.200, 1.000E-002, 0.000, GeneralLights, 148.200, 2964.000 +~Lights Internal Gains Nominal,~ SPACE2-1 LIGHTS 2, LIGHTS-1, SPACE2-1, 42.37, 5.0, 684.000, 16.144, 137.982, 0.200, 0.590, 0.200, 1.000E-002, 0.000, Accent Lighting, 34.200, 684.000, 34.200, 684.0, 34.200, 34.200, 34.200, 684.000 \subsubsection{Field: \textless{}Lights Internal Gains - Nominal\textgreater{}}\label{field-lights-internal-gains---nominal} @@ -1229,29 +1227,51 @@ \subsubsection{Field: End-Use Category}\label{field-end-use-category} This field shows the end-use category for this lights statement. Usage can be reported by end-use category. -\subsubsection{Field: Nominal Minimum Lighting Level \{W\}}\label{field-nominal-minimum-lighting-level-w} +\subsubsection{Field: Minimum Lighting Level for All Day Types \{W\}}\label{field-minimum-lighting-level-for-all-day-types-w} + +This numeric field is the calculated minimum amount of lighting in Watts based on the calculated lighting level (above) * the minimum value for the lights schedule across all day types (weekday, weekends, holidays, design days and custom days). It may be useful in diagnosing errors that occur during simulation. + +\subsubsection{Field: Maximum Lighting Level for All Day Types \{W\}}\label{field-maximum-lighting-level-for-all-day-types-w} + +This numeric field is the calculated maximum amount of lighting in Watts based on the calculated lighting level (above) * the maximum value for the lights schedule across all day types (weekday, weekends, holidays, design days and custom days). It may be useful in diagnosing errors that occur during simulation. + +\subsubsection{Field: Minimum Lighting Level for Weekdays \{W\}}\label{field-minimum-lighting-level-for-weekdays-w} + +This numeric field is the calculated minimum amount of lighting in Watts based on the calculated lighting level (above) * the minimum value for the lights schedule for weekday day types (Monday through Friday). + +\subsubsection{Field: Maximum Lighting Level for Weekdays \{W\}}\label{field-maximum-lighting-level-for-weekdays-w} + +This numeric field is the calculated maximum amount of lighting in Watts based on the calculated lighting level (above) * the maximum value for the lights schedule for weekday day types (Monday through Friday). + +\subsubsection{Field: Minimum Lighting Level for Weekends/Holidays \{W\}}\label{field-minimum-lighting-level-for-weekends-holidays-w} + +This numeric field is the calculated minimum amount of lighting in Watts based on the calculated lighting level (above) * the minimum value for the lights schedule for weekend (Saturday and Sunday) or holiday day types. + +\subsubsection{Field: Maximum Lighting Level for Weekends/Holidays \{W\}}\label{field-maximum-lighting-level-for-weekends-holidays-w} -This numeric field is the calculated minimum amount of lighting in Watts based on the calculated lighting level (above) * the minimum value (annual) for the lights schedule. It may be useful in diagnosing errors that occur during simulation. +This numeric field is the calculated maximum amount of lighting in Watts based on the calculated lighting level (above) * the maximum value for the lights schedule for weekend (Saturday and Sunday) or holiday day types. -\subsubsection{Field: Nominal Maximum Lighting Level \{W\}}\label{field-nominal-maximum-lighting-level-w} +\subsubsection{Field: Minimum Lighting Level for Design Days \{W\}}\label{field-minimum-lighting-level-for-designdays-w} -This numeric field is the calculated maximum amount of lighting in Watts based on the calculated lighting level (above) * the maximum value (annual) for the lights schedule. It may be useful in diagnosing errors that occur during simulation. +This numeric field is the calculated minimum amount of lighting in Watts based on the calculated lighting level (above) * the minimum value for the lights schedule for design day types (SummerDesignDay and WinterDesignDay). + +\subsubsection{Field: Maximum Lighting Level for Design Days \{W\}}\label{field-maximum-lighting-level-for-designdays-w} + +This numeric field is the calculated maximum amount of lighting in Watts based on the calculated lighting level (above) * the maximum value for the lights schedule for design day types (SummerDesignDay and WinterDesignDay). \subsection{Equipment (Electric, Gas, Steam, Hot Water) Gains}\label{equipment-electric-gas-steam-hot-water-gains} These equipments are all reported similarly. Electric Equipment is used in the example below: -! \textless{}ElectricEquipment Internal Gains - Nominal\textgreater{}, Name, Schedule Name, Zone Name, Zone Floor Area \{m2\}, \# Zone Occupants, Equipment Level \{W\}, Equipment/Floor Area \{W/m2\}, Equipment per person \{W/person\}, Fraction Latent, Fraction Radiant, Fraction Lost, Fraction Convected, End-Use SubCategory, Nominal Minimum Equipment Level \{W\}, Nominal Maximum Equipment Level \{W\} - -ElectricEquipment Internal Gains,~ SPACE1-1 ELECEQ 1, EQUIP-1, SPACE1-1, 99.16, 11.0, 1056.000, 10.649, 96.000, 0.000, 0.300, 0.000, 0.700, General, 21.120, 950.400 +! \textless{}ElectricEquipment Internal Gains Nominal\textgreater{}, Name, Schedule Name, Zone Name, Zone Floor Area \{m2\}, \# Zone Occupants,Equipment Level \{W\}, Equipment/Floor Area \{W/m2\}, Equipment per person \{W/person\},Fraction Latent,Fraction Radiant, Fraction Lost, Fraction Convected, End-Use SubCategory, Minimum Equipment Level for All Day Types \{W\}, Maximum Equipment Level for All Day Types \{W\}, Minimum Equipment Level for Weekdays \{W\}, Maximum Equipment Level for Weekdays \{W\}, Minimum Equipment Level for Weekends/Holidays \{W\}, Maximum Equipment Level for Weekends /Holidays \{W\}, Minimum Equipment Level for Design Days \{W\}, Maximum Equipment Level for Design Days \{W\} -~ElectricEquipment Internal Gains,~ SPACE2-1 ELECEQ 1, EQUIP-1, SPACE2-1, 42.74, 5.0, 456.000, 10.670, 91.200, 0.000, 0.300, 0.000, 0.700, General, 9.120, 410.400 +ElectricEquipment Internal Gains Nominal,~ SPACE1-1 ELECEQ 1, EQUIP-1, SPACE1-1, 90.00, 10.0, 958.410, 10.649, 95.937, 0.000, 0.300, 0.000, 0.700, Computers, 19.168, 862.569, 19.168, 862.569, 191.682, 191.682, 19.168, 862.569 -~ElectricEquipment Internal Gains,~ SPACE3-1 ELECEQ 1, EQUIP-1, SPACE3-1, 96.48, 11.0, 1056.000, 10.945, 96.000, 0.000, 0.300, 0.000, 0.700, General, 21.120, 950.400 +~ElectricEquipment Internal Gains Nominal,~ SPACE1-1 ELECEQ 2, EQUIP-1, SPACE1-1, 90.00, 10.0, 200.000, 2.222, 20.020, 0.000, 0.300, 0.000, 0.700, Copy Machines, 4.000, 180.000, 4.000, 180.000, 40.000, 40.000, 4.000, 180.000 -~ElectricEquipment Internal Gains,~ SPACE4-1 ELECEQ 1, EQUIP-1, SPACE4-1, 42.74, 5.0, 456.000, 10.670, 91.200, 0.000, 0.300, 0.000, 0.700, General, 9.120, 410.400 +~ElectricEquipment Internal Gains Nominal,~ SPACE1-1 ELECEQ 3, EQUIP-1, SPACE1-1, 90.00, 10.0, 200.000, 2.222, 20.020, 0.000, 0.100, 0.000, 0.900, People Movers, 4.000, 180.000, 4.000, 180.000, 40.000, 40.000, 4.000, 180.000 -~ElectricEquipment Internal Gains,~ SPACE5-1 ELECEQ 1, EQUIP-1, SPACE5-1, 182.49, 20.0, 1976.000, 10.828, 98.800, 0.000, 0.300, 0.000, 0.700, General, 39.520, 1778.400 +~ElectricEquipment Internal Gains Nominal,~ SPACE2-1 ELECEQ 1, EQUIP-1, SPACE2-1, 42.37, 5.0, 452.095, 10.670, 91.200, 0.000, 0.300, 0.000, 0.700, Computers, 9.042, 406.885, 9.042, 406.885, 90.419, 90.419, 9.042, 406.885 \subsubsection{Field: \textless{}{[}Specific{]} Equipment Internal Gains - Nominal\textgreater{}}\label{field-specific-equipment-internal-gains---nominal} @@ -1309,19 +1329,45 @@ \subsubsection{Field: End-Use SubCategory}\label{field-end-use-subcategory} This field shows the end-use category for this statement. Usage can be reported by end-use category. -\subsubsection{Field: Nominal Minimum Equipment Level \{W\}}\label{field-nominal-minimum-equipment-level-w} -This numeric field is the calculated minimum amount of the equipment in Watts based on the calculated design level (above) * the minimum value (annual) for the equipment schedule. It may be useful in diagnosing errors that occur during simulation. -\subsubsection{Field: Nominal Maximum Equipment Level \{W\}}\label{field-nominal-maximum-equipment-level-w} +\subsubsection{Field: Minimum Equipment Level for All Day Types \{W\}}\label{field-minimum-equipment-level-for-all-day-types-w} + +This numeric field is the calculated minimum amount of the equipment in Watts based on the calculated design level (above) * the minimum value for the equipment schedule across all day types (weekday, weekends, holidays, design days and custom days). It may be useful in diagnosing errors that occur during simulation. + +\subsubsection{Field: Maximum Equipment Level for All Day Types \{W\}}\label{field-maximum-equipment-level-for-all-day-types-w} + +This numeric field is the calculated maximum amount of the equipment in Watts based on the calculated design level (above) * the maximum value for the equipment schedule across all day types (weekday, weekends, holidays, design days and custom days). It may be useful in diagnosing errors that occur during simulation. + +\subsubsection{Field: Minimum Equipment Level for Weekdays \{W\}}\label{field-minimum-equipment-level-for-weekdays-w} + +This numeric field is the calculated minimum amount of the equipment in Watts based on the calculated design level (above) * the minimum value for the equipment schedule across weekday day types (Monday through Friday). + +\subsubsection{Field: Maximum Equipment Level for Weekdays \{W\}}\label{field-maximum-equipment-level-for-weekdays-w} + +This numeric field is the calculated maximum amount of the equipment in Watts based on the calculated design level (above) * the maximum value for the equipment schedule across weekday day types (Monday through Friday). + +\subsubsection{Field: Minimum Equipment Level for Weekends/Holidays \{W\}}\label{field-minimum-equipment-level-for-weekends-holidays-w} -This numeric field is the calculated maximum amount of the equipment in Watts based on the calculated design level (above) * the maximum value (annual) for the equipment schedule. It may be useful in diagnosing errors that occur during simulation. +This numeric field is the calculated minimum amount of the equipment in Watts based on the calculated design level (above) * the minimum value for the equipment schedule across weekend (Saturday and Sunday) or holiday day types. + +\subsubsection{Field: Maximum Equipment Level for Weekends/Holidays \{W\}}\label{field-maximum-equipment-level-for-weekends-holidays-w} + +This numeric field is the calculated maximum amount of the equipment in Watts based on the calculated design level (above) * the maximum value for the equipment schedule across weekend (Saturday and Sunday) or holiday day types. + +\subsubsection{Field: Minimum Equipment Level for Design Days \{W\}}\label{field-minimum-equipment-level-for-designdays-w} + +This numeric field is the calculated minimum amount of the equipment in Watts based on the calculated design level (above) * the minimum value for the equipment schedule across design day types (SummerDesignDay and WinterDesignDay). + +\subsubsection{Field: Maximum Equipment Level for Design Days \{W\}}\label{field-maximum-equipment-level-for-designdays-w} + +This numeric field is the calculated maximum amount of the equipment in Watts based on the calculated design level (above) * the maximum value for the equipment schedule across design day types (SummerDesignDay and WinterDesignDay). \subsection{Other Equipment Gains}\label{other-equipment-gains} Other equipment report is shown below (does not have an end-use category -- is not attached to any normal meter): -! \textless{}OtherEquipment Internal Gains - Nominal\textgreater{}, Name, Schedule Name, Zone Name, Zone Floor Area \{m2\}, \# Zone Occupants, Equipment Level \{W\}, Equipment/Floor Area \{W/m2\}, Equipment per person \{W/person\}, Fraction Latent, Fraction Radiant, Fraction Lost, Fraction Convected, Nominal Minimum Equipment Level \{W\}, Nominal Maximum Equipment Level \{W\} +! \textless{}OtherEquipment Internal Gains - Nominal\textgreater{}, Name, Schedule Name, Zone Name, Zone Floor Area \{m2\}, \# Zone Occupants, Equipment Level \{W\}, Equipment/Floor Area \{W/m2\}, Equipment per person \{W/person\}, Fraction Latent, Fraction Radiant, Fraction Lost, Fraction Convected, Minimum Equipment Level for All Day Types \{W\}, Maximum Equipment Level for All Day Types \{W\}, Minimum Equipment Level for Weekdays \{W\}, Maximum Equipment Level for Weekdays \{W\}, Minimum Equipment Level for Weekends/Holidays \{W\}, Maximum Equipment Level for Weekends /Holidays \{W\}, Minimum Equipment Level for Design Days \{W\}, Maximum Equipment Level for Design Days \{W\} OtherEquipment Internal Gains,~ TEST 352A, ALWAYSON, ZONE ONE, 232.26, 0.0, 352.000, 1.516, N/A, 0.000, 0.000, 0.000, 1.000, 352.000, 352.000 @@ -1379,13 +1425,41 @@ \subsubsection{Field: Fraction Convected}\label{field-fraction-convected-3} This is the fraction convected for this equipment. -\subsubsection{Field: Nominal Minimum Equipment Level \{W\}}\label{field-nominal-minimum-equipment-level-w-1} -This numeric field is the calculated minimum amount of the equipment in Watts based on the calculated design level (above) * the minimum value (annual) for the equipment schedule. It may be useful in diagnosing errors that occur during simulation. -\subsubsection{Field: Nominal Maximum Equipment Level \{W\}}\label{field-nominal-maximum-equipment-level-w-1} -This numeric field is the calculated maximum amount of the equipment in Watts based on the calculated design level (above) * the maximum value (annual) for the equipment schedule. It may be useful in diagnosing errors that occur during simulation. +\subsubsection{Field: Minimum Equipment Level for All Day Types \{W\}}\label{field-minimum-equipment-level-for-all-day-types-w-1} + +This numeric field is the calculated minimum amount of the equipment in Watts based on the calculated design level (above) * the minimum value for the equipment schedule across all day types (weekday, weekends, holidays, design days and custom days). It may be useful in diagnosing errors that occur during simulation. + +\subsubsection{Field: Maximum Equipment Level for All Day Types \{W\}}\label{field-maximum-equipment-level-for-all-day-types-w-1} + +This numeric field is the calculated maximum amount of the equipment in Watts based on the calculated design level (above) * the maximum value for the equipment schedule across all day types (weekday, weekends, holidays, design days and custom days). It may be useful in diagnosing errors that occur during simulation. + +\subsubsection{Field: Minimum Equipment Level for Weekdays \{W\}}\label{field-minimum-equipment-level-for-weekdays-w-1} + +This numeric field is the calculated minimum amount of the equipment in Watts based on the calculated design level (above) * the minimum value for the equipment schedule across weekday day types (Monday through Friday). + +\subsubsection{Field: Maximum Equipment Level for Weekdays \{W\}}\label{field-maximum-equipment-level-for-weekdays-w-1} + +This numeric field is the calculated maximum amount of the equipment in Watts based on the calculated design level (above) * the maximum value for the equipment schedule across weekday day types (Monday through Friday). + +\subsubsection{Field: Minimum Equipment Level for Weekends/Holidays \{W\}}\label{field-minimum-equipment-level-for-weekends-holidays-w-1} + +This numeric field is the calculated minimum amount of the equipment in Watts based on the calculated design level (above) * the minimum value for the equipment schedule across weekend (Saturday and Sunday) or holiday day types. + +\subsubsection{Field: Maximum Equipment Level for Weekends/Holidays \{W\}}\label{field-maximum-equipment-level-for-weekends-holidays-w-1} + +This numeric field is the calculated maximum amount of the equipment in Watts based on the calculated design level (above) * the maximum value for the equipment schedule across weekend (Saturday and Sunday) or holiday day types. + +\subsubsection{Field: Minimum Equipment Level for Design Days \{W\}}\label{field-minimum-equipment-level-for-designdays-w-1} + +This numeric field is the calculated minimum amount of the equipment in Watts based on the calculated design level (above) * the minimum value for the equipment schedule across design day types (SummerDesignDay and WinterDesignDay). + +\subsubsection{Field: Maximum Equipment Level for Design Days \{W\}}\label{field-maximum-equipment-level-for-designdays-w-1} + +This numeric field is the calculated maximum amount of the equipment in Watts based on the calculated design level (above) * the maximum value for the equipment schedule across design day types (SummerDesignDay and WinterDesignDay). + \subsection{Outdoor Controlled Baseboard Heat}\label{outdoor-controlled-baseboard-heat} From 5957438645b4b1c443731e8cfc27884fec460d33 Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Tue, 9 Apr 2024 07:37:22 -0500 Subject: [PATCH 06/21] Using constexpr for dayfilters --- src/EnergyPlus/ScheduleManager.cc | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/EnergyPlus/ScheduleManager.cc b/src/EnergyPlus/ScheduleManager.cc index 1b91d7ab28b..da2335488b2 100644 --- a/src/EnergyPlus/ScheduleManager.cc +++ b/src/EnergyPlus/ScheduleManager.cc @@ -4497,6 +4497,15 @@ namespace ScheduleManager { // finds the minimum and maximum for a specific set of day types for a given schedule Real64 MinValue = Constant::BigNumber; Real64 MaxValue = -Constant::BigNumber; + // Sun Mon Tues Wed Thur Fri Sat Hol Summer Winter Cust1 Cust2 + constexpr std::array dayTypeFilterWkDy = { + false, true, true, true, true, true, false, false, false, false, false, false}; + constexpr std::array dayTypeFilterWeHo = { + true, false, false, false, false, false, true, true, false, false, false, false}; + constexpr std::array dayTypeFilterDsDy = { + false, false, false, false, false, false, false, false, true, true, false, false}; + constexpr std::array dayTypeFilterNone = { + false, false, false, false, false, false, false, false, false, false, false, false}; if (ScheduleIndex == -1) { MinValue = 1.0; MaxValue = 1.0; @@ -4506,21 +4515,20 @@ namespace ScheduleManager { } else if (ScheduleIndex < 1 || ScheduleIndex > state.dataScheduleMgr->NumSchedules) { ShowFatalError(state, "getScheduleMinMaxByDayType called with ScheduleIndex out of range"); } else if (ScheduleIndex > 0) { - std::vector dayTypeFilter(maxDayTypes); + std::array dayTypeFilter; std::fill(dayTypeFilter.begin(), dayTypeFilter.end(), false); switch (days) { case DayTypeGroup::Weekday: - // Sun Mon Tues Wed Thur Fri Sat Sun Summer Winter Cust1 Cust2 - dayTypeFilter = {false, true, true, true, true, true, false, false, false, false, false, false}; + dayTypeFilter = dayTypeFilterWkDy; break; case DayTypeGroup::WeekEndHoliday: - dayTypeFilter = {true, false, false, false, false, false, true, true, false, false, false, false}; + dayTypeFilter = dayTypeFilterWeHo; break; case DayTypeGroup::DesignDay: - dayTypeFilter = {false, false, false, false, false, false, false, false, true, true, false, false}; + dayTypeFilter = dayTypeFilterDsDy; break; default: - dayTypeFilter = {false, false, false, false, false, false, false, false, false, false, false, false}; + dayTypeFilter = dayTypeFilterNone; break; } for (int iDayOfYear = 1; iDayOfYear <= 366; ++iDayOfYear) { From f32e3c7f3c26839e57df18ec225c58145a458ea3 Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Tue, 9 Apr 2024 09:24:58 -0500 Subject: [PATCH 07/21] clean ups --- src/EnergyPlus/ScheduleManager.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/EnergyPlus/ScheduleManager.cc b/src/EnergyPlus/ScheduleManager.cc index da2335488b2..9868146c20f 100644 --- a/src/EnergyPlus/ScheduleManager.cc +++ b/src/EnergyPlus/ScheduleManager.cc @@ -4536,9 +4536,9 @@ namespace ScheduleManager { auto &weekSch = state.dataScheduleMgr->WeekSchedule(WkSch); for (int jType = 1; jType <= maxDayTypes; ++jType) { if (dayTypeFilter[jType - 1]) { - auto &daySch = state.dataScheduleMgr->DaySchedule; - MinValue = min(MinValue, minval(daySch(weekSch.DaySchedulePointer(jType)).TSValue)); - MaxValue = max(MaxValue, maxval(daySch(weekSch.DaySchedulePointer(jType)).TSValue)); + auto &daySch = state.dataScheduleMgr->DaySchedule(weekSch.DaySchedulePointer(jType)); + MinValue = min(MinValue, minval(daySch.TSValue)); + MaxValue = max(MaxValue, maxval(daySch.TSValue)); } } } From 5f0010aa11f1e531e2e69d880c599e4c4ddfb68e Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Tue, 9 Apr 2024 09:43:06 -0500 Subject: [PATCH 08/21] clang format (although not actually better) --- src/EnergyPlus/ScheduleManager.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/EnergyPlus/ScheduleManager.cc b/src/EnergyPlus/ScheduleManager.cc index 9868146c20f..f4544a61d3b 100644 --- a/src/EnergyPlus/ScheduleManager.cc +++ b/src/EnergyPlus/ScheduleManager.cc @@ -4498,10 +4498,8 @@ namespace ScheduleManager { Real64 MinValue = Constant::BigNumber; Real64 MaxValue = -Constant::BigNumber; // Sun Mon Tues Wed Thur Fri Sat Hol Summer Winter Cust1 Cust2 - constexpr std::array dayTypeFilterWkDy = { - false, true, true, true, true, true, false, false, false, false, false, false}; - constexpr std::array dayTypeFilterWeHo = { - true, false, false, false, false, false, true, true, false, false, false, false}; + constexpr std::array dayTypeFilterWkDy = {false, true, true, true, true, true, false, false, false, false, false, false}; + constexpr std::array dayTypeFilterWeHo = {true, false, false, false, false, false, true, true, false, false, false, false}; constexpr std::array dayTypeFilterDsDy = { false, false, false, false, false, false, false, false, true, true, false, false}; constexpr std::array dayTypeFilterNone = { From af8fde5e1be383d752dcbaddb3e2eaaf6d1a6ad5 Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Tue, 9 Apr 2024 15:56:00 -0500 Subject: [PATCH 09/21] Incorporate suggested code changes --- src/EnergyPlus/ScheduleManager.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/EnergyPlus/ScheduleManager.cc b/src/EnergyPlus/ScheduleManager.cc index f4544a61d3b..aa6cea6ff8f 100644 --- a/src/EnergyPlus/ScheduleManager.cc +++ b/src/EnergyPlus/ScheduleManager.cc @@ -4497,24 +4497,16 @@ namespace ScheduleManager { // finds the minimum and maximum for a specific set of day types for a given schedule Real64 MinValue = Constant::BigNumber; Real64 MaxValue = -Constant::BigNumber; - // Sun Mon Tues Wed Thur Fri Sat Hol Summer Winter Cust1 Cust2 + // Sun Mon Tues Wed Thur Fri Sat Hol Summer Winter Cust1 Cust2 constexpr std::array dayTypeFilterWkDy = {false, true, true, true, true, true, false, false, false, false, false, false}; constexpr std::array dayTypeFilterWeHo = {true, false, false, false, false, false, true, true, false, false, false, false}; + // Sun Mon Tues Wed Thur Fri Sat Hol Summer Winter Cust1 Cust2 constexpr std::array dayTypeFilterDsDy = { false, false, false, false, false, false, false, false, true, true, false, false}; constexpr std::array dayTypeFilterNone = { false, false, false, false, false, false, false, false, false, false, false, false}; - if (ScheduleIndex == -1) { - MinValue = 1.0; - MaxValue = 1.0; - } else if (ScheduleIndex == 0) { - MinValue = 0.0; - MaxValue = 0.0; - } else if (ScheduleIndex < 1 || ScheduleIndex > state.dataScheduleMgr->NumSchedules) { - ShowFatalError(state, "getScheduleMinMaxByDayType called with ScheduleIndex out of range"); - } else if (ScheduleIndex > 0) { + if (ScheduleIndex > 0 && ScheduleIndex <= state.dataScheduleMgr->NumSchedules) { std::array dayTypeFilter; - std::fill(dayTypeFilter.begin(), dayTypeFilter.end(), false); switch (days) { case DayTypeGroup::Weekday: dayTypeFilter = dayTypeFilterWkDy; @@ -4542,6 +4534,14 @@ namespace ScheduleManager { } if (MinValue == Constant::BigNumber) MinValue = 0; if (MaxValue == -Constant::BigNumber) MaxValue = 0; + } else if (ScheduleIndex == -1) { + MinValue = 1.0; + MaxValue = 1.0; + } else if (ScheduleIndex == 0) { + MinValue = 0.0; + MaxValue = 0.0; + } else { + ShowFatalError(state, "getScheduleMinMaxByDayType called with ScheduleIndex out of range"); } return std::make_pair(MinValue, MaxValue); } From e43700672a486ad0cdc1f833e792fd5174d3fa35 Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Wed, 10 Apr 2024 13:29:21 -0500 Subject: [PATCH 10/21] Store the min and max to speed up multiple calls for same schedule. Changed to use ScheduleAlwaysOn and Off. --- src/EnergyPlus/ScheduleManager.cc | 130 +++++++++++--------- src/EnergyPlus/ScheduleManager.hh | 5 + tst/EnergyPlus/unit/ScheduleManager.unit.cc | 7 ++ 3 files changed, 83 insertions(+), 59 deletions(-) diff --git a/src/EnergyPlus/ScheduleManager.cc b/src/EnergyPlus/ScheduleManager.cc index aa6cea6ff8f..15b72e6fcfe 100644 --- a/src/EnergyPlus/ScheduleManager.cc +++ b/src/EnergyPlus/ScheduleManager.cc @@ -2691,9 +2691,9 @@ namespace ScheduleManager { // na // Checking if valid index is passed is necessary - if (ScheduleIndex == -1) { + if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOn) { return 1.0; - } else if (ScheduleIndex == 0) { + } else if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOff) { return 0.0; } else if (!state.dataScheduleMgr->Schedule(ScheduleIndex).EMSActuatedOn) { return state.dataScheduleMgr->Schedule(ScheduleIndex) @@ -2771,9 +2771,9 @@ namespace ScheduleManager { // Return value Real64 scheduleValue(0.0); - if (ScheduleIndex == -1) { + if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOn) { return 1.0; - } else if (ScheduleIndex == 0) { + } else if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOff) { return 0.0; } @@ -2990,10 +2990,10 @@ namespace ScheduleManager { state.dataScheduleMgr->ScheduleInputProcessed = true; } - if (ScheduleIndex == -1) { + if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOn) { DayValues({1, state.dataGlobal->NumOfTimeStepInHour}, {1, 24}) = 1.0; return; - } else if (ScheduleIndex == 0) { + } else if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOff) { DayValues({1, state.dataGlobal->NumOfTimeStepInHour}, {1, 24}) = 0.0; return; } @@ -3744,10 +3744,10 @@ namespace ScheduleManager { Real64 MinValue(0.0); // For total minimum Real64 MaxValue(0.0); // For total maximum - if (ScheduleIndex == -1) { + if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOn) { MinValue = 1.0; MaxValue = 1.0; - } else if (ScheduleIndex == 0) { + } else if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOff) { MinValue = 0.0; MaxValue = 0.0; } else if (ScheduleIndex < 1 || ScheduleIndex > state.dataScheduleMgr->NumSchedules) { @@ -3810,11 +3810,11 @@ namespace ScheduleManager { bool MinValueOk = true; bool MaxValueOk = true; - if (schedNum == -1) { + if (schedNum == ScheduleManager::ScheduleAlwaysOn) { assert(clusiveMin == Clusivity::Inclusive && clusiveMax == Clusivity::Inclusive); MinValueOk = (Minimum == 1.0); MaxValueOk = (Maximum == 1.0); - } else if (schedNum == 0) { + } else if (schedNum == ScheduleManager::ScheduleAlwaysOff) { assert(clusiveMin == Clusivity::Inclusive && clusiveMax == Clusivity::Inclusive); MinValueOk = (Minimum == 0.0); MaxValueOk = (Maximum == 0.0); @@ -3853,9 +3853,9 @@ namespace ScheduleManager { Real64 MinValue(0.0); // For total minimum - if (schedNum == -1) { + if (schedNum == ScheduleManager::ScheduleAlwaysOn) { MinValue = 1.0; - } else if (schedNum == 0) { + } else if (schedNum == ScheduleManager::ScheduleAlwaysOff) { MinValue = 0.0; } else if (schedNum > 0 && schedNum > state.dataScheduleMgr->NumSchedules) { if (!state.dataScheduleMgr->Schedule(schedNum).MaxMinSet) { // Set Minimum/Maximums for this schedule @@ -3893,10 +3893,10 @@ namespace ScheduleManager { bool MinValueOk; bool MaxValueOk; - if (schedNum == -1) { + if (schedNum == ScheduleManager::ScheduleAlwaysOn) { MinValueOk = (Minimum == 1.0); MaxValueOk = (Maximum == 1.0); - } else if (schedNum == 0) { + } else if (schedNum == ScheduleManager::ScheduleAlwaysOff) { MinValueOk = (Minimum == 0.0); MaxValueOk = (Maximum == 0.0); } else if (schedNum > 0 && schedNum <= state.dataScheduleMgr->NumSchedules) { @@ -3962,9 +3962,9 @@ namespace ScheduleManager { CheckScheduleValue = false; - if (ScheduleIndex == -1) { + if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOn) { CheckScheduleValue = (Value == 1.0); - } else if (ScheduleIndex == 0) { + } else if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOff) { CheckScheduleValue = (Value == 0.0); } else if (ScheduleIndex < 1 || ScheduleIndex > state.dataScheduleMgr->NumSchedules) { ShowFatalError(state, "CheckScheduleValue called with ScheduleIndex out of range"); @@ -4034,9 +4034,9 @@ namespace ScheduleManager { int WkSch; // Pointer for WeekSchedule value CheckScheduleValue = false; - if (ScheduleIndex == -1) { + if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOn) { CheckScheduleValue = (Value == 1); - } else if (ScheduleIndex == 0) { + } else if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOff) { CheckScheduleValue = (Value == 0); } else if (ScheduleIndex < 1 || ScheduleIndex > state.dataScheduleMgr->NumSchedules) { ShowFatalError(state, "CheckScheduleValue called with ScheduleIndex out of range"); @@ -4109,10 +4109,10 @@ namespace ScheduleManager { bool MinValueOk; bool MaxValueOk; - if (ScheduleIndex == -1) { + if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOn) { MinValue = 1.0; MaxValue = 1.0; - } else if (ScheduleIndex == 0) { + } else if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOff) { MinValue = 0.0; MaxValue = 0.0; } else if (ScheduleIndex < 1 || ScheduleIndex > state.dataScheduleMgr->NumDaySchedules) { @@ -4191,9 +4191,9 @@ namespace ScheduleManager { Real64 MinValue(0.0); // For total minimum bool MinValueOk; - if (ScheduleIndex == -1) { + if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOn) { MinValue = 1.0; - } else if (ScheduleIndex == 0) { + } else if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOff) { MinValue = 0.0; } else if (ScheduleIndex < 1 || ScheduleIndex > state.dataScheduleMgr->NumDaySchedules) { ShowFatalError(state, "CheckDayScheduleValueMinMax called with ScheduleIndex out of range"); @@ -4260,7 +4260,7 @@ namespace ScheduleManager { int Hour; int TStep; - if (ScheduleIndex == -1 || ScheduleIndex == 0) { + if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOn || ScheduleIndex == ScheduleManager::ScheduleAlwaysOff) { } else if (ScheduleIndex < 1 || ScheduleIndex > state.dataScheduleMgr->NumSchedules) { ShowFatalError(state, "HasFractionalScheduleValue called with ScheduleIndex out of range"); @@ -4351,10 +4351,10 @@ namespace ScheduleManager { int DayT; int Loop; - if (ScheduleIndex == -1) { + if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOn) { MinValue = 1.0; MaxValue = 1.0; - } else if (ScheduleIndex == 0) { + } else if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOff) { MinValue = 0.0; MaxValue = 0.0; } else if (ScheduleIndex < 1 || ScheduleIndex > state.dataScheduleMgr->NumSchedules) { @@ -4442,10 +4442,10 @@ namespace ScheduleManager { int DayT; int Loop; - if (ScheduleIndex == -1) { + if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOn) { MinValue = 1.0; MaxValue = 1.0; - } else if (ScheduleIndex == 0) { + } else if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOff) { MinValue = 0.0; MaxValue = 0.0; } else if (ScheduleIndex < 1 || ScheduleIndex > state.dataScheduleMgr->NumSchedules) { @@ -4506,38 +4506,50 @@ namespace ScheduleManager { constexpr std::array dayTypeFilterNone = { false, false, false, false, false, false, false, false, false, false, false, false}; if (ScheduleIndex > 0 && ScheduleIndex <= state.dataScheduleMgr->NumSchedules) { - std::array dayTypeFilter; - switch (days) { - case DayTypeGroup::Weekday: - dayTypeFilter = dayTypeFilterWkDy; - break; - case DayTypeGroup::WeekEndHoliday: - dayTypeFilter = dayTypeFilterWeHo; - break; - case DayTypeGroup::DesignDay: - dayTypeFilter = dayTypeFilterDsDy; - break; - default: - dayTypeFilter = dayTypeFilterNone; - break; - } - for (int iDayOfYear = 1; iDayOfYear <= 366; ++iDayOfYear) { - int WkSch = state.dataScheduleMgr->Schedule(ScheduleIndex).WeekSchedulePointer(iDayOfYear); - auto &weekSch = state.dataScheduleMgr->WeekSchedule(WkSch); - for (int jType = 1; jType <= maxDayTypes; ++jType) { - if (dayTypeFilter[jType - 1]) { - auto &daySch = state.dataScheduleMgr->DaySchedule(weekSch.DaySchedulePointer(jType)); - MinValue = min(MinValue, minval(daySch.TSValue)); - MaxValue = max(MaxValue, maxval(daySch.TSValue)); + int curDayTypeGroup = static_cast(days); + auto &curSch = state.dataScheduleMgr->Schedule(ScheduleIndex); + if (!curSch.MaxMinByDayTypeSet[curDayTypeGroup]) { + std::array dayTypeFilter; + switch (days) { + case DayTypeGroup::Weekday: + dayTypeFilter = dayTypeFilterWkDy; + break; + case DayTypeGroup::WeekEndHoliday: + dayTypeFilter = dayTypeFilterWeHo; + break; + case DayTypeGroup::DesignDay: + dayTypeFilter = dayTypeFilterDsDy; + break; + default: + dayTypeFilter = dayTypeFilterNone; + break; + } + for (int iDayOfYear = 1; iDayOfYear <= 366; ++iDayOfYear) { + int WkSch = curSch.WeekSchedulePointer(iDayOfYear); + auto &weekSch = state.dataScheduleMgr->WeekSchedule(WkSch); + for (int jType = 1; jType <= maxDayTypes; ++jType) { + if (dayTypeFilter[jType - 1]) { + auto &daySch = state.dataScheduleMgr->DaySchedule(weekSch.DaySchedulePointer(jType)); + MinValue = min(MinValue, minval(daySch.TSValue)); + MaxValue = max(MaxValue, maxval(daySch.TSValue)); + } } } + if (MinValue == Constant::BigNumber) MinValue = 0; + if (MaxValue == -Constant::BigNumber) MaxValue = 0; + // store for the next call of the same schedule + curSch.MaxByDayType[curDayTypeGroup] = MaxValue; + curSch.MinByDayType[curDayTypeGroup] = MinValue; + curSch.MaxMinByDayTypeSet[curDayTypeGroup] = true; + } else { + // retrieve previously found min and max by day type + MaxValue = curSch.MaxByDayType[curDayTypeGroup]; + MinValue = curSch.MinByDayType[curDayTypeGroup]; } - if (MinValue == Constant::BigNumber) MinValue = 0; - if (MaxValue == -Constant::BigNumber) MaxValue = 0; - } else if (ScheduleIndex == -1) { + } else if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOn) { MinValue = 1.0; MaxValue = 1.0; - } else if (ScheduleIndex == 0) { + } else if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOff) { MinValue = 0.0; MaxValue = 0.0; } else { @@ -4591,9 +4603,9 @@ namespace ScheduleManager { if (ScheduleIndex > 0) { ScheduleName = state.dataScheduleMgr->Schedule(ScheduleIndex).Name; - } else if (ScheduleIndex == -1) { + } else if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOn) { ScheduleName = "Constant-1.0"; - } else if (ScheduleIndex == 0) { + } else if (ScheduleIndex == ScheduleManager::ScheduleAlwaysOff) { ScheduleName = "Constant-0.0"; } else { ScheduleName = "N/A-Invalid"; @@ -4749,7 +4761,7 @@ namespace ScheduleManager { DaysInYear = 365; } - if (ScheduleIndex < -1 || ScheduleIndex > state.dataScheduleMgr->NumSchedules) { + if (ScheduleIndex < ScheduleManager::ScheduleAlwaysOn || ScheduleIndex > state.dataScheduleMgr->NumSchedules) { ShowFatalError(state, "ScheduleAnnualFullLoadHours called with ScheduleIndex out of range"); } @@ -4796,7 +4808,7 @@ namespace ScheduleManager { WeeksInYear = 365.0 / 7.0; } - if (ScheduleIndex < -1 || ScheduleIndex > state.dataScheduleMgr->NumSchedules) { + if (ScheduleIndex < ScheduleManager::ScheduleAlwaysOn || ScheduleIndex > state.dataScheduleMgr->NumSchedules) { ShowFatalError(state, "ScheduleAverageHoursPerWeek called with ScheduleIndex out of range"); } @@ -4823,7 +4835,7 @@ namespace ScheduleManager { DaysInYear = 365; } - if (ScheduleIndex < -1 || ScheduleIndex > state.dataScheduleMgr->NumSchedules) { + if (ScheduleIndex < ScheduleManager::ScheduleAlwaysOn || ScheduleIndex > state.dataScheduleMgr->NumSchedules) { ShowFatalError(state, "ScheduleHoursGT1perc called with ScheduleIndex out of range"); } diff --git a/src/EnergyPlus/ScheduleManager.hh b/src/EnergyPlus/ScheduleManager.hh index fa5a83c8176..c8481f4a8d3 100644 --- a/src/EnergyPlus/ScheduleManager.hh +++ b/src/EnergyPlus/ScheduleManager.hh @@ -69,6 +69,7 @@ struct EnergyPlusData; namespace ScheduleManager { constexpr int ScheduleAlwaysOn = -1; + constexpr int ScheduleAlwaysOff = 0; enum class DayType { @@ -195,6 +196,9 @@ namespace ScheduleManager { bool MaxMinSet; // Max/min values have been stored for this schedule Real64 MaxValue; // Maximum value for this schedule Real64 MinValue; // Minimum value for this schedule + std::array(DayType::Num)> MaxMinByDayTypeSet; // minimum and maximum values by daytype have been stored for this schedule + std::array(DayType::Num)> MinByDayType; // minimum values by daytype for this schedule + std::array(DayType::Num)> MaxByDayType; // maximum values by daytype for this schedule Real64 CurrentValue; // For Reporting bool EMSActuatedOn; // indicates if EMS computed Real64 EMSValue; // EMS value @@ -203,6 +207,7 @@ namespace ScheduleManager { // Default Constructor ScheduleData() : ScheduleTypePtr(0), WeekSchedulePointer(366, 0), Used(false), MaxMinSet(false), MaxValue(0.0), MinValue(0.0), CurrentValue(0.0), + MaxMinByDayTypeSet{false}, MinByDayType{0.0}, MaxByDayType{0.0}, EMSActuatedOn(false), EMSValue(0.0), UseDaylightSaving(true) { } diff --git a/tst/EnergyPlus/unit/ScheduleManager.unit.cc b/tst/EnergyPlus/unit/ScheduleManager.unit.cc index f815e6f114d..e6ccd8bebe8 100644 --- a/tst/EnergyPlus/unit/ScheduleManager.unit.cc +++ b/tst/EnergyPlus/unit/ScheduleManager.unit.cc @@ -1640,6 +1640,11 @@ TEST_F(EnergyPlusFixture, getScheduleMinMaxByDayType_test) EXPECT_EQ(0.40, schMin); EXPECT_EQ(0.87, schMax); + // repeat test to see if using cached values + std::tie(schMin, schMax) = getScheduleMinMaxByDayType(*state, index, DayTypeGroup::Weekday); + EXPECT_EQ(0.40, schMin); + EXPECT_EQ(0.87, schMax); + std::tie(schMin, schMax) = getScheduleMinMaxByDayType(*state, index, DayTypeGroup::WeekEndHoliday); EXPECT_EQ(0.30, schMin); EXPECT_EQ(0.83, schMax); @@ -1648,6 +1653,8 @@ TEST_F(EnergyPlusFixture, getScheduleMinMaxByDayType_test) EXPECT_EQ(0.15, schMin); EXPECT_EQ(0.95, schMax); + + index = GetScheduleIndex(*state, "HIGHLOW02"); std::tie(schMin, schMax) = getScheduleMinMaxByDayType(*state, index, DayTypeGroup::Weekday); From bced9e7302679e46349a17fdcb852d2109379557 Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Wed, 10 Apr 2024 13:48:54 -0500 Subject: [PATCH 11/21] format --- tst/EnergyPlus/unit/ScheduleManager.unit.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/tst/EnergyPlus/unit/ScheduleManager.unit.cc b/tst/EnergyPlus/unit/ScheduleManager.unit.cc index e6ccd8bebe8..e1491d34452 100644 --- a/tst/EnergyPlus/unit/ScheduleManager.unit.cc +++ b/tst/EnergyPlus/unit/ScheduleManager.unit.cc @@ -1653,8 +1653,6 @@ TEST_F(EnergyPlusFixture, getScheduleMinMaxByDayType_test) EXPECT_EQ(0.15, schMin); EXPECT_EQ(0.95, schMax); - - index = GetScheduleIndex(*state, "HIGHLOW02"); std::tie(schMin, schMax) = getScheduleMinMaxByDayType(*state, index, DayTypeGroup::Weekday); From c4fe92c0b5234e58973b9f2216ae783dbb3a53a3 Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Thu, 11 Apr 2024 06:25:52 -0500 Subject: [PATCH 12/21] Clang, clang, clang --- src/EnergyPlus/ScheduleManager.hh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/EnergyPlus/ScheduleManager.hh b/src/EnergyPlus/ScheduleManager.hh index c8481f4a8d3..4deb5d34bc9 100644 --- a/src/EnergyPlus/ScheduleManager.hh +++ b/src/EnergyPlus/ScheduleManager.hh @@ -196,19 +196,19 @@ namespace ScheduleManager { bool MaxMinSet; // Max/min values have been stored for this schedule Real64 MaxValue; // Maximum value for this schedule Real64 MinValue; // Minimum value for this schedule - std::array(DayType::Num)> MaxMinByDayTypeSet; // minimum and maximum values by daytype have been stored for this schedule + std::array(DayType::Num)> + MaxMinByDayTypeSet; // minimum and maximum values by daytype have been stored for this schedule std::array(DayType::Num)> MinByDayType; // minimum values by daytype for this schedule - std::array(DayType::Num)> MaxByDayType; // maximum values by daytype for this schedule - Real64 CurrentValue; // For Reporting - bool EMSActuatedOn; // indicates if EMS computed - Real64 EMSValue; // EMS value - bool UseDaylightSaving; // Toggles between daylight saving option to be inclused as "No" or "Yes" (default) + std::array(DayType::Num)> MaxByDayType; // maximum values by daytype for this schedule + Real64 CurrentValue; // For Reporting + bool EMSActuatedOn; // indicates if EMS computed + Real64 EMSValue; // EMS value + bool UseDaylightSaving; // Toggles between daylight saving option to be inclused as "No" or "Yes" (default) // Default Constructor ScheduleData() : ScheduleTypePtr(0), WeekSchedulePointer(366, 0), Used(false), MaxMinSet(false), MaxValue(0.0), MinValue(0.0), CurrentValue(0.0), - MaxMinByDayTypeSet{false}, MinByDayType{0.0}, MaxByDayType{0.0}, - EMSActuatedOn(false), EMSValue(0.0), UseDaylightSaving(true) + MaxMinByDayTypeSet{false}, MinByDayType{0.0}, MaxByDayType{0.0}, EMSActuatedOn(false), EMSValue(0.0), UseDaylightSaving(true) { } }; From c0db5b70a39e97868b4d897851a27ef0d5eab2ef Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Thu, 11 Apr 2024 09:04:56 -0500 Subject: [PATCH 13/21] Separate columns on design day to be separate for summer and winter design days --- src/EnergyPlus/InternalHeatGains.cc | 96 +++++++++++++++------ src/EnergyPlus/ScheduleManager.cc | 13 ++- src/EnergyPlus/ScheduleManager.hh | 3 +- tst/EnergyPlus/unit/ScheduleManager.unit.cc | 22 ++++- 4 files changed, 101 insertions(+), 33 deletions(-) diff --git a/src/EnergyPlus/InternalHeatGains.cc b/src/EnergyPlus/InternalHeatGains.cc index 869b1d973fd..7734de06b11 100644 --- a/src/EnergyPlus/InternalHeatGains.cc +++ b/src/EnergyPlus/InternalHeatGains.cc @@ -3727,7 +3727,8 @@ namespace InternalHeatGains { "Minimum Number of People for All Day Types,Maximum Number of People for All Day Types," "Minimum Number of People for Weekdays, Maximum Number of People for Weekdays, " "Minimum Number of People for Weekends/Holidays, Maximum Number of People for Weekends /Holidays," - "Minimum Number of People for Design Days, Maximum Number of People for Design Days"); + "Minimum Number of People for Summer Design Days, Maximum Number of People for Summer Design Days," + "Minimum Number of People for Winter Design Days, Maximum Number of People for WinterDesign Days"); if (state.dataHeatBal->People(Loop).Fanger || state.dataHeatBal->People(Loop).Pierce || state.dataHeatBal->People(Loop).KSU || state.dataHeatBal->People(Loop).CoolingEffectASH55 || state.dataHeatBal->People(Loop).AnkleDraftASH55) { print(state.files.eio, @@ -3794,8 +3795,13 @@ namespace InternalHeatGains { print(state.files.eio, "{:.1R},", thisPeople.NumberOfPeople * SchMin); print(state.files.eio, "{:.1R},", thisPeople.NumberOfPeople * SchMax); - // design days - std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, thisPeople.NumberOfPeoplePtr, DayTypeGroup::DesignDay); + // summer design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, thisPeople.NumberOfPeoplePtr, DayTypeGroup::SummerDesignDay); + print(state.files.eio, "{:.1R},", thisPeople.NumberOfPeople * SchMin); + print(state.files.eio, "{:.1R},", thisPeople.NumberOfPeople * SchMax); + + // winter design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, thisPeople.NumberOfPeoplePtr, DayTypeGroup::WinterDesignDay); print(state.files.eio, "{:.1R},", thisPeople.NumberOfPeople * SchMin); print(state.files.eio, "{:.1R},", thisPeople.NumberOfPeople * SchMax); @@ -3863,7 +3869,8 @@ namespace InternalHeatGains { "Minimum Lighting Level for All Day Types {W},Maximum Lighting Level for All Day Types {W}," "Minimum Lighting Level for Weekdays {W}, Maximum Lighting Level for Weekdays {W}," "Minimum Lighting Level for Weekends/Holidays {W}, Maximum Lighting Level for Weekends /Holidays {W}," - "Minimum Lighting Level for Design Days {W}, Maximum Lighting Level for Design Days {W}\n"); + "Minimum Lighting Level for Summer Design Days, Maximum Lighting Level for Summer Design Days," + "Minimum Lighting Level for Winter Design Days, Maximum Lighting Level for WinterDesign Days"); } int ZoneNum = state.dataHeatBal->Lights(Loop).ZonePtr; @@ -3906,8 +3913,13 @@ namespace InternalHeatGains { print(state.files.eio, "{:.3R},", light.DesignLevel * SchMin); print(state.files.eio, "{:.3R},", light.DesignLevel * SchMax); - // design days - std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, light.SchedPtr, DayTypeGroup::DesignDay); + // summer design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, light.SchedPtr, DayTypeGroup::SummerDesignDay); + print(state.files.eio, "{:.3R},", light.DesignLevel * SchMin); + print(state.files.eio, "{:.3R},", light.DesignLevel * SchMax); + + // winter design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, light.SchedPtr, DayTypeGroup::WinterDesignDay); print(state.files.eio, "{:.3R},", light.DesignLevel * SchMin); print(state.files.eio, "{:.3R}\n", light.DesignLevel * SchMax); } @@ -3921,7 +3933,8 @@ namespace InternalHeatGains { "Minimum Equipment Level for All Day Types {W},Maximum Equipment Level for All Day Types {W}," "Minimum Equipment Level for Weekdays {W}, Maximum Equipment Level for Weekdays {W}," "Minimum Equipment Level for Weekends/Holidays {W}, Maximum Equipment Level for Weekends /Holidays {W}," - "Minimum Equipment Level for Design Days {W}, Maximum Equipment Level for Design Days {W}\n"); + "Minimum Equipment Level for Summer Design Days {W}, Maximum Equipment Level for Summer Design Days {W}," + "Minimum Equipment Level for Winter Design Days {W}, Maximum Equipment Level for Winter Design Days {W}\n"); } int ZoneNum = state.dataHeatBal->ZoneElectric(Loop).ZonePtr; @@ -3963,8 +3976,13 @@ namespace InternalHeatGains { print(state.files.eio, "{:.3R},", electric.DesignLevel * SchMin); print(state.files.eio, "{:.3R},", electric.DesignLevel * SchMax); - // design days - std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, electric.SchedPtr, DayTypeGroup::DesignDay); + // summer design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, electric.SchedPtr, DayTypeGroup::SummerDesignDay); + print(state.files.eio, "{:.3R},", electric.DesignLevel * SchMin); + print(state.files.eio, "{:.3R},", electric.DesignLevel * SchMax); + + // winter design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, electric.SchedPtr, DayTypeGroup::WinterDesignDay); print(state.files.eio, "{:.3R},", electric.DesignLevel * SchMin); print(state.files.eio, "{:.3R}\n", electric.DesignLevel * SchMax); } @@ -3978,7 +3996,8 @@ namespace InternalHeatGains { "Minimum Equipment Level for All Day Types {W},Maximum Equipment Level for All Day Types {W}," "Minimum Equipment Level for Weekdays {W}, Maximum Equipment Level for Weekdays {W}," "Minimum Equipment Level for Weekends/Holidays {W}, Maximum Equipment Level for Weekends /Holidays {W}," - "Minimum Equipment Level for Design Days {W}, Maximum Equipment Level for Design Days {W}\n"); + "Minimum Equipment Level for Summer Design Days {W}, Maximum Equipment Level for Summer Design Days {W}," + "Minimum Equipment Level for Winter Design Days {W}, Maximum Equipment Level for Winter Design Days {W}\n"); } int ZoneNum = state.dataHeatBal->ZoneGas(Loop).ZonePtr; @@ -4021,8 +4040,13 @@ namespace InternalHeatGains { print(state.files.eio, "{:.3R},", gas.DesignLevel * SchMin); print(state.files.eio, "{:.3R},", gas.DesignLevel * SchMax); - // design days - std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, gas.SchedPtr, DayTypeGroup::DesignDay); + // summer design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, gas.SchedPtr, DayTypeGroup::SummerDesignDay); + print(state.files.eio, "{:.3R},", gas.DesignLevel * SchMin); + print(state.files.eio, "{:.3R},", gas.DesignLevel * SchMax); + + // winter design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, gas.SchedPtr, DayTypeGroup::WinterDesignDay); print(state.files.eio, "{:.3R},", gas.DesignLevel * SchMin); print(state.files.eio, "{:.3R}\n", gas.DesignLevel * SchMax); } @@ -4037,7 +4061,8 @@ namespace InternalHeatGains { "Minimum Equipment Level for All Day Types {W},Maximum Equipment Level for All Day Types {W}," "Minimum Equipment Level for Weekdays {W}, Maximum Equipment Level for Weekdays {W}," "Minimum Equipment Level for Weekends/Holidays {W}, Maximum Equipment Level for Weekends /Holidays {W}," - "Minimum Equipment Level for Design Days {W}, Maximum Equipment Level for Design Days {W}\n"); + "Minimum Equipment Level for Summer Design Days {W}, Maximum Equipment Level for Summer Design Days {W}," + "Minimum Equipment Level for Winter Design Days {W}, Maximum Equipment Level for Winter Design Days {W}\n"); } int ZoneNum = state.dataHeatBal->ZoneHWEq(Loop).ZonePtr; @@ -4080,8 +4105,13 @@ namespace InternalHeatGains { print(state.files.eio, "{:.3R},", hweq.DesignLevel * SchMin); print(state.files.eio, "{:.3R},", hweq.DesignLevel * SchMax); - // design days - std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, hweq.SchedPtr, DayTypeGroup::DesignDay); + // summer design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, hweq.SchedPtr, DayTypeGroup::SummerDesignDay); + print(state.files.eio, "{:.3R},", hweq.DesignLevel * SchMin); + print(state.files.eio, "{:.3R},", hweq.DesignLevel * SchMax); + + // winter design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, hweq.SchedPtr, DayTypeGroup::WinterDesignDay); print(state.files.eio, "{:.3R},", hweq.DesignLevel * SchMin); print(state.files.eio, "{:.3R}\n", hweq.DesignLevel * SchMax); } @@ -4096,7 +4126,8 @@ namespace InternalHeatGains { "Minimum Equipment Level for All Day Types {W},Maximum Equipment Level for All Day Types {W}," "Minimum Equipment Level for Weekdays {W}, Maximum Equipment Level for Weekdays {W}," "Minimum Equipment Level for Weekends/Holidays {W}, Maximum Equipment Level for Weekends /Holidays {W}," - "Minimum Equipment Level for Design Days {W}, Maximum Equipment Level for Design Days {W}\n"); + "Minimum Equipment Level for Summer Design Days {W}, Maximum Equipment Level for Summer Design Days {W}," + "Minimum Equipment Level for Winter Design Days {W}, Maximum Equipment Level for Winter Design Days {W}\n"); } int ZoneNum = state.dataHeatBal->ZoneSteamEq(Loop).ZonePtr; @@ -4139,8 +4170,13 @@ namespace InternalHeatGains { print(state.files.eio, "{:.3R},", stmeq.DesignLevel * SchMin); print(state.files.eio, "{:.3R},", stmeq.DesignLevel * SchMax); - // design days - std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, stmeq.SchedPtr, DayTypeGroup::DesignDay); + // summer design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, stmeq.SchedPtr, DayTypeGroup::SummerDesignDay); + print(state.files.eio, "{:.3R},", stmeq.DesignLevel * SchMin); + print(state.files.eio, "{:.3R},", stmeq.DesignLevel * SchMax); + + // winter design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, stmeq.SchedPtr, DayTypeGroup::WinterDesignDay); print(state.files.eio, "{:.3R},", stmeq.DesignLevel * SchMin); print(state.files.eio, "{:.3R}\n", stmeq.DesignLevel * SchMax); } @@ -4155,7 +4191,8 @@ namespace InternalHeatGains { "Minimum Equipment Level for All Day Types {W},Maximum Equipment Level for All Day Types {W}," "Minimum Equipment Level for Weekdays {W}, Maximum Equipment Level for Weekdays {W}," "Minimum Equipment Level for Weekends/Holidays {W}, Maximum Equipment Level for Weekends /Holidays {W}," - "Minimum Equipment Level for Design Days {W}, Maximum Equipment Level for Design Days {W}\n"); + "Minimum Equipment Level for Summer Design Days {W}, Maximum Equipment Level for Summer Design Days {W}," + "Minimum Equipment Level for Winter Design Days {W}, Maximum Equipment Level for Winter Design Days {W}\n"); } int ZoneNum = state.dataHeatBal->ZoneOtherEq(Loop).ZonePtr; @@ -4197,8 +4234,13 @@ namespace InternalHeatGains { print(state.files.eio, "{:.3R},", other.DesignLevel * SchMin); print(state.files.eio, "{:.3R},", other.DesignLevel * SchMax); - // design days - std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, other.SchedPtr, DayTypeGroup::DesignDay); + // summer design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, other.SchedPtr, DayTypeGroup::SummerDesignDay); + print(state.files.eio, "{:.3R},", other.DesignLevel * SchMin); + print(state.files.eio, "{:.3R},", other.DesignLevel * SchMax); + + // winter design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, other.SchedPtr, DayTypeGroup::WinterDesignDay); print(state.files.eio, "{:.3R},", other.DesignLevel * SchMin); print(state.files.eio, "{:.3R}\n", other.DesignLevel * SchMax); } @@ -4214,7 +4256,8 @@ namespace InternalHeatGains { "Minimum Equipment Level for All Day Types {W},Maximum Equipment Level for All Day Types {W}," "Minimum Equipment Level for Weekdays {W}, Maximum Equipment Level for Weekdays {W}," "Minimum Equipment Level for Weekends/Holidays {W}, Maximum Equipment Level for Weekends /Holidays {W}," - "Minimum Equipment Level for Design Days {W}, Maximum Equipment Level for Design Days {W}," + "Minimum Equipment Level for Summer Design Days {W}, Maximum Equipment Level for Summer Design Days {W}," + "Minimum Equipment Level for Winter Design Days {W}, Maximum Equipment Level for Winter Design Days {W}," "Design Air Volume Flow Rate {m3/s}\n"); } @@ -4258,8 +4301,13 @@ namespace InternalHeatGains { print(state.files.eio, "{:.3R},", iteq.DesignTotalPower * SchMin); print(state.files.eio, "{:.3R},", iteq.DesignTotalPower * SchMax); - // design days - std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, iteq.OperSchedPtr, DayTypeGroup::DesignDay); + // summer design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, iteq.OperSchedPtr, DayTypeGroup::SummerDesignDay); + print(state.files.eio, "{:.3R},", iteq.DesignTotalPower * SchMin); + print(state.files.eio, "{:.3R},", iteq.DesignTotalPower * SchMax); + + // winter design days + std::tie(SchMin, SchMax) = getScheduleMinMaxByDayType(state, iteq.OperSchedPtr, DayTypeGroup::WinterDesignDay); print(state.files.eio, "{:.3R},", iteq.DesignTotalPower * SchMin); print(state.files.eio, "{:.3R},", iteq.DesignTotalPower * SchMax); diff --git a/src/EnergyPlus/ScheduleManager.cc b/src/EnergyPlus/ScheduleManager.cc index 15b72e6fcfe..1d9ce6b1115 100644 --- a/src/EnergyPlus/ScheduleManager.cc +++ b/src/EnergyPlus/ScheduleManager.cc @@ -4501,8 +4501,10 @@ namespace ScheduleManager { constexpr std::array dayTypeFilterWkDy = {false, true, true, true, true, true, false, false, false, false, false, false}; constexpr std::array dayTypeFilterWeHo = {true, false, false, false, false, false, true, true, false, false, false, false}; // Sun Mon Tues Wed Thur Fri Sat Hol Summer Winter Cust1 Cust2 - constexpr std::array dayTypeFilterDsDy = { - false, false, false, false, false, false, false, false, true, true, false, false}; + constexpr std::array dayTypeFilterSumDsDy = { + false, false, false, false, false, false, false, false, true, false, false, false}; + constexpr std::array dayTypeFilterWinDsDy = { + false, false, false, false, false, false, false, false, false, true, false, false}; constexpr std::array dayTypeFilterNone = { false, false, false, false, false, false, false, false, false, false, false, false}; if (ScheduleIndex > 0 && ScheduleIndex <= state.dataScheduleMgr->NumSchedules) { @@ -4517,8 +4519,11 @@ namespace ScheduleManager { case DayTypeGroup::WeekEndHoliday: dayTypeFilter = dayTypeFilterWeHo; break; - case DayTypeGroup::DesignDay: - dayTypeFilter = dayTypeFilterDsDy; + case DayTypeGroup::SummerDesignDay: + dayTypeFilter = dayTypeFilterSumDsDy; + break; + case DayTypeGroup::WinterDesignDay: + dayTypeFilter = dayTypeFilterWinDsDy; break; default: dayTypeFilter = dayTypeFilterNone; diff --git a/src/EnergyPlus/ScheduleManager.hh b/src/EnergyPlus/ScheduleManager.hh index 4deb5d34bc9..3821fc5846f 100644 --- a/src/EnergyPlus/ScheduleManager.hh +++ b/src/EnergyPlus/ScheduleManager.hh @@ -99,7 +99,8 @@ namespace ScheduleManager { Invalid = -1, Weekday = 1, WeekEndHoliday, - DesignDay, + SummerDesignDay, + WinterDesignDay, Num }; diff --git a/tst/EnergyPlus/unit/ScheduleManager.unit.cc b/tst/EnergyPlus/unit/ScheduleManager.unit.cc index e1491d34452..f618163fc77 100644 --- a/tst/EnergyPlus/unit/ScheduleManager.unit.cc +++ b/tst/EnergyPlus/unit/ScheduleManager.unit.cc @@ -1589,8 +1589,10 @@ TEST_F(EnergyPlusFixture, getScheduleMinMaxByDayType_test) " Until: 8:00,0.30,", " Until: 24:00,0.83,", " For: SummerDesignDay,", + " Until: 8:00,0.85,", " Until: 24:00,0.95,", " For: WinterDesignDay,", + " Until: 8:00,0.17,", " Until: 24:00,0.15;", " ", "Schedule:Compact,", @@ -1602,8 +1604,10 @@ TEST_F(EnergyPlusFixture, getScheduleMinMaxByDayType_test) " For: Weekends Holiday,", " Until: 24:00,0.65,", " For: SummerDesignDay,", + " Until: 24:00,0.76,", " Until: 24:00,0.79,", " For: WinterDesignDay,", + " Until: 24:00,0.16,", " Until: 24:00,0.18,", " Through: 12/31,", " For: WeekDays CustomDay1 CustomDay2,", @@ -1611,8 +1615,10 @@ TEST_F(EnergyPlusFixture, getScheduleMinMaxByDayType_test) " For: Weekends Holiday,", " Until: 24:00,0.27,", " For: SummerDesignDay,", + " Until: 8:00,0.77,", " Until: 24:00,0.85,", " For: WinterDesignDay,", + " Until: 8:00,0.19,", " Until: 24:00,0.25;", " ", }); @@ -1649,10 +1655,14 @@ TEST_F(EnergyPlusFixture, getScheduleMinMaxByDayType_test) EXPECT_EQ(0.30, schMin); EXPECT_EQ(0.83, schMax); - std::tie(schMin, schMax) = getScheduleMinMaxByDayType(*state, index, DayTypeGroup::DesignDay); - EXPECT_EQ(0.15, schMin); + std::tie(schMin, schMax) = getScheduleMinMaxByDayType(*state, index, DayTypeGroup::SummerDesignDay); + EXPECT_EQ(0.85, schMin); EXPECT_EQ(0.95, schMax); + std::tie(schMin, schMax) = getScheduleMinMaxByDayType(*state, index, DayTypeGroup::WinterDesignDay); + EXPECT_EQ(0.15, schMin); + EXPECT_EQ(0.17, schMax); + index = GetScheduleIndex(*state, "HIGHLOW02"); std::tie(schMin, schMax) = getScheduleMinMaxByDayType(*state, index, DayTypeGroup::Weekday); @@ -1663,7 +1673,11 @@ TEST_F(EnergyPlusFixture, getScheduleMinMaxByDayType_test) EXPECT_EQ(0.27, schMin); EXPECT_EQ(0.65, schMax); - std::tie(schMin, schMax) = getScheduleMinMaxByDayType(*state, index, DayTypeGroup::DesignDay); - EXPECT_EQ(0.18, schMin); + std::tie(schMin, schMax) = getScheduleMinMaxByDayType(*state, index, DayTypeGroup::SummerDesignDay); + EXPECT_EQ(0.76, schMin); EXPECT_EQ(0.85, schMax); + + std::tie(schMin, schMax) = getScheduleMinMaxByDayType(*state, index, DayTypeGroup::WinterDesignDay); + EXPECT_EQ(0.16, schMin); + EXPECT_EQ(0.25, schMax); } From f9e2315d63fecec4c9e4566144bfe7659be2c619 Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Thu, 11 Apr 2024 15:06:40 -0500 Subject: [PATCH 14/21] Update output-details-and-examples/src/output-files/eplusout-eio.tex for revised columns --- .../src/output-files/eplusout-eio.tex | 130 ++++++++++++++---- src/EnergyPlus/InternalHeatGains.cc | 4 +- 2 files changed, 102 insertions(+), 32 deletions(-) diff --git a/doc/output-details-and-examples/src/output-files/eplusout-eio.tex b/doc/output-details-and-examples/src/output-files/eplusout-eio.tex index 9ecf831f6f5..8274c59a5dc 100644 --- a/doc/output-details-and-examples/src/output-files/eplusout-eio.tex +++ b/doc/output-details-and-examples/src/output-files/eplusout-eio.tex @@ -1019,17 +1019,17 @@ \subsubsection{Field: Outdoor Controlled Baseboard Heat}\label{field-outdoor-con \subsection{People Gains}\label{people-gains} -! \textless{}People Internal Gains - Nominal\textgreater{}, Name, Schedule Name, Zone Name, Zone Floor Area \{m2\}, \# Zone Occupants, Number of People \{\}, People/Floor Area \{person/m2\}, Floor Area per person \{m2/person\}, Fraction Radiant, Fraction Convected, Sensible Fraction Calculation, Activity level, ASHRAE 55 Warnings, Carbon Dioxide Generation Rate, Minimum Number of People for All Day Types, Maximum Number of People for All Day Types, Minimum Number of People for Weekdays, Maximum Number of People for Weekdays, Minimum Number of People for Weekends/Holidays, Maximum Number of People for Weekends /Holidays, Minimum Number of People for Design Days, Maximum Number of People for Design Days +! \textless{}People Internal Gains Nominal\textgreater{}, Name, Schedule Name, Zone Name, Zone Floor Area \{m2\}, \# Zone Occupants, Number of People \{\}, People/Floor Area \{person/m2\}, Floor Area per person \{m2/person\}, Fraction Radiant, Fraction Convected, Sensible Fraction Calculation, Activity level, ASHRAE 55 Warnings, Carbon Dioxide Generation Rate, Minimum Number of People for All Day Types, Maximum Number of People for All Day Types, Minimum Number of People for Weekdays, Maximum Number of People for Weekdays, Minimum Number of People for Weekends/Holidays, Maximum Number of People for Weekends /Holidays, Minimum Number of People for Summer Design Days, Maximum Number of People for Summer Design Days, Minimum Number of People for Winter Design Days, Maximum Number of People for WinterDesign Days -People Internal Gains Nominal,~ SPACE1-1 PEOPLE 1, OCCUPY-1, SPACE1-1, 90.00, 10.0, 10.0, 0.111, 9.009, 0.300, 0.700, 0.550, ACTSCHD, No, 3.8200E-008, 0.0, 10.0, 0.0, 10.0, 0.0, 0.0, 0.0, 10.0 + People Internal Gains Nominal, SPACE1-1 PEOPLE 1, OCCUPY-1, SPACE1-1, 90.00, 10.0, 10.0, 0.111, 9.009, 0.300, 0.700, 0.550, ACTSCHD, No, 3.8200E-008, 0.0, 10.0, 0.8, 4.0, 0.6, 2.5, 9.5, 10.0, 0.0, 0.5, -~People Internal Gains Nominal,~ SPACE2-1 PEOPLE 1, OCCUPY-1, SPACE2-1, 42.37, 5.0, 5.0, 0.117, 8.547, 0.300, 0.700, 0.550, ACTSCHD, No, 3.8200E-008, 0.0, 5.0, 0.0, 5.0, 0.0, 0.0, 0.0, 5.0 +~People Internal Gains Nominal, SPACE2-1 PEOPLE 1, OCCUPY-1, SPACE2-1, 42.37, 5.0, 5.0, 0.117, 8.547, 0.300, 0.700, 0.550, ACTSCHD, No, 3.8200E-008, 0.0, 5.0, 0.4, 2.0, 0.3, 1.2, 4.7, 5.0, 0.0, 0.2, -~People Internal Gains Nominal,~ SPACE3-1 PEOPLE 1, OCCUPY-1, SPACE3-1, 96.48, 11.0, 11.0, 0.114, 8.771, 0.300, 0.700, 0.550, ACTSCHD, No, 3.8200E-008, 0.0, 11.0, 0.0, 11.0, 0.0, 0.0, 0.0, 11.0 +~People Internal Gains Nominal, SPACE3-1 PEOPLE 1, OCCUPY-1, SPACE3-1, 96.48, 11.0, 11.0, 0.114, 8.771, 0.300, 0.700, 0.550, ACTSCHD, No, 3.8200E-008, 0.0, 11.0, 0.9, 4.4, 0.7, 2.8, 10.5, 11.0, 0.0, 0.6, -~People Internal Gains Nominal,~ SPACE4-1 PEOPLE 1, OCCUPY-1, SPACE4-1, 42.74, 5.0, 5.0, 0.117, 8.547, 0.300, 0.700, 0.550, ACTSCHD, No, 3.8200E-008, 0.0, 5.0, 0.0, 5.0, 0.0, 0.0, 0.0, 5.0 +~People Internal Gains Nominal, SPACE4-1 PEOPLE 1, OCCUPY-1, SPACE4-1, 42.74, 5.0, 5.0, 0.117, 8.547, 0.300, 0.700, 0.550, ACTSCHD, No, 3.8200E-008, 0.0, 5.0, 0.4, 2.0, 0.3, 1.3, 4.8, 5.0, 0.0, 0.3, -~ People Internal Gains Nominal,~ SPACE5-1 PEOPLE 1, OCCUPY-1, SPACE5-1, 182.49, 20.0, 20.0, 0.110, 9.125, 0.300, 0.700, 0.550, ACTSCHD, No, 3.8200E-008, 0.0, 20.0, 0.0, 20.0, 0.0, 0.0, 0.0, 20.0 +~People Internal Gains Nominal, SPACE5-1 PEOPLE 1, OCCUPY-1, SPACE5-1, 182.49, 20.0, 20.0, 0.110, 9.125, 0.300, 0.700, 0.550, ACTSCHD, No, 3.8200E-008, 0.0, 20.0, 1.6, 8.0, 1.2, 5.0, 19.0, 20.0, 0.0, 1.0, \subsubsection{Field: \textless{}People Internal Gains - Nominal\textgreater{}}\label{field-people-internal-gains---nominal} @@ -1147,25 +1147,46 @@ \subsubsection{Field: Maximum Number of People for Weekends/Holidays}\label{fiel This numeric field is the calculated maximum number of people based on the number of people field * the maximum value for the people schedule for weekend (Saturday and Sunday) or holiday day types -\subsubsection{Field: Minimum Number of People for Design Days}\label{field-minimum-number-of-people-for-designdays} +\subsubsection{Field: Minimum Number of People for Summer Design Days}\label{field-minimum-number-of-people-for-summer-designdays} -This numeric field is the calculated minimum number of people based on the number of people field * the minimum value for the people schedule for design day types (SummerDesignDay and WinterDesignDay). +This numeric field is the calculated minimum number of people based on the number of people field * the minimum value for the people schedule for the summer design day type. -\subsubsection{Field: Maximum Number of People for Design Days}\label{field-maximum-number-of-people-for-designdays} +\subsubsection{Field: Maximum Number of People for Summer Design Days}\label{field-maximum-number-of-people-for-summer-designdays} -This numeric field is the calculated maximum number of people based on the number of people field * the maximum value for the people schedule for design day types (SummerDesignDay and WinterDesignDay). +This numeric field is the calculated maximum number of people based on the number of people field * the maximum value for the people schedule for the summer design day type. + +\subsubsection{Field: Minimum Number of People for Winter Design Days}\label{field-minimum-number-of-people-for-winter-designdays} + +This numeric field is the calculated minimum number of people based on the number of people field * the minimum value for the people schedule for the winter design day type. + +\subsubsection{Field: Maximum Number of People for Winter Design Days}\label{field-maximum-number-of-people-for-winter-designdays} + +This numeric field is the calculated maximum number of people based on the number of people field * the maximum value for the people schedule for the winter design day type. \subsection{Lights Gains}\label{lights-gains} -! \textless{}Lights Internal Gains Nominal\textgreater{}, Name, Schedule Name, Zone Name, Zone Floor Area \{m2\}, \# Zone Occupants, Lighting Level \{W\}, Lights/Floor Area \{W/m2\}, Lights per person \{W/person\}, Fraction Return Air, Fraction Radiant, Fraction Short Wave, Fraction Convected, Fraction Replaceable, End-Use, Minimum Lighting Level for All Day Types \{W\}, Maximum Lighting Level for All Day Types \{W\}, Minimum Lighting Level for Weekdays \{W\}, Maximum Lighting Level for Weekdays \{W\}, Minimum Lighting Level for Weekends/Holidays \{W\}, Maximum Lighting Level for Weekends /Holidays \{W\}, Minimum Lighting Level for Design Days \{W\}, Maximum Lighting Level for Design Days \{W\} +! \textless{}Lights Internal Gains Nominal\textgreater{}, Name, Schedule Name, Zone Name, Zone Floor Area \{m2\}, \# Zone Occupants, Lighting Level \{W\}, Lights/Floor Area \{W/m2\}, Lights per person \{W/person\}, Fraction Return Air, Fraction Radiant, Fraction Short Wave, Fraction Convected, Fraction Replaceable, End-Use, Minimum Lighting Level for All Day Types \{W\}, Maximum Lighting Level for All Day Types \{W\}, Minimum Lighting Level for Weekdays \{W\}, Maximum Lighting Level for Weekdays \{W\}, Minimum Lighting Level for Weekends/Holidays \{W\}, Maximum Lighting Level for Weekends /Holidays \{W\}, Minimum Lighting Level for Summer Design Days \{W\}, Maximum Lighting Level for Summer Design Days \{W\}, Minimum Lighting Level for Winter Design Days \{W\}, Maximum Lighting Level for WinterDesign Days \{W\} + +Lights Internal Gains Nominal, SPACE1-1 LIGHTS 1, LIGHTS-1, SPACE1-1, 90.00, 10.0, 1437.660, 15.974, 143.910, 0.200, 0.590, 0.200, 1.000E-002, 1.000, General, 71.883, 1437.660, 71.883, 1437.7, 71.883, 71.883, 71.883, 1437.660, 71.883, 71.883 + +~Lights Internal Gains Nominal, SPACE1-1 LIGHTS 2, LIGHTS-1, SPACE1-1, 90.00, 10.0, 480.000, 5.333, 48.048, 0.200, 0.590, 0.200, 1.000E-002, 0.000, Task Lights, 24.000, 480.000, 24.000, 480.0, 24.000, 24.000, 24.000, 480.000, 24.000, 24.000 + +~Lights Internal Gains Nominal, SPACE2-1 LIGHTS 1, LIGHTS-1, SPACE2-1, 42.37, 5.0, 678.142, 16.006, 136.800, 0.200, 0.590, 0.200, 1.000E-002, 1.000, General, 33.907, 678.142, 33.907, 678.1, 33.907, 33.907, 33.907, 678.142, 33.907, 33.907 + +~Lights Internal Gains Nominal, SPACE2-1 LIGHTS 2,LIGHTS-1, SPACE2-1, 42.37, 5.0, 684.000, 16.144, 137.982, 0.200, 0.590, 0.200, 1.000E-002, 0.000, Accent Lighting, 34.200, 684.000, 34.200, 684.0, 34.200, 34.200, 34.200, 684.000, 34.200, 34.200 + +~Lights Internal Gains Nominal, SPACE3-1 LIGHTS 1, LIGHTS-1, SPACE3-1, 96.48, 11.0, 1584.000, 16.418, 144.000, 0.200, 0.590, 0.200, 1.000E-002, 1.000, General, 79.200, 1584.000, 79.200, 1584.0, 79.200, 79.200, 79.200, 1584.000, 79.200, 79.200 + +~Lights Internal Gains Nominal, SPACE3-1 LIGHTS 2, LIGHTS-1, SPACE3-1, 96.48, 11.0, 480.000, 4.975, 43.636, 0.200, 0.590, 0.200, 1.000E-002, 1.000, Task Lights, 24.000, 480.000, 24.000, 480.0, 24.000, 24.000, 24.000, 480.000, 24.000, 24.000 -Lights Internal Gains Nominal,~ SPACE1-1 LIGHTS 1, LIGHTS-1, SPACE1-1, 90.00, 10.0, 1437.660, 15.974, 143.910, 0.200, 0.590, 0.200, 1.000E-002, 1.000, General, 71.883, 1437.660, 71.883, 1437.7, 71.883, 71.883, 71.883, 1437.660 +~Lights Internal Gains Nominal, SPACE4-1 LIGHTS 1, LIGHTS-1, SPACE4-1, 42.74, 5.0, 684.000, 16.006, 136.800, 0.200, 0.590, 0.200, 1.000E-002, 1.000, General, 34.200, 684.000, 34.200, 684.0, 34.200, 34.200, 34.200, 684.000, 34.200, 34.200 -~Lights Internal Gains Nominal,~ SPACE1-1 LIGHTS 2, LIGHTS-1, SPACE1-1, 90.00, 10.0, 480.000, 5.333, 48.048, 0.200, 0.590, 0.200, 1.000E-002, 0.000, Task Lights, 24.000, 480.000, 24.000, 480.0, 24.000, 24.000, 24.000, 480.000 +~Lights Internal Gains Nominal, SPACE5-1 LIGHTS 1, LIGHTS-1, SPACE5-1, 182.49, 20.0, 2964.000, 16.242, 148.200, 0.200, 0.590, 0.200, 1.000E-002, 1.000, General, 148.200, 2964.000, 148.200, 2964.0, 148.200, 148.200, 148.200, 2964.000, 148.200, 148.200 -~Lights Internal Gains Nominal,~ SPACE2-1 LIGHTS 1, LIGHTS-1, SPACE2-1, 42.37, 5.0, 678.142, 16.006, 136.800, 0.200, 0.590, 0.200, 1.000E-002, 1.000, General, 33.907, 678.142, 33.907, 678.1, 33.907, 33.907, 33.907, 678.142 +~Lights Internal Gains Nominal, SPACE5-1 LIGHTS 2, LIGHTS-1, SPACE5-1, 182.49, 20.0, 2964.000, 16.242, 148.200, 0.200, 0.590, 0.200, 1.000E-002, 0.000, Task Lights, 148.200, 2964.000, 148.200, 2964.0, 148.200, 148.200, 148.200, 2964.000, 148.200, 148.200 + +~Lights Internal Gains Nominal, PROCESS LIGHTING, EQUIP-1, SPACE5-1, 182.49, 20.0, 500.000, 2.740, 25.000, 0.000, 0.200, 0.200, 0.600, 1.000, Interior Lighting-Process, 10.000, 450.000, 10.000, 450.0, 100.000, 100.000, 10.000, 450.000, 100.000, 100.000 -~Lights Internal Gains Nominal,~ SPACE2-1 LIGHTS 2, LIGHTS-1, SPACE2-1, 42.37, 5.0, 684.000, 16.144, 137.982, 0.200, 0.590, 0.200, 1.000E-002, 0.000, Accent Lighting, 34.200, 684.000, 34.200, 684.0, 34.200, 34.200, 34.200, 684.000 \subsubsection{Field: \textless{}Lights Internal Gains - Nominal\textgreater{}}\label{field-lights-internal-gains---nominal} @@ -1251,13 +1272,21 @@ \subsubsection{Field: Maximum Lighting Level for Weekends/Holidays \{W\}}\label{ This numeric field is the calculated maximum amount of lighting in Watts based on the calculated lighting level (above) * the maximum value for the lights schedule for weekend (Saturday and Sunday) or holiday day types. -\subsubsection{Field: Minimum Lighting Level for Design Days \{W\}}\label{field-minimum-lighting-level-for-designdays-w} +\subsubsection{Field: Minimum Lighting Level for Summer Design Days \{W\}}\label{field-minimum-lighting-level-for-summer-designdays-w} + +This numeric field is the calculated minimum amount of lighting in Watts based on the calculated lighting level (above) * the minimum value for the lights schedule for the summer design day type. + +\subsubsection{Field: Maximum Lighting Level for Summer Design Days \{W\}}\label{field-maximum-lighting-level-for-summer-designdays-w} + +This numeric field is the calculated maximum amount of lighting in Watts based on the calculated lighting level (above) * the maximum value for the lights schedule for the summer design day type. + +\subsubsection{Field: Minimum Lighting Level for Winter Design Days \{W\}}\label{field-minimum-lighting-level-for-winter-designdays-w} -This numeric field is the calculated minimum amount of lighting in Watts based on the calculated lighting level (above) * the minimum value for the lights schedule for design day types (SummerDesignDay and WinterDesignDay). +This numeric field is the calculated minimum amount of lighting in Watts based on the calculated lighting level (above) * the minimum value for the lights schedule for the winter design day type. -\subsubsection{Field: Maximum Lighting Level for Design Days \{W\}}\label{field-maximum-lighting-level-for-designdays-w} +\subsubsection{Field: Maximum Lighting Level for Winter Design Days \{W\}}\label{field-maximum-lighting-level-for-winter-designdays-w} -This numeric field is the calculated maximum amount of lighting in Watts based on the calculated lighting level (above) * the maximum value for the lights schedule for design day types (SummerDesignDay and WinterDesignDay). +This numeric field is the calculated maximum amount of lighting in Watts based on the calculated lighting level (above) * the maximum value for the lights schedule for the winter design day type. \subsection{Equipment (Electric, Gas, Steam, Hot Water) Gains}\label{equipment-electric-gas-steam-hot-water-gains} @@ -1273,6 +1302,31 @@ \subsection{Equipment (Electric, Gas, Steam, Hot Water) Gains}\label{equipment-e ~ElectricEquipment Internal Gains Nominal,~ SPACE2-1 ELECEQ 1, EQUIP-1, SPACE2-1, 42.37, 5.0, 452.095, 10.670, 91.200, 0.000, 0.300, 0.000, 0.700, Computers, 9.042, 406.885, 9.042, 406.885, 90.419, 90.419, 9.042, 406.885 + +! \textless{}ElectricEquipment Internal Gains Nominal\textgreater{}, Name, Schedule Name, Zone Name, Zone Floor Area \{m2\}, \# Zone Occupants, Equipment Level \{W\}, Equipment/Floor Area \{W/m2\}, Equipment per person \{W/person\}, Fraction Latent, Fraction Radiant, Fraction Lost, Fraction Convected, End-Use SubCategory, Minimum Equipment Level for All Day Types \{W\}, Maximum Equipment Level for All Day Types \{W\}, Minimum Equipment Level for Weekdays \{W\}, Maximum Equipment Level for Weekdays \{W\}, Minimum Equipment Level for Weekends/Holidays \{W\}, Maximum Equipment Level for Weekends /Holidays \{W\}, Minimum Equipment Level for Summer Design Days \{W\}, Maximum Equipment Level for Summer Design Days \{W\}, Minimum Equipment Level for Winter Design Days \{W\}, Maximum Equipment Level for Winter Design Days \{W\} + + ElectricEquipment Internal Gains Nominal, SPACE1-1 ELECEQ 1, EQUIP-1, SPACE1-1, 90.00, 10.0, 958.410, 10.649, 95.937, 0.000, 0.300, 0.000, 0.700, Computers, 19.168, 862.569, 19.168, 862.569, 191.682, 191.682, 19.168, 862.569, 191.682, 191.682 + +~ElectricEquipment Internal Gains Nominal, SPACE1-1 ELECEQ 2, EQUIP-1, SPACE1-1, 90.00, 10.0, 200.000, 2.222, 20.020, 0.000, 0.300, 0.000, 0.700, Copy Machines, 4.000, 180.000, 4.000, 180.000, 40.000, 40.000, 4.000, 180.000, 40.000, 40.000 + +~ElectricEquipment Internal Gains Nominal, SPACE1-1 ELECEQ 3, EQUIP-1, SPACE1-1, 90.00, 10.0, 200.000, 2.222, 20.020, 0.000, 0.100, 0.000, 0.900, People Movers, 4.000, 180.000, 4.000, 180.000, 40.000, 40.000, 4.000, 180.000, 40.000, 40.000 + +~ElectricEquipment Internal Gains Nominal, SPACE2-1 ELECEQ 1, EQUIP-1, SPACE2-1, 42.37, 5.0, 452.095, 10.670, 91.200, 0.000, 0.300, 0.000, 0.700, Computers, 9.042, 406.885, 9.042, 406.885, 90.419, 90.419, 9.042, 406.885, 90.419, 90.419 + +~ElectricEquipment Internal Gains Nominal, INDUSTRIAL EQUIP, EQUIP-1, SPACE3-1, 96.48, 11.0, 3000.000, 31.095, 272.727, 0.000, 0.200, 0.200, 0.600, Industrial Process, 60.000, 2700.000, 60.000, 2700.000, 600.000, 600.000, 60.000, 2700.000, 600.000, 600.000 + +~ElectricEquipment Internal Gains Nominal, VERTICAL TRANSPORTATION, OCCUPY-1, SPACE2-1, 42.37, 5.0, 1000.000, 23.602, 201.728, 0.000, 0.000, 0.000, 1.000, Elevators and Escalators, 0.000, 1000.000, 80.000, 400.000, 60.000, 250.000, 950.000, 1000.000, 0.000, 50.000 + +~ElectricEquipment Internal Gains Nominal, SPACE3-1 ELECEQ 1, EQUIP-1, SPACE3-1, 96.48, 11.0, 1056.000, 10.945, 96.000, 0.000, 0.300, 0.000, 0.700, Computers, 21.120, 950.400, 21.120, 950.400, 211.200, 211.200, 21.120, 950.400, 211.200, 211.200~ + +~ElectricEquipment Internal Gains Nominal, SPACE3-1 ELECEQ 2, EQUIP-1, SPACE3-1, 96.48, 11.0, 200.000, 2.073, 18.182, 0.000, 0.300, 0.000, 0.700, Fax Machines, 4.000, 180.000, 4.000, 180.000, 40.000, 40.000, 4.000, 180.000, 40.000, 40.000 + +~ElectricEquipment Internal Gains Nominal, SPACE4-1 ELECEQ 1, EQUIP-1, SPACE4-1, 42.74, 5.0, 100.000, 2.340, 20.000, 0.000, 0.300, 0.000, 0.700, Laundry, 2.000, 90.000, 2.000, 90.000, 20.000, 20.000, 2.000, 90.000, 20.000, 20.000 + +~ElectricEquipment Internal Gains Nominal, SPACE5-1 ELECEQ 1, EQUIP-1, SPACE5-1, 182.49, 20.0, 1976.000, 10.828, 98.800, 0.000, 0.300, 0.000, 0.700, Computers, 39.520, 1778.400, 39.520, 1778.400, 395.200, 395.200, 39.520, 1778.400, 395.200, 395.200 + + + \subsubsection{Field: \textless{}{[}Specific{]} Equipment Internal Gains - Nominal\textgreater{}}\label{field-specific-equipment-internal-gains---nominal} This field will contain the type of equipment internal gain in each line (i.e.~Electric Equipment Internal Gains, Gas Equipment Internal Gains, \ldots{}). @@ -1355,23 +1409,31 @@ \subsubsection{Field: Maximum Equipment Level for Weekends/Holidays \{W\}}\label This numeric field is the calculated maximum amount of the equipment in Watts based on the calculated design level (above) * the maximum value for the equipment schedule across weekend (Saturday and Sunday) or holiday day types. -\subsubsection{Field: Minimum Equipment Level for Design Days \{W\}}\label{field-minimum-equipment-level-for-designdays-w} +\subsubsection{Field: Minimum Equipment Level for Summer Design Days \{W\}}\label{field-minimum-equipment-level-for-summer-designdays-w} + +This numeric field is the calculated minimum amount of the equipment in Watts based on the calculated design level (above) * the minimum value for the equipment schedule for the summer design day type. + +\subsubsection{Field: Maximum Equipment Level for Summer Design Days \{W\}}\label{field-maximum-equipment-level-for-summer-designdays-w} + +This numeric field is the calculated maximum amount of the equipment in Watts based on the calculated design level (above) * the maximum value for the equipment schedule for the summer design day type. + +\subsubsection{Field: Minimum Equipment Level for Winter Design Days \{W\}}\label{field-minimum-equipment-level-for-winter-designdays-w} -This numeric field is the calculated minimum amount of the equipment in Watts based on the calculated design level (above) * the minimum value for the equipment schedule across design day types (SummerDesignDay and WinterDesignDay). +This numeric field is the calculated minimum amount of the equipment in Watts based on the calculated design level (above) * the minimum value for the equipment schedule for the winter design day type. -\subsubsection{Field: Maximum Equipment Level for Design Days \{W\}}\label{field-maximum-equipment-level-for-designdays-w} +\subsubsection{Field: Maximum Equipment Level for Winter Design Days \{W\}}\label{field-maximum-equipment-level-for-winter-designdays-w} -This numeric field is the calculated maximum amount of the equipment in Watts based on the calculated design level (above) * the maximum value for the equipment schedule across design day types (SummerDesignDay and WinterDesignDay). +This numeric field is the calculated maximum amount of the equipment in Watts based on the calculated design level (above) * the maximum value for the equipment schedule for the winter design day type. \subsection{Other Equipment Gains}\label{other-equipment-gains} Other equipment report is shown below (does not have an end-use category -- is not attached to any normal meter): -! \textless{}OtherEquipment Internal Gains - Nominal\textgreater{}, Name, Schedule Name, Zone Name, Zone Floor Area \{m2\}, \# Zone Occupants, Equipment Level \{W\}, Equipment/Floor Area \{W/m2\}, Equipment per person \{W/person\}, Fraction Latent, Fraction Radiant, Fraction Lost, Fraction Convected, Minimum Equipment Level for All Day Types \{W\}, Maximum Equipment Level for All Day Types \{W\}, Minimum Equipment Level for Weekdays \{W\}, Maximum Equipment Level for Weekdays \{W\}, Minimum Equipment Level for Weekends/Holidays \{W\}, Maximum Equipment Level for Weekends /Holidays \{W\}, Minimum Equipment Level for Design Days \{W\}, Maximum Equipment Level for Design Days \{W\} +! \textless{}OtherEquipment Internal Gains - Nominal\textgreater{}, Name, Schedule Name, Zone Name, Zone Floor Area \{m2\}, \# Zone Occupants, Equipment Level \{W\}, Equipment/Floor Area \{W/m2\}, Equipment per person \{W/person\}, Fraction Latent, Fraction Radiant, Fraction Lost, Fraction Convected, Minimum Equipment Level for All Day Types \{W\}, Maximum Equipment Level for All Day Types \{W\}, Minimum Equipment Level for Weekdays \{W\}, Maximum Equipment Level for Weekdays \{W\}, Minimum Equipment Level for Weekends/Holidays \{W\}, Maximum Equipment Level for Weekends /Holidays \{W\}, Minimum Equipment Level for Summer Design Days \{W\}, Maximum Equipment Level for Summer Design Days \{W\}, Minimum Equipment Level for Winter Design Days \{W\}, Maximum Equipment Level for Winter Design Days \{W\} -OtherEquipment Internal Gains,~ TEST 352A, ALWAYSON, ZONE ONE, 232.26, 0.0, 352.000, 1.516, N/A, 0.000, 0.000, 0.000, 1.000, 352.000, 352.000 +OtherEquipment Internal Gains,~ TEST 352A, ALWAYSON, ZONE ONE, 232.26, 0.0, 352.000, 1.516, N/A, 0.000, 0.000, 0.000, 1.000, 352.000, 352.000, 352.000, 352.000 -~OtherEquipment Internal Gains,~ TEST 352 MINUS, ALWAYSON, ZONE ONE, 232.26, 0.0, -352.000, -1.516, N/A, 0.000, 0.000, 0.000, 1.000, -352.000, -352.000 +~OtherEquipment Internal Gains,~ TEST 352 MINUS, ALWAYSON, ZONE ONE, 232.26, 0.0, -352.000, -1.516, N/A, 0.000, 0.000, 0.000, 1.000, -352.000, -352.000, -352.000, -352.000 \subsubsection{Field: \textless{}Other Equipment Internal Gains - Nominal\textgreater{}}\label{field-other-equipment-internal-gains---nominal} @@ -1452,13 +1514,21 @@ \subsubsection{Field: Maximum Equipment Level for Weekends/Holidays \{W\}}\label This numeric field is the calculated maximum amount of the equipment in Watts based on the calculated design level (above) * the maximum value for the equipment schedule across weekend (Saturday and Sunday) or holiday day types. -\subsubsection{Field: Minimum Equipment Level for Design Days \{W\}}\label{field-minimum-equipment-level-for-designdays-w-1} +\subsubsection{Field: Minimum Equipment Level for Summer Design Days \{W\}}\label{field-minimum-equipment-level-for-summer-designdays-w-1} + +This numeric field is the calculated minimum amount of the equipment in Watts based on the calculated design level (above) * the minimum value for the equipment schedule for the summer design day type. + +\subsubsection{Field: Maximum Equipment Level for Summer Design Days \{W\}}\label{field-maximum-equipment-level-for-summer-designdays-w-1} + +This numeric field is the calculated maximum amount of the equipment in Watts based on the calculated design level (above) * the maximum value for the equipment schedule for the summer design day type. + +\subsubsection{Field: Minimum Equipment Level for Winter Design Days \{W\}}\label{field-minimum-equipment-level-for-winter-designdays-w-1} -This numeric field is the calculated minimum amount of the equipment in Watts based on the calculated design level (above) * the minimum value for the equipment schedule across design day types (SummerDesignDay and WinterDesignDay). +This numeric field is the calculated minimum amount of the equipment in Watts based on the calculated design level (above) * the minimum value for the equipment schedule for the winter design day type. -\subsubsection{Field: Maximum Equipment Level for Design Days \{W\}}\label{field-maximum-equipment-level-for-designdays-w-1} +\subsubsection{Field: Maximum Equipment Level for Winter Design Days \{W\}}\label{field-maximum-equipment-level-for-winter-designdays-w-1} -This numeric field is the calculated maximum amount of the equipment in Watts based on the calculated design level (above) * the maximum value for the equipment schedule across design day types (SummerDesignDay and WinterDesignDay). +This numeric field is the calculated maximum amount of the equipment in Watts based on the calculated design level (above) * the maximum value for the equipment schedule for the winter design day type. \subsection{Outdoor Controlled Baseboard Heat}\label{outdoor-controlled-baseboard-heat} diff --git a/src/EnergyPlus/InternalHeatGains.cc b/src/EnergyPlus/InternalHeatGains.cc index 7734de06b11..f345fcc94a2 100644 --- a/src/EnergyPlus/InternalHeatGains.cc +++ b/src/EnergyPlus/InternalHeatGains.cc @@ -3869,8 +3869,8 @@ namespace InternalHeatGains { "Minimum Lighting Level for All Day Types {W},Maximum Lighting Level for All Day Types {W}," "Minimum Lighting Level for Weekdays {W}, Maximum Lighting Level for Weekdays {W}," "Minimum Lighting Level for Weekends/Holidays {W}, Maximum Lighting Level for Weekends /Holidays {W}," - "Minimum Lighting Level for Summer Design Days, Maximum Lighting Level for Summer Design Days," - "Minimum Lighting Level for Winter Design Days, Maximum Lighting Level for WinterDesign Days"); + "Minimum Lighting Level for Summer Design Days {W}, Maximum Lighting Level for Summer Design Days {W}," + "Minimum Lighting Level for Winter Design Days {W}, Maximum Lighting Level for WinterDesign Days {W}\n"); } int ZoneNum = state.dataHeatBal->Lights(Loop).ZonePtr; From a70fe0a9173369c873d8753a32369b6aa4b7c249 Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Thu, 11 Apr 2024 15:15:38 -0500 Subject: [PATCH 15/21] Fix typo --- src/EnergyPlus/InternalHeatGains.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EnergyPlus/InternalHeatGains.cc b/src/EnergyPlus/InternalHeatGains.cc index f345fcc94a2..bed8ea512fd 100644 --- a/src/EnergyPlus/InternalHeatGains.cc +++ b/src/EnergyPlus/InternalHeatGains.cc @@ -3728,7 +3728,7 @@ namespace InternalHeatGains { "Minimum Number of People for Weekdays, Maximum Number of People for Weekdays, " "Minimum Number of People for Weekends/Holidays, Maximum Number of People for Weekends /Holidays," "Minimum Number of People for Summer Design Days, Maximum Number of People for Summer Design Days," - "Minimum Number of People for Winter Design Days, Maximum Number of People for WinterDesign Days"); + "Minimum Number of People for Winter Design Days, Maximum Number of People for Winter Design Days"); if (state.dataHeatBal->People(Loop).Fanger || state.dataHeatBal->People(Loop).Pierce || state.dataHeatBal->People(Loop).KSU || state.dataHeatBal->People(Loop).CoolingEffectASH55 || state.dataHeatBal->People(Loop).AnkleDraftASH55) { print(state.files.eio, @@ -3870,7 +3870,7 @@ namespace InternalHeatGains { "Minimum Lighting Level for Weekdays {W}, Maximum Lighting Level for Weekdays {W}," "Minimum Lighting Level for Weekends/Holidays {W}, Maximum Lighting Level for Weekends /Holidays {W}," "Minimum Lighting Level for Summer Design Days {W}, Maximum Lighting Level for Summer Design Days {W}," - "Minimum Lighting Level for Winter Design Days {W}, Maximum Lighting Level for WinterDesign Days {W}\n"); + "Minimum Lighting Level for Winter Design Days {W}, Maximum Lighting Level for Winter Design Days {W}\n"); } int ZoneNum = state.dataHeatBal->Lights(Loop).ZonePtr; From 90bf684268013bb64cf7b615a4b7573acfc34360 Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Fri, 12 Apr 2024 08:02:47 -0500 Subject: [PATCH 16/21] Trying to outwit clang-format which I cannot replicate locally. Put back code from develop. --- src/EnergyPlus/ScheduleManager.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EnergyPlus/ScheduleManager.hh b/src/EnergyPlus/ScheduleManager.hh index 3821fc5846f..49802809709 100644 --- a/src/EnergyPlus/ScheduleManager.hh +++ b/src/EnergyPlus/ScheduleManager.hh @@ -209,7 +209,7 @@ namespace ScheduleManager { // Default Constructor ScheduleData() : ScheduleTypePtr(0), WeekSchedulePointer(366, 0), Used(false), MaxMinSet(false), MaxValue(0.0), MinValue(0.0), CurrentValue(0.0), - MaxMinByDayTypeSet{false}, MinByDayType{0.0}, MaxByDayType{0.0}, EMSActuatedOn(false), EMSValue(0.0), UseDaylightSaving(true) + EMSActuatedOn(false), EMSValue(0.0), UseDaylightSaving(true) { } }; From 7f6925c6901545a04f8d2f5affa177f76fb8236d Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Fri, 12 Apr 2024 08:04:49 -0500 Subject: [PATCH 17/21] Retype code changes [decent_ci_skip] --- src/EnergyPlus/ScheduleManager.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EnergyPlus/ScheduleManager.hh b/src/EnergyPlus/ScheduleManager.hh index 49802809709..c05bf686e48 100644 --- a/src/EnergyPlus/ScheduleManager.hh +++ b/src/EnergyPlus/ScheduleManager.hh @@ -209,7 +209,7 @@ namespace ScheduleManager { // Default Constructor ScheduleData() : ScheduleTypePtr(0), WeekSchedulePointer(366, 0), Used(false), MaxMinSet(false), MaxValue(0.0), MinValue(0.0), CurrentValue(0.0), - EMSActuatedOn(false), EMSValue(0.0), UseDaylightSaving(true) + MaxMinByDayTypeSet{false}, MinByDayType{0.}, MaxByDayType{0.}, EMSActuatedOn(false), EMSValue(0.0), UseDaylightSaving(true) { } }; From 9c6a8e72fa263851e8f68d8c30d5494241e7c2f1 Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Fri, 12 Apr 2024 09:47:30 -0500 Subject: [PATCH 18/21] Move initialization out of constructor to make clang format happy (I hope) --- src/EnergyPlus/ScheduleManager.hh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/EnergyPlus/ScheduleManager.hh b/src/EnergyPlus/ScheduleManager.hh index c05bf686e48..bb4fb054ff4 100644 --- a/src/EnergyPlus/ScheduleManager.hh +++ b/src/EnergyPlus/ScheduleManager.hh @@ -197,19 +197,19 @@ namespace ScheduleManager { bool MaxMinSet; // Max/min values have been stored for this schedule Real64 MaxValue; // Maximum value for this schedule Real64 MinValue; // Minimum value for this schedule - std::array(DayType::Num)> - MaxMinByDayTypeSet; // minimum and maximum values by daytype have been stored for this schedule - std::array(DayType::Num)> MinByDayType; // minimum values by daytype for this schedule - std::array(DayType::Num)> MaxByDayType; // maximum values by daytype for this schedule - Real64 CurrentValue; // For Reporting - bool EMSActuatedOn; // indicates if EMS computed - Real64 EMSValue; // EMS value + std::array(DayType::Num)> MaxMinByDayTypeSet{ + false}; // minimum and maximum values by daytype have been stored for this schedule + std::array(DayType::Num)> MinByDayType{0.0}; // minimum values by daytype for this schedule + std::array(DayType::Num)> MaxByDayType{0.0}; // maximum values by daytype for this schedule + Real64 CurrentValue; // For Reporting + bool EMSActuatedOn; // indicates if EMS computed + Real64 EMSValue; // EMS value bool UseDaylightSaving; // Toggles between daylight saving option to be inclused as "No" or "Yes" (default) // Default Constructor ScheduleData() : ScheduleTypePtr(0), WeekSchedulePointer(366, 0), Used(false), MaxMinSet(false), MaxValue(0.0), MinValue(0.0), CurrentValue(0.0), - MaxMinByDayTypeSet{false}, MinByDayType{0.}, MaxByDayType{0.}, EMSActuatedOn(false), EMSValue(0.0), UseDaylightSaving(true) + EMSActuatedOn(false), EMSValue(0.0), UseDaylightSaving(true) { } }; From 50b7a43ef40ebfec46ae4fe0480f3e8d423e77ca Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Fri, 12 Apr 2024 16:58:31 -0500 Subject: [PATCH 19/21] Add OutputChanges24-1-0-to-24-2-0.md [decent_ci_skip] [actions skip] --- .../OutputChanges24-1-0-to-24-2-0.md | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/Transition/OutputRulesFiles/OutputChanges24-1-0-to-24-2-0.md diff --git a/src/Transition/OutputRulesFiles/OutputChanges24-1-0-to-24-2-0.md b/src/Transition/OutputRulesFiles/OutputChanges24-1-0-to-24-2-0.md new file mode 100644 index 00000000000..5227594e7e0 --- /dev/null +++ b/src/Transition/OutputRulesFiles/OutputChanges24-1-0-to-24-2-0.md @@ -0,0 +1,40 @@ +Output Changes +============== + +This file documents the structural changes on the output of EnergyPlus that could affect interfaces, etc. + +### Description + +This will eventually become a more structured file, but currently it isn't clear what format is best. As an intermediate solution, and to allow the form to be formed organically, this plain text file is being used. Entries should be clearly delimited. It isn't expected that there will be but maybe a couple each release at most. Entries should also include some reference back to the repo. At least a PR number or whatever. + +### EIO Internal Gains and Initialization report + +For the EIO lines for: + +- People Internal Gains Nominal +- Lights Internal Gains Nominal +- ElectricEquipment Internal Gains Nominal +- GasEquipment Internal Gains Nominal +- HotWaterEquipment Internal Gains Nominal +- SteamEquipment Internal Gains Nominal +- OtherEquipment Internal Gains Nominal + +replaced the colums: + +- Nominal Minimum +- Nominal Maximum + +with + +- Minimum for All Day Types +- Maximum for All Day Types +- Minimum for Weekdays +- Maximum for Weekdays +- Minimum for Weekends/Holidays +- Maximum for Weekends/Holidays +- Minimum for Summer Design Days +- Maximum for Summer Design Days +- Minimum for Winter Design Days +- Maximum for Winter Design Days + +These changes will also make corresponding changes in the HTML Intialization Summary report From b8d9928913426ba878c6e6a55bc3edb6e067028a Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Thu, 25 Apr 2024 14:23:12 -0500 Subject: [PATCH 20/21] Utilize SetScheduleMinMax and optimize loop --- src/EnergyPlus/ScheduleManager.cc | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/EnergyPlus/ScheduleManager.cc b/src/EnergyPlus/ScheduleManager.cc index 1d9ce6b1115..4053573fb5a 100644 --- a/src/EnergyPlus/ScheduleManager.cc +++ b/src/EnergyPlus/ScheduleManager.cc @@ -4510,6 +4510,9 @@ namespace ScheduleManager { if (ScheduleIndex > 0 && ScheduleIndex <= state.dataScheduleMgr->NumSchedules) { int curDayTypeGroup = static_cast(days); auto &curSch = state.dataScheduleMgr->Schedule(ScheduleIndex); + if (!curSch.MaxMinSet) { + SetScheduleMinMax(state, ScheduleIndex); + } if (!curSch.MaxMinByDayTypeSet[curDayTypeGroup]) { std::array dayTypeFilter; switch (days) { @@ -4529,15 +4532,20 @@ namespace ScheduleManager { dayTypeFilter = dayTypeFilterNone; break; } + int prevWkSch = -999; // set to a value that would never occur for (int iDayOfYear = 1; iDayOfYear <= 366; ++iDayOfYear) { int WkSch = curSch.WeekSchedulePointer(iDayOfYear); - auto &weekSch = state.dataScheduleMgr->WeekSchedule(WkSch); - for (int jType = 1; jType <= maxDayTypes; ++jType) { - if (dayTypeFilter[jType - 1]) { - auto &daySch = state.dataScheduleMgr->DaySchedule(weekSch.DaySchedulePointer(jType)); - MinValue = min(MinValue, minval(daySch.TSValue)); - MaxValue = max(MaxValue, maxval(daySch.TSValue)); + if (WkSch != prevWkSch) { // skip if same as previous week (very common) + auto &weekSch = state.dataScheduleMgr->WeekSchedule(WkSch); + for (int jType = 1; jType <= maxDayTypes; ++jType) { + if (dayTypeFilter[jType - 1]) { + auto &daySch = state.dataScheduleMgr->DaySchedule(weekSch.DaySchedulePointer(jType)); + // use precalcuated min and max from SetScheduleMinMax + MinValue = min(MinValue, daySch.TSValMin); + MaxValue = max(MaxValue, daySch.TSValMax); + } } + prevWkSch - WkSch; } } if (MinValue == Constant::BigNumber) MinValue = 0; From 8475b71ee58248ab9dbba790fad1009b72e137ca Mon Sep 17 00:00:00 2001 From: Jason Glazer Date: Thu, 25 Apr 2024 15:05:07 -0500 Subject: [PATCH 21/21] Don't iterate through duplicate week schedules when finding min and max. --- src/EnergyPlus/ScheduleManager.cc | 55 ++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/src/EnergyPlus/ScheduleManager.cc b/src/EnergyPlus/ScheduleManager.cc index 4053573fb5a..2806c135ede 100644 --- a/src/EnergyPlus/ScheduleManager.cc +++ b/src/EnergyPlus/ScheduleManager.cc @@ -3706,12 +3706,17 @@ namespace ScheduleManager { MinValue = min(MinValue, daySched.TSValMin); MaxValue = max(MaxValue, daySched.TSValMax); } + int prevWkSch = -999; // set to a value that would never occur for (int Loop = 2; Loop <= 366; ++Loop) { - auto const &wkSched = state.dataScheduleMgr->WeekSchedule(sched.WeekSchedulePointer(Loop)); - for (int DayT = 1; DayT <= maxDayTypes; ++DayT) { - auto const &daySched = state.dataScheduleMgr->DaySchedule(wkSched.DaySchedulePointer(DayT)); - MinValue = min(MinValue, daySched.TSValMin); - MaxValue = max(MaxValue, daySched.TSValMax); + int WkSch = sched.WeekSchedulePointer(Loop); + if (WkSch != prevWkSch) { // skip if same as previous week (very common) + auto const &wkSched = state.dataScheduleMgr->WeekSchedule(WkSch); + for (int DayT = 1; DayT <= maxDayTypes; ++DayT) { + auto const &daySched = state.dataScheduleMgr->DaySchedule(wkSched.DaySchedulePointer(DayT)); + MinValue = min(MinValue, daySched.TSValMin); + MaxValue = max(MaxValue, daySched.TSValMax); + } + prevWkSch = WkSch; } } sched.MaxMinSet = true; @@ -4374,15 +4379,21 @@ namespace ScheduleManager { max(MaxValue, maxval(state.dataScheduleMgr->DaySchedule(state.dataScheduleMgr->WeekSchedule(WkSch).DaySchedulePointer(DayT)).TSValue)); } + int prevWkSch = -999; // set to a value that would never occur for (Loop = 2; Loop <= 366; ++Loop) { WkSch = state.dataScheduleMgr->Schedule(ScheduleIndex).WeekSchedulePointer(Loop); - for (DayT = 1; DayT <= maxDayTypes; ++DayT) { - MinValue = min( - MinValue, - minval(state.dataScheduleMgr->DaySchedule(state.dataScheduleMgr->WeekSchedule(WkSch).DaySchedulePointer(DayT)).TSValue)); - MaxValue = max( - MaxValue, - maxval(state.dataScheduleMgr->DaySchedule(state.dataScheduleMgr->WeekSchedule(WkSch).DaySchedulePointer(DayT)).TSValue)); + if (WkSch != prevWkSch) { // skip if same as previous week (very common) + for (DayT = 1; DayT <= maxDayTypes; ++DayT) { + MinValue = min( + MinValue, + minval( + state.dataScheduleMgr->DaySchedule(state.dataScheduleMgr->WeekSchedule(WkSch).DaySchedulePointer(DayT)).TSValue)); + MaxValue = max( + MaxValue, + maxval( + state.dataScheduleMgr->DaySchedule(state.dataScheduleMgr->WeekSchedule(WkSch).DaySchedulePointer(DayT)).TSValue)); + } + prevWkSch = WkSch; } } state.dataScheduleMgr->Schedule(ScheduleIndex).MaxMinSet = true; @@ -4465,15 +4476,21 @@ namespace ScheduleManager { max(MaxValue, maxval(state.dataScheduleMgr->DaySchedule(state.dataScheduleMgr->WeekSchedule(WkSch).DaySchedulePointer(DayT)).TSValue)); } + int prevWkSch = -999; // set to a value that would never occur for (Loop = 2; Loop <= 366; ++Loop) { WkSch = state.dataScheduleMgr->Schedule(ScheduleIndex).WeekSchedulePointer(Loop); - for (DayT = 1; DayT <= maxDayTypes; ++DayT) { - MinValue = min( - MinValue, - minval(state.dataScheduleMgr->DaySchedule(state.dataScheduleMgr->WeekSchedule(WkSch).DaySchedulePointer(DayT)).TSValue)); - MaxValue = max( - MaxValue, - maxval(state.dataScheduleMgr->DaySchedule(state.dataScheduleMgr->WeekSchedule(WkSch).DaySchedulePointer(DayT)).TSValue)); + if (WkSch != prevWkSch) { // skip if same as previous week (very common) + for (DayT = 1; DayT <= maxDayTypes; ++DayT) { + MinValue = min( + MinValue, + minval( + state.dataScheduleMgr->DaySchedule(state.dataScheduleMgr->WeekSchedule(WkSch).DaySchedulePointer(DayT)).TSValue)); + MaxValue = max( + MaxValue, + maxval( + state.dataScheduleMgr->DaySchedule(state.dataScheduleMgr->WeekSchedule(WkSch).DaySchedulePointer(DayT)).TSValue)); + } + prevWkSch = WkSch; } } state.dataScheduleMgr->Schedule(ScheduleIndex).MaxMinSet = true;