LCOV - code coverage report
Current view: top level - EnergyPlus - SizingManager.cc (source / functions) Hit Total Coverage
Test: lcov.output.filtered Lines: 2429 3325 73.1 %
Date: 2023-01-17 19:17:23 Functions: 27 28 96.4 %

          Line data    Source code
       1             : // EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois,
       2             : // The Regents of the University of California, through Lawrence Berkeley National Laboratory
       3             : // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge
       4             : // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other
       5             : // contributors. All rights reserved.
       6             : //
       7             : // NOTICE: This Software was developed under funding from the U.S. Department of Energy and the
       8             : // U.S. Government consequently retains certain rights. As such, the U.S. Government has been
       9             : // granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable,
      10             : // worldwide license in the Software to reproduce, distribute copies to the public, prepare
      11             : // derivative works, and perform publicly and display publicly, and to permit others to do so.
      12             : //
      13             : // Redistribution and use in source and binary forms, with or without modification, are permitted
      14             : // provided that the following conditions are met:
      15             : //
      16             : // (1) Redistributions of source code must retain the above copyright notice, this list of
      17             : //     conditions and the following disclaimer.
      18             : //
      19             : // (2) Redistributions in binary form must reproduce the above copyright notice, this list of
      20             : //     conditions and the following disclaimer in the documentation and/or other materials
      21             : //     provided with the distribution.
      22             : //
      23             : // (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory,
      24             : //     the University of Illinois, U.S. Dept. of Energy nor the names of its contributors may be
      25             : //     used to endorse or promote products derived from this software without specific prior
      26             : //     written permission.
      27             : //
      28             : // (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in stand-alone form
      29             : //     without changes from the version obtained under this License, or (ii) Licensee makes a
      30             : //     reference solely to the software portion of its product, Licensee must refer to the
      31             : //     software as "EnergyPlus version X" software, where "X" is the version number Licensee
      32             : //     obtained under this License and may not use a different name for the software. Except as
      33             : //     specifically required in this Section (4), Licensee shall not use in a company name, a
      34             : //     product name, in advertising, publicity, or other promotional activities any name, trade
      35             : //     name, trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or confusingly
      36             : //     similar designation, without the U.S. Department of Energy's prior written consent.
      37             : //
      38             : // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
      39             : // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
      40             : // AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
      41             : // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
      42             : // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
      43             : // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
      44             : // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
      45             : // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      46             : // POSSIBILITY OF SUCH DAMAGE.
      47             : 
      48             : // C++ Headers
      49             : #include <cmath>
      50             : #include <string>
      51             : 
      52             : // EnergyPlus Headers
      53             : #include <EnergyPlus/Autosizing/Base.hh>
      54             : #include <EnergyPlus/Data/EnergyPlusData.hh>
      55             : #include <EnergyPlus/DataDefineEquip.hh>
      56             : #include <EnergyPlus/DataEnvironment.hh>
      57             : #include <EnergyPlus/DataGlobalConstants.hh>
      58             : #include <EnergyPlus/DataHVACGlobals.hh>
      59             : #include <EnergyPlus/DataHeatBalance.hh>
      60             : #include <EnergyPlus/DataIPShortCuts.hh>
      61             : #include <EnergyPlus/DataSizing.hh>
      62             : #include <EnergyPlus/DataStringGlobals.hh>
      63             : #include <EnergyPlus/DataZoneEquipment.hh>
      64             : #include <EnergyPlus/DisplayRoutines.hh>
      65             : #include <EnergyPlus/DualDuct.hh>
      66             : #include <EnergyPlus/EMSManager.hh>
      67             : #include <EnergyPlus/General.hh>
      68             : #include <EnergyPlus/HVACCooledBeam.hh>
      69             : #include <EnergyPlus/HVACSingleDuctInduc.hh>
      70             : #include <EnergyPlus/HeatBalanceManager.hh>
      71             : #include <EnergyPlus/InputProcessing/InputProcessor.hh>
      72             : #include <EnergyPlus/OutputReportPredefined.hh>
      73             : #include <EnergyPlus/OutputReportTabular.hh>
      74             : #include <EnergyPlus/PoweredInductionUnits.hh>
      75             : #include <EnergyPlus/SQLiteProcedures.hh>
      76             : #include <EnergyPlus/ScheduleManager.hh>
      77             : #include <EnergyPlus/SimAirServingZones.hh>
      78             : #include <EnergyPlus/SingleDuct.hh>
      79             : #include <EnergyPlus/SizingManager.hh>
      80             : #include <EnergyPlus/UtilityRoutines.hh>
      81             : #include <EnergyPlus/WeatherManager.hh>
      82             : #include <EnergyPlus/ZoneEquipmentManager.hh>
      83             : 
      84             : namespace EnergyPlus::SizingManager {
      85             : 
      86             : // MODULE INFORMATION:
      87             : //       AUTHOR         Fred Buhl
      88             : //       DATE WRITTEN   December 2000
      89             : //       MODIFIED       na
      90             : //       RE-ENGINEERED  na
      91             : 
      92             : // PURPOSE OF THIS MODULE:
      93             : // This module contains the data and routines relating to managing the sizing
      94             : // simulations.
      95             : 
      96             : // Using/Aliasing
      97             : using namespace HeatBalanceManager;
      98             : using namespace WeatherManager;
      99             : using namespace DataSizing;
     100             : using DataStringGlobals::CharComma;
     101             : using DataStringGlobals::CharSpace;
     102             : using DataStringGlobals::CharTab;
     103             : 
     104             : constexpr std::array<std::string_view, static_cast<int>(DataSizing::OAFlowCalcMethod::Num)> OAFlowCalcMethodNamesUC{
     105             :     "FLOW/PERSON",
     106             :     "FLOW/ZONE",
     107             :     "FLOW/AREA",
     108             :     "AIRCHANGES/HOUR",
     109             :     "SUM",
     110             :     "MAXIMUM",
     111             :     "INDOORAIRQUALITYPROCEDURE",
     112             :     "PROPORTIONALCONTROLBASEDONOCCUPANCYSCHEDULE",
     113             :     "PROPORTIONALCONTROLBASEDONDESIGNOCCUPANCY"};
     114             : 
     115         771 : void ManageSizing(EnergyPlusData &state)
     116             : {
     117             : 
     118             :     // SUBROUTINE INFORMATION:
     119             :     //       AUTHOR         Fred Buhl
     120             :     //       DATE WRITTEN   December 2000
     121             : 
     122             :     // PURPOSE OF THIS SUBROUTINE:
     123             :     // This subroutine manages the sizing simulations (using design day condiions)
     124             :     // for zones, central air systems, and central plants and zone heating and cooling
     125             : 
     126             :     // METHODOLOGY EMPLOYED:
     127             :     // Design day simulations are run with the zones supplied with "Ideal Loads",
     128             :     // yielding zone design supply air flow rates and zone heating and cooling capacities.
     129             :     // Design day simulations are run again with central air systems supplied by
     130             :     // purchased hot and cold water, yielding central heating and cooling capacities.
     131             : 
     132         771 :     auto &CalcSysSizing(state.dataSize->CalcSysSizing);
     133         771 :     auto &SysSizPeakDDNum(state.dataSize->SysSizPeakDDNum);
     134             : 
     135             :     // Using/Aliasing
     136             :     using SimAirServingZones::ManageAirLoops;
     137             :     using SimAirServingZones::UpdateSysSizing;
     138             :     using ZoneEquipmentManager::ManageZoneEquipment;
     139             :     using ZoneEquipmentManager::RezeroZoneSizingArrays;
     140             :     using ZoneEquipmentManager::UpdateZoneSizing;
     141             :     using namespace OutputReportPredefined;
     142             : 
     143             :     using OutputReportTabular::AllocateLoadComponentArrays;
     144             :     using OutputReportTabular::ComputeLoadComponentDecayCurve;
     145             :     using OutputReportTabular::DeallocateLoadComponentArrays;
     146             :     using OutputReportTabular::hasSizingPeriodsDays;
     147             :     using OutputReportTabular::isCompLoadRepReq;
     148             : 
     149             :     // SUBROUTINE PARAMETER DEFINITIONS:
     150             :     static constexpr std::string_view RoutineName("ManageSizing: ");
     151             : 
     152             :     // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
     153         771 :     bool Available(false); // an environment is available to process
     154         771 :     bool ErrorsFound(false);
     155         771 :     bool SimAir(false);
     156         771 :     bool SimZoneEquip(false);
     157         771 :     int TimeStepInDay(0); // time step number
     158         771 :     int LastMonth(0);
     159         771 :     int LastDayOfMonth(0);
     160         771 :     Real64 TempAtPeak(0.0);   // Outside temperature at peak cooling/heating for reporting
     161         771 :     Real64 HumRatAtPeak(0.0); // Outside humidity ratio at peak cooling/heating for reporting
     162         771 :     int TimeStepAtPeak(0);    // time step number at heat or cool peak
     163         771 :     int DDNum(0);             // Design Day index
     164         771 :     int AirLoopNum(0);        // air loop index
     165             :     //  EXTERNAL            ReportZoneSizing
     166             :     //  EXTERNAL            ReportSysSizing
     167        1542 :     std::string curName;
     168             :     int NumSizingPeriodsPerformed;
     169             :     int numZoneSizeIter; // number of times to repeat zone sizing calcs. 1 normal, 2 load component reporting
     170             :     int iZoneCalcIter;   // index for repeating the zone sizing calcs
     171             :     bool isUserReqCompLoadReport;
     172         771 :     Real64 DOASHeatGainRateAtHtPk(0.0); // zone heat gain rate from the DOAS at the heating peak [W]
     173         771 :     Real64 DOASHeatGainRateAtClPk(0.0); // zone heat gain rate from the DOAS at the cooling peak [W]
     174         771 :     Real64 TStatSetPtAtPk(0.0);         // thermostat set point at peak
     175             : 
     176         771 :     auto &FinalSysSizing(state.dataSize->FinalSysSizing);
     177             : 
     178         771 :     TimeStepInDay = 0;
     179         771 :     state.dataSize->SysSizingRunDone = false;
     180         771 :     state.dataSize->ZoneSizingRunDone = false;
     181         771 :     curName = "Unknown";
     182         771 :     GetOARequirements(state);      // get the OA requirements object
     183         771 :     GetZoneAirDistribution(state); // get zone air distribution objects
     184         771 :     GetZoneHVACSizing(state);      // get zone HVAC sizing object
     185         771 :     GetAirTerminalSizing(state);   // get air terminal sizing object
     186         771 :     GetSizingParams(state);        // get the building level sizing paramets
     187         771 :     GetZoneSizingInput(state);     // get the Zone Sizing input
     188         771 :     GetSystemSizingInput(state);   // get the System Sizing input
     189         771 :     GetPlantSizingInput(state);    // get the Plant Sizing input
     190             : 
     191             :     // okay, check sizing inputs vs desires vs requirements
     192         771 :     if (state.dataGlobal->DoZoneSizing || state.dataGlobal->DoSystemSizing) {
     193         818 :         if ((state.dataSize->NumSysSizInput > 0 && state.dataSize->NumZoneSizingInput == 0) ||
     194         410 :             (!state.dataGlobal->DoZoneSizing && state.dataGlobal->DoSystemSizing && state.dataSize->NumSysSizInput > 0)) {
     195           0 :             ShowSevereError(state, std::string{RoutineName} + "Requested System Sizing but did not request Zone Sizing.");
     196           0 :             ShowContinueError(state, "System Sizing cannot be done without Zone Sizing");
     197           0 :             ShowFatalError(state, "Program terminates for preceding conditions.");
     198             :         }
     199             :     }
     200             : 
     201             :     // determine if the second set of zone sizing calculations should be performed
     202             :     // that include a pulse for the load component reporting
     203         771 :     isUserReqCompLoadReport = isCompLoadRepReq(state); // check getinput structure if load component report is requested
     204             :     bool fileHasSizingPeriodDays =
     205         771 :         hasSizingPeriodsDays(state); // check getinput if SizingPeriod:DesignDays or SizingPeriod:WeatherFileDays are present
     206         771 :     if (state.dataGlobal->DoZoneSizing && (state.dataSize->NumZoneSizingInput > 0) && fileHasSizingPeriodDays) {
     207         406 :         state.dataGlobal->CompLoadReportIsReq = isUserReqCompLoadReport;
     208             :     } else { // produce a warning if the user asked for the report but it will not be generated because sizing is not done
     209         365 :         if (isUserReqCompLoadReport) {
     210           0 :             if (fileHasSizingPeriodDays) {
     211           0 :                 ShowWarningError(
     212             :                     state,
     213           0 :                     std::string{RoutineName} +
     214             :                         "The ZoneComponentLoadSummary report was requested but no sizing objects were found so that report cannot be generated.");
     215             :             } else {
     216           0 :                 ShowWarningError(state,
     217           0 :                                  std::string{RoutineName} + "The ZoneComponentLoadSummary report was requested but no SizingPeriod:DesignDay or "
     218             :                                                             "SizingPeriod:WeatherFileDays objects were found so that report cannot be generated.");
     219             :             }
     220             :         }
     221             :     }
     222         771 :     if (state.dataGlobal->CompLoadReportIsReq) { // if that report is created then zone sizing calculations are repeated
     223          23 :         numZoneSizeIter = 2;
     224             :     } else {
     225         748 :         numZoneSizeIter = 1;
     226             :     }
     227             : 
     228         771 :     if ((state.dataGlobal->DoZoneSizing) && (state.dataSize->NumZoneSizingInput == 0)) {
     229           6 :         ShowWarningError(
     230             :             state,
     231           4 :             std::string{RoutineName} +
     232             :                 "For a zone sizing run, there must be at least 1 Sizing:Zone input object. SimulationControl Zone Sizing option ignored.");
     233             :     }
     234             : 
     235        1597 :     if ((state.dataSize->NumZoneSizingInput > 0) &&
     236         434 :         (state.dataGlobal->DoZoneSizing || state.dataGlobal->DoSystemSizing || state.dataGlobal->DoPlantSizing)) {
     237             : 
     238         406 :         if (state.dataGlobal->DoDesDaySim || state.dataGlobal->DoWeathSim) {
     239         406 :             state.dataGlobal->DoOutputReporting = false;
     240             :         }
     241         406 :         state.dataGlobal->DoOutputReporting = false;
     242         406 :         state.dataGlobal->ZoneSizingCalc = true;
     243         406 :         Available = true;
     244             : 
     245         406 :         if (state.dataSize->SizingFileColSep == CharComma) {
     246         406 :             state.files.zsz.filePath = state.files.outputZszCsvFilePath;
     247           0 :         } else if (state.dataSize->SizingFileColSep == CharTab) {
     248           0 :             state.files.zsz.filePath = state.files.outputZszTabFilePath;
     249             :         } else {
     250           0 :             state.files.zsz.filePath = state.files.outputZszTxtFilePath;
     251             :         }
     252             : 
     253         406 :         state.files.zsz.ensure_open(state, "ManageSizing", state.files.outputControl.zsz);
     254             : 
     255         406 :         ShowMessage(state, "Beginning Zone Sizing Calculations");
     256             : 
     257         406 :         ResetEnvironmentCounter(state);
     258         406 :         state.dataGlobal->KickOffSizing = true;
     259         406 :         SetupZoneSizing(state, ErrorsFound); // Should only be done ONCE
     260         405 :         state.dataGlobal->KickOffSizing = false;
     261             : 
     262         833 :         for (iZoneCalcIter = 1; iZoneCalcIter <= numZoneSizeIter; ++iZoneCalcIter) { // normally this is performed once but if load component
     263             :             // report is requested, these are repeated with a pulse in
     264             :             // each zone.
     265             : 
     266             :             // set flag if performing a "pulse" set of sizing calcs
     267             :             // the pulse simulation needs to be done first (the 1 in the following line) otherwise
     268             :             // the difference seen in the loads in the epluspls and epluszsz files are not
     269             :             // simple decreasing curves but appear as amost random fluctuations.
     270         428 :             state.dataGlobal->isPulseZoneSizing = (state.dataGlobal->CompLoadReportIsReq && (iZoneCalcIter == 1));
     271         428 :             if (state.dataGlobal->DoPureLoadCalc && !state.dataGlobal->isPulseZoneSizing) {
     272           0 :                 state.dataGlobal->DoOutputReporting = true;
     273             :             }
     274             : 
     275         428 :             Available = true;
     276             : 
     277         428 :             ResetEnvironmentCounter(state);
     278         428 :             state.dataSize->CurOverallSimDay = 0;
     279         428 :             NumSizingPeriodsPerformed = 0;
     280        2196 :             while (Available) { // loop over environments
     281             : 
     282        1312 :                 GetNextEnvironment(state, Available, ErrorsFound); // get an environment
     283             : 
     284        1312 :                 if (!Available) break;
     285         884 :                 if (ErrorsFound) break;
     286             : 
     287             :                 // check that environment is one of the design days
     288         884 :                 if (state.dataGlobal->KindOfSim == DataGlobalConstants::KindOfSim::RunPeriodWeather) {
     289           0 :                     continue;
     290             :                 }
     291             : 
     292         884 :                 ++NumSizingPeriodsPerformed;
     293             : 
     294         884 :                 if (state.dataGlobal->DoPureLoadCalc && !state.dataGlobal->isPulseZoneSizing) {
     295           0 :                     if (state.dataSQLiteProcedures->sqlite) {
     296           0 :                         state.dataSQLiteProcedures->sqlite->sqliteBegin();
     297           0 :                         state.dataSQLiteProcedures->sqlite->createSQLiteEnvironmentPeriodRecord(
     298           0 :                             state.dataEnvrn->CurEnvirNum, state.dataEnvrn->EnvironmentName, state.dataGlobal->KindOfSim);
     299           0 :                         state.dataSQLiteProcedures->sqlite->sqliteCommit();
     300             :                     }
     301             :                 }
     302             : 
     303         884 :                 state.dataGlobal->BeginEnvrnFlag = true;
     304         884 :                 state.dataGlobal->EndEnvrnFlag = false;
     305         884 :                 state.dataEnvrn->EndMonthFlag = false;
     306         884 :                 state.dataGlobal->WarmupFlag = true;
     307         884 :                 state.dataGlobal->DayOfSim = 0;
     308         884 :                 state.dataGlobal->DayOfSimChr = "0";
     309         884 :                 state.dataSize->CurEnvirNumSimDay = 1;
     310         884 :                 ++state.dataSize->CurOverallSimDay;
     311       13460 :                 while ((state.dataGlobal->DayOfSim < state.dataGlobal->NumOfDayInEnvrn) || (state.dataGlobal->WarmupFlag)) { // Begin day loop ...
     312             : 
     313        6288 :                     ++state.dataGlobal->DayOfSim;
     314        6288 :                     if (!state.dataGlobal->WarmupFlag && state.dataGlobal->DayOfSim > 1) {
     315          33 :                         ++state.dataSize->CurEnvirNumSimDay;
     316             :                     }
     317             : 
     318        6288 :                     state.dataGlobal->DayOfSimChr = fmt::to_string(state.dataGlobal->DayOfSim);
     319        6288 :                     state.dataGlobal->BeginDayFlag = true;
     320        6288 :                     state.dataGlobal->EndDayFlag = false;
     321             : 
     322        6288 :                     if (state.dataGlobal->WarmupFlag) {
     323        5371 :                         DisplayString(state, "Warming up");
     324             :                     } else { // (.NOT.WarmupFlag)
     325         917 :                         if (state.dataGlobal->DayOfSim == 1) {
     326         884 :                             if (!state.dataGlobal->isPulseZoneSizing) {
     327         838 :                                 DisplayString(state, "Performing Zone Sizing Simulation");
     328             :                             } else {
     329          46 :                                 DisplayString(state, "Performing Zone Sizing Simulation for Load Component Report");
     330             :                             }
     331         884 :                             DisplayString(state,
     332        1768 :                                           fmt::format("...for Sizing Period: #{} {}", NumSizingPeriodsPerformed, state.dataEnvrn->EnvironmentName));
     333             :                         }
     334         917 :                         UpdateZoneSizing(state, DataGlobalConstants::CallIndicator::BeginDay);
     335         917 :                         UpdateFacilitySizing(state, DataGlobalConstants::CallIndicator::BeginDay);
     336             :                     }
     337             : 
     338      157200 :                     for (state.dataGlobal->HourOfDay = 1; state.dataGlobal->HourOfDay <= 24; ++state.dataGlobal->HourOfDay) { // Begin hour loop ...
     339             : 
     340      150912 :                         state.dataGlobal->BeginHourFlag = true;
     341      150912 :                         state.dataGlobal->EndHourFlag = false;
     342             : 
     343      931680 :                         for (state.dataGlobal->TimeStep = 1; state.dataGlobal->TimeStep <= state.dataGlobal->NumOfTimeStepInHour;
     344      780768 :                              ++state.dataGlobal->TimeStep) { // Begin time step (TINC) loop ...
     345             : 
     346      780768 :                             state.dataGlobal->BeginTimeStepFlag = true;
     347             : 
     348             :                             // Set the End__Flag variables to true if necessary.  Note that
     349             :                             // each flag builds on the previous level.  EndDayFlag cannot be
     350             :                             // .TRUE. unless EndHourFlag is also .TRUE., etc.  Note that the
     351             :                             // EndEnvrnFlag and the EndSimFlag cannot be set during warmup.
     352             :                             // Note also that BeginTimeStepFlag, EndTimeStepFlag, and the
     353             :                             // SubTimeStepFlags can/will be set/reset in the HVAC Manager.
     354             : 
     355      780768 :                             if (state.dataGlobal->TimeStep == state.dataGlobal->NumOfTimeStepInHour) {
     356      150912 :                                 state.dataGlobal->EndHourFlag = true;
     357      150912 :                                 if (state.dataGlobal->HourOfDay == 24) {
     358        6288 :                                     state.dataGlobal->EndDayFlag = true;
     359        6288 :                                     if ((!state.dataGlobal->WarmupFlag) && (state.dataGlobal->DayOfSim == state.dataGlobal->NumOfDayInEnvrn)) {
     360         884 :                                         state.dataGlobal->EndEnvrnFlag = true;
     361             :                                     }
     362             :                                 }
     363             :                             }
     364             : 
     365             :                             // set flag for pulse used in load component reporting
     366     3903840 :                             state.dataGlobal->doLoadComponentPulseNow = CalcdoLoadComponentPulseNow(state,
     367      780768 :                                                                                                     state.dataGlobal->isPulseZoneSizing,
     368      780768 :                                                                                                     state.dataGlobal->WarmupFlag,
     369      780768 :                                                                                                     state.dataGlobal->HourOfDay,
     370      780768 :                                                                                                     state.dataGlobal->TimeStep,
     371      780768 :                                                                                                     state.dataGlobal->KindOfSim);
     372             : 
     373      780768 :                             ManageWeather(state);
     374             : 
     375      780768 :                             if (!state.dataGlobal->WarmupFlag) {
     376      114432 :                                 TimeStepInDay =
     377      114432 :                                     (state.dataGlobal->HourOfDay - 1) * state.dataGlobal->NumOfTimeStepInHour + state.dataGlobal->TimeStep;
     378      114432 :                                 if (state.dataGlobal->HourOfDay == 1 && state.dataGlobal->TimeStep == 1) {
     379        1834 :                                     state.dataSize->DesDayWeath(state.dataSize->CurOverallSimDay).DateString =
     380        2751 :                                         fmt::format("{}/{}", state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth);
     381             :                                 }
     382      114432 :                                 state.dataSize->DesDayWeath(state.dataSize->CurOverallSimDay).Temp(TimeStepInDay) = state.dataEnvrn->OutDryBulbTemp;
     383      114432 :                                 state.dataSize->DesDayWeath(state.dataSize->CurOverallSimDay).HumRat(TimeStepInDay) = state.dataEnvrn->OutHumRat;
     384      114432 :                                 state.dataSize->DesDayWeath(state.dataSize->CurOverallSimDay).Press(TimeStepInDay) = state.dataEnvrn->OutBaroPress;
     385             :                             }
     386             : 
     387      780768 :                             ManageHeatBalance(state);
     388             : 
     389      780768 :                             state.dataGlobal->BeginHourFlag = false;
     390      780768 :                             state.dataGlobal->BeginDayFlag = false;
     391      780768 :                             state.dataGlobal->BeginEnvrnFlag = false;
     392      780768 :                             state.dataGlobal->BeginSimFlag = false;
     393             : 
     394             :                         } // ... End time step (TINC) loop.
     395             : 
     396      150912 :                         state.dataGlobal->PreviousHour = state.dataGlobal->HourOfDay;
     397             : 
     398             :                     } // ... End hour loop.
     399             : 
     400        6288 :                     if (state.dataGlobal->EndDayFlag && !state.dataGlobal->WarmupFlag) {
     401        1801 :                         UpdateZoneSizing(state, DataGlobalConstants::CallIndicator::EndDay);
     402        1801 :                         UpdateFacilitySizing(state, DataGlobalConstants::CallIndicator::EndDay);
     403             :                     }
     404             : 
     405        7205 :                     if (!state.dataGlobal->WarmupFlag && (state.dataGlobal->DayOfSim > 0) &&
     406         917 :                         (state.dataGlobal->DayOfSim < state.dataGlobal->NumOfDayInEnvrn)) {
     407          33 :                         ++state.dataSize->CurOverallSimDay;
     408             :                     }
     409             : 
     410             :                 } // ... End day loop.
     411             : 
     412         884 :                 LastMonth = state.dataEnvrn->Month;
     413         884 :                 LastDayOfMonth = state.dataEnvrn->DayOfMonth;
     414             : 
     415             :             } // ... End environment loop
     416             : 
     417         428 :             if (NumSizingPeriodsPerformed > 0) {
     418         428 :                 UpdateZoneSizing(state, DataGlobalConstants::CallIndicator::EndZoneSizingCalc);
     419         428 :                 UpdateFacilitySizing(state, DataGlobalConstants::CallIndicator::EndZoneSizingCalc);
     420         428 :                 state.dataSize->ZoneSizingRunDone = true;
     421             :             } else {
     422           0 :                 ShowSevereError(state,
     423           0 :                                 std::string{RoutineName} + "No Sizing periods were performed for Zone Sizing. No Zone Sizing calculations saved.");
     424           0 :                 ErrorsFound = true;
     425             :             }
     426             : 
     427         428 :             if (state.dataGlobal->isPulseZoneSizing && state.dataSizingManager->runZeroingOnce) {
     428          23 :                 RezeroZoneSizingArrays(state); // zero all arrays related to zone sizing.
     429          23 :                 state.dataSizingManager->runZeroingOnce = false;
     430             :             }
     431             :         } // loop that repeats the zone sizing calcs for the load component report, if requested
     432             : 
     433             :         // both the pulse and normal zone sizing is complete so now post processing of the results is performed
     434         405 :         if (state.dataGlobal->CompLoadReportIsReq) {
     435             :             // call the routine that computes the decay curve
     436          23 :             ComputeLoadComponentDecayCurve(state);
     437             :             // remove some of the arrays used to derive the decay curves
     438          23 :             DeallocateLoadComponentArrays(state);
     439             :         }
     440             :     }
     441             : 
     442         770 :     state.dataGlobal->ZoneSizingCalc = false;
     443         770 :     state.dataGlobal->DoOutputReporting = false;
     444         770 :     state.dataEnvrn->Month = LastMonth;
     445         770 :     state.dataEnvrn->DayOfMonth = LastDayOfMonth;
     446             : 
     447         770 :     if ((state.dataGlobal->DoSystemSizing) && (state.dataSize->NumSysSizInput == 0) && (state.dataSizingManager->NumAirLoops > 0)) {
     448           6 :         ShowWarningError(
     449             :             state,
     450           4 :             std::string{RoutineName} +
     451             :                 "For a system sizing run, there must be at least 1 Sizing:System object input. SimulationControl System Sizing option ignored.");
     452             :     }
     453             : 
     454         770 :     if ((state.dataSize->NumSysSizInput > 0) && (state.dataGlobal->DoSystemSizing || state.dataGlobal->DoPlantSizing) && !ErrorsFound) {
     455             : 
     456         330 :         ShowMessage(state, "Beginning System Sizing Calculations");
     457             : 
     458         330 :         state.dataGlobal->SysSizingCalc = true;
     459         330 :         Available = true;
     460         330 :         if (state.dataSize->SizingFileColSep == CharComma) {
     461         330 :             state.files.ssz.filePath = state.files.outputSszCsvFilePath;
     462           0 :         } else if (state.dataSize->SizingFileColSep == CharTab) {
     463           0 :             state.files.ssz.filePath = state.files.outputSszTabFilePath;
     464             :         } else {
     465           0 :             state.files.ssz.filePath = state.files.outputSszTxtFilePath;
     466             :         }
     467         330 :         state.files.ssz.ensure_open(state, "ManageSizing", state.files.outputControl.ssz);
     468             : 
     469         330 :         SimAir = true;
     470         330 :         SimZoneEquip = true;
     471             : 
     472         330 :         ManageZoneEquipment(state, true, SimZoneEquip, SimAir);
     473         330 :         ManageAirLoops(state, true, SimAir, SimZoneEquip);
     474         329 :         SizingManager::UpdateTermUnitFinalZoneSizing(state); // AirDistUnits have been loaded now so TermUnitSizing values are all in place
     475         329 :         SimAirServingZones::SizeSysOutdoorAir(state);        // System OA can be sized now that TermUnitFinalZoneSizing is initialized
     476         329 :         ResetEnvironmentCounter(state);
     477         329 :         state.dataSize->CurEnvirNumSimDay = 0;
     478         329 :         state.dataSize->CurOverallSimDay = 0;
     479         329 :         NumSizingPeriodsPerformed = 0;
     480        2351 :         while (Available) { // loop over environments
     481             : 
     482        1012 :             GetNextEnvironment(state, Available, ErrorsFound); // get an environment
     483             : 
     484             :             // check that environment is one of the design days
     485        1012 :             if (state.dataGlobal->KindOfSim == DataGlobalConstants::KindOfSim::RunPeriodWeather) {
     486         328 :                 continue;
     487             :             }
     488             : 
     489         684 :             if (!Available) break;
     490         683 :             if (ErrorsFound) break;
     491             : 
     492         683 :             ++NumSizingPeriodsPerformed;
     493             : 
     494         683 :             state.dataGlobal->BeginEnvrnFlag = true;
     495         683 :             state.dataGlobal->EndEnvrnFlag = false;
     496         683 :             state.dataGlobal->WarmupFlag = false;
     497         683 :             state.dataGlobal->DayOfSim = 0;
     498         683 :             state.dataGlobal->DayOfSimChr = "0";
     499         683 :             state.dataSize->CurEnvirNumSimDay = 1;
     500         683 :             ++state.dataSize->CurOverallSimDay;
     501             : 
     502        2073 :             while ((state.dataGlobal->DayOfSim < state.dataGlobal->NumOfDayInEnvrn) || (state.dataGlobal->WarmupFlag)) { // Begin day loop ...
     503             : 
     504         695 :                 ++state.dataGlobal->DayOfSim;
     505         695 :                 if (!state.dataGlobal->WarmupFlag && state.dataGlobal->DayOfSim > 1) {
     506          12 :                     ++state.dataSize->CurEnvirNumSimDay;
     507             :                 }
     508         695 :                 state.dataGlobal->DayOfSimChr = fmt::to_string(state.dataGlobal->DayOfSim);
     509         695 :                 state.dataGlobal->BeginDayFlag = true;
     510         695 :                 state.dataGlobal->EndDayFlag = false;
     511             : 
     512         695 :                 if (state.dataGlobal->WarmupFlag) {
     513           0 :                     DisplayString(state, "Warming up");
     514             :                 } else { // (.NOT.WarmupFlag)
     515         695 :                     if (state.dataGlobal->DayOfSim == 1) {
     516         683 :                         DisplayString(state, "Calculating System sizing");
     517         683 :                         DisplayString(state,
     518        1366 :                                       fmt::format("...for Sizing Period: #{} {}", NumSizingPeriodsPerformed, state.dataEnvrn->EnvironmentName));
     519             :                     }
     520         695 :                     UpdateSysSizing(state, DataGlobalConstants::CallIndicator::BeginDay);
     521             :                 }
     522             : 
     523       17375 :                 for (state.dataGlobal->HourOfDay = 1; state.dataGlobal->HourOfDay <= 24; ++state.dataGlobal->HourOfDay) { // Begin hour loop ...
     524             : 
     525       16680 :                     state.dataGlobal->BeginHourFlag = true;
     526       16680 :                     state.dataGlobal->EndHourFlag = false;
     527             : 
     528      100776 :                     for (state.dataGlobal->TimeStep = 1; state.dataGlobal->TimeStep <= state.dataGlobal->NumOfTimeStepInHour;
     529       84096 :                          ++state.dataGlobal->TimeStep) { // Begin time step (TINC) loop ...
     530             : 
     531       84096 :                         state.dataGlobal->BeginTimeStepFlag = true;
     532             : 
     533             :                         // Set the End__Flag variables to true if necessary.  Note that
     534             :                         // each flag builds on the previous level.  EndDayFlag cannot be
     535             :                         // .TRUE. unless EndHourFlag is also .TRUE., etc.  Note that the
     536             :                         // EndEnvrnFlag and the EndSimFlag cannot be set during warmup.
     537             : 
     538       84096 :                         if (state.dataGlobal->TimeStep == state.dataGlobal->NumOfTimeStepInHour) {
     539       16680 :                             state.dataGlobal->EndHourFlag = true;
     540       16680 :                             if (state.dataGlobal->HourOfDay == 24) {
     541         695 :                                 state.dataGlobal->EndDayFlag = true;
     542         695 :                                 if ((!state.dataGlobal->WarmupFlag) && (state.dataGlobal->DayOfSim == state.dataGlobal->NumOfDayInEnvrn)) {
     543         683 :                                     state.dataGlobal->EndEnvrnFlag = true;
     544             :                                 }
     545             :                             }
     546             :                         }
     547             : 
     548       84096 :                         ManageWeather(state);
     549             : 
     550       84096 :                         UpdateSysSizing(state, DataGlobalConstants::CallIndicator::DuringDay);
     551             : 
     552       84096 :                         state.dataGlobal->BeginHourFlag = false;
     553       84096 :                         state.dataGlobal->BeginDayFlag = false;
     554       84096 :                         state.dataGlobal->BeginEnvrnFlag = false;
     555             : 
     556             :                     } // ... End time step (TINC) loop.
     557             : 
     558       16680 :                     state.dataGlobal->PreviousHour = state.dataGlobal->HourOfDay;
     559             : 
     560             :                 } // ... End hour loop.
     561             : 
     562         695 :                 if (state.dataGlobal->EndDayFlag) UpdateSysSizing(state, DataGlobalConstants::CallIndicator::EndDay);
     563             : 
     564        1390 :                 if (!state.dataGlobal->WarmupFlag && (state.dataGlobal->DayOfSim > 0) &&
     565         695 :                     (state.dataGlobal->DayOfSim < state.dataGlobal->NumOfDayInEnvrn)) {
     566          12 :                     ++state.dataSize->CurOverallSimDay;
     567             :                 }
     568             : 
     569             :             } // ... End day loop.
     570             : 
     571             :         } // ... End environment loop
     572             : 
     573         329 :         if (NumSizingPeriodsPerformed > 0) {
     574         329 :             UpdateSysSizing(state, DataGlobalConstants::CallIndicator::EndSysSizingCalc);
     575         329 :             state.dataSize->SysSizingRunDone = true;
     576             :         } else {
     577           0 :             ShowSevereError(state,
     578           0 :                             std::string{RoutineName} + "No Sizing periods were performed for System Sizing. No System Sizing calculations saved.");
     579           0 :             ErrorsFound = true;
     580             :         }
     581         604 :     } else if ((state.dataSize->NumZoneSizingInput > 0) &&
     582         103 :                (state.dataGlobal->DoZoneSizing || state.dataGlobal->DoSystemSizing || state.dataGlobal->DoPlantSizing)) {
     583             :         // If zone sizing but no system sizing - still need to set up system zone equipment and transfer zone sizing data to
     584             :         // TermUnitFinalZoneSizing
     585          75 :         state.dataGlobal->SysSizingCalc = true; // set true here so equipment does not try to size yet
     586          75 :         SimAir = true;
     587          75 :         SimZoneEquip = true;
     588             : 
     589          75 :         ManageZoneEquipment(state, true, SimZoneEquip, SimAir);
     590          75 :         SizingManager::UpdateTermUnitFinalZoneSizing(state); // AirDistUnits have been loaded now so TermUnitSizing values are all in place
     591             :     }
     592         769 :     state.dataGlobal->SysSizingCalc = false;
     593             : 
     594             :     // report sizing results to eio file
     595         769 :     if (state.dataSize->ZoneSizingRunDone) {
     596        4181 :         for (int CtrlZoneNum = 1; CtrlZoneNum <= state.dataGlobal->NumOfZones; ++CtrlZoneNum) {
     597        3777 :             if (!state.dataZoneEquip->ZoneEquipConfig(CtrlZoneNum).IsControlled) continue;
     598        3310 :             if (state.dataSize->FinalZoneSizing(CtrlZoneNum).DesCoolVolFlow > 0.0) {
     599        3268 :                 TimeStepAtPeak = state.dataSize->FinalZoneSizing(CtrlZoneNum).TimeStepNumAtCoolMax;
     600        3268 :                 DDNum = state.dataSize->FinalZoneSizing(CtrlZoneNum).CoolDDNum;
     601        3268 :                 if (DDNum > 0 && TimeStepAtPeak > 0) {
     602        3268 :                     TempAtPeak = state.dataSize->DesDayWeath(DDNum).Temp(TimeStepAtPeak);
     603        3268 :                     HumRatAtPeak = state.dataSize->DesDayWeath(DDNum).HumRat(TimeStepAtPeak);
     604        3268 :                     DOASHeatGainRateAtClPk = state.dataSize->CalcZoneSizing(DDNum, CtrlZoneNum).DOASHeatAddSeq(TimeStepAtPeak);
     605        3268 :                     TStatSetPtAtPk = state.dataSize->ZoneSizing(DDNum, CtrlZoneNum).CoolTstatTempSeq(TimeStepAtPeak);
     606             :                 } else {
     607           0 :                     TempAtPeak = 0.0;
     608           0 :                     HumRatAtPeak = 0.0;
     609           0 :                     DOASHeatGainRateAtClPk = 0.0;
     610           0 :                     TStatSetPtAtPk = 0.0;
     611             :                 }
     612       32680 :                 ReportZoneSizing(state,
     613        3268 :                                  state.dataSize->FinalZoneSizing(CtrlZoneNum).ZoneName,
     614        3268 :                                  state.dataSize->CalcFinalZoneSizing(CtrlZoneNum).CoolSizingType,
     615        3268 :                                  state.dataSize->CalcFinalZoneSizing(CtrlZoneNum).DesCoolLoad,
     616        3268 :                                  state.dataSize->FinalZoneSizing(CtrlZoneNum).DesCoolLoad,
     617        3268 :                                  state.dataSize->CalcFinalZoneSizing(CtrlZoneNum).DesCoolVolFlow,
     618        3268 :                                  state.dataSize->FinalZoneSizing(CtrlZoneNum).DesCoolVolFlow,
     619        3268 :                                  state.dataSize->FinalZoneSizing(CtrlZoneNum).CoolDesDay,
     620        3268 :                                  state.dataSize->CoolPeakDateHrMin(CtrlZoneNum),
     621             :                                  TempAtPeak,
     622             :                                  HumRatAtPeak,
     623        3268 :                                  state.dataHeatBal->Zone(CtrlZoneNum).FloorArea,
     624        3268 :                                  state.dataHeatBal->Zone(CtrlZoneNum).TotOccupants,
     625        3268 :                                  state.dataSize->FinalZoneSizing(CtrlZoneNum).MinOA,
     626             :                                  DOASHeatGainRateAtClPk);
     627        3268 :                 curName = state.dataSize->FinalZoneSizing(CtrlZoneNum).ZoneName;
     628        9804 :                 PreDefTableEntry(
     629        6536 :                     state, state.dataOutRptPredefined->pdchZnClCalcDesLd, curName, state.dataSize->CalcFinalZoneSizing(CtrlZoneNum).DesCoolLoad);
     630        9804 :                 PreDefTableEntry(
     631        6536 :                     state, state.dataOutRptPredefined->pdchZnClUserDesLd, curName, state.dataSize->FinalZoneSizing(CtrlZoneNum).DesCoolLoad);
     632        3268 :                 if (state.dataHeatBal->Zone(CtrlZoneNum).FloorArea != 0.0) {
     633        9804 :                     PreDefTableEntry(state,
     634        3268 :                                      state.dataOutRptPredefined->pdchZnClUserDesLdPerArea,
     635             :                                      curName,
     636        3268 :                                      state.dataSize->FinalZoneSizing(CtrlZoneNum).DesCoolLoad / state.dataHeatBal->Zone(CtrlZoneNum).FloorArea);
     637             :                 }
     638        9804 :                 PreDefTableEntry(state,
     639        3268 :                                  state.dataOutRptPredefined->pdchZnClCalcDesAirFlow,
     640             :                                  curName,
     641        3268 :                                  state.dataSize->CalcFinalZoneSizing(CtrlZoneNum).DesCoolVolFlow,
     642             :                                  3);
     643        9804 :                 PreDefTableEntry(state,
     644        3268 :                                  state.dataOutRptPredefined->pdchZnClUserDesAirFlow,
     645             :                                  curName,
     646        3268 :                                  state.dataSize->FinalZoneSizing(CtrlZoneNum).DesCoolVolFlow,
     647             :                                  3);
     648        3268 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnClDesDay, curName, state.dataSize->FinalZoneSizing(CtrlZoneNum).CoolDesDay);
     649        3268 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnClPkTime, curName, state.dataSize->CoolPeakDateHrMin(CtrlZoneNum));
     650        3268 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnClPkTstatTemp, curName, TStatSetPtAtPk);
     651        9804 :                 PreDefTableEntry(state,
     652        3268 :                                  state.dataOutRptPredefined->pdchZnClPkIndTemp,
     653             :                                  curName,
     654        3268 :                                  state.dataSize->CalcFinalZoneSizing(CtrlZoneNum).ZoneTempAtCoolPeak);
     655        9804 :                 PreDefTableEntry(state,
     656        3268 :                                  state.dataOutRptPredefined->pdchZnClPkIndHum,
     657             :                                  curName,
     658        3268 :                                  state.dataSize->CalcFinalZoneSizing(CtrlZoneNum).ZoneHumRatAtCoolPeak,
     659             :                                  5);
     660        3268 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnClPkOATemp, curName, TempAtPeak);
     661        3268 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnClPkOAHum, curName, HumRatAtPeak, 5);
     662        9804 :                 PreDefTableEntry(
     663        6536 :                     state, state.dataOutRptPredefined->pdchZnClPkOAMinFlow, curName, state.dataSize->FinalZoneSizing(CtrlZoneNum).MinOA, 3);
     664        3268 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnClPkDOASHeatGain, curName, DOASHeatGainRateAtClPk);
     665             :             } else {
     666          42 :                 curName = state.dataSize->FinalZoneSizing(CtrlZoneNum).ZoneName;
     667          42 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnClCalcDesLd, curName, 0.0, 1);
     668          42 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnClUserDesLd, curName, 0.0, 1);
     669          42 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnClUserDesLdPerArea, curName, 0.0, 1);
     670          42 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnClCalcDesAirFlow, curName, 0.0, 1);
     671          42 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnClUserDesAirFlow, curName, 0.0, 1);
     672          42 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnClDesDay, curName, "N/A");
     673          42 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnClPkTime, curName, "N/A");
     674          42 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnClPkTstatTemp, curName, 0.0, 1);
     675          42 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnClPkIndTemp, curName, 0.0, 1);
     676          42 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnClPkIndHum, curName, 0.0, 1);
     677          42 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnClPkOATemp, curName, 0.0, 1);
     678          42 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnClPkOAHum, curName, 0.0, 1);
     679          42 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnClPkOAMinFlow, curName, 0.0, 1);
     680          42 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnClPkDOASHeatGain, curName, 0.0, 1);
     681             :             }
     682        3310 :             if (state.dataSize->FinalZoneSizing(CtrlZoneNum).DesHeatVolFlow > 0.0) {
     683        3293 :                 TimeStepAtPeak = state.dataSize->FinalZoneSizing(CtrlZoneNum).TimeStepNumAtHeatMax;
     684        3293 :                 DDNum = state.dataSize->FinalZoneSizing(CtrlZoneNum).HeatDDNum;
     685        3293 :                 if (DDNum > 0 && TimeStepAtPeak > 0) {
     686        3293 :                     TempAtPeak = state.dataSize->DesDayWeath(DDNum).Temp(TimeStepAtPeak);
     687        3293 :                     HumRatAtPeak = state.dataSize->DesDayWeath(DDNum).HumRat(TimeStepAtPeak);
     688        3293 :                     DOASHeatGainRateAtHtPk = state.dataSize->CalcZoneSizing(DDNum, CtrlZoneNum).DOASHeatAddSeq(TimeStepAtPeak);
     689        3293 :                     TStatSetPtAtPk = state.dataSize->ZoneSizing(DDNum, CtrlZoneNum).HeatTstatTempSeq(TimeStepAtPeak);
     690             :                 } else {
     691           0 :                     TempAtPeak = 0.0;
     692           0 :                     HumRatAtPeak = 0.0;
     693           0 :                     DOASHeatGainRateAtHtPk = 0.0;
     694           0 :                     TStatSetPtAtPk = 0.0;
     695             :                 }
     696       32930 :                 ReportZoneSizing(state,
     697        3293 :                                  state.dataSize->FinalZoneSizing(CtrlZoneNum).ZoneName,
     698        3293 :                                  state.dataSize->CalcFinalZoneSizing(CtrlZoneNum).HeatSizingType,
     699        3293 :                                  state.dataSize->CalcFinalZoneSizing(CtrlZoneNum).DesHeatLoad,
     700        3293 :                                  state.dataSize->FinalZoneSizing(CtrlZoneNum).DesHeatLoad,
     701        3293 :                                  state.dataSize->CalcFinalZoneSizing(CtrlZoneNum).DesHeatVolFlow,
     702        3293 :                                  state.dataSize->FinalZoneSizing(CtrlZoneNum).DesHeatVolFlow,
     703        3293 :                                  state.dataSize->FinalZoneSizing(CtrlZoneNum).HeatDesDay,
     704        3293 :                                  state.dataSize->HeatPeakDateHrMin(CtrlZoneNum),
     705             :                                  TempAtPeak,
     706             :                                  HumRatAtPeak,
     707        3293 :                                  state.dataHeatBal->Zone(CtrlZoneNum).FloorArea,
     708        3293 :                                  state.dataHeatBal->Zone(CtrlZoneNum).TotOccupants,
     709        3293 :                                  state.dataSize->FinalZoneSizing(CtrlZoneNum).MinOA,
     710             :                                  DOASHeatGainRateAtHtPk);
     711        3293 :                 curName = state.dataSize->FinalZoneSizing(CtrlZoneNum).ZoneName;
     712        9879 :                 PreDefTableEntry(
     713        6586 :                     state, state.dataOutRptPredefined->pdchZnHtCalcDesLd, curName, state.dataSize->CalcFinalZoneSizing(CtrlZoneNum).DesHeatLoad);
     714        9879 :                 PreDefTableEntry(
     715        6586 :                     state, state.dataOutRptPredefined->pdchZnHtUserDesLd, curName, state.dataSize->FinalZoneSizing(CtrlZoneNum).DesHeatLoad);
     716        3293 :                 if (state.dataHeatBal->Zone(CtrlZoneNum).FloorArea != 0.0) {
     717        9879 :                     PreDefTableEntry(state,
     718        3293 :                                      state.dataOutRptPredefined->pdchZnHtUserDesLdPerArea,
     719             :                                      curName,
     720        3293 :                                      state.dataSize->FinalZoneSizing(CtrlZoneNum).DesHeatLoad / state.dataHeatBal->Zone(CtrlZoneNum).FloorArea);
     721             :                 }
     722        9879 :                 PreDefTableEntry(state,
     723        3293 :                                  state.dataOutRptPredefined->pdchZnHtCalcDesAirFlow,
     724             :                                  curName,
     725        3293 :                                  state.dataSize->CalcFinalZoneSizing(CtrlZoneNum).DesHeatVolFlow,
     726             :                                  3);
     727        9879 :                 PreDefTableEntry(state,
     728        3293 :                                  state.dataOutRptPredefined->pdchZnHtUserDesAirFlow,
     729             :                                  curName,
     730        3293 :                                  state.dataSize->FinalZoneSizing(CtrlZoneNum).DesHeatVolFlow,
     731             :                                  3);
     732        3293 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnHtDesDay, curName, state.dataSize->FinalZoneSizing(CtrlZoneNum).HeatDesDay);
     733        3293 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnHtPkTime, curName, state.dataSize->HeatPeakDateHrMin(CtrlZoneNum));
     734        3293 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnHtPkTstatTemp, curName, TStatSetPtAtPk);
     735        9879 :                 PreDefTableEntry(state,
     736        3293 :                                  state.dataOutRptPredefined->pdchZnHtPkIndTemp,
     737             :                                  curName,
     738        3293 :                                  state.dataSize->CalcFinalZoneSizing(CtrlZoneNum).ZoneTempAtHeatPeak);
     739        9879 :                 PreDefTableEntry(state,
     740        3293 :                                  state.dataOutRptPredefined->pdchZnHtPkIndHum,
     741             :                                  curName,
     742        3293 :                                  state.dataSize->CalcFinalZoneSizing(CtrlZoneNum).ZoneHumRatAtHeatPeak,
     743             :                                  5);
     744        3293 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnHtPkOATemp, curName, TempAtPeak);
     745        3293 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnHtPkOAHum, curName, HumRatAtPeak, 5);
     746        9879 :                 PreDefTableEntry(
     747        6586 :                     state, state.dataOutRptPredefined->pdchZnHtPkOAMinFlow, curName, state.dataSize->FinalZoneSizing(CtrlZoneNum).MinOA, 3);
     748        3293 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnHtPkDOASHeatGain, curName, DOASHeatGainRateAtHtPk);
     749             :             } else {
     750          17 :                 curName = state.dataSize->FinalZoneSizing(CtrlZoneNum).ZoneName;
     751          17 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnHtCalcDesLd, curName, 0.0, 1);
     752          17 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnHtUserDesLd, curName, 0.0, 1);
     753          17 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnHtUserDesLdPerArea, curName, 0.0, 1);
     754          17 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnHtCalcDesAirFlow, curName, 0.0, 1);
     755          17 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnHtUserDesAirFlow, curName, 0.0, 1);
     756          17 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnHtDesDay, curName, "N/A");
     757          17 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnHtPkTime, curName, "N/A");
     758          17 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnHtPkTstatTemp, curName, 0.0, 1);
     759          17 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnHtPkIndTemp, curName, 0.0, 1);
     760          17 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnHtPkIndHum, curName, 0.0, 1);
     761          17 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnHtPkOATemp, curName, 0.0, 1);
     762          17 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnHtPkOAHum, curName, 0.0, 1);
     763          17 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnHtPkOAMinFlow, curName, 0.0, 1);
     764          17 :                 PreDefTableEntry(state, state.dataOutRptPredefined->pdchZnHtPkDOASHeatGain, curName, 0.0, 1);
     765             :             }
     766             :         }
     767             :         // Deallocate arrays no longer needed
     768         404 :         state.dataSize->ZoneSizing.deallocate();
     769             :         // CalcZoneSizing.deallocate();
     770             :     }
     771         769 :     if (state.dataSize->SysSizingRunDone) {
     772        1254 :         for (AirLoopNum = 1; AirLoopNum <= state.dataHVACGlobal->NumPrimaryAirSys; ++AirLoopNum) {
     773         925 :             curName = FinalSysSizing(AirLoopNum).AirPriLoopName;
     774         925 :             PreDefTableEntry(state, state.dataOutRptPredefined->pdchSysSizCalcClAir, curName, CalcSysSizing(AirLoopNum).DesCoolVolFlow);
     775         925 :             if (std::abs(CalcSysSizing(AirLoopNum).DesCoolVolFlow) <= 1.e-8) {
     776           0 :                 ShowWarningError(state,
     777           0 :                                  std::string{RoutineName} +
     778           0 :                                      "Calculated Cooling Design Air Flow Rate for System=" + FinalSysSizing(AirLoopNum).AirPriLoopName + " is zero.");
     779           0 :                 ShowContinueError(state, "Check Sizing:Zone and ZoneControl:Thermostat inputs.");
     780             :             }
     781         925 :             PreDefTableEntry(state, state.dataOutRptPredefined->pdchSysSizUserClAir, curName, FinalSysSizing(AirLoopNum).DesCoolVolFlow);
     782         925 :             PreDefTableEntry(state, state.dataOutRptPredefined->pdchSysSizCalcHtAir, curName, CalcSysSizing(AirLoopNum).DesHeatVolFlow);
     783         925 :             if (std::abs(CalcSysSizing(AirLoopNum).DesHeatVolFlow) <= 1.e-8) {
     784          12 :                 ShowWarningError(state,
     785           8 :                                  std::string{RoutineName} +
     786          12 :                                      "Calculated Heating Design Air Flow Rate for System=" + FinalSysSizing(AirLoopNum).AirPriLoopName + " is zero.");
     787           4 :                 ShowContinueError(state, "Check Sizing:Zone and ZoneControl:Thermostat inputs.");
     788             :             }
     789        1850 :             std::string coolPeakLoadKind;
     790        1850 :             std::string coolPeakDDDate;
     791         925 :             int coolPeakDD = 0;
     792         925 :             Real64 coolCap = 0.;
     793         925 :             if (FinalSysSizing(AirLoopNum).coolingPeakLoad == DataSizing::PeakLoad::SensibleCooling) {
     794         915 :                 coolPeakLoadKind = "Sensible";
     795         915 :                 coolPeakDDDate = SysSizPeakDDNum(AirLoopNum).cSensCoolPeakDDDate;
     796         915 :                 coolPeakDD = SysSizPeakDDNum(AirLoopNum).SensCoolPeakDD;
     797         915 :                 coolCap = FinalSysSizing(AirLoopNum).SensCoolCap;
     798          10 :             } else if (FinalSysSizing(AirLoopNum).coolingPeakLoad == DataSizing::PeakLoad::TotalCooling) {
     799          10 :                 if (FinalSysSizing(AirLoopNum).loadSizingType == DataSizing::LoadSizing::Latent && state.dataHeatBal->DoLatentSizing) {
     800           1 :                     coolPeakLoadKind = "Total Based on Latent";
     801             :                 } else {
     802           9 :                     coolPeakLoadKind = "Total";
     803             :                 }
     804          10 :                 coolPeakDDDate = SysSizPeakDDNum(AirLoopNum).cTotCoolPeakDDDate;
     805          10 :                 coolPeakDD = SysSizPeakDDNum(AirLoopNum).TotCoolPeakDD;
     806          10 :                 coolCap = FinalSysSizing(AirLoopNum).TotCoolCap;
     807             :             }
     808         925 :             if (coolPeakDD > 0) {
     809        3700 :                 ReportSysSizing(state,
     810             :                                 curName,
     811             :                                 "Cooling",
     812             :                                 coolPeakLoadKind,
     813             :                                 coolCap,
     814         925 :                                 CalcSysSizing(AirLoopNum).DesCoolVolFlow,
     815         925 :                                 FinalSysSizing(AirLoopNum).DesCoolVolFlow,
     816         925 :                                 FinalSysSizing(AirLoopNum).CoolDesDay,
     817             :                                 coolPeakDDDate,
     818         925 :                                 SysSizPeakDDNum(AirLoopNum).TimeStepAtHeatPk(coolPeakDD));
     819             :             } else {
     820           0 :                 ReportSysSizing(state,
     821             :                                 curName,
     822             :                                 "Cooling",
     823             :                                 coolPeakLoadKind,
     824             :                                 coolCap,
     825           0 :                                 CalcSysSizing(AirLoopNum).DesCoolVolFlow,
     826           0 :                                 FinalSysSizing(AirLoopNum).DesCoolVolFlow,
     827           0 :                                 FinalSysSizing(AirLoopNum).CoolDesDay,
     828             :                                 coolPeakDDDate,
     829             :                                 0);
     830             :             }
     831         925 :             int heatPeakDD = SysSizPeakDDNum(AirLoopNum).HeatPeakDD;
     832         925 :             if (heatPeakDD > 0) {
     833        5496 :                 ReportSysSizing(state,
     834             :                                 curName,
     835             :                                 "Heating",
     836             :                                 "Sensible",
     837         916 :                                 FinalSysSizing(AirLoopNum).HeatCap,
     838         916 :                                 CalcSysSizing(AirLoopNum).DesHeatVolFlow,
     839         916 :                                 FinalSysSizing(AirLoopNum).DesHeatVolFlow,
     840         916 :                                 FinalSysSizing(AirLoopNum).HeatDesDay,
     841         916 :                                 SysSizPeakDDNum(AirLoopNum).cHeatPeakDDDate,
     842         916 :                                 SysSizPeakDDNum(AirLoopNum).TimeStepAtHeatPk(heatPeakDD));
     843             :             } else {
     844          45 :                 ReportSysSizing(state,
     845             :                                 curName,
     846             :                                 "Heating",
     847             :                                 "Sensible",
     848           9 :                                 FinalSysSizing(AirLoopNum).HeatCap,
     849           9 :                                 CalcSysSizing(AirLoopNum).DesHeatVolFlow,
     850           9 :                                 FinalSysSizing(AirLoopNum).DesHeatVolFlow,
     851           9 :                                 FinalSysSizing(AirLoopNum).HeatDesDay,
     852           9 :                                 SysSizPeakDDNum(AirLoopNum).cHeatPeakDDDate,
     853             :                                 0);
     854             :             }
     855         925 :             PreDefTableEntry(state, state.dataOutRptPredefined->pdchSysSizUserHtAir, curName, FinalSysSizing(AirLoopNum).DesHeatVolFlow);
     856             :         }
     857             :         // Deallocate arrays no longer needed
     858         329 :         state.dataSize->SysSizing.deallocate();
     859             :     }
     860             : 
     861         769 :     if ((state.dataGlobal->DoPlantSizing) && (state.dataSize->NumPltSizInput == 0)) {
     862          51 :         ShowWarningError(
     863             :             state,
     864          34 :             std::string{RoutineName} +
     865             :                 "For a plant sizing run, there must be at least 1 Sizing:Plant object input. SimulationControl Plant Sizing option ignored.");
     866             :     }
     867             : 
     868         769 :     if ((state.dataSize->NumPltSizInput > 0) && (state.dataGlobal->DoPlantSizing) && !ErrorsFound) {
     869             : 
     870         197 :         ShowMessage(state, "Beginning Plant Sizing Calculations");
     871             :     }
     872             : 
     873         769 :     if (ErrorsFound) {
     874           0 :         ShowFatalError(state, "Program terminates due to preceding conditions.");
     875             :     }
     876         769 : }
     877             : 
     878      780768 : bool CalcdoLoadComponentPulseNow(EnergyPlusData &state,
     879             :                                  bool const isPulseZoneSizing,
     880             :                                  bool const WarmupFlag,
     881             :                                  int const HourOfDay,
     882             :                                  int const TimeStep,
     883             :                                  DataGlobalConstants::KindOfSim const KindOfSim)
     884             : {
     885             :     // This routine decides whether or not to do a Load Component Pulse.  True when yes it should, false when in shouldn't
     886             :     // This check looks to do the pulse at the first time step of the 10th hour of the day while not in warmup mode.
     887             :     // This needs to be done not just on the first day of a simulation because when the user picks a design day derived from
     888             :     // an attached weather file the design day is not necessarily the first day of the simulation.
     889             : 
     890      780768 :     int constexpr HourDayToPulse(10);
     891      780768 :     int constexpr TimeStepToPulse(1);
     892             : 
     893      780814 :     if ((isPulseZoneSizing) && (!WarmupFlag) && (HourOfDay == HourDayToPulse) && (TimeStep == TimeStepToPulse) &&
     894          46 :         ((KindOfSim == DataGlobalConstants::KindOfSim::RunPeriodDesign) || (state.dataGlobal->DayOfSim == 1))) {
     895          46 :         return true;
     896             :     } else {
     897      780722 :         return false;
     898             :     }
     899             : }
     900             : 
     901         769 : void ManageSystemSizingAdjustments(EnergyPlusData &state)
     902             : {
     903             :     // This routine adjusts system sizing outcomes based on how the zone air terminals finish out their sizing.
     904             :     // The zone models are executed to trigger their sizing routines
     905             :     // Then the air terminal units are scanned to sum design flow rates. Every air terminal connected to a particular air loop is summed for
     906             :     //  1. minimum heating flow rate, 2. maximum heating flow rate, and 3. maximum flow rate.
     907             :     // the summed values are used to "Adjust" the system sizing results
     908             :     // the corrected values are used to autosize the central heating flow ratio, if set to autosize by the user.
     909             : 
     910             :     // Also store zone level flow information for Standard 62.1 calculations, Vpz, Vpz_min, Vdz, and Vdz_min for both cooling and heating
     911             : 
     912         769 :     auto &AirDistUnit(state.dataDefineEquipment->AirDistUnit);
     913         769 :     auto &FinalSysSizing(state.dataSize->FinalSysSizing);
     914         769 :     auto &sd_airterminal(state.dataSingleDuct->sd_airterminal);
     915             : 
     916         769 :     if ((state.dataSize->NumSysSizInput > 0) && (state.dataGlobal->DoSystemSizing)) { // only if there is system sizing
     917             : 
     918             :         // call zone component models to execute their component sizing routines
     919         329 :         bool t_SimZoneEquip(true);
     920         329 :         bool t_SimAir(false);
     921         329 :         state.dataGlobal->BeginEnvrnFlag = true; // trigger begin envrn blocks in zone equipment models
     922         329 :         ZoneEquipmentManager::ManageZoneEquipment(state, true, t_SimZoneEquip, t_SimAir);
     923         329 :         state.dataGlobal->BeginEnvrnFlag = false;
     924             : 
     925        1254 :         for (int AirLoopNum = 1; AirLoopNum <= state.dataHVACGlobal->NumPrimaryAirSys; ++AirLoopNum) {
     926             :             // Mine data from ATUs to find new design heating flow rates and new maximum flow rates
     927         925 :             Real64 airLoopMaxFlowRateSum(0.0);
     928         925 :             Real64 airLoopHeatingMinimumFlowRateSum(0.0);
     929         925 :             Real64 airLoopHeatingMaximumFlowRateSum(0.0);
     930             : 
     931             :             // sum up heating and max flows for any single duct systems, store 62.1 values by zone
     932         925 :             if (allocated(sd_airterminal) && state.dataSingleDuct->NumSDAirTerminal > 0) {
     933       18585 :                 for (int singleDuctATUNum = 1; singleDuctATUNum <= state.dataSingleDuct->NumSDAirTerminal; ++singleDuctATUNum) {
     934       17676 :                     if (AirLoopNum == sd_airterminal(singleDuctATUNum).AirLoopNum) {
     935        2772 :                         int termUnitSizingIndex = AirDistUnit(sd_airterminal(singleDuctATUNum).ADUNum).TermUnitSizingNum;
     936        2772 :                         airLoopMaxFlowRateSum += sd_airterminal(singleDuctATUNum).MaxAirVolFlowRate;
     937             : 
     938        2772 :                         state.dataSize->VpzClgByZone(termUnitSizingIndex) =
     939        2772 :                             sd_airterminal(singleDuctATUNum).MaxAirVolFlowRate; // store std 62.1 values
     940             : 
     941        5511 :                         if (sd_airterminal(singleDuctATUNum).SysType_Num == SingleDuct::SysType::SingleDuctConstVolReheat ||
     942        2739 :                             sd_airterminal(singleDuctATUNum).SysType_Num == SingleDuct::SysType::SingleDuctConstVolNoReheat) {
     943         614 :                             airLoopHeatingMinimumFlowRateSum += sd_airterminal(singleDuctATUNum).MaxAirVolFlowRate;
     944         614 :                             airLoopHeatingMaximumFlowRateSum += sd_airterminal(singleDuctATUNum).MaxAirVolFlowRate;
     945             : 
     946         614 :                             state.dataSize->VpzHtgByZone(termUnitSizingIndex) =
     947         614 :                                 sd_airterminal(singleDuctATUNum).MaxAirVolFlowRate; // store std 62.1 values
     948         614 :                             state.dataSize->VpzMinClgByZone(termUnitSizingIndex) =
     949         614 :                                 sd_airterminal(singleDuctATUNum).MaxAirVolFlowRate; // store std 62.1 values
     950         614 :                             state.dataSize->VpzMinHtgByZone(termUnitSizingIndex) =
     951         614 :                                 sd_airterminal(singleDuctATUNum).MaxAirVolFlowRate; // store std 62.1 values
     952             : 
     953             :                         } else {
     954        2158 :                             airLoopHeatingMinimumFlowRateSum +=
     955        2158 :                                 sd_airterminal(singleDuctATUNum).MaxAirVolFlowRate * sd_airterminal(singleDuctATUNum).ZoneMinAirFrac;
     956        2158 :                             state.dataSize->VpzMinClgByZone(termUnitSizingIndex) =
     957        4316 :                                 sd_airterminal(singleDuctATUNum).MaxAirVolFlowRate *
     958        2158 :                                 sd_airterminal(singleDuctATUNum).ZoneMinAirFrac; // store std 62.1 values
     959        2158 :                             state.dataSize->VpzMinHtgByZone(termUnitSizingIndex) =
     960        4316 :                                 sd_airterminal(singleDuctATUNum).MaxAirVolFlowRate *
     961        2158 :                                 sd_airterminal(singleDuctATUNum).ZoneMinAirFrac;                // store std 62.1 values
     962        2158 :                             if (sd_airterminal(singleDuctATUNum).MaxHeatAirVolFlowRate > 0.0) { // VS fan ATU has this non zero, so use it
     963           8 :                                 airLoopHeatingMaximumFlowRateSum += sd_airterminal(singleDuctATUNum).MaxHeatAirVolFlowRate;
     964           8 :                                 state.dataSize->VpzHtgByZone(termUnitSizingIndex) =
     965           8 :                                     sd_airterminal(singleDuctATUNum).MaxHeatAirVolFlowRate; // store std 62.1 values
     966             :                             } else {
     967        2150 :                                 if (sd_airterminal(singleDuctATUNum).DamperHeatingAction == SingleDuct::Action::Reverse) {
     968          61 :                                     airLoopHeatingMaximumFlowRateSum += sd_airterminal(singleDuctATUNum).MaxAirVolFlowRate;
     969          61 :                                     state.dataSize->VpzHtgByZone(termUnitSizingIndex) =
     970          61 :                                         sd_airterminal(singleDuctATUNum).MaxAirVolFlowRate; // store std 62.1 values
     971        2089 :                                 } else if (sd_airterminal(singleDuctATUNum).DamperHeatingAction == SingleDuct::Action::ReverseWithLimits) {
     972        1089 :                                     airLoopHeatingMaximumFlowRateSum +=
     973        1089 :                                         max(sd_airterminal(singleDuctATUNum).MaxAirVolFlowRateDuringReheat,
     974        1089 :                                             (sd_airterminal(singleDuctATUNum).MaxAirVolFlowRate * sd_airterminal(singleDuctATUNum).ZoneMinAirFrac));
     975        1089 :                                     state.dataSize->VpzHtgByZone(termUnitSizingIndex) =
     976        1089 :                                         max(sd_airterminal(singleDuctATUNum).MaxAirVolFlowRateDuringReheat,
     977        1089 :                                             (sd_airterminal(singleDuctATUNum).MaxAirVolFlowRate *
     978        1089 :                                              sd_airterminal(singleDuctATUNum).ZoneMinAirFrac)); // store std 62.1 values
     979             :                                 } else {
     980        1000 :                                     airLoopHeatingMaximumFlowRateSum +=
     981        1000 :                                         sd_airterminal(singleDuctATUNum).MaxAirVolFlowRate * sd_airterminal(singleDuctATUNum).ZoneMinAirFrac;
     982        1000 :                                     state.dataSize->VpzHtgByZone(termUnitSizingIndex) =
     983        2000 :                                         sd_airterminal(singleDuctATUNum).MaxAirVolFlowRate *
     984        1000 :                                         sd_airterminal(singleDuctATUNum).ZoneMinAirFrac; // store std 62.1 values
     985             :                                 }
     986             :                             }
     987             :                         }
     988             :                         // single-path air terminal so Vdz = Vpz
     989        2772 :                         state.dataSize->VdzClgByZone(termUnitSizingIndex) =
     990        2772 :                             state.dataSize->VpzClgByZone(termUnitSizingIndex); // store std 62.1 values
     991        2772 :                         state.dataSize->VdzMinClgByZone(termUnitSizingIndex) =
     992        2772 :                             state.dataSize->VpzMinClgByZone(termUnitSizingIndex); // store std 62.1 values
     993        2772 :                         state.dataSize->VdzHtgByZone(termUnitSizingIndex) =
     994        2772 :                             state.dataSize->VpzHtgByZone(termUnitSizingIndex); // store std 62.1 values
     995        2772 :                         state.dataSize->VdzMinHtgByZone(termUnitSizingIndex) =
     996        2772 :                             state.dataSize->VpzMinHtgByZone(termUnitSizingIndex); // store std 62.1 values
     997             :                     }
     998             :                 }
     999             :             }
    1000             : 
    1001             :             // sum up heating and max flows for any dual duct air terminals
    1002         925 :             if (allocated(state.dataDualDuct->dd_airterminal) && state.dataDualDuct->NumDDAirTerminal > 0) {
    1003          34 :                 for (int dualDuctATUNum = 1; dualDuctATUNum <= state.dataDualDuct->NumDDAirTerminal; ++dualDuctATUNum) {
    1004          30 :                     if (AirLoopNum == state.dataDualDuct->dd_airterminal(dualDuctATUNum).AirLoopNum) {
    1005          19 :                         int termUnitSizingIndex = AirDistUnit(state.dataDualDuct->dd_airterminal(dualDuctATUNum).ADUNum).TermUnitSizingNum;
    1006          19 :                         airLoopMaxFlowRateSum += state.dataDualDuct->dd_airterminal(dualDuctATUNum).MaxAirVolFlowRate;
    1007          19 :                         state.dataSize->VpzClgByZone(termUnitSizingIndex) =
    1008          19 :                             state.dataDualDuct->dd_airterminal(dualDuctATUNum).MaxAirVolFlowRate; // store std 62.1 value
    1009             : 
    1010          19 :                         if (state.dataDualDuct->dd_airterminal(dualDuctATUNum).DamperType == DualDuct::DualDuctDamper::ConstantVolume) {
    1011           8 :                             airLoopHeatingMaximumFlowRateSum += state.dataDualDuct->dd_airterminal(dualDuctATUNum).MaxAirVolFlowRate;
    1012           8 :                             airLoopHeatingMinimumFlowRateSum += state.dataDualDuct->dd_airterminal(dualDuctATUNum).MaxAirVolFlowRate;
    1013           8 :                             state.dataSize->VpzMinClgByZone(termUnitSizingIndex) =
    1014           8 :                                 state.dataDualDuct->dd_airterminal(dualDuctATUNum).MaxAirVolFlowRate; // store std 62.1 value
    1015           8 :                             state.dataSize->VpzHtgByZone(termUnitSizingIndex) =
    1016           8 :                                 state.dataDualDuct->dd_airterminal(dualDuctATUNum).MaxAirVolFlowRate; // store std 62.1 value
    1017           8 :                             state.dataSize->VpzMinHtgByZone(termUnitSizingIndex) =
    1018           8 :                                 state.dataDualDuct->dd_airterminal(dualDuctATUNum).MaxAirVolFlowRate; // store std 62.1 value
    1019           8 :                             state.dataSize->VdzClgByZone(termUnitSizingIndex) = state.dataSize->VpzClgByZone(termUnitSizingIndex);
    1020           8 :                             state.dataSize->VdzMinClgByZone(termUnitSizingIndex) = state.dataSize->VpzMinClgByZone(termUnitSizingIndex);
    1021           8 :                             state.dataSize->VdzHtgByZone(termUnitSizingIndex) = state.dataSize->VpzHtgByZone(termUnitSizingIndex);
    1022           8 :                             state.dataSize->VdzMinHtgByZone(termUnitSizingIndex) = state.dataSize->VpzMinHtgByZone(termUnitSizingIndex);
    1023             : 
    1024          11 :                         } else if (state.dataDualDuct->dd_airterminal(dualDuctATUNum).DamperType == DualDuct::DualDuctDamper::VariableVolume) {
    1025           0 :                             airLoopHeatingMaximumFlowRateSum += state.dataDualDuct->dd_airterminal(dualDuctATUNum).MaxAirVolFlowRate;
    1026           0 :                             airLoopHeatingMinimumFlowRateSum += state.dataDualDuct->dd_airterminal(dualDuctATUNum).MaxAirVolFlowRate *
    1027           0 :                                                                 state.dataDualDuct->dd_airterminal(dualDuctATUNum).ZoneMinAirFrac;
    1028           0 :                             state.dataSize->VpzMinClgByZone(termUnitSizingIndex) =
    1029           0 :                                 state.dataDualDuct->dd_airterminal(dualDuctATUNum).MaxAirVolFlowRate *
    1030           0 :                                 state.dataDualDuct->dd_airterminal(dualDuctATUNum).ZoneMinAirFrac; // store std 62.1 value
    1031           0 :                             state.dataSize->VpzHtgByZone(termUnitSizingIndex) =
    1032           0 :                                 state.dataDualDuct->dd_airterminal(dualDuctATUNum).MaxAirVolFlowRate; // store std 62.1 value
    1033           0 :                             state.dataSize->VpzMinHtgByZone(termUnitSizingIndex) =
    1034           0 :                                 state.dataDualDuct->dd_airterminal(dualDuctATUNum).MaxAirVolFlowRate *
    1035           0 :                                 state.dataDualDuct->dd_airterminal(dualDuctATUNum).ZoneMinAirFrac; // store std 62.1 value
    1036           0 :                             state.dataSize->VdzClgByZone(termUnitSizingIndex) = state.dataSize->VpzClgByZone(termUnitSizingIndex);
    1037           0 :                             state.dataSize->VdzMinClgByZone(termUnitSizingIndex) = state.dataSize->VpzMinClgByZone(termUnitSizingIndex);
    1038           0 :                             state.dataSize->VdzHtgByZone(termUnitSizingIndex) = state.dataSize->VpzHtgByZone(termUnitSizingIndex);
    1039           0 :                             state.dataSize->VdzMinHtgByZone(termUnitSizingIndex) = state.dataSize->VpzMinHtgByZone(termUnitSizingIndex);
    1040          11 :                         } else if (state.dataDualDuct->dd_airterminal(dualDuctATUNum).DamperType == DualDuct::DualDuctDamper::OutdoorAir) {
    1041          11 :                             airLoopHeatingMaximumFlowRateSum += state.dataDualDuct->dd_airterminal(dualDuctATUNum).MaxAirVolFlowRate;
    1042             :                             // Calculate the design OA flow rate for this zone
    1043          11 :                             bool UseOccSchFlag = false;
    1044          11 :                             bool UseMinOASchFlag = false;
    1045          11 :                             Real64 designOAductFlow(0.0);
    1046          11 :                             designOAductFlow =
    1047          33 :                                 DataSizing::calcDesignSpecificationOutdoorAir(state,
    1048          11 :                                                                               state.dataDualDuct->dd_airterminal(dualDuctATUNum).OARequirementsPtr,
    1049          11 :                                                                               state.dataDualDuct->dd_airterminal(dualDuctATUNum).CtrlZoneNum,
    1050             :                                                                               UseOccSchFlag,
    1051             :                                                                               UseMinOASchFlag);
    1052          11 :                             airLoopHeatingMinimumFlowRateSum += designOAductFlow;
    1053             :                             // is this a dual duct is dual path for Std 62.1 ?? not sure, assume not because Vpz = Vdz
    1054             :                             // anyDualPathAirTerminals = true;
    1055          11 :                             state.dataSize->VpzMinClgByZone(termUnitSizingIndex) = designOAductFlow; // not sure about this
    1056          11 :                             state.dataSize->VpzHtgByZone(termUnitSizingIndex) = designOAductFlow;    // no heating for this terminal
    1057          11 :                             state.dataSize->VpzMinHtgByZone(termUnitSizingIndex) = designOAductFlow;
    1058          11 :                             state.dataSize->VdzClgByZone(termUnitSizingIndex) = state.dataDualDuct->dd_airterminal(dualDuctATUNum).MaxAirVolFlowRate;
    1059          11 :                             state.dataSize->VdzMinClgByZone(termUnitSizingIndex) = designOAductFlow;
    1060          11 :                             state.dataSize->VdzHtgByZone(termUnitSizingIndex) = designOAductFlow;
    1061          11 :                             state.dataSize->VdzMinHtgByZone(termUnitSizingIndex) = designOAductFlow;
    1062             :                         }
    1063             :                     }
    1064             :                 }
    1065             :             }
    1066             : 
    1067             :             // sum up heating and max flows for any PIU air terminals
    1068         925 :             if (allocated(state.dataPowerInductionUnits->PIU) && state.dataPowerInductionUnits->NumPIUs > 0) {
    1069          45 :                 for (int pIUATUNum = 1; pIUATUNum <= state.dataPowerInductionUnits->NumPIUs; ++pIUATUNum) {
    1070          34 :                     if (AirLoopNum == state.dataPowerInductionUnits->PIU(pIUATUNum).AirLoopNum) {
    1071          34 :                         int termUnitSizingIndex = AirDistUnit(state.dataPowerInductionUnits->PIU(pIUATUNum).ADUNum).TermUnitSizingNum;
    1072          34 :                         airLoopMaxFlowRateSum += state.dataPowerInductionUnits->PIU(pIUATUNum).MaxPriAirVolFlow;
    1073          34 :                         if (state.dataPowerInductionUnits->PIU(pIUATUNum).UnitType_Num ==
    1074             :                             DataDefineEquip::ZnAirLoopEquipType::SingleDuct_SeriesPIU_Reheat) {
    1075          60 :                             airLoopHeatingMaximumFlowRateSum += state.dataPowerInductionUnits->PIU(pIUATUNum).MinPriAirFlowFrac *
    1076          30 :                                                                 state.dataPowerInductionUnits->PIU(pIUATUNum).MaxPriAirVolFlow;
    1077          60 :                             airLoopHeatingMinimumFlowRateSum += state.dataPowerInductionUnits->PIU(pIUATUNum).MinPriAirFlowFrac *
    1078          30 :                                                                 state.dataPowerInductionUnits->PIU(pIUATUNum).MaxPriAirVolFlow;
    1079             : 
    1080             :                             // dual path for std 62.1
    1081          30 :                             state.dataSize->VpzClgByZone(termUnitSizingIndex) = state.dataPowerInductionUnits->PIU(pIUATUNum).MaxPriAirVolFlow;
    1082          60 :                             state.dataSize->VpzMinClgByZone(termUnitSizingIndex) = state.dataPowerInductionUnits->PIU(pIUATUNum).MinPriAirFlowFrac *
    1083          30 :                                                                                    state.dataPowerInductionUnits->PIU(pIUATUNum).MaxPriAirVolFlow;
    1084          30 :                             state.dataSize->VdzClgByZone(termUnitSizingIndex) =
    1085          30 :                                 state.dataPowerInductionUnits->PIU(pIUATUNum).MaxTotAirVolFlow; // which is constant for series PIU
    1086          30 :                             state.dataSize->VdzMinClgByZone(termUnitSizingIndex) =
    1087          30 :                                 state.dataPowerInductionUnits->PIU(pIUATUNum)
    1088          30 :                                     .MaxTotAirVolFlow; // min dz is the same as max because series PIU has constant discharge volume
    1089             : 
    1090          30 :                             state.dataSize->VpzHtgByZone(termUnitSizingIndex) =
    1091          60 :                                 state.dataPowerInductionUnits->PIU(pIUATUNum).MinPriAirFlowFrac *
    1092          30 :                                 state.dataPowerInductionUnits->PIU(pIUATUNum).MaxPriAirVolFlow; // runs at minimum primary for heating always
    1093          30 :                             state.dataSize->VpzMinHtgByZone(termUnitSizingIndex) =
    1094          60 :                                 state.dataPowerInductionUnits->PIU(pIUATUNum).MinPriAirFlowFrac *
    1095          30 :                                 state.dataPowerInductionUnits->PIU(pIUATUNum).MaxPriAirVolFlow; // runs at minimum primary for heating always
    1096          30 :                             state.dataSize->VdzHtgByZone(termUnitSizingIndex) =
    1097          30 :                                 state.dataPowerInductionUnits->PIU(pIUATUNum).MaxTotAirVolFlow; // which is constant for series PIU
    1098          30 :                             state.dataSize->VdzMinHtgByZone(termUnitSizingIndex) =
    1099          30 :                                 state.dataPowerInductionUnits->PIU(pIUATUNum).MaxTotAirVolFlow; // which is constant for series PIU
    1100             : 
    1101             :                             // store Ep for 62.1 calculations
    1102          30 :                             state.dataSize->TermUnitFinalZoneSizing(termUnitSizingIndex).ZonePrimaryAirFraction =
    1103          60 :                                 state.dataSize->VpzMinClgByZone(termUnitSizingIndex) /
    1104          30 :                                 state.dataSize->VdzClgByZone(termUnitSizingIndex); // min primary divided by max total
    1105          30 :                             state.dataSize->TermUnitFinalZoneSizing(termUnitSizingIndex).ZonePrimaryAirFractionHtg =
    1106          30 :                                 state.dataSize->VpzMinHtgByZone(termUnitSizingIndex) / state.dataSize->VdzHtgByZone(termUnitSizingIndex);
    1107             : 
    1108           4 :                         } else if (state.dataPowerInductionUnits->PIU(pIUATUNum).UnitType_Num ==
    1109             :                                    DataDefineEquip::ZnAirLoopEquipType::SingleDuct_ParallelPIU_Reheat) {
    1110           8 :                             airLoopHeatingMaximumFlowRateSum += state.dataPowerInductionUnits->PIU(pIUATUNum).MinPriAirFlowFrac *
    1111           4 :                                                                 state.dataPowerInductionUnits->PIU(pIUATUNum).MaxPriAirVolFlow;
    1112           8 :                             airLoopHeatingMinimumFlowRateSum += state.dataPowerInductionUnits->PIU(pIUATUNum).MinPriAirFlowFrac *
    1113           4 :                                                                 state.dataPowerInductionUnits->PIU(pIUATUNum).MaxPriAirVolFlow;
    1114             : 
    1115             :                             // dual path for std 62.1
    1116           4 :                             state.dataSize->VpzClgByZone(termUnitSizingIndex) = state.dataPowerInductionUnits->PIU(pIUATUNum).MaxPriAirVolFlow;
    1117           8 :                             state.dataSize->VpzMinClgByZone(termUnitSizingIndex) = state.dataPowerInductionUnits->PIU(pIUATUNum).MinPriAirFlowFrac *
    1118           4 :                                                                                    state.dataPowerInductionUnits->PIU(pIUATUNum).MaxPriAirVolFlow;
    1119           4 :                             state.dataSize->VdzClgByZone(termUnitSizingIndex) =
    1120           4 :                                 state.dataPowerInductionUnits->PIU(pIUATUNum)
    1121           4 :                                     .MaxPriAirVolFlow; // for Parallel PIU expect Fan off durign max cooling, so discharge is all primary
    1122           4 :                             state.dataSize->VdzMinClgByZone(termUnitSizingIndex) =
    1123           8 :                                 state.dataPowerInductionUnits->PIU(pIUATUNum).MinPriAirFlowFrac *
    1124           8 :                                     state.dataPowerInductionUnits->PIU(pIUATUNum).MaxPriAirVolFlow +
    1125           4 :                                 state.dataPowerInductionUnits->PIU(pIUATUNum)
    1126           4 :                                     .MaxSecAirVolFlow; // expect secondary fan to be running at min cooling, for reheat
    1127             : 
    1128           4 :                             state.dataSize->VpzHtgByZone(termUnitSizingIndex) =
    1129           8 :                                 state.dataPowerInductionUnits->PIU(pIUATUNum).MinPriAirFlowFrac *
    1130           4 :                                 state.dataPowerInductionUnits->PIU(pIUATUNum).MaxPriAirVolFlow; // primary at minimum
    1131           4 :                             state.dataSize->VpzMinHtgByZone(termUnitSizingIndex) =
    1132           8 :                                 state.dataPowerInductionUnits->PIU(pIUATUNum).MinPriAirFlowFrac *
    1133           4 :                                 state.dataPowerInductionUnits->PIU(pIUATUNum).MaxPriAirVolFlow; // primary at minimum
    1134           4 :                             state.dataSize->VdzHtgByZone(termUnitSizingIndex) =
    1135           8 :                                 state.dataPowerInductionUnits->PIU(pIUATUNum).MinPriAirFlowFrac *
    1136           8 :                                     state.dataPowerInductionUnits->PIU(pIUATUNum).MaxPriAirVolFlow +
    1137           4 :                                 state.dataPowerInductionUnits->PIU(pIUATUNum).MaxSecAirVolFlow; // expect min primary and CV fan running
    1138           4 :                             state.dataSize->VdzMinHtgByZone(termUnitSizingIndex) =
    1139           8 :                                 state.dataPowerInductionUnits->PIU(pIUATUNum).MinPriAirFlowFrac *
    1140           8 :                                     state.dataPowerInductionUnits->PIU(pIUATUNum).MaxPriAirVolFlow +
    1141           4 :                                 state.dataPowerInductionUnits->PIU(pIUATUNum).MaxSecAirVolFlow; // expect min primary and CV fan running
    1142             : 
    1143           4 :                             state.dataSize->TermUnitFinalZoneSizing(termUnitSizingIndex).ZonePrimaryAirFraction =
    1144           8 :                                 state.dataSize->VpzMinClgByZone(termUnitSizingIndex) /
    1145           4 :                                 state.dataSize->VdzClgByZone(termUnitSizingIndex); // min primary divided by max total
    1146           4 :                             state.dataSize->TermUnitFinalZoneSizing(termUnitSizingIndex).ZonePrimaryAirFractionHtg =
    1147           4 :                                 state.dataSize->VpzMinHtgByZone(termUnitSizingIndex) / state.dataSize->VdzHtgByZone(termUnitSizingIndex);
    1148             :                         }
    1149             :                     }
    1150             :                 }
    1151             :             }
    1152             : 
    1153         925 :             auto &IndUnit = state.dataHVACSingleDuctInduc->IndUnit;
    1154         925 :             auto &NumIndUnits = state.dataHVACSingleDuctInduc->NumIndUnits;
    1155             : 
    1156             :             // sum up heating and max flows for any four pipe induction units
    1157             :             // dual path for std 62.1
    1158         925 :             if (allocated(IndUnit) && (NumIndUnits > 0)) {
    1159           5 :                 for (int indUnitNum = 1; indUnitNum <= NumIndUnits; ++indUnitNum) {
    1160           4 :                     if (AirLoopNum == IndUnit(indUnitNum).AirLoopNum) {
    1161           4 :                         int termUnitSizingIndex = AirDistUnit(IndUnit(indUnitNum).ADUNum).TermUnitSizingNum;
    1162           4 :                         airLoopHeatingMaximumFlowRateSum += IndUnit(indUnitNum).MaxPriAirMassFlow / state.dataEnvrn->StdRhoAir;
    1163           4 :                         airLoopHeatingMinimumFlowRateSum += IndUnit(indUnitNum).MaxPriAirMassFlow / state.dataEnvrn->StdRhoAir;
    1164           4 :                         airLoopMaxFlowRateSum += IndUnit(indUnitNum).MaxPriAirMassFlow / state.dataEnvrn->StdRhoAir;
    1165             :                         // store Std 62.1 values, CV system
    1166           4 :                         state.dataSize->VpzClgByZone(termUnitSizingIndex) = IndUnit(indUnitNum).MaxPriAirMassFlow / state.dataEnvrn->StdRhoAir;
    1167           4 :                         state.dataSize->VpzMinClgByZone(termUnitSizingIndex) = IndUnit(indUnitNum).MaxPriAirMassFlow / state.dataEnvrn->StdRhoAir;
    1168           4 :                         state.dataSize->VdzClgByZone(termUnitSizingIndex) = IndUnit(indUnitNum).MaxTotAirVolFlow;
    1169           4 :                         state.dataSize->VdzMinClgByZone(termUnitSizingIndex) = IndUnit(indUnitNum).MaxTotAirVolFlow;
    1170           4 :                         state.dataSize->VpzHtgByZone(termUnitSizingIndex) = IndUnit(indUnitNum).MaxPriAirMassFlow / state.dataEnvrn->StdRhoAir;
    1171           4 :                         state.dataSize->VpzMinHtgByZone(termUnitSizingIndex) = IndUnit(indUnitNum).MaxPriAirMassFlow / state.dataEnvrn->StdRhoAir;
    1172           4 :                         state.dataSize->VdzHtgByZone(termUnitSizingIndex) = IndUnit(indUnitNum).MaxTotAirVolFlow;
    1173           4 :                         state.dataSize->VdzMinHtgByZone(termUnitSizingIndex) = IndUnit(indUnitNum).MaxTotAirVolFlow;
    1174             :                     }
    1175             :                 }
    1176             :             }
    1177             : 
    1178             :             // sum up heating and max flows for any two pipe constant volume cooled beam terminal units
    1179         925 :             if (allocated(state.dataHVACCooledBeam->CoolBeam) && (state.dataHVACCooledBeam->NumCB > 0)) {
    1180           6 :                 for (int coolBeamNum = 1; coolBeamNum <= state.dataHVACCooledBeam->NumCB; ++coolBeamNum) {
    1181           5 :                     if (AirLoopNum == state.dataHVACCooledBeam->CoolBeam(coolBeamNum).AirLoopNum) {
    1182           5 :                         int termUnitSizingIndex = AirDistUnit(state.dataHVACCooledBeam->CoolBeam(coolBeamNum).ADUNum).TermUnitSizingNum;
    1183           5 :                         airLoopHeatingMaximumFlowRateSum += state.dataHVACCooledBeam->CoolBeam(coolBeamNum).MaxAirVolFlow;
    1184           5 :                         airLoopHeatingMinimumFlowRateSum += state.dataHVACCooledBeam->CoolBeam(coolBeamNum).MaxAirVolFlow;
    1185           5 :                         airLoopMaxFlowRateSum += state.dataHVACCooledBeam->CoolBeam(coolBeamNum).MaxAirVolFlow;
    1186             : 
    1187             :                         // store std 62.1 values, beam will actually have secondary flow but that is not part of the model since it uses non air
    1188             :                         // system term, we have no secondary flow rate information to work with
    1189           5 :                         state.dataSize->VpzClgByZone(termUnitSizingIndex) = state.dataHVACCooledBeam->CoolBeam(coolBeamNum).MaxAirVolFlow;
    1190           5 :                         state.dataSize->VpzMinClgByZone(termUnitSizingIndex) = state.dataHVACCooledBeam->CoolBeam(coolBeamNum).MaxAirVolFlow;
    1191           5 :                         state.dataSize->VpzHtgByZone(termUnitSizingIndex) = state.dataHVACCooledBeam->CoolBeam(coolBeamNum).MaxAirVolFlow;
    1192           5 :                         state.dataSize->VpzMinHtgByZone(termUnitSizingIndex) = state.dataHVACCooledBeam->CoolBeam(coolBeamNum).MaxAirVolFlow;
    1193           5 :                         state.dataSize->VdzClgByZone(termUnitSizingIndex) = state.dataHVACCooledBeam->CoolBeam(coolBeamNum).MaxAirVolFlow;
    1194           5 :                         state.dataSize->VdzMinClgByZone(termUnitSizingIndex) = state.dataHVACCooledBeam->CoolBeam(coolBeamNum).MaxAirVolFlow;
    1195           5 :                         state.dataSize->VdzHtgByZone(termUnitSizingIndex) = state.dataHVACCooledBeam->CoolBeam(coolBeamNum).MaxAirVolFlow;
    1196           5 :                         state.dataSize->VdzMinHtgByZone(termUnitSizingIndex) = state.dataHVACCooledBeam->CoolBeam(coolBeamNum).MaxAirVolFlow;
    1197             :                     }
    1198             :                 }
    1199             :             }
    1200             : 
    1201             :             // sum up heating and max flows for any four pipe cooled beam terminal units (the only one using the airTerminalPtr at this point)
    1202         925 :             if (allocated(AirDistUnit) && (int)state.dataDefineEquipment->AirDistUnit.size() > 0) {
    1203       18793 :                 for (int aDUNum = 1; aDUNum <= (int)state.dataDefineEquipment->AirDistUnit.size(); ++aDUNum) {
    1204       17868 :                     if (AirDistUnit(aDUNum).airTerminalPtr.get() != nullptr) {
    1205          60 :                         if (AirLoopNum == AirDistUnit(aDUNum).airTerminalPtr->getAirLoopNum()) {
    1206          15 :                             airLoopHeatingMaximumFlowRateSum += AirDistUnit(aDUNum).airTerminalPtr->getPrimAirDesignVolFlow();
    1207          15 :                             airLoopHeatingMinimumFlowRateSum += AirDistUnit(aDUNum).airTerminalPtr->getPrimAirDesignVolFlow();
    1208          15 :                             airLoopMaxFlowRateSum += AirDistUnit(aDUNum).airTerminalPtr->getPrimAirDesignVolFlow();
    1209             :                             // store Std 62.1 values, have no modeling of secondary flow rates for induced flow from beam
    1210          15 :                             int termUnitSizingIndex = AirDistUnit(aDUNum).airTerminalPtr->getTermUnitSizingIndex();
    1211          15 :                             state.dataSize->VpzClgByZone(termUnitSizingIndex) = AirDistUnit(aDUNum).airTerminalPtr->getPrimAirDesignVolFlow();
    1212          15 :                             state.dataSize->VpzMinClgByZone(termUnitSizingIndex) = AirDistUnit(aDUNum).airTerminalPtr->getPrimAirDesignVolFlow();
    1213          15 :                             state.dataSize->VpzHtgByZone(termUnitSizingIndex) = AirDistUnit(aDUNum).airTerminalPtr->getPrimAirDesignVolFlow();
    1214          15 :                             state.dataSize->VpzMinHtgByZone(termUnitSizingIndex) = AirDistUnit(aDUNum).airTerminalPtr->getPrimAirDesignVolFlow();
    1215          15 :                             state.dataSize->VdzClgByZone(termUnitSizingIndex) = AirDistUnit(aDUNum).airTerminalPtr->getPrimAirDesignVolFlow();
    1216          15 :                             state.dataSize->VdzMinClgByZone(termUnitSizingIndex) = AirDistUnit(aDUNum).airTerminalPtr->getPrimAirDesignVolFlow();
    1217          15 :                             state.dataSize->VdzHtgByZone(termUnitSizingIndex) = AirDistUnit(aDUNum).airTerminalPtr->getPrimAirDesignVolFlow();
    1218          15 :                             state.dataSize->VdzMinHtgByZone(termUnitSizingIndex) = AirDistUnit(aDUNum).airTerminalPtr->getPrimAirDesignVolFlow();
    1219             :                         }
    1220             :                     }
    1221             :                 }
    1222             :             }
    1223             : 
    1224             :             // sum up flows for any air terminal mixers
    1225         925 :             if (allocated(state.dataSingleDuct->SysATMixer) && (state.dataSingleDuct->NumATMixers > 0)) {
    1226          59 :                 for (int aTMixerNum = 1; aTMixerNum <= state.dataSingleDuct->NumATMixers; ++aTMixerNum) {
    1227          49 :                     if (AirLoopNum == state.dataSingleDuct->SysATMixer(aTMixerNum).AirLoopNum) {
    1228          49 :                         int termUnitSizingIndex = AirDistUnit(state.dataSingleDuct->SysATMixer(aTMixerNum).ADUNum).TermUnitSizingNum;
    1229          49 :                         airLoopHeatingMaximumFlowRateSum += state.dataSingleDuct->SysATMixer(aTMixerNum).DesignPrimaryAirVolRate;
    1230          49 :                         airLoopHeatingMinimumFlowRateSum += state.dataSingleDuct->SysATMixer(aTMixerNum).DesignPrimaryAirVolRate;
    1231          49 :                         airLoopMaxFlowRateSum += state.dataSingleDuct->SysATMixer(aTMixerNum).DesignPrimaryAirVolRate;
    1232             : 
    1233          49 :                         state.dataSize->VpzClgByZone(termUnitSizingIndex) = state.dataSingleDuct->SysATMixer(aTMixerNum).DesignPrimaryAirVolRate;
    1234          49 :                         state.dataSize->VpzMinClgByZone(termUnitSizingIndex) = state.dataSingleDuct->SysATMixer(aTMixerNum).DesignPrimaryAirVolRate;
    1235          49 :                         state.dataSize->VpzHtgByZone(termUnitSizingIndex) = state.dataSingleDuct->SysATMixer(aTMixerNum).DesignPrimaryAirVolRate;
    1236          49 :                         state.dataSize->VpzMinHtgByZone(termUnitSizingIndex) = state.dataSingleDuct->SysATMixer(aTMixerNum).DesignPrimaryAirVolRate;
    1237             :                         // the ZoneHVAC devices will have secondary flow but how to get it, future work
    1238          49 :                         state.dataSize->VdzClgByZone(termUnitSizingIndex) = state.dataSingleDuct->SysATMixer(aTMixerNum).DesignPrimaryAirVolRate;
    1239          49 :                         state.dataSize->VdzMinClgByZone(termUnitSizingIndex) = state.dataSingleDuct->SysATMixer(aTMixerNum).DesignPrimaryAirVolRate;
    1240          49 :                         state.dataSize->VdzHtgByZone(termUnitSizingIndex) = state.dataSingleDuct->SysATMixer(aTMixerNum).DesignPrimaryAirVolRate;
    1241          49 :                         state.dataSize->VdzMinHtgByZone(termUnitSizingIndex) = state.dataSingleDuct->SysATMixer(aTMixerNum).DesignPrimaryAirVolRate;
    1242             :                     }
    1243             :                 }
    1244             :             }
    1245             : 
    1246        1850 :             std::string curName = FinalSysSizing(AirLoopNum).AirPriLoopName;
    1247        2775 :             BaseSizer::reportSizerOutput(
    1248        1850 :                 state, "AirLoopHVAC", curName, "Sum of Air Terminal Maximum Heating Flow Rates [m3/s]", airLoopHeatingMaximumFlowRateSum);
    1249        2775 :             BaseSizer::reportSizerOutput(
    1250        1850 :                 state, "AirLoopHVAC", curName, "Sum of Air Terminal Minimum Heating Flow Rates [m3/s]", airLoopHeatingMinimumFlowRateSum);
    1251         925 :             BaseSizer::reportSizerOutput(state, "AirLoopHVAC", curName, "Sum of Air Terminal Maximum Flow Rates [m3/s]", airLoopMaxFlowRateSum);
    1252             : 
    1253             :             // Adjust system sizing info
    1254         925 :             if (allocated(FinalSysSizing)) {
    1255             :                 // correct sizing design heating volume flow rate based on finalized air terminal unit operation
    1256             : 
    1257         925 :                 if (FinalSysSizing(AirLoopNum).SizingOption ==
    1258             :                     NonCoincident) { // If non-coincident sizing method for this air loop, the we can use these sum's from air terminals directly
    1259         832 :                     FinalSysSizing(AirLoopNum).DesHeatVolFlow = max(airLoopHeatingMaximumFlowRateSum, FinalSysSizing(AirLoopNum).DesHeatVolFlow);
    1260         832 :                     FinalSysSizing(AirLoopNum).DesMainVolFlow = max(airLoopMaxFlowRateSum, FinalSysSizing(AirLoopNum).DesMainVolFlow);
    1261         832 :                     if (FinalSysSizing(AirLoopNum).sysSizeCoolingDominant) {
    1262         732 :                         FinalSysSizing(AirLoopNum).DesCoolVolFlow = FinalSysSizing(AirLoopNum).DesMainVolFlow;
    1263         732 :                         FinalSysSizing(AirLoopNum).MassFlowAtCoolPeak = FinalSysSizing(AirLoopNum).DesCoolVolFlow * state.dataEnvrn->StdRhoAir;
    1264         100 :                     } else if (FinalSysSizing(AirLoopNum).sysSizeHeatingDominant) { // make sure cooling is at least at minimum.
    1265          80 :                         FinalSysSizing(AirLoopNum).DesCoolVolFlow = max(airLoopHeatingMinimumFlowRateSum, FinalSysSizing(AirLoopNum).DesCoolVolFlow);
    1266          80 :                         FinalSysSizing(AirLoopNum).MassFlowAtCoolPeak = FinalSysSizing(AirLoopNum).DesCoolVolFlow * state.dataEnvrn->StdRhoAir;
    1267             :                     }
    1268          93 :                 } else if (FinalSysSizing(AirLoopNum).SizingOption == Coincident) {
    1269             : 
    1270          93 :                     if (FinalSysSizing(AirLoopNum).sysSizeCoolingDominant) { // use minimum heating flow sum from air terminals
    1271             :                         // know that minimum heating flow is a hard minimum regardless of concurrence situation, so make sure that design is at
    1272             :                         // least that high.
    1273          93 :                         FinalSysSizing(AirLoopNum).DesHeatVolFlow = max(airLoopHeatingMinimumFlowRateSum, FinalSysSizing(AirLoopNum).DesHeatVolFlow);
    1274          93 :                         FinalSysSizing(AirLoopNum).DesMainVolFlow = max(airLoopHeatingMinimumFlowRateSum, FinalSysSizing(AirLoopNum).DesMainVolFlow);
    1275          93 :                         FinalSysSizing(AirLoopNum).DesCoolVolFlow = FinalSysSizing(AirLoopNum).DesMainVolFlow;
    1276          93 :                         FinalSysSizing(AirLoopNum).MassFlowAtCoolPeak = FinalSysSizing(AirLoopNum).DesCoolVolFlow * state.dataEnvrn->StdRhoAir;
    1277           0 :                     } else if (FinalSysSizing(AirLoopNum).sysSizeHeatingDominant) { // use maximum heating flow sum from air terminals
    1278           0 :                         FinalSysSizing(AirLoopNum).DesHeatVolFlow = max(airLoopHeatingMaximumFlowRateSum, FinalSysSizing(AirLoopNum).DesHeatVolFlow);
    1279           0 :                         FinalSysSizing(AirLoopNum).DesMainVolFlow = max(airLoopHeatingMaximumFlowRateSum, FinalSysSizing(AirLoopNum).DesMainVolFlow);
    1280             :                         // make sure cooling is at least at minimum.
    1281           0 :                         FinalSysSizing(AirLoopNum).DesCoolVolFlow = max(airLoopHeatingMinimumFlowRateSum, FinalSysSizing(AirLoopNum).DesCoolVolFlow);
    1282           0 :                         FinalSysSizing(AirLoopNum).MassFlowAtCoolPeak = FinalSysSizing(AirLoopNum).DesCoolVolFlow * state.dataEnvrn->StdRhoAir;
    1283             :                     }
    1284             :                 }
    1285             :                 // report out adjusted design flow rates
    1286        3700 :                 BaseSizer::reportSizerOutput(
    1287        2775 :                     state, "AirLoopHVAC", curName, "Adjusted Heating Design Air Flow Rate [m3/s]", FinalSysSizing(AirLoopNum).DesHeatVolFlow);
    1288        2775 :                 OutputReportPredefined::PreDefTableEntry(
    1289        1850 :                     state, state.dataOutRptPredefined->pdchSysSizAdjustedHtAir, curName, FinalSysSizing(AirLoopNum).DesHeatVolFlow, 4);
    1290        3700 :                 BaseSizer::reportSizerOutput(
    1291        2775 :                     state, "AirLoopHVAC", curName, "Adjusted Cooling Design Air Flow Rate [m3/s]", FinalSysSizing(AirLoopNum).DesCoolVolFlow);
    1292        2775 :                 OutputReportPredefined::PreDefTableEntry(
    1293        1850 :                     state, state.dataOutRptPredefined->pdchSysSizAdjustedClAir, curName, FinalSysSizing(AirLoopNum).DesCoolVolFlow, 4);
    1294        3700 :                 BaseSizer::reportSizerOutput(
    1295        2775 :                     state, "AirLoopHVAC", curName, "Adjusted Main Design Air Flow Rate [m3/s]", FinalSysSizing(AirLoopNum).DesMainVolFlow);
    1296        2775 :                 OutputReportPredefined::PreDefTableEntry(
    1297        1850 :                     state, state.dataOutRptPredefined->pdchSysSizAdjustedMainAir, curName, FinalSysSizing(AirLoopNum).DesMainVolFlow, 4);
    1298             : 
    1299             :                 // Autosize central heating min system air flow rate, using corrected design heating flow, using maximum heating flow summation
    1300         925 :                 if (FinalSysSizing(AirLoopNum).SysAirMinFlowRatWasAutoSized) {
    1301           0 :                     if (FinalSysSizing(AirLoopNum).DesMainVolFlow > 0.0) { // protect div by zero
    1302           0 :                         FinalSysSizing(AirLoopNum).SysAirMinFlowRat =
    1303           0 :                             FinalSysSizing(AirLoopNum).DesHeatVolFlow / FinalSysSizing(AirLoopNum).DesMainVolFlow;
    1304             :                     } else { // big trouble anyway.
    1305           0 :                         FinalSysSizing(AirLoopNum).SysAirMinFlowRat = 1.0;
    1306             :                     }
    1307           0 :                     BaseSizer::reportSizerOutput(
    1308           0 :                         state, "AirLoopHVAC", curName, "Calculated Heating Air Flow Ratio []", FinalSysSizing(AirLoopNum).SysAirMinFlowRat);
    1309           0 :                     OutputReportPredefined::PreDefTableEntry(
    1310           0 :                         state, state.dataOutRptPredefined->pdchSysSizCalcHeatFlowRatio, curName, FinalSysSizing(AirLoopNum).SysAirMinFlowRat, 4);
    1311           0 :                     BaseSizer::reportSizerOutput(
    1312           0 :                         state, "AirLoopHVAC", curName, "User Heating Air Flow Ratio []", FinalSysSizing(AirLoopNum).SysAirMinFlowRat);
    1313           0 :                     OutputReportPredefined::PreDefTableEntry(
    1314           0 :                         state, state.dataOutRptPredefined->pdchSysSizUserHeatFlowRatio, curName, FinalSysSizing(AirLoopNum).SysAirMinFlowRat, 4);
    1315             :                 } else {
    1316        3700 :                     BaseSizer::reportSizerOutput(
    1317        2775 :                         state, "AirLoopHVAC", curName, "User Heating Air Flow Ratio []", FinalSysSizing(AirLoopNum).SysAirMinFlowRat);
    1318        2775 :                     OutputReportPredefined::PreDefTableEntry(
    1319        1850 :                         state, state.dataOutRptPredefined->pdchSysSizUserHeatFlowRatio, curName, FinalSysSizing(AirLoopNum).SysAirMinFlowRat, 4);
    1320         925 :                     Real64 calcSysAirMinFlowRat(0.0);
    1321         925 :                     if (FinalSysSizing(AirLoopNum).DesMainVolFlow > 0.0) { // protect div by zero
    1322         925 :                         calcSysAirMinFlowRat = FinalSysSizing(AirLoopNum).DesHeatVolFlow / FinalSysSizing(AirLoopNum).DesMainVolFlow;
    1323             :                     }
    1324         925 :                     BaseSizer::reportSizerOutput(state, "AirLoopHVAC", curName, "Calculated Heating Air Flow Ratio []", calcSysAirMinFlowRat);
    1325        1850 :                     OutputReportPredefined::PreDefTableEntry(
    1326         925 :                         state, state.dataOutRptPredefined->pdchSysSizCalcHeatFlowRatio, curName, calcSysAirMinFlowRat, 4);
    1327             :                 }
    1328             :             }
    1329             :         }
    1330             : 
    1331             :     } // if doing any system sizing
    1332         769 : }
    1333             : 
    1334         769 : void ManageSystemVentilationAdjustments(EnergyPlusData &state)
    1335             : {
    1336         769 :     auto &AirDistUnit(state.dataDefineEquipment->AirDistUnit);
    1337         769 :     auto &FinalSysSizing(state.dataSize->FinalSysSizing);
    1338         769 :     auto &VbzByZone(state.dataSize->VbzByZone);
    1339         769 :     auto &AirToZoneNodeInfo(state.dataAirLoop->AirToZoneNodeInfo);
    1340             : 
    1341             :     // redo std 62.1 calculations using latest information on zone flows and report to tables
    1342             : 
    1343             :     // redo 62.1 zone calculations with final (or user) zone terminal flow sizes, only redo calculations that might change with final flows
    1344        1694 :     for (int AirLoopNum = 1; AirLoopNum <= state.dataHVACGlobal->NumPrimaryAirSys; ++AirLoopNum) {
    1345        1850 :         int SysSizNum = UtilityRoutines::FindItemInList(
    1346        2775 :             FinalSysSizing(AirLoopNum).AirPriLoopName, state.dataSize->SysSizInput, &SystemSizingInputData::AirPriLoopName);
    1347         925 :         if (SysSizNum == 0) SysSizNum = 1; // use first when none applicable
    1348        2736 :         if (FinalSysSizing(AirLoopNum).OAAutoSized &&
    1349        1765 :             (state.dataSize->SysSizInput(SysSizNum).SystemOAMethod == SysOAMethod::VRP ||
    1350         888 :              state.dataSize->SysSizInput(SysSizNum).SystemOAMethod == SysOAMethod::SP) &&
    1351         943 :             state.dataAirLoop->AirLoopZoneInfo(AirLoopNum).NumZones > 1 &&
    1352           9 :             FinalSysSizing(AirLoopNum).loadSizingType != DataSizing::LoadSizing::Ventilation) {
    1353             : 
    1354             :             // Loop over all zones connected to air loop, redo both cooling and heating calcs for Zdz minimum discharge outdoor air fraction for
    1355             :             // each zone
    1356          49 :             for (int zoneNum = 1; zoneNum <= AirToZoneNodeInfo(AirLoopNum).NumZonesCooled; ++zoneNum) {
    1357          40 :                 int termUnitSizingIndex = AirToZoneNodeInfo(AirLoopNum).TermUnitCoolSizingIndex(zoneNum);
    1358          40 :                 auto &thisTermUnitFinalZoneSizing(state.dataSize->TermUnitFinalZoneSizing(termUnitSizingIndex));
    1359          40 :                 if (state.dataSize->VdzMinClgByZone(termUnitSizingIndex) > 0.0) {
    1360          40 :                     state.dataSize->ZdzClgByZone(termUnitSizingIndex) =
    1361          40 :                         min(1.0, thisTermUnitFinalZoneSizing.VozClgByZone / state.dataSize->VdzMinClgByZone(termUnitSizingIndex));
    1362             :                 } else { // would divide by zero, so set to max ??
    1363           0 :                     state.dataSize->ZdzClgByZone(termUnitSizingIndex) = 1.0;
    1364             :                 }
    1365          40 :                 if (state.dataSize->VdzMinHtgByZone(termUnitSizingIndex) > 0.0) {
    1366          40 :                     state.dataSize->ZdzHtgByZone(termUnitSizingIndex) =
    1367          40 :                         min(1.0, thisTermUnitFinalZoneSizing.VozHtgByZone / state.dataSize->VdzMinHtgByZone(termUnitSizingIndex));
    1368             :                 } else { // would divide by zero, so set to max
    1369           0 :                     state.dataSize->ZdzHtgByZone(termUnitSizingIndex) = 1.0;
    1370             :                 }
    1371             :             }
    1372           9 :             for (int zoneNum = 1; zoneNum <= AirToZoneNodeInfo(AirLoopNum).NumZonesHeated; ++zoneNum) {
    1373           0 :                 int termUnitSizingIndex = AirToZoneNodeInfo(AirLoopNum).TermUnitHeatSizingIndex(zoneNum);
    1374           0 :                 auto &thisTermUnitFinalZoneSizing(state.dataSize->TermUnitFinalZoneSizing(termUnitSizingIndex));
    1375           0 :                 if (state.dataSize->VdzMinClgByZone(termUnitSizingIndex) > 0.0) {
    1376           0 :                     state.dataSize->ZdzClgByZone(termUnitSizingIndex) =
    1377           0 :                         min(1.0, thisTermUnitFinalZoneSizing.VozClgByZone / state.dataSize->VdzMinClgByZone(termUnitSizingIndex));
    1378             :                 } else { // would divide by zero, so set to max ??
    1379           0 :                     state.dataSize->ZdzClgByZone(termUnitSizingIndex) = 1.0;
    1380             :                 }
    1381           0 :                 if (state.dataSize->VdzMinHtgByZone(termUnitSizingIndex) > 0.0) {
    1382           0 :                     state.dataSize->ZdzHtgByZone(termUnitSizingIndex) =
    1383           0 :                         min(1.0, thisTermUnitFinalZoneSizing.VozHtgByZone / state.dataSize->VdzMinHtgByZone(termUnitSizingIndex));
    1384             :                 } else { // would divide by zero, so set to max
    1385           0 :                     state.dataSize->ZdzHtgByZone(termUnitSizingIndex) = 1.0;
    1386             :                 }
    1387             :             } // end loop over zones on air loop to calculate Zdz values
    1388             : 
    1389             :             // Sum Voz values for System Vou, in E+ the Vbz value has now been corrected to remove population Diversity, so we add the term back
    1390             :             // in here directly to get Vou, now corrected again to only apply D to the people part
    1391           9 :             state.dataSize->VouBySys(AirLoopNum) =
    1392           9 :                 state.dataSize->DBySys(AirLoopNum) * state.dataSize->SumRpxPzBySys(AirLoopNum) + state.dataSize->SumRaxAzBySys(AirLoopNum);
    1393             :             // redo VpzClgSumBySys( AirLoopNum ) with latest values, for reporting
    1394           9 :             state.dataSize->VpzClgSumBySys(AirLoopNum) = 0.0;
    1395          49 :             for (int zoneNum = 1; zoneNum <= AirToZoneNodeInfo(AirLoopNum).NumZonesCooled; ++zoneNum) {
    1396          40 :                 int termUnitSizingIndex = AirToZoneNodeInfo(AirLoopNum).TermUnitCoolSizingIndex(zoneNum);
    1397          40 :                 state.dataSize->VpzClgSumBySys(AirLoopNum) += state.dataSize->VdzClgByZone(termUnitSizingIndex);
    1398             :             }
    1399           9 :             for (int zoneNum = 1; zoneNum <= AirToZoneNodeInfo(AirLoopNum).NumZonesHeated; ++zoneNum) {
    1400           0 :                 int termUnitSizingIndex = AirToZoneNodeInfo(AirLoopNum).TermUnitHeatSizingIndex(zoneNum);
    1401           0 :                 int MatchingCooledZoneNum = General::FindNumberInList(
    1402           0 :                     termUnitSizingIndex, AirToZoneNodeInfo(AirLoopNum).TermUnitCoolSizingIndex, AirToZoneNodeInfo(AirLoopNum).NumZonesCooled);
    1403           0 :                 if (MatchingCooledZoneNum == 0) {
    1404           0 :                     state.dataSize->VpzClgSumBySys(AirLoopNum) += state.dataSize->VdzClgByZone(termUnitSizingIndex);
    1405             :                 }
    1406             :             }
    1407             : 
    1408             :             // Fill Vps for cooling VRP calculation, use cooling design flow rate as adjusted in ManageSystemSizingAdjustments ( to use
    1409             :             // conincident sizing result if available for block air flow
    1410           9 :             state.dataSize->VpsClgBySys(AirLoopNum) = FinalSysSizing(AirLoopNum).DesCoolVolFlow;
    1411             : 
    1412             :             // Fill Vps for heating VRP calculation, use heating min by zone from air terminal scan in ManageSystemSizingAdjustments
    1413           9 :             state.dataSize->VpsHtgBySys(AirLoopNum) = 0.0;
    1414           9 :             state.dataSize->VpzHtgSumBySys(AirLoopNum) = 0.0; // for reporting only
    1415          49 :             for (int zoneNum = 1; zoneNum <= AirToZoneNodeInfo(AirLoopNum).NumZonesCooled; ++zoneNum) {
    1416          40 :                 int termUnitSizingIndex = AirToZoneNodeInfo(AirLoopNum).TermUnitCoolSizingIndex(zoneNum);
    1417          40 :                 state.dataSize->VpsHtgBySys(AirLoopNum) += state.dataSize->VpzMinHtgByZone(termUnitSizingIndex);
    1418          40 :                 state.dataSize->VpzHtgSumBySys(AirLoopNum) += state.dataSize->VpzHtgByZone(termUnitSizingIndex);
    1419             :             }
    1420           9 :             for (int zoneNum = 1; zoneNum <= AirToZoneNodeInfo(AirLoopNum).NumZonesHeated; ++zoneNum) {
    1421           0 :                 int termUnitSizingIndex = AirToZoneNodeInfo(AirLoopNum).TermUnitHeatSizingIndex(zoneNum);
    1422           0 :                 int MatchingCooledZoneNum = General::FindNumberInList(
    1423           0 :                     termUnitSizingIndex, AirToZoneNodeInfo(AirLoopNum).TermUnitCoolSizingIndex, AirToZoneNodeInfo(AirLoopNum).NumZonesCooled);
    1424           0 :                 if (MatchingCooledZoneNum == 0) {
    1425           0 :                     state.dataSize->VpsHtgBySys(AirLoopNum) += state.dataSize->VpzMinHtgByZone(termUnitSizingIndex);
    1426           0 :                     state.dataSize->VpzHtgSumBySys(AirLoopNum) += state.dataSize->VpzHtgByZone(termUnitSizingIndex);
    1427             :                 }
    1428             :             }
    1429             :             // Fill Xs values
    1430           9 :             state.dataSize->XsBySysCool(AirLoopNum) = state.dataSize->VouBySys(AirLoopNum) / state.dataSize->VpsClgBySys(AirLoopNum);
    1431           9 :             state.dataSize->XsBySysHeat(AirLoopNum) = state.dataSize->VouBySys(AirLoopNum) / state.dataSize->VpsHtgBySys(AirLoopNum);
    1432             : 
    1433             :             // Loop over zones and calculate Evz for each for both cooling and heating, and find mins
    1434           9 :             state.dataSize->EvzMinBySysCool(AirLoopNum) = 1.0;
    1435           9 :             state.dataSize->EvzMinBySysHeat(AirLoopNum) = 1.0;
    1436             : 
    1437             :             // make two passes, one for cooled zone and one for heated zones, if some zones are duplicate, it's OK, it'll just redo the same calcs
    1438          27 :             for (int coolHeatPass = 1; coolHeatPass <= 2; ++coolHeatPass) {
    1439          18 :                 int numZones = 0;
    1440          18 :                 if (coolHeatPass == 1) {
    1441           9 :                     numZones = AirToZoneNodeInfo(AirLoopNum).NumZonesCooled;
    1442             :                 } else {
    1443           9 :                     numZones = AirToZoneNodeInfo(AirLoopNum).NumZonesHeated;
    1444             :                 }
    1445          58 :                 for (int zoneNum = 1; zoneNum <= numZones; ++zoneNum) {
    1446          40 :                     int termUnitSizingIndex = 0;
    1447          40 :                     if (coolHeatPass == 1) {
    1448          40 :                         termUnitSizingIndex = AirToZoneNodeInfo(AirLoopNum).TermUnitCoolSizingIndex(zoneNum);
    1449             :                     } else {
    1450           0 :                         termUnitSizingIndex = AirToZoneNodeInfo(AirLoopNum).TermUnitHeatSizingIndex(zoneNum);
    1451             :                     }
    1452          40 :                     auto &thisTermUnitFinalZoneSizing(state.dataSize->TermUnitFinalZoneSizing(termUnitSizingIndex));
    1453          40 :                     Real64 Er = thisTermUnitFinalZoneSizing.ZoneSecondaryRecirculation; // user input in Zone Air Distribution design spec object
    1454             : 
    1455          40 :                     if (state.dataSize->SysSizInput(SysSizNum).SystemOAMethod == SysOAMethod::SP) { // 62.1 simplified procedure
    1456           5 :                         if (state.dataSize->DBySys(AirLoopNum) < 0.60) {
    1457           2 :                             state.dataSize->EvzByZoneHeat(termUnitSizingIndex) = 0.88 * state.dataSize->DBySys(AirLoopNum) + 0.22;
    1458             :                         } else {
    1459           3 :                             state.dataSize->EvzByZoneHeat(termUnitSizingIndex) = 0.75;
    1460             :                         }
    1461           5 :                         state.dataSize->EvzByZoneCool(termUnitSizingIndex) = state.dataSize->EvzByZoneHeat(termUnitSizingIndex);
    1462          35 :                     } else if (Er > 0.0) { // 62.1 ventilation rate procedure - multi path zone
    1463             :                         // Find Evz for cooling
    1464           1 :                         Real64 Ep_Clg = thisTermUnitFinalZoneSizing.ZonePrimaryAirFraction; // as adjusted in ManageSystemSizingAdjustments();
    1465           1 :                         Real64 Fa_Clg = Ep_Clg + (1.0 - Ep_Clg) * Er;
    1466           1 :                         state.dataSize->FaByZoneCool(termUnitSizingIndex) = Fa_Clg;
    1467           1 :                         Real64 Fb_Clg = Ep_Clg;
    1468           1 :                         state.dataSize->FbByZoneCool(termUnitSizingIndex) = Fb_Clg;
    1469           1 :                         Real64 Ez_Clg = thisTermUnitFinalZoneSizing.ZoneADEffCooling; // user input in Zone Air Distribution design spec object
    1470           1 :                         Real64 Fc_Clg = 1.0 - (1.0 - Ez_Clg) * (1.0 - Er) * (1 - Ep_Clg);
    1471           1 :                         state.dataSize->FcByZoneCool(termUnitSizingIndex) = Fc_Clg;
    1472           1 :                         state.dataSize->EvzByZoneCool(termUnitSizingIndex) =
    1473           1 :                             (Fa_Clg + state.dataSize->XsBySysCool(AirLoopNum) * Fb_Clg - state.dataSize->ZdzClgByZone(termUnitSizingIndex) * Fc_Clg) /
    1474             :                             Fa_Clg;
    1475             :                         // note that SimAirServingZones::LimitZoneVentEff is intended only for single path per I/O ref
    1476             : 
    1477             :                         // find Evz for heating
    1478           1 :                         Real64 Ep_Htg = thisTermUnitFinalZoneSizing.ZonePrimaryAirFractionHtg; // as adjusted in ManageSystemSizingAdjustments();
    1479           1 :                         Real64 Fa_Htg = Ep_Htg + (1.0 - Ep_Htg) * Er;
    1480           1 :                         state.dataSize->FaByZoneHeat(termUnitSizingIndex) = Fa_Htg;
    1481           1 :                         Real64 Fb_Htg = Ep_Htg;
    1482           1 :                         state.dataSize->FbByZoneCool(termUnitSizingIndex) = Fb_Htg;
    1483           1 :                         Real64 Ez_Htg = thisTermUnitFinalZoneSizing.ZoneADEffHeating; // user input in Zone Air Distribution design spec object
    1484           1 :                         Real64 Fc_Htg = 1.0 - (1.0 - Ez_Htg) * (1.0 - Er) * (1 - Ep_Htg);
    1485           1 :                         state.dataSize->FcByZoneHeat(termUnitSizingIndex) = Fc_Htg;
    1486           1 :                         state.dataSize->EvzByZoneHeat(termUnitSizingIndex) =
    1487           1 :                             (Fa_Htg + state.dataSize->XsBySysHeat(AirLoopNum) * Fb_Htg - state.dataSize->ZdzHtgByZone(termUnitSizingIndex) * Fc_Htg) /
    1488             :                             Fa_Htg;
    1489             : 
    1490             :                     } else { // 62.1 ventilation rate procedure - single path zone
    1491          34 :                         state.dataSize->EvzByZoneCool(termUnitSizingIndex) =
    1492          34 :                             1.0 + state.dataSize->XsBySysCool(AirLoopNum) - state.dataSize->ZdzClgByZone(termUnitSizingIndex);
    1493          68 :                         SimAirServingZones::LimitZoneVentEff(state,
    1494          34 :                                                              state.dataSize->XsBySysCool(AirLoopNum),
    1495          34 :                                                              VbzByZone(termUnitSizingIndex) / state.dataSize->EvzByZoneCool(termUnitSizingIndex),
    1496             :                                                              termUnitSizingIndex,
    1497          34 :                                                              state.dataSize->EvzByZoneCool(termUnitSizingIndex));
    1498          34 :                         state.dataSize->EvzByZoneHeat(termUnitSizingIndex) =
    1499          34 :                             1.0 + state.dataSize->XsBySysHeat(AirLoopNum) - state.dataSize->ZdzHtgByZone(termUnitSizingIndex);
    1500          68 :                         SimAirServingZones::LimitZoneVentEff(state,
    1501          34 :                                                              state.dataSize->XsBySysHeat(AirLoopNum),
    1502          34 :                                                              VbzByZone(termUnitSizingIndex) / state.dataSize->EvzByZoneHeat(termUnitSizingIndex),
    1503             :                                                              termUnitSizingIndex,
    1504          34 :                                                              state.dataSize->EvzByZoneHeat(termUnitSizingIndex));
    1505             :                     }
    1506             : 
    1507          40 :                     if (state.dataSize->EvzByZoneCool(termUnitSizingIndex) < state.dataSize->EvzMinBySysCool(AirLoopNum)) {
    1508          13 :                         state.dataSize->EvzMinBySysCool(AirLoopNum) = state.dataSize->EvzByZoneCool(termUnitSizingIndex);
    1509             :                     }
    1510          40 :                     if (state.dataSize->EvzByZoneHeat(termUnitSizingIndex) < state.dataSize->EvzMinBySysHeat(AirLoopNum)) {
    1511          15 :                         state.dataSize->EvzMinBySysHeat(AirLoopNum) = state.dataSize->EvzByZoneHeat(termUnitSizingIndex);
    1512             :                     }
    1513             :                 } // end loop over zones on air loop to calculate Evz by zone and find mins
    1514             : 
    1515             :                 // calculate Vot for both cooling and heating
    1516          18 :                 state.dataSize->VotClgBySys(AirLoopNum) = state.dataSize->VouBySys(AirLoopNum) / state.dataSize->EvzMinBySysCool(AirLoopNum);
    1517          18 :                 state.dataSize->VotHtgBySys(AirLoopNum) = state.dataSize->VouBySys(AirLoopNum) / state.dataSize->EvzMinBySysHeat(AirLoopNum);
    1518             :                 // the design zone ventilation value is based on the larger of the system-level cooling Vot and/or heating Vot
    1519          18 :                 FinalSysSizing(AirLoopNum).DesOutAirVolFlow = max(state.dataSize->VotClgBySys(AirLoopNum), state.dataSize->VotHtgBySys(AirLoopNum));
    1520             :             }
    1521             :         } // system OA is autosized and VRP
    1522         916 :         else if ((FinalSysSizing(AirLoopNum).OAAutoSized && state.dataSize->SysSizInput(SysSizNum).SystemOAMethod == SysOAMethod::VRP &&
    1523           0 :                   state.dataAirLoop->AirLoopZoneInfo(AirLoopNum).NumZones == 1)) { // single zone VRP
    1524           0 :             int termUnitSizingIndex = 0;
    1525           0 :             termUnitSizingIndex = AirToZoneNodeInfo(AirLoopNum).TermUnitCoolSizingIndex(1);
    1526           0 :             if (termUnitSizingIndex == 0) {
    1527           0 :                 termUnitSizingIndex = AirToZoneNodeInfo(AirLoopNum).TermUnitHeatSizingIndex(1);
    1528             :             }
    1529           0 :             auto &thisTermUnitFinalZoneSizing(state.dataSize->TermUnitFinalZoneSizing(termUnitSizingIndex));
    1530             :             // single zone cooling
    1531           0 :             state.dataSize->VotClgBySys(AirLoopNum) = VbzByZone(termUnitSizingIndex) / thisTermUnitFinalZoneSizing.ZoneADEffCooling;
    1532           0 :             state.dataSize->EvzByZoneCool(termUnitSizingIndex) = thisTermUnitFinalZoneSizing.ZoneADEffCooling;
    1533           0 :             state.dataSize->EvzMinBySysCool(AirLoopNum) = state.dataSize->EvzByZoneCool(termUnitSizingIndex);
    1534           0 :             state.dataSize->VpsClgBySys(AirLoopNum) = FinalSysSizing(AirLoopNum).DesCoolVolFlow;
    1535           0 :             state.dataSize->VpzClgSumBySys(AirLoopNum) = state.dataSize->VdzClgByZone(termUnitSizingIndex);
    1536             :             // single zone heating
    1537           0 :             state.dataSize->VotHtgBySys(AirLoopNum) = VbzByZone(termUnitSizingIndex) / thisTermUnitFinalZoneSizing.ZoneADEffHeating;
    1538           0 :             state.dataSize->EvzByZoneHeat(termUnitSizingIndex) = thisTermUnitFinalZoneSizing.ZoneADEffHeating;
    1539           0 :             state.dataSize->EvzMinBySysHeat(AirLoopNum) = state.dataSize->EvzByZoneHeat(termUnitSizingIndex);
    1540           0 :             state.dataSize->VpsHtgBySys(AirLoopNum) = state.dataSize->VpzMinHtgByZone(termUnitSizingIndex);
    1541           0 :             state.dataSize->VpzHtgSumBySys(AirLoopNum) = state.dataSize->VpzHtgByZone(termUnitSizingIndex);
    1542             : 
    1543             :             // the design zone ventilation value is based on the larger of the system-level cooling Vot and/or heating Vot
    1544           0 :             FinalSysSizing(AirLoopNum).DesOutAirVolFlow = max(state.dataSize->VotClgBySys(AirLoopNum), state.dataSize->VotHtgBySys(AirLoopNum));
    1545             :             // Fill Xs values for reporting
    1546           0 :             state.dataSize->XsBySysCool(AirLoopNum) = FinalSysSizing(AirLoopNum).DesOutAirVolFlow / state.dataSize->VpsClgBySys(AirLoopNum);
    1547           0 :             state.dataSize->XsBySysHeat(AirLoopNum) = FinalSysSizing(AirLoopNum).DesOutAirVolFlow / state.dataSize->VpsHtgBySys(AirLoopNum);
    1548             : 
    1549             :         } else { // not vrp, zone sum, fill out values that still apply
    1550             :             // redo VpzClgSumBySys( AirLoopNum ) with latest values, for reporting
    1551         916 :             state.dataSize->VpzClgSumBySys(AirLoopNum) = 0.0;
    1552             :             // Fill Vps for cooling VRP calculation, use cooling design flow rate as adjusted in ManageSystemSizingAdjustments ( to use
    1553             :             // conincident sizing result if available for block air flow
    1554         916 :             state.dataSize->VpsClgBySys(AirLoopNum) = FinalSysSizing(AirLoopNum).DesCoolVolFlow;
    1555             :             // Fill Vps for heating VRP calculation, use heating min by zone from air terminal scan in ManageSystemSizingAdjustments
    1556         916 :             state.dataSize->VpsHtgBySys(AirLoopNum) = 0.0;
    1557         916 :             state.dataSize->VpzHtgSumBySys(AirLoopNum) = 0.0; // for reporting only
    1558        3784 :             for (int zoneNum = 1; zoneNum <= AirToZoneNodeInfo(AirLoopNum).NumZonesCooled; ++zoneNum) {
    1559        2868 :                 int termUnitSizingIndex = AirToZoneNodeInfo(AirLoopNum).TermUnitCoolSizingIndex(zoneNum);
    1560        2868 :                 state.dataSize->VpzClgSumBySys(AirLoopNum) += state.dataSize->VdzClgByZone(termUnitSizingIndex);
    1561        2868 :                 state.dataSize->VpsHtgBySys(AirLoopNum) += state.dataSize->VpzMinHtgByZone(termUnitSizingIndex);
    1562        2868 :                 state.dataSize->VpzHtgSumBySys(AirLoopNum) += state.dataSize->VpzHtgByZone(termUnitSizingIndex);
    1563             :             }
    1564         930 :             for (int zoneNum = 1; zoneNum <= AirToZoneNodeInfo(AirLoopNum).NumZonesHeated; ++zoneNum) {
    1565          14 :                 int termUnitSizingIndex = AirToZoneNodeInfo(AirLoopNum).TermUnitHeatSizingIndex(zoneNum);
    1566          42 :                 int MatchingCooledZoneNum = General::FindNumberInList(
    1567          42 :                     termUnitSizingIndex, AirToZoneNodeInfo(AirLoopNum).TermUnitCoolSizingIndex, AirToZoneNodeInfo(AirLoopNum).NumZonesCooled);
    1568          14 :                 if (MatchingCooledZoneNum == 0) {
    1569           0 :                     state.dataSize->VpzClgSumBySys(AirLoopNum) += state.dataSize->VdzClgByZone(termUnitSizingIndex);
    1570           0 :                     state.dataSize->VpsHtgBySys(AirLoopNum) += state.dataSize->VpzMinHtgByZone(termUnitSizingIndex);
    1571           0 :                     state.dataSize->VpzHtgSumBySys(AirLoopNum) += state.dataSize->VpzHtgByZone(termUnitSizingIndex);
    1572             :                 }
    1573             :             }
    1574             :         }
    1575             :     } // airloop loop
    1576             : 
    1577             :     // write out predefined standard 62.1 report data, total of 8 tables
    1578        1694 :     for (int AirLoopNum = 1; AirLoopNum <= state.dataHVACGlobal->NumPrimaryAirSys; ++AirLoopNum) {
    1579             : 
    1580             :         // System Ventilation Requirements for Cooling (table 1)
    1581        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    1582         925 :                                                  state.dataOutRptPredefined->pdchS62svrClSumVpz,
    1583         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    1584         925 :                                                  state.dataSize->VpzClgSumBySys(AirLoopNum),
    1585             :                                                  4); // Vpz-sum
    1586        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    1587         925 :                                                  state.dataOutRptPredefined->pdchS62svrClPs,
    1588         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    1589         925 :                                                  state.dataSize->PsBySys(AirLoopNum),
    1590             :                                                  4); // Ps
    1591        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    1592         925 :                                                  state.dataOutRptPredefined->pdchS62svrClSumPz,
    1593         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    1594         925 :                                                  state.dataSize->PzSumBySys(AirLoopNum),
    1595             :                                                  4); // Pz-sum
    1596        3700 :         OutputReportPredefined::PreDefTableEntry(
    1597        2775 :             state, state.dataOutRptPredefined->pdchS62svrClD, FinalSysSizing(AirLoopNum).AirPriLoopName, state.dataSize->DBySys(AirLoopNum), 4); // D
    1598             :         // Origin of D
    1599        1850 :         int SysSizNum = UtilityRoutines::FindItemInList(
    1600        2775 :             FinalSysSizing(AirLoopNum).AirPriLoopName, state.dataSize->SysSizInput, &SystemSizingInputData::AirPriLoopName);
    1601         925 :         if (SysSizNum == 0) SysSizNum = 1; // use first when none applicable
    1602         925 :         if (state.dataSize->SysSizInput(SysSizNum).OccupantDiversity == AutoSize) {
    1603        1846 :             OutputReportPredefined::PreDefTableEntry(
    1604        1846 :                 state, state.dataOutRptPredefined->pdchS62svrClDorg, FinalSysSizing(AirLoopNum).AirPriLoopName, "Calculated from schedules");
    1605             :         } else {
    1606           4 :             OutputReportPredefined::PreDefTableEntry(
    1607           4 :                 state, state.dataOutRptPredefined->pdchS62svrClDorg, FinalSysSizing(AirLoopNum).AirPriLoopName, "User-specified");
    1608             :         }
    1609        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    1610         925 :                                                  state.dataOutRptPredefined->pdchS62svrClVou,
    1611         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    1612         925 :                                                  state.dataSize->VouBySys(AirLoopNum),
    1613             :                                                  4); // Vou
    1614        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    1615         925 :                                                  state.dataOutRptPredefined->pdchS62svrClVps,
    1616         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    1617         925 :                                                  state.dataSize->VpsClgBySys(AirLoopNum),
    1618             :                                                  4); // Vps
    1619        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    1620         925 :                                                  state.dataOutRptPredefined->pdchS62svrClXs,
    1621         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    1622         925 :                                                  state.dataSize->XsBySysCool(AirLoopNum),
    1623             :                                                  4); // Xs
    1624        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    1625         925 :                                                  state.dataOutRptPredefined->pdchS62svrClEv,
    1626         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    1627         925 :                                                  state.dataSize->EvzMinBySysCool(AirLoopNum),
    1628             :                                                  4); // Ev
    1629             :         // Ev Calculation Methodology
    1630         925 :         if (state.dataSize->SysSizInput(SysSizNum).SystemOAMethod == SysOAMethod::VRP) {
    1631          14 :             OutputReportPredefined::PreDefTableEntry(state,
    1632           7 :                                                      state.dataOutRptPredefined->pdchS62svrClEvMthd,
    1633           7 :                                                      FinalSysSizing(AirLoopNum).AirPriLoopName,
    1634           7 :                                                      "Standard 62.1 Ventilation Rate Procedure");
    1635         918 :         } else if (state.dataSize->SysSizInput(SysSizNum).SystemOAMethod == SysOAMethod::SP) {
    1636           6 :             OutputReportPredefined::PreDefTableEntry(state,
    1637           3 :                                                      state.dataOutRptPredefined->pdchS62svrClEvMthd,
    1638           3 :                                                      FinalSysSizing(AirLoopNum).AirPriLoopName,
    1639           3 :                                                      "Standard 62.1 Simplified Procedure");
    1640             :         } else {
    1641        1830 :             OutputReportPredefined::PreDefTableEntry(
    1642        1830 :                 state, state.dataOutRptPredefined->pdchS62svrClEvMthd, FinalSysSizing(AirLoopNum).AirPriLoopName, "Not calculated");
    1643             :         }
    1644        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    1645         925 :                                                  state.dataOutRptPredefined->pdchS62svrClVot,
    1646         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    1647         925 :                                                  state.dataSize->VotClgBySys(AirLoopNum),
    1648             :                                                  4);          // Vot
    1649         925 :         if (state.dataSize->VpsClgBySys(AirLoopNum) != 0.0) { // Move here
    1650        3700 :             OutputReportPredefined::PreDefTableEntry(state,
    1651         925 :                                                      state.dataOutRptPredefined->pdchS62svrClPercOA,
    1652         925 :                                                      FinalSysSizing(AirLoopNum).AirPriLoopName,
    1653         925 :                                                      state.dataSize->VotClgBySys(AirLoopNum) / state.dataSize->VpsClgBySys(AirLoopNum),
    1654             :                                                      4); //%OA
    1655             :         }
    1656        2775 :         OutputReportPredefined::PreDefTableEntry(state,
    1657         925 :                                                  state.dataOutRptPredefined->pdchS62svrClEnvironmentOfPs,
    1658         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    1659         925 :                                                  state.dataSize->PeakPsOccurrenceEnvironmentStringBySys(AirLoopNum));
    1660        2775 :         OutputReportPredefined::PreDefTableEntry(state,
    1661         925 :                                                  state.dataOutRptPredefined->pdchS62svrClTimeOfPs,
    1662         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    1663         925 :                                                  state.dataSize->PeakPsOccurrenceDateTimeStringBySys(AirLoopNum));
    1664             : 
    1665             :         // system ventilation requirements for heating ( table 2 )
    1666        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    1667         925 :                                                  state.dataOutRptPredefined->pdchS62svrHtSumVpz,
    1668         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    1669         925 :                                                  state.dataSize->VpzHtgSumBySys(AirLoopNum),
    1670             :                                                  4); // Vpz-sum
    1671        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    1672         925 :                                                  state.dataOutRptPredefined->pdchS62svrHtPs,
    1673         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    1674         925 :                                                  state.dataSize->PsBySys(AirLoopNum),
    1675             :                                                  4); // Ps
    1676        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    1677         925 :                                                  state.dataOutRptPredefined->pdchS62svrHtSumPz,
    1678         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    1679         925 :                                                  state.dataSize->PzSumBySys(AirLoopNum),
    1680             :                                                  4); // Pz-sum
    1681        3700 :         OutputReportPredefined::PreDefTableEntry(
    1682        2775 :             state, state.dataOutRptPredefined->pdchS62svrHtD, FinalSysSizing(AirLoopNum).AirPriLoopName, state.dataSize->DBySys(AirLoopNum), 4); // D
    1683             :         // Origin of D
    1684         925 :         if (state.dataSize->SysSizInput(SysSizNum).OccupantDiversity == AutoSize) {
    1685        1846 :             OutputReportPredefined::PreDefTableEntry(
    1686        1846 :                 state, state.dataOutRptPredefined->pdchS62svrHtDorg, FinalSysSizing(AirLoopNum).AirPriLoopName, "Calculated from schedules");
    1687             :         } else {
    1688           4 :             OutputReportPredefined::PreDefTableEntry(
    1689           4 :                 state, state.dataOutRptPredefined->pdchS62svrHtDorg, FinalSysSizing(AirLoopNum).AirPriLoopName, "User-specified");
    1690             :         }
    1691        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    1692         925 :                                                  state.dataOutRptPredefined->pdchS62svrHtVou,
    1693         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    1694         925 :                                                  state.dataSize->VouBySys(AirLoopNum),
    1695             :                                                  4); // Vou
    1696        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    1697         925 :                                                  state.dataOutRptPredefined->pdchS62svrHtVps,
    1698         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    1699         925 :                                                  state.dataSize->VpsHtgBySys(AirLoopNum),
    1700             :                                                  4); // Vps
    1701        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    1702         925 :                                                  state.dataOutRptPredefined->pdchS62svrHtXs,
    1703         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    1704         925 :                                                  state.dataSize->XsBySysHeat(AirLoopNum),
    1705             :                                                  4); // Xs
    1706        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    1707         925 :                                                  state.dataOutRptPredefined->pdchS62svrHtEv,
    1708         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    1709         925 :                                                  state.dataSize->EvzMinBySysHeat(AirLoopNum),
    1710             :                                                  4); // Ev
    1711             :         // Ev Calculation Methodology
    1712         925 :         if (state.dataSize->SysSizInput(SysSizNum).SystemOAMethod == SysOAMethod::VRP) {
    1713          14 :             OutputReportPredefined::PreDefTableEntry(state,
    1714           7 :                                                      state.dataOutRptPredefined->pdchS62svrHtEvMthd,
    1715           7 :                                                      FinalSysSizing(AirLoopNum).AirPriLoopName,
    1716           7 :                                                      "Standard 62.1 Ventilation Rate Procedure");
    1717         918 :         } else if (state.dataSize->SysSizInput(SysSizNum).SystemOAMethod == SysOAMethod::SP) {
    1718           6 :             OutputReportPredefined::PreDefTableEntry(state,
    1719           3 :                                                      state.dataOutRptPredefined->pdchS62svrHtEvMthd,
    1720           3 :                                                      FinalSysSizing(AirLoopNum).AirPriLoopName,
    1721           3 :                                                      "Standard 62.1 Simplified Procedure");
    1722             :         } else {
    1723        1830 :             OutputReportPredefined::PreDefTableEntry(
    1724        1830 :                 state, state.dataOutRptPredefined->pdchS62svrHtEvMthd, FinalSysSizing(AirLoopNum).AirPriLoopName, "Not calculated");
    1725             :         }
    1726        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    1727         925 :                                                  state.dataOutRptPredefined->pdchS62svrHtVot,
    1728         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    1729         925 :                                                  state.dataSize->VotHtgBySys(AirLoopNum),
    1730             :                                                  4); // Vot
    1731         925 :         if (state.dataSize->VpsHtgBySys(AirLoopNum) != 0.0) {
    1732        3696 :             OutputReportPredefined::PreDefTableEntry(state,
    1733         924 :                                                      state.dataOutRptPredefined->pdchS62svrHtPercOA,
    1734         924 :                                                      FinalSysSizing(AirLoopNum).AirPriLoopName,
    1735         924 :                                                      state.dataSize->VotHtgBySys(AirLoopNum) / state.dataSize->VpsHtgBySys(AirLoopNum),
    1736             :                                                      4); //%OA
    1737             :         }
    1738             :         // heating time of peak Ps is the same as for cooling (for now)
    1739        2775 :         OutputReportPredefined::PreDefTableEntry(state,
    1740         925 :                                                  state.dataOutRptPredefined->pdchS62svrHtEnvironmentOfPs,
    1741         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    1742         925 :                                                  state.dataSize->PeakPsOccurrenceEnvironmentStringBySys(AirLoopNum));
    1743        2775 :         OutputReportPredefined::PreDefTableEntry(state,
    1744         925 :                                                  state.dataOutRptPredefined->pdchS62svrHtTimeOfPs,
    1745         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    1746         925 :                                                  state.dataSize->PeakPsOccurrenceDateTimeStringBySys(AirLoopNum));
    1747             : 
    1748             :         // Zone ventilation parameters, (table 3)
    1749             :         // make two passes, one for cooled zones and one for heated zones, if a zone is the same on the second pass, skip it
    1750        2775 :         for (int coolHeatPass = 1; coolHeatPass <= 2; ++coolHeatPass) {
    1751        1850 :             int numZones = 0;
    1752        1850 :             if (coolHeatPass == 1) {
    1753         925 :                 numZones = AirToZoneNodeInfo(AirLoopNum).NumZonesCooled;
    1754             :             } else {
    1755         925 :                 numZones = AirToZoneNodeInfo(AirLoopNum).NumZonesHeated;
    1756             :             }
    1757        4772 :             for (int zoneNum = 1; zoneNum <= numZones; ++zoneNum) {
    1758        2922 :                 int termUnitSizingIndex = 0;
    1759        2922 :                 int MatchingCooledZoneNum = 0;
    1760        2922 :                 if (coolHeatPass == 1) {
    1761        2908 :                     termUnitSizingIndex = AirToZoneNodeInfo(AirLoopNum).TermUnitCoolSizingIndex(zoneNum);
    1762             :                 } else {
    1763          14 :                     termUnitSizingIndex = AirToZoneNodeInfo(AirLoopNum).TermUnitHeatSizingIndex(zoneNum);
    1764          28 :                     MatchingCooledZoneNum = General::FindNumberInList(
    1765          28 :                         termUnitSizingIndex, AirToZoneNodeInfo(AirLoopNum).TermUnitCoolSizingIndex, AirToZoneNodeInfo(AirLoopNum).NumZonesCooled);
    1766             :                 }
    1767        2922 :                 if (MatchingCooledZoneNum == 0) {
    1768        2908 :                     auto &thisTermUnitFinalZoneSizing(state.dataSize->TermUnitFinalZoneSizing(termUnitSizingIndex));
    1769        5816 :                     OutputReportPredefined::PreDefTableEntry(state,
    1770        2908 :                                                              state.dataOutRptPredefined->pdchS62zvpAlN,
    1771             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1772        2908 :                                                              state.dataAirSystemsData->PrimaryAirSystems(AirLoopNum).Name); // Air loop name
    1773        5816 :                     OutputReportPredefined::PreDefTableEntry(state,
    1774        2908 :                                                              state.dataOutRptPredefined->pdchS62zvpRp,
    1775             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1776             :                                                              thisTermUnitFinalZoneSizing.DesOAFlowPPer,
    1777             :                                                              6); // Rp
    1778        5816 :                     OutputReportPredefined::PreDefTableEntry(state,
    1779        2908 :                                                              state.dataOutRptPredefined->pdchS62zvpPz,
    1780             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1781             :                                                              thisTermUnitFinalZoneSizing.TotPeopleInZone,
    1782             :                                                              4); // Pz
    1783        5816 :                     OutputReportPredefined::PreDefTableEntry(state,
    1784        2908 :                                                              state.dataOutRptPredefined->pdchS62zvpRa,
    1785             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1786             :                                                              thisTermUnitFinalZoneSizing.DesOAFlowPerArea,
    1787             :                                                              6); // Ra
    1788        5816 :                     OutputReportPredefined::PreDefTableEntry(state,
    1789        2908 :                                                              state.dataOutRptPredefined->pdchS62zvpAz,
    1790             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1791             :                                                              thisTermUnitFinalZoneSizing.TotalZoneFloorArea); // Az
    1792        8724 :                     OutputReportPredefined::PreDefTableEntry(
    1793             :                         state,
    1794        2908 :                         state.dataOutRptPredefined->pdchS62zvpVbz,
    1795             :                         thisTermUnitFinalZoneSizing.ZoneName,
    1796        2908 :                         VbzByZone(termUnitSizingIndex),
    1797             :                         4); // Vbz, now corrected so that Vbz does not already have system population term multiplied into it
    1798        5816 :                     OutputReportPredefined::PreDefTableEntry(state,
    1799        2908 :                                                              state.dataOutRptPredefined->pdchS62zvpClEz,
    1800             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1801             :                                                              thisTermUnitFinalZoneSizing.ZoneADEffCooling,
    1802             :                                                              4); // Ez-clg
    1803        2908 :                     if (thisTermUnitFinalZoneSizing.ZoneADEffCooling > 0.0) {
    1804        8724 :                         OutputReportPredefined::PreDefTableEntry(state,
    1805        2908 :                                                                  state.dataOutRptPredefined->pdchS62zvpClVoz,
    1806             :                                                                  thisTermUnitFinalZoneSizing.ZoneName,
    1807        2908 :                                                                  VbzByZone(termUnitSizingIndex) / thisTermUnitFinalZoneSizing.ZoneADEffCooling,
    1808             :                                                                  4); // Voz-clg
    1809             :                     }
    1810        5816 :                     OutputReportPredefined::PreDefTableEntry(state,
    1811        2908 :                                                              state.dataOutRptPredefined->pdchS62zvpHtEz,
    1812             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1813             :                                                              thisTermUnitFinalZoneSizing.ZoneADEffHeating,
    1814             :                                                              3); // Ez-htg
    1815        2908 :                     if (thisTermUnitFinalZoneSizing.ZoneADEffHeating != 0.0) {
    1816        8724 :                         OutputReportPredefined::PreDefTableEntry(state,
    1817        2908 :                                                                  state.dataOutRptPredefined->pdchS62zvpHtVoz,
    1818             :                                                                  thisTermUnitFinalZoneSizing.ZoneName,
    1819        2908 :                                                                  VbzByZone(termUnitSizingIndex) / thisTermUnitFinalZoneSizing.ZoneADEffHeating,
    1820             :                                                                  4); // Voz-htg
    1821             :                     }
    1822             :                 }
    1823             :             }
    1824             :         }
    1825             : 
    1826             :         // System Ventilation Parameters, (Table 4)
    1827             : 
    1828             :         // first do some summations needed
    1829         925 :         Real64 RpPzSum(0.0);
    1830         925 :         Real64 RaAzSum(0.0);
    1831         925 :         Real64 AzSum(0.0);
    1832         925 :         Real64 VbzSum(0.0);
    1833         925 :         Real64 VozClgSum(0.0);
    1834         925 :         Real64 VozHtgSum(0.0);
    1835         925 :         Real64 VdzClgSum(0.0);
    1836         925 :         Real64 VdzHtgSum(0.0);
    1837         925 :         Real64 VpzMinClgSum(0.0);
    1838         925 :         Real64 VpzMinHtgSum(0.0);
    1839             :         // make two passes, one for cooled zones and one for heated zones, if a zone is the same on the second pass, skip it
    1840        2775 :         for (int coolHeatPass = 1; coolHeatPass <= 2; ++coolHeatPass) {
    1841        1850 :             int numZones = 0;
    1842        1850 :             if (coolHeatPass == 1) {
    1843         925 :                 numZones = AirToZoneNodeInfo(AirLoopNum).NumZonesCooled;
    1844             :             } else {
    1845         925 :                 numZones = AirToZoneNodeInfo(AirLoopNum).NumZonesHeated;
    1846             :             }
    1847        4772 :             for (int airLoopZoneNum = 1; airLoopZoneNum <= numZones; ++airLoopZoneNum) {
    1848        2922 :                 int termUnitSizingIndex = 0;
    1849        2922 :                 int MatchingCooledZoneNum = 0;
    1850        2922 :                 if (coolHeatPass == 1) {
    1851        2908 :                     termUnitSizingIndex = AirToZoneNodeInfo(AirLoopNum).TermUnitCoolSizingIndex(airLoopZoneNum);
    1852             :                 } else {
    1853          14 :                     termUnitSizingIndex = AirToZoneNodeInfo(AirLoopNum).TermUnitHeatSizingIndex(airLoopZoneNum);
    1854          28 :                     MatchingCooledZoneNum = General::FindNumberInList(
    1855          28 :                         termUnitSizingIndex, AirToZoneNodeInfo(AirLoopNum).TermUnitCoolSizingIndex, AirToZoneNodeInfo(AirLoopNum).NumZonesCooled);
    1856             :                 }
    1857        2922 :                 if (MatchingCooledZoneNum == 0) {
    1858        2908 :                     auto &thisTermUnitFinalZoneSizing(state.dataSize->TermUnitFinalZoneSizing(termUnitSizingIndex));
    1859             :                     // Zone ventilation parameters, (table 3)
    1860        2908 :                     RpPzSum += thisTermUnitFinalZoneSizing.DesOAFlowPPer * thisTermUnitFinalZoneSizing.TotPeopleInZone;
    1861        2908 :                     RaAzSum += thisTermUnitFinalZoneSizing.DesOAFlowPerArea * thisTermUnitFinalZoneSizing.TotalZoneFloorArea;
    1862        2908 :                     AzSum += thisTermUnitFinalZoneSizing.TotalZoneFloorArea;
    1863        2908 :                     VbzSum += VbzByZone(termUnitSizingIndex);
    1864        2908 :                     if (thisTermUnitFinalZoneSizing.ZoneADEffCooling != 0.0) {
    1865        2908 :                         VozClgSum += VbzByZone(termUnitSizingIndex) / thisTermUnitFinalZoneSizing.ZoneADEffCooling;
    1866             :                     }
    1867        2908 :                     if (thisTermUnitFinalZoneSizing.ZoneADEffHeating != 0.0) {
    1868        2908 :                         VozHtgSum += VbzByZone(termUnitSizingIndex) / thisTermUnitFinalZoneSizing.ZoneADEffHeating;
    1869             :                     }
    1870             : 
    1871        2908 :                     VpzMinClgSum += state.dataSize->VpzMinClgByZone(termUnitSizingIndex);
    1872        2908 :                     VdzClgSum += state.dataSize->VdzClgByZone(termUnitSizingIndex);
    1873        2908 :                     VpzMinHtgSum += state.dataSize->VpzMinHtgByZone(termUnitSizingIndex);
    1874        2908 :                     VdzHtgSum += state.dataSize->VdzMinHtgByZone(termUnitSizingIndex);
    1875             : 
    1876             :                     // Zone Ventilation Calculations for Cooling Design, (Table 5)
    1877        5816 :                     OutputReportPredefined::PreDefTableEntry(state,
    1878        2908 :                                                              state.dataOutRptPredefined->pdchS62zcdAlN,
    1879             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1880        2908 :                                                              AirToZoneNodeInfo(AirLoopNum).AirLoopName); // Air loop name
    1881       49140 :                     for (int iAirDistUnit = 1; iAirDistUnit <= (int)state.dataDefineEquipment->AirDistUnit.size(); ++iAirDistUnit) {
    1882       49130 :                         if (AirDistUnit(iAirDistUnit).TermUnitSizingNum == termUnitSizingIndex) {
    1883        5796 :                             OutputReportPredefined::PreDefTableEntry(state,
    1884        2898 :                                                                      state.dataOutRptPredefined->pdchS62zcdBox,
    1885             :                                                                      thisTermUnitFinalZoneSizing.ZoneName,
    1886        2898 :                                                                      AirDistUnit(iAirDistUnit).EquipType(1)); // use first type of equipment listed
    1887        2898 :                             break; // if it has been found no more searching is needed
    1888             :                         }
    1889             :                     }
    1890        8724 :                     OutputReportPredefined::PreDefTableEntry(state,
    1891        2908 :                                                              state.dataOutRptPredefined->pdchS62zcdVpz,
    1892             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1893        2908 :                                                              state.dataSize->VpzClgByZone(termUnitSizingIndex),
    1894             :                                                              4); // Vpz LS:
    1895        8724 :                     OutputReportPredefined::PreDefTableEntry(state,
    1896        2908 :                                                              state.dataOutRptPredefined->pdchS62zcdVdz,
    1897             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1898        2908 :                                                              state.dataSize->VdzClgByZone(termUnitSizingIndex),
    1899             :                                                              4); // Vdz
    1900        8724 :                     OutputReportPredefined::PreDefTableEntry(state,
    1901        2908 :                                                              state.dataOutRptPredefined->pdchS62zcdVpzmin,
    1902             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1903        2908 :                                                              state.dataSize->VpzMinClgByZone(termUnitSizingIndex),
    1904             :                                                              4); // Vpz-min
    1905             :                     // Vpz-min, simplified procedure?
    1906        2908 :                     if (thisTermUnitFinalZoneSizing.VpzMinByZoneSPSized) {
    1907          16 :                         OutputReportPredefined::PreDefTableEntry(
    1908          16 :                             state, state.dataOutRptPredefined->pdchS62zcdVpzminSPSize, thisTermUnitFinalZoneSizing.ZoneName, "Yes");
    1909             :                     } else {
    1910        5800 :                         OutputReportPredefined::PreDefTableEntry(
    1911        5800 :                             state, state.dataOutRptPredefined->pdchS62zcdVpzminSPSize, thisTermUnitFinalZoneSizing.ZoneName, "No");
    1912             :                     }
    1913        2908 :                     Real64 VozClg = 0.0;
    1914        2908 :                     if (thisTermUnitFinalZoneSizing.ZoneADEffCooling > 0.0) {
    1915        2908 :                         VozClg = VbzByZone(termUnitSizingIndex) / thisTermUnitFinalZoneSizing.ZoneADEffCooling;
    1916        5816 :                         OutputReportPredefined::PreDefTableEntry(state,
    1917        2908 :                                                                  state.dataOutRptPredefined->pdchS62zcdVozclg,
    1918             :                                                                  thisTermUnitFinalZoneSizing.ZoneName,
    1919             :                                                                  VozClg,
    1920             :                                                                  4); // Voz-clg
    1921             :                     }
    1922        8724 :                     OutputReportPredefined::PreDefTableEntry(state,
    1923        2908 :                                                              state.dataOutRptPredefined->pdchS62zcdZpz,
    1924             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1925        2908 :                                                              state.dataSize->ZdzClgByZone(termUnitSizingIndex),
    1926             :                                                              4); // Zpz = Voz/Vpz (see eq 6-5 in 62.1-2010)
    1927        5816 :                     OutputReportPredefined::PreDefTableEntry(state,
    1928        2908 :                                                              state.dataOutRptPredefined->pdchS62zcdEp,
    1929             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1930             :                                                              thisTermUnitFinalZoneSizing.ZonePrimaryAirFraction,
    1931             :                                                              4); // Ep
    1932        5816 :                     OutputReportPredefined::PreDefTableEntry(state,
    1933        2908 :                                                              state.dataOutRptPredefined->pdchS62zcdEr,
    1934             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1935             :                                                              thisTermUnitFinalZoneSizing.ZoneSecondaryRecirculation,
    1936             :                                                              4); // Er
    1937        8724 :                     OutputReportPredefined::PreDefTableEntry(state,
    1938        2908 :                                                              state.dataOutRptPredefined->pdchS62zcdFa,
    1939             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1940        2908 :                                                              state.dataSize->FaByZoneCool(termUnitSizingIndex),
    1941             :                                                              4); // Fa
    1942        8724 :                     OutputReportPredefined::PreDefTableEntry(state,
    1943        2908 :                                                              state.dataOutRptPredefined->pdchS62zcdFb,
    1944             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1945        2908 :                                                              state.dataSize->FbByZoneCool(termUnitSizingIndex),
    1946             :                                                              4); // Fb
    1947        8724 :                     OutputReportPredefined::PreDefTableEntry(state,
    1948        2908 :                                                              state.dataOutRptPredefined->pdchS62zcdFc,
    1949             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1950        2908 :                                                              state.dataSize->FcByZoneCool(termUnitSizingIndex),
    1951             :                                                              4); // Fc
    1952        8724 :                     OutputReportPredefined::PreDefTableEntry(state,
    1953        2908 :                                                              state.dataOutRptPredefined->pdchS62zcdEvz,
    1954             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1955        2908 :                                                              state.dataSize->EvzByZoneCool(termUnitSizingIndex),
    1956             :                                                              4); // Evz
    1957             : 
    1958             :                     // Zone Ventilation Calculations for Heating Design (Table 7)
    1959        5816 :                     OutputReportPredefined::PreDefTableEntry(state,
    1960        2908 :                                                              state.dataOutRptPredefined->pdchS62zhdAlN,
    1961             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1962        2908 :                                                              AirToZoneNodeInfo(AirLoopNum).AirLoopName); // Air loop name
    1963       49140 :                     for (int iAirDistUnit = 1; iAirDistUnit <= (int)state.dataDefineEquipment->AirDistUnit.size(); ++iAirDistUnit) {
    1964       49130 :                         if (AirDistUnit(iAirDistUnit).TermUnitSizingNum == termUnitSizingIndex) {
    1965        5796 :                             OutputReportPredefined::PreDefTableEntry(state,
    1966        2898 :                                                                      state.dataOutRptPredefined->pdchS62zhdBox,
    1967             :                                                                      thisTermUnitFinalZoneSizing.ZoneName,
    1968        2898 :                                                                      AirDistUnit(iAirDistUnit).EquipType(1)); // use first type of equipment listed
    1969        2898 :                             break; // if it has been found no more searching is needed
    1970             :                         }
    1971             :                     }
    1972        8724 :                     OutputReportPredefined::PreDefTableEntry(state,
    1973        2908 :                                                              state.dataOutRptPredefined->pdchS62zhdVpz,
    1974             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1975        2908 :                                                              state.dataSize->VpzHtgByZone(termUnitSizingIndex),
    1976             :                                                              4); // Vpz
    1977        8724 :                     OutputReportPredefined::PreDefTableEntry(state,
    1978        2908 :                                                              state.dataOutRptPredefined->pdchS62zhdVdz,
    1979             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1980        2908 :                                                              state.dataSize->VdzHtgByZone(termUnitSizingIndex),
    1981             :                                                              4); // Vdz
    1982        8724 :                     OutputReportPredefined::PreDefTableEntry(state,
    1983        2908 :                                                              state.dataOutRptPredefined->pdchS62zhdVpzmin,
    1984             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    1985        2908 :                                                              state.dataSize->VpzMinHtgByZone(termUnitSizingIndex),
    1986             :                                                              4); // Vpz-min
    1987             :                     // Vpz-min, simplified procedure?
    1988        2908 :                     if (thisTermUnitFinalZoneSizing.VpzMinByZoneSPSized) {
    1989          16 :                         OutputReportPredefined::PreDefTableEntry(
    1990          16 :                             state, state.dataOutRptPredefined->pdchS62zhdVpzminSPSize, thisTermUnitFinalZoneSizing.ZoneName, "Yes");
    1991             :                     } else {
    1992        5800 :                         OutputReportPredefined::PreDefTableEntry(
    1993        5800 :                             state, state.dataOutRptPredefined->pdchS62zhdVpzminSPSize, thisTermUnitFinalZoneSizing.ZoneName, "No");
    1994             :                     }
    1995        2908 :                     Real64 VozHtg = 0.0;
    1996        2908 :                     if (thisTermUnitFinalZoneSizing.ZoneADEffHeating != 0.0) {
    1997        2908 :                         VozHtg = VbzByZone(termUnitSizingIndex) / thisTermUnitFinalZoneSizing.ZoneADEffHeating;
    1998        5816 :                         OutputReportPredefined::PreDefTableEntry(state,
    1999        2908 :                                                                  state.dataOutRptPredefined->pdchS62zhdVozhtg,
    2000             :                                                                  thisTermUnitFinalZoneSizing.ZoneName,
    2001             :                                                                  VozHtg,
    2002             :                                                                  4); // Voz-htg
    2003             :                     }
    2004             :                     // Outdoor Air Details Report - Design Zone Outdoor Airflow - Voz
    2005        2908 :                     Real64 VozMax = std::max(VozHtg, VozClg); // take larger of the heating and cooling Voz values
    2006        5816 :                     OutputReportPredefined::PreDefTableEntry(
    2007        2908 :                         state, state.dataOutRptPredefined->pdchOaMvDesZnOa, thisTermUnitFinalZoneSizing.ZoneName, VozMax, 4);
    2008        5816 :                     state.dataOutRptPredefined->TotalVozMax += VozMax * state.dataHeatBal->Zone(thisTermUnitFinalZoneSizing.ZoneNum).Multiplier *
    2009        2908 :                                                                state.dataHeatBal->Zone(thisTermUnitFinalZoneSizing.ZoneNum).ListMultiplier;
    2010        5816 :                     OutputReportPredefined::PreDefTableEntry(state,
    2011        2908 :                                                              state.dataOutRptPredefined->pdchS62zhdZpz,
    2012             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    2013             :                                                              thisTermUnitFinalZoneSizing.ZpzHtgByZone,
    2014             :                                                              4); // Zpz = Voz/Vpz (see eq 6-5 in 62.1-2010)
    2015        5816 :                     OutputReportPredefined::PreDefTableEntry(state,
    2016        2908 :                                                              state.dataOutRptPredefined->pdchS62zhdEp,
    2017             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    2018             :                                                              thisTermUnitFinalZoneSizing.ZonePrimaryAirFractionHtg,
    2019             :                                                              4); // Ep
    2020        5816 :                     OutputReportPredefined::PreDefTableEntry(state,
    2021        2908 :                                                              state.dataOutRptPredefined->pdchS62zhdEr,
    2022             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    2023             :                                                              thisTermUnitFinalZoneSizing.ZoneSecondaryRecirculation,
    2024             :                                                              4); // Er
    2025        8724 :                     OutputReportPredefined::PreDefTableEntry(state,
    2026        2908 :                                                              state.dataOutRptPredefined->pdchS62zhdFa,
    2027             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    2028        2908 :                                                              state.dataSize->FaByZoneHeat(termUnitSizingIndex),
    2029             :                                                              4); // Fa
    2030        8724 :                     OutputReportPredefined::PreDefTableEntry(state,
    2031        2908 :                                                              state.dataOutRptPredefined->pdchS62zhdFb,
    2032             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    2033        2908 :                                                              state.dataSize->FbByZoneHeat(termUnitSizingIndex),
    2034             :                                                              4); // Fb
    2035        8724 :                     OutputReportPredefined::PreDefTableEntry(state,
    2036        2908 :                                                              state.dataOutRptPredefined->pdchS62zhdFc,
    2037             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    2038        2908 :                                                              state.dataSize->FcByZoneHeat(termUnitSizingIndex),
    2039             :                                                              4); // Fc
    2040        8724 :                     OutputReportPredefined::PreDefTableEntry(state,
    2041        2908 :                                                              state.dataOutRptPredefined->pdchS62zhdEvz,
    2042             :                                                              thisTermUnitFinalZoneSizing.ZoneName,
    2043        2908 :                                                              state.dataSize->EvzByZoneHeat(termUnitSizingIndex),
    2044             :                                                              4); // Evz
    2045             :                 }
    2046             :             }
    2047             :         }
    2048             : 
    2049             :         // System Ventilation Parameters, (Table 4)
    2050         925 :         if (state.dataSize->PzSumBySys(AirLoopNum) != 0.0) {
    2051        3412 :             OutputReportPredefined::PreDefTableEntry(state,
    2052         853 :                                                      state.dataOutRptPredefined->pdchS62svpRp,
    2053         853 :                                                      FinalSysSizing(AirLoopNum).AirPriLoopName,
    2054         853 :                                                      RpPzSum / state.dataSize->PzSumBySys(AirLoopNum),
    2055             :                                                      6); // Average Rp for system
    2056             :         }
    2057        3700 :         OutputReportPredefined::PreDefTableEntry(
    2058        2775 :             state, state.dataOutRptPredefined->pdchS62svpPz, FinalSysSizing(AirLoopNum).AirPriLoopName, state.dataSize->PzSumBySys(AirLoopNum));
    2059         925 :         if (AzSum != 0.0) {
    2060        2775 :             OutputReportPredefined::PreDefTableEntry(state,
    2061         925 :                                                      state.dataOutRptPredefined->pdchS62svpRa,
    2062         925 :                                                      FinalSysSizing(AirLoopNum).AirPriLoopName,
    2063             :                                                      RaAzSum / AzSum,
    2064             :                                                      6); // average Ra for system
    2065             :         }
    2066        2775 :         OutputReportPredefined::PreDefTableEntry(state,
    2067         925 :                                                  state.dataOutRptPredefined->pdchS62svpAz,
    2068         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    2069             :                                                  AzSum,
    2070             :                                                  4); // Az sum
    2071        2775 :         OutputReportPredefined::PreDefTableEntry(
    2072        1850 :             state, state.dataOutRptPredefined->pdchS62svpVbz, FinalSysSizing(AirLoopNum).AirPriLoopName, VbzSum, 4);
    2073        2775 :         OutputReportPredefined::PreDefTableEntry(state,
    2074         925 :                                                  state.dataOutRptPredefined->pdchS62svpClVoz,
    2075         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    2076             :                                                  VozClgSum,
    2077             :                                                  4); // Voz-clg
    2078        2775 :         OutputReportPredefined::PreDefTableEntry(state,
    2079         925 :                                                  state.dataOutRptPredefined->pdchS62svpHtVoz,
    2080         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    2081             :                                                  VozHtgSum,
    2082             :                                                  4); // Voz-htg
    2083             : 
    2084             :         // System Ventilation Calculations for Cooling Design (Table 6)
    2085        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    2086         925 :                                                  state.dataOutRptPredefined->pdchS62scdVpz,
    2087         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    2088         925 :                                                  state.dataSize->VpzClgSumBySys(AirLoopNum),
    2089             :                                                  4); // Vpz-sum
    2090        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    2091         925 :                                                  state.dataOutRptPredefined->pdchS62scdVps,
    2092         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    2093         925 :                                                  state.dataSize->VpsClgBySys(AirLoopNum),
    2094             :                                                  4); // Vps
    2095        2775 :         OutputReportPredefined::PreDefTableEntry(
    2096        1850 :             state, state.dataOutRptPredefined->pdchS62scdVpzmin, FinalSysSizing(AirLoopNum).AirPriLoopName, VpzMinClgSum, 4); // Vpz-min
    2097        2775 :         OutputReportPredefined::PreDefTableEntry(state,
    2098         925 :                                                  state.dataOutRptPredefined->pdchS62scdVdz,
    2099         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    2100             :                                                  VdzClgSum,
    2101             :                                                  4); // Vdz-sum
    2102        2775 :         OutputReportPredefined::PreDefTableEntry(state,
    2103         925 :                                                  state.dataOutRptPredefined->pdchS62scdVozclg,
    2104         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    2105             :                                                  VozClgSum,
    2106             :                                                  4); // Voz-clg
    2107        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    2108         925 :                                                  state.dataOutRptPredefined->pdchS62scdEvz,
    2109         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    2110         925 :                                                  state.dataSize->EvzMinBySysCool(AirLoopNum),
    2111             :                                                  4); // Evz-min
    2112             : 
    2113             :         // System Ventilation Calculations for Heating Design (Table 8)
    2114        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    2115         925 :                                                  state.dataOutRptPredefined->pdchS62shdVpz,
    2116         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    2117         925 :                                                  state.dataSize->VpzHtgSumBySys(AirLoopNum),
    2118             :                                                  4); // Vpz-sum
    2119        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    2120         925 :                                                  state.dataOutRptPredefined->pdchS62shdVps,
    2121         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    2122         925 :                                                  state.dataSize->VpsHtgBySys(AirLoopNum),
    2123             :                                                  4); // Vps
    2124        2775 :         OutputReportPredefined::PreDefTableEntry(state,
    2125         925 :                                                  state.dataOutRptPredefined->pdchS62shdVdz,
    2126         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    2127             :                                                  VdzHtgSum,
    2128             :                                                  4); // Vdz-sum
    2129        2775 :         OutputReportPredefined::PreDefTableEntry(
    2130        1850 :             state, state.dataOutRptPredefined->pdchS62shdVpzmin, FinalSysSizing(AirLoopNum).AirPriLoopName, VpzMinHtgSum, 4); // Vpz-min
    2131        2775 :         OutputReportPredefined::PreDefTableEntry(state,
    2132         925 :                                                  state.dataOutRptPredefined->pdchS62shdVozhtg,
    2133         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    2134             :                                                  VozHtgSum,
    2135             :                                                  4); // Voz-htg
    2136        3700 :         OutputReportPredefined::PreDefTableEntry(state,
    2137         925 :                                                  state.dataOutRptPredefined->pdchS62shdEvz,
    2138         925 :                                                  FinalSysSizing(AirLoopNum).AirPriLoopName,
    2139         925 :                                                  state.dataSize->EvzMinBySysHeat(AirLoopNum),
    2140             :                                                  4); // Evz-min
    2141             : 
    2142             :     } // loop over air loops for table writing
    2143         769 : }
    2144             : 
    2145         329 : void DetermineSystemPopulationDiversity(EnergyPlusData &state)
    2146             : {
    2147             : 
    2148         329 :     auto &FinalSysSizing(state.dataSize->FinalSysSizing);
    2149         329 :     auto &SysSizInput(state.dataSize->SysSizInput);
    2150             : 
    2151             :     // determine Pz sum, Ps, and D for each air system for standard 62.1
    2152             : 
    2153             :     // first determine if any airloops use VRP, if not then don't need to march thru year of schedules for performance
    2154         329 :     bool anyVRPinModel(false);
    2155        1244 :     for (int AirLoopNum = 1; AirLoopNum <= state.dataHVACGlobal->NumPrimaryAirSys; ++AirLoopNum) {
    2156         922 :         if (FinalSysSizing(AirLoopNum).SystemOAMethod == SysOAMethod::VRP || FinalSysSizing(AirLoopNum).SystemOAMethod == SysOAMethod::SP) {
    2157           7 :             anyVRPinModel = true;
    2158           7 :             break;
    2159             :         }
    2160             :     }
    2161             :     // First get the design (max) level of people in all zones connected to air loop
    2162        1254 :     for (int AirLoopNum = 1; AirLoopNum <= state.dataHVACGlobal->NumPrimaryAirSys; ++AirLoopNum) {
    2163        1850 :         int SysSizNum = UtilityRoutines::FindItemInList(
    2164        2775 :             FinalSysSizing(AirLoopNum).AirPriLoopName, state.dataSize->SysSizInput, &SystemSizingInputData::AirPriLoopName);
    2165         925 :         if (SysSizNum == 0) SysSizNum = 1; // use first when none applicable
    2166             :         // only retrieve data if the occupant density is set to be autosized
    2167         925 :         if (FinalSysSizing(AirLoopNum).OAAutoSized && SysSizInput(SysSizNum).OccupantDiversity == AutoSize) {
    2168         885 :             state.dataSize->PzSumBySys(AirLoopNum) = 0.0;
    2169         885 :             state.dataSize->PsBySys(AirLoopNum) = 0.0;
    2170        3478 :             for (int zoneNumOnLoop = 1; zoneNumOnLoop <= state.dataAirLoop->AirLoopZoneInfo(AirLoopNum).NumZones; ++zoneNumOnLoop) {
    2171        2593 :                 int CtrlZoneNum = state.dataAirLoop->AirLoopZoneInfo(AirLoopNum).ActualZoneNumber(zoneNumOnLoop);
    2172       72927 :                 for (int PeopleNum = 1; PeopleNum <= state.dataHeatBal->TotPeople; ++PeopleNum) {
    2173       70334 :                     if (state.dataHeatBal->People(PeopleNum).ZonePtr == state.dataSize->FinalZoneSizing(CtrlZoneNum).ZoneNum) {
    2174        2481 :                         state.dataSize->PzSumBySys(AirLoopNum) +=
    2175        4962 :                             (state.dataHeatBal->People(PeopleNum).NumberOfPeople *
    2176        4962 :                              state.dataHeatBal->Zone(state.dataSize->FinalZoneSizing(CtrlZoneNum).ZoneNum).Multiplier *
    2177        2481 :                              state.dataHeatBal->Zone(state.dataSize->FinalZoneSizing(CtrlZoneNum).ZoneNum).ListMultiplier);
    2178             :                     }
    2179             :                 }
    2180             :             }
    2181             :         }
    2182             :     }
    2183             : 
    2184         329 :     if (!anyVRPinModel) {
    2185        1237 :         for (int AirLoopNum = 1; AirLoopNum <= state.dataHVACGlobal->NumPrimaryAirSys; ++AirLoopNum) {
    2186         915 :             state.dataSize->DBySys(AirLoopNum) = 1.0;
    2187             :         }
    2188         322 :         return; // early return to not march through schedules
    2189             :     }
    2190             : 
    2191           7 :     DisplayString(state, "Standard 62.1 Ventilation Rate Procedure: Determine System Occupant Diversity");
    2192             :     // now march through all zone timesteps for entire year to find the concurrent max
    2193           7 :     int DaysInYear(366);  // assume leap year
    2194           7 :     int dayOfWeekType(1); // assume year starts on Sunday
    2195           7 :     WeatherManager::CalcSpecialDayTypes(state);
    2196        2569 :     for (int DayLoop = 1; DayLoop <= DaysInYear; ++DayLoop) { // loop over all days in year
    2197        2562 :         state.dataEnvrn->HolidayIndex = state.dataWeatherManager->SpecialDayTypes(DayLoop);
    2198        2562 :         state.dataEnvrn->DayOfYear_Schedule = DayLoop;
    2199        2562 :         state.dataEnvrn->DayOfWeek = dayOfWeekType;
    2200        2562 :         ++dayOfWeekType;
    2201        2562 :         if (dayOfWeekType > 7) dayOfWeekType = 1;
    2202       64050 :         for (int hrOfDay = 1; hrOfDay <= 24; ++hrOfDay) {                         // loop over all hours in day
    2203       61488 :             state.dataGlobal->HourOfDay = hrOfDay;                                // avoid crash in schedule manager
    2204      325008 :             for (int TS = 1; TS <= state.dataGlobal->NumOfTimeStepInHour; ++TS) { // loop over all timesteps in hour
    2205      263520 :                 state.dataGlobal->TimeStep = TS;                                  // avoid crash in schedule manager
    2206      263520 :                 Real64 TSfraction(0.0);
    2207      263520 :                 if (state.dataGlobal->NumOfTimeStepInHour > 0.0) TSfraction = 1.0 / double(state.dataGlobal->NumOfTimeStepInHour);
    2208      667584 :                 for (int AirLoopNum = 1; AirLoopNum <= state.dataHVACGlobal->NumPrimaryAirSys; ++AirLoopNum) { // loop over all the air systems
    2209      808128 :                     int SysSizNum = UtilityRoutines::FindItemInList(
    2210     1212192 :                         FinalSysSizing(AirLoopNum).AirPriLoopName, state.dataSize->SysSizInput, &SystemSizingInputData::AirPriLoopName);
    2211      404064 :                     if (SysSizNum == 0) SysSizNum = 1; // use first when none applicable
    2212      404064 :                     if (FinalSysSizing(AirLoopNum).OAAutoSized && SysSizInput(SysSizNum).OccupantDiversity == AutoSize) {
    2213             : 
    2214             :                         // Loop over all zones connected to air loop
    2215      333792 :                         Real64 TotConcurrentPeopleOnSys = 0.0;
    2216     1932480 :                         for (int zoneNumOnLoop = 1; zoneNumOnLoop <= state.dataAirLoop->AirLoopZoneInfo(AirLoopNum).NumZones; ++zoneNumOnLoop) {
    2217     1598688 :                             int CtrlZoneNum = state.dataAirLoop->AirLoopZoneInfo(AirLoopNum).ActualZoneNumber(zoneNumOnLoop);
    2218             : 
    2219    17497728 :                             for (int PeopleNum = 1; PeopleNum <= state.dataHeatBal->TotPeople; ++PeopleNum) {
    2220    15899040 :                                 if (state.dataHeatBal->People(PeopleNum).ZonePtr == state.dataSize->FinalZoneSizing(CtrlZoneNum).ZoneNum) {
    2221             :                                     Real64 PeopleInZone =
    2222     3197376 :                                         (state.dataHeatBal->People(PeopleNum).NumberOfPeople *
    2223     3197376 :                                          state.dataHeatBal->Zone(state.dataSize->FinalZoneSizing(CtrlZoneNum).ZoneNum).Multiplier *
    2224     3197376 :                                          state.dataHeatBal->Zone(state.dataSize->FinalZoneSizing(CtrlZoneNum).ZoneNum).ListMultiplier);
    2225     1598688 :                                     Real64 schMultiplier = ScheduleManager::LookUpScheduleValue(
    2226     3197376 :                                         state, state.dataHeatBal->People(PeopleNum).NumberOfPeoplePtr, hrOfDay, TS);
    2227     1598688 :                                     PeopleInZone = PeopleInZone * schMultiplier;
    2228     1598688 :                                     TotConcurrentPeopleOnSys += PeopleInZone;
    2229             :                                 }
    2230             :                             }
    2231             :                         }
    2232      333792 :                         if (TotConcurrentPeopleOnSys >= state.dataSize->PsBySys(AirLoopNum)) {
    2233       76084 :                             state.dataSize->PsBySys(AirLoopNum) = TotConcurrentPeopleOnSys; // store max concurrent occupancy on system
    2234             :                             // store timing description of Last occurrence of max
    2235       76084 :                             int Month(0);
    2236       76084 :                             int DayOfMonth(0);
    2237       76084 :                             General::InvOrdinalDay(DayLoop, Month, DayOfMonth, 1);
    2238       76084 :                             Real64 TimeHrsFraction = (double(hrOfDay) - 1.0) + double(TS) * TSfraction;
    2239       76084 :                             int TimeHrsInt = int(TimeHrsFraction);
    2240       76084 :                             int TimeMinsInt = nint((TimeHrsFraction - TimeHrsInt) * 60.0);
    2241       76084 :                             if (TimeMinsInt == 60) {
    2242           0 :                                 ++TimeHrsInt;
    2243           0 :                                 TimeMinsInt = 0;
    2244             :                             }
    2245       76084 :                             state.dataSize->PeakPsOccurrenceDateTimeStringBySys(AirLoopNum) =
    2246      152168 :                                 format("{:02}/{:02} {:02}:{:02}", Month, DayOfMonth, TimeHrsInt, TimeMinsInt);
    2247       76084 :                             state.dataSize->PeakPsOccurrenceEnvironmentStringBySys(AirLoopNum) = "Full Year Schedule";
    2248             :                         }
    2249             :                     } // if autosizied and VRP
    2250             :                 }     // air loops
    2251             :             }
    2252             :         }
    2253             :     }
    2254             : 
    2255             :     // compute D for standard 62.1 by system
    2256          17 :     for (int AirLoopNum = 1; AirLoopNum <= state.dataHVACGlobal->NumPrimaryAirSys; ++AirLoopNum) {
    2257          20 :         int SysSizNum = UtilityRoutines::FindItemInList(
    2258          30 :             FinalSysSizing(AirLoopNum).AirPriLoopName, state.dataSize->SysSizInput, &SystemSizingInputData::AirPriLoopName);
    2259          10 :         if (SysSizNum == 0) SysSizNum = 1; // use first when none applicable
    2260             : 
    2261             :         // compute D if set to autosize
    2262          10 :         if (SysSizInput(SysSizNum).OccupantDiversity == AutoSize) {
    2263           8 :             if (state.dataSize->PzSumBySys(AirLoopNum) > 0.0) {
    2264           8 :                 state.dataSize->DBySys(AirLoopNum) = state.dataSize->PsBySys(AirLoopNum) / state.dataSize->PzSumBySys(AirLoopNum);
    2265             :             } else {
    2266           0 :                 state.dataSize->DBySys(AirLoopNum) = 1.0;
    2267             :             }
    2268           8 :             state.dataSize->DBySys(AirLoopNum) = min(1.0, state.dataSize->DBySys(AirLoopNum));
    2269             :         } else {
    2270             :             // set the occupant diversity based on user-specified value
    2271           2 :             state.dataSize->DBySys(AirLoopNum) = SysSizInput(SysSizNum).OccupantDiversity;
    2272             :         }
    2273             : 
    2274             :         // For single zone systems, D should be 1.0.
    2275          10 :         if (state.dataAirLoop->AirLoopZoneInfo(AirLoopNum).NumZones == 1) {
    2276           0 :             state.dataSize->DBySys(AirLoopNum) = 1.0;
    2277           0 :             ShowWarningError(
    2278             :                 state,
    2279           0 :                 format("The {} air loop serves a single zone. The Occupant Diversity was calculated or set to a value less than 1.0. Single-zone air "
    2280             :                        "loops should have an Occupant Diversity of 1.0. The Occupant Diversity value for that air loop has been reset to 1.0",
    2281           0 :                        FinalSysSizing(AirLoopNum).AirPriLoopName));
    2282             :         }
    2283             :     }
    2284             : }
    2285             : 
    2286         771 : void GetOARequirements(EnergyPlusData &state)
    2287             : {
    2288             : 
    2289             :     // SUBROUTINE INFORMATION:
    2290             :     //       AUTHOR         R. Raustad - FSEC
    2291             :     //       DATE WRITTEN   February 2010
    2292             : 
    2293             :     // PURPOSE OF THIS SUBROUTINE:
    2294             :     // Obtains input data for the OA Requirements object and stores it in
    2295             :     // appropriate data structure.
    2296             : 
    2297             :     // METHODOLOGY EMPLOYED:
    2298             :     // Uses InputProcessor "Get" routines to obtain data.
    2299             :     // This object requires only a name where the default values are assumed
    2300             :     // if subsequent fields are not entered.
    2301             : 
    2302             :     using ScheduleManager::CheckScheduleValueMinMax;
    2303             :     using ScheduleManager::GetScheduleIndex;
    2304             :     using ScheduleManager::GetScheduleMaxValue;
    2305             : 
    2306             :     static constexpr std::string_view RoutineName("GetOARequirements: "); // include trailing blank space
    2307             : 
    2308             :     int NumAlphas;           // Number of Alphas for each GetObjectItem call
    2309             :     int NumNumbers;          // Number of Numbers for each GetObjectItem call
    2310             :     int TotalArgs;           // Total number of alpha and numeric arguments (max) for a
    2311             :     int IOStatus;            // Used in GetObjectItem
    2312         771 :     bool ErrorsFound(false); // If errors detected in input
    2313             : 
    2314        1542 :     std::string CurrentModuleObject; // for ease in getting objects
    2315        1542 :     Array1D_string Alphas;           // Alpha input items for object
    2316        1542 :     Array1D_string cAlphaFields;     // Alpha field names
    2317        1542 :     Array1D_string cNumericFields;   // Numeric field names
    2318        1542 :     Array1D<Real64> Numbers;         // Numeric input items for object
    2319        1542 :     Array1D_bool lAlphaBlanks;       // Logical array, alpha field input BLANK = .TRUE.
    2320        1542 :     Array1D_bool lNumericBlanks;     // Logical array, numeric field input BLANK = .TRUE.
    2321             : 
    2322         771 :     CurrentModuleObject = "DesignSpecification:OutdoorAir";
    2323         771 :     int numOARequirements = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, CurrentModuleObject);
    2324         771 :     state.dataInputProcessing->inputProcessor->getObjectDefMaxArgs(state, CurrentModuleObject, TotalArgs, NumAlphas, NumNumbers);
    2325        1542 :     std::string cCurrentModuleObject2 = "DesignSpecification:OutdoorAir:SpaceList";
    2326         771 :     int numOARequirementsLists = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject2);
    2327         771 :     state.dataSize->NumOARequirements = numOARequirements + numOARequirementsLists;
    2328             : 
    2329         771 :     Alphas.allocate(NumAlphas);
    2330         771 :     cAlphaFields.allocate(NumAlphas);
    2331         771 :     cNumericFields.allocate(NumNumbers);
    2332         771 :     Numbers.dimension(NumNumbers, 0.0);
    2333         771 :     lAlphaBlanks.dimension(NumAlphas, true);
    2334         771 :     lNumericBlanks.dimension(NumNumbers, true);
    2335             : 
    2336         771 :     if (state.dataSize->NumOARequirements > 0) {
    2337         415 :         state.dataSize->OARequirements.allocate(state.dataSize->NumOARequirements);
    2338             : 
    2339             :         // Start Loading the System Input
    2340        4235 :         for (int OAIndex = 1; OAIndex <= numOARequirements; ++OAIndex) {
    2341             : 
    2342        3820 :             state.dataInputProcessing->inputProcessor->getObjectItem(state,
    2343             :                                                                      CurrentModuleObject,
    2344             :                                                                      OAIndex,
    2345             :                                                                      Alphas,
    2346             :                                                                      NumAlphas,
    2347             :                                                                      Numbers,
    2348             :                                                                      NumNumbers,
    2349             :                                                                      IOStatus,
    2350             :                                                                      lNumericBlanks,
    2351             :                                                                      lAlphaBlanks,
    2352             :                                                                      cAlphaFields,
    2353             :                                                                      cNumericFields);
    2354        3820 :             UtilityRoutines::IsNameEmpty(state, Alphas(1), CurrentModuleObject, ErrorsFound);
    2355             : 
    2356        3820 :             state.dataSize->OARequirements(OAIndex).Name = Alphas(1);
    2357             : 
    2358        3820 :             ProcessInputOARequirements(
    2359             :                 state, CurrentModuleObject, OAIndex, Alphas, NumAlphas, Numbers, NumNumbers, lAlphaBlanks, cAlphaFields, ErrorsFound);
    2360             :         }
    2361             : 
    2362         415 :         Alphas.deallocate();
    2363         415 :         cAlphaFields.deallocate();
    2364         415 :         cNumericFields.deallocate();
    2365         415 :         Numbers.deallocate();
    2366         415 :         lAlphaBlanks.deallocate();
    2367         415 :         lNumericBlanks.deallocate();
    2368             : 
    2369             :         // DesignSpecification:OutdoorAir:SpaceList
    2370         415 :         auto &ip = state.dataInputProcessing->inputProcessor;
    2371         830 :         auto const instances = ip->epJSON.find(cCurrentModuleObject2);
    2372         415 :         if (instances != ip->epJSON.end()) {
    2373           1 :             auto const &objectSchemaProps = ip->getObjectSchemaProps(state, cCurrentModuleObject2);
    2374           1 :             auto &instancesValue = instances.value();
    2375           1 :             int oaIndex = numOARequirements; // add lists to the end of the same array
    2376             : 
    2377           2 :             for (auto instance = instancesValue.begin(); instance != instancesValue.end(); ++instance) {
    2378           1 :                 ++oaIndex;
    2379           1 :                 auto const &objectFields = instance.value();
    2380           1 :                 auto &thisOAReq = state.dataSize->OARequirements(oaIndex);
    2381           1 :                 ip->markObjectAsUsed(cCurrentModuleObject2, instance.key());
    2382           2 :                 std::string thisOAReqName = UtilityRoutines::MakeUPPERCase(instance.key());
    2383             : 
    2384           1 :                 if (UtilityRoutines::FindItemInList(thisOAReqName, state.dataSize->OARequirements) > 0) {
    2385           0 :                     ShowSevereError(state,
    2386           0 :                                     std::string(RoutineName) + cCurrentModuleObject2 + "=\"" + thisOAReqName +
    2387             :                                         "\" is a duplicate DesignSpecification:OutdoorAir name.");
    2388           0 :                     ErrorsFound = true;
    2389             :                 }
    2390           1 :                 thisOAReq.Name = thisOAReqName;
    2391             : 
    2392             :                 // List of spaces and DSOA names
    2393           1 :                 thisOAReq.numDSOA = 0;
    2394           2 :                 auto extensibles = objectFields.find("space_specs");
    2395           1 :                 auto const &extensionSchemaProps = objectSchemaProps["space_specs"]["items"]["properties"];
    2396           1 :                 if (extensibles != objectFields.end()) {
    2397           2 :                     auto extensiblesArray = extensibles.value();
    2398           3 :                     for (auto extensibleInstance : extensiblesArray) {
    2399             :                         // Zones and spaces are not created yet, validate space names in ZoneEquipmentManager::SetupZoneSizingArrays
    2400           4 :                         std::string thisSpaceName = ip->getAlphaFieldValue(extensibleInstance, extensionSchemaProps, "space_name");
    2401           2 :                         thisOAReq.dsoaSpaceNames.emplace_back(thisSpaceName);
    2402             :                         std::string thisDsoaName =
    2403           4 :                             ip->getAlphaFieldValue(extensibleInstance, extensionSchemaProps, "space_design_specification_outdoor_air_object_name");
    2404           2 :                         int thisDsoaNum = UtilityRoutines::FindItemInList(thisDsoaName, state.dataSize->OARequirements, oaIndex);
    2405           2 :                         if (thisDsoaNum > 0) {
    2406           2 :                             thisOAReq.dsoaIndexes.emplace_back(thisDsoaNum);
    2407           2 :                             ++thisOAReq.numDSOA;
    2408             :                         } else {
    2409           0 :                             ShowSevereError(state, std::string(RoutineName) + cCurrentModuleObject2 + "=" + thisOAReq.Name);
    2410           0 :                             ShowContinueError(state, "DesignSpecification:OutdoorAir=" + thisDsoaName + " not found.");
    2411           0 :                             ErrorsFound = true;
    2412             :                         }
    2413             :                     }
    2414             :                 } else {
    2415           0 :                     ShowSevereError(state, std::string(RoutineName) + cCurrentModuleObject2 + "=" + thisOAReq.Name + " is empty.");
    2416           0 :                     ShowContinueError(state, "At least one pair of Space Name and Space Design Specification Outdoor Air Object Name is required.");
    2417           0 :                     ErrorsFound = true;
    2418             :                 }
    2419             :             }
    2420             : 
    2421           1 :             if (ErrorsFound) {
    2422           0 :                 ShowFatalError(state, std::string{RoutineName} + "Errors found in input.  Preceding condition(s) cause termination.");
    2423             :             }
    2424             :         }
    2425             :     }
    2426         771 : }
    2427             : 
    2428        3820 : void ProcessInputOARequirements(EnergyPlusData &state,
    2429             :                                 std::string const &CurrentModuleObject,
    2430             :                                 int const OAIndex,
    2431             :                                 Array1D_string const &Alphas,
    2432             :                                 int &NumAlphas,
    2433             :                                 Array1D<Real64> const &Numbers,
    2434             :                                 int &NumNumbers,
    2435             :                                 Array1D_bool const &lAlphaBlanks,
    2436             :                                 Array1D_string const &cAlphaFields,
    2437             :                                 bool &ErrorsFound // If errors found in input
    2438             : )
    2439             : {
    2440             : 
    2441             :     // SUBROUTINE INFORMATION:
    2442             :     //       AUTHOR         R. Raustad - FSEC
    2443             :     //       DATE WRITTEN   February 2010
    2444             :     //       MODIFIED       na
    2445             :     //       RE-ENGINEERED  na
    2446             : 
    2447             :     // PURPOSE OF THIS SUBROUTINE:
    2448             :     // Obtains input data for the OA Requirements object and stores it in
    2449             :     // appropriate data structure.
    2450             : 
    2451             :     // METHODOLOGY EMPLOYED:
    2452             :     // Uses InputProcessor "Get" routines to obtain data.
    2453             :     // This object requires only a name where the default values are assumed
    2454             :     // if subsequent fields are not entered.
    2455             : 
    2456             :     // REFERENCES:
    2457             :     // na
    2458             : 
    2459             :     using ScheduleManager::CheckScheduleValueMinMax;
    2460             :     using ScheduleManager::GetScheduleIndex;
    2461             :     using ScheduleManager::GetScheduleMaxValue;
    2462             : 
    2463             :     // Locals
    2464             :     // SUBROUTINE ARGUMENT DEFINITIONS:
    2465             :     // na
    2466             : 
    2467             :     // SUBROUTINE PARAMETER DEFINITIONS:
    2468             :     static constexpr std::string_view RoutineName("GetOARequirements: "); // include trailing blank space
    2469             : 
    2470             :     // INTERFACE BLOCK SPECIFICATIONS
    2471             :     // na
    2472             : 
    2473             :     // DERIVED TYPE DEFINITIONS
    2474             :     // na
    2475             : 
    2476        3820 :     auto &thisOARequirements(state.dataSize->OARequirements(OAIndex));
    2477             : 
    2478        3820 :     if (NumAlphas > 1) {
    2479        3820 :         thisOARequirements.OAFlowMethod =
    2480        7640 :             static_cast<OAFlowCalcMethod>(getEnumerationValue(OAFlowCalcMethodNamesUC, UtilityRoutines::MakeUPPERCase(Alphas(2))));
    2481        3820 :         if (thisOARequirements.OAFlowMethod == OAFlowCalcMethod::Invalid) {
    2482           0 :             ShowSevereError(state, std::string{RoutineName} + CurrentModuleObject + "=\"" + state.dataSize->OARequirements(OAIndex).Name + "\",");
    2483           0 :             ShowContinueError(state, "...Invalid " + cAlphaFields(2) + "=\"" + Alphas(2) + "\",");
    2484           0 :             ShowContinueError(state,
    2485             :                               "...Valid choices are Flow/Person, Flow/Zone, Flow/Area, AirChanges/Hour, Sum, Maximum, IndoorAirQualityProcedure, "
    2486             :                               "ProportionalControlBasedOnDesignOccupancy, and ProportionalControlBasedOnOccupancySchedule.");
    2487           0 :             ErrorsFound = true;
    2488             :         }
    2489             :     } else {
    2490             :         // default value for Outdoor Air Method
    2491           0 :         thisOARequirements.OAFlowMethod = OAFlowCalcMethod::PerPerson;
    2492             :     }
    2493        3820 :     if (NumNumbers > 0) {
    2494        3819 :         state.dataSize->OARequirements(OAIndex).OAFlowPerPerson = Numbers(1);
    2495             :     } else {
    2496             :         // default value for Outdoor Air Flow per Person when per person flow is counted
    2497           1 :         state.dataSize->OARequirements(OAIndex).OAFlowPerPerson = 0.00944;
    2498             :     }
    2499             :     // if one of the methods that should not use the flow per person field is chosen then zero out the flow per person to avoid it
    2500             :     // being counted later #4378
    2501        5571 :     if (thisOARequirements.OAFlowMethod != OAFlowCalcMethod::PerPerson && thisOARequirements.OAFlowMethod != OAFlowCalcMethod::Sum &&
    2502        5241 :         thisOARequirements.OAFlowMethod != OAFlowCalcMethod::Max && thisOARequirements.OAFlowMethod != OAFlowCalcMethod::PCOccSch &&
    2503        3485 :         thisOARequirements.OAFlowMethod != OAFlowCalcMethod::PCDesOcc && thisOARequirements.OAFlowMethod != OAFlowCalcMethod::IAQProcedure) {
    2504        1736 :         state.dataSize->OARequirements(OAIndex).OAFlowPerPerson = 0.0;
    2505             :     }
    2506             :     // remaining fields default to 0
    2507        3820 :     if (NumNumbers > 1) {
    2508        5862 :         if (thisOARequirements.OAFlowMethod == OAFlowCalcMethod::PerArea || thisOARequirements.OAFlowMethod == OAFlowCalcMethod::Sum ||
    2509        2331 :             thisOARequirements.OAFlowMethod == OAFlowCalcMethod::Max) {
    2510        1205 :             state.dataSize->OARequirements(OAIndex).OAFlowPerArea = Numbers(2);
    2511        4647 :         } else if (thisOARequirements.OAFlowMethod == OAFlowCalcMethod::PCOccSch || thisOARequirements.OAFlowMethod == OAFlowCalcMethod::PCDesOcc ||
    2512        2321 :                    thisOARequirements.OAFlowMethod == OAFlowCalcMethod::IAQProcedure) {
    2513          10 :             state.dataSize->OARequirements(OAIndex).OAFlowPerArea = Numbers(2);
    2514             :         } else {
    2515        2316 :             state.dataSize->OARequirements(OAIndex).OAFlowPerArea = 0.0;
    2516             :         }
    2517             :     }
    2518        3820 :     if (NumNumbers > 2) {
    2519        4737 :         if (thisOARequirements.OAFlowMethod == OAFlowCalcMethod::PerZone || thisOARequirements.OAFlowMethod == OAFlowCalcMethod::Sum ||
    2520        3493 :             thisOARequirements.OAFlowMethod == OAFlowCalcMethod::Max || thisOARequirements.OAFlowMethod == OAFlowCalcMethod::IAQProcedure) {
    2521        1249 :             state.dataSize->OARequirements(OAIndex).OAFlowPerZone = Numbers(3);
    2522             :         } else {
    2523        1739 :             state.dataSize->OARequirements(OAIndex).OAFlowPerZone = 0.0;
    2524             :         }
    2525             :     }
    2526             : 
    2527        3820 :     if (NumNumbers > 3) {
    2528         559 :         if (thisOARequirements.OAFlowMethod == OAFlowCalcMethod::ACH || thisOARequirements.OAFlowMethod == OAFlowCalcMethod::Sum ||
    2529         538 :             thisOARequirements.OAFlowMethod == OAFlowCalcMethod::Max || thisOARequirements.OAFlowMethod == OAFlowCalcMethod::IAQProcedure) {
    2530          21 :             state.dataSize->OARequirements(OAIndex).OAFlowACH = Numbers(4);
    2531             :         } else {
    2532         269 :             state.dataSize->OARequirements(OAIndex).OAFlowACH = 0.0;
    2533             :         }
    2534             :     }
    2535             : 
    2536             :     // Set default schedule
    2537        3820 :     state.dataSize->OARequirements(OAIndex).OAFlowFracSchPtr = DataGlobalConstants::ScheduleAlwaysOn;
    2538        3820 :     if (NumAlphas > 2) {
    2539         284 :         if (!lAlphaBlanks(3)) {
    2540          22 :             state.dataSize->OARequirements(OAIndex).OAFlowFracSchPtr = GetScheduleIndex(state, Alphas(3));
    2541          22 :             if (state.dataSize->OARequirements(OAIndex).OAFlowFracSchPtr > 0) {
    2542          22 :                 if (!CheckScheduleValueMinMax(state, state.dataSize->OARequirements(OAIndex).OAFlowFracSchPtr, ">=", 0.0, "<=", 1.0)) {
    2543           0 :                     ShowSevereError(state,
    2544           0 :                                     std::string{RoutineName} + CurrentModuleObject + "=\"" + state.dataSize->OARequirements(OAIndex).Name + "\",");
    2545           0 :                     ShowContinueError(state, "Error found in " + cAlphaFields(3) + " = " + Alphas(3));
    2546           0 :                     ShowContinueError(state, "Schedule values must be (>=0., <=1.)");
    2547           0 :                     ErrorsFound = true;
    2548             :                 }
    2549             :             } else {
    2550           0 :                 ShowSevereError(state, std::string{RoutineName} + CurrentModuleObject + "=\"" + state.dataSize->OARequirements(OAIndex).Name + "\",");
    2551           0 :                 ShowContinueError(state, "...Not Found " + cAlphaFields(3) + "=\"" + Alphas(3) + "\".");
    2552           0 :                 ErrorsFound = true;
    2553             :             }
    2554             :         }
    2555             :     }
    2556             : 
    2557        3820 :     if (NumAlphas > 3) {
    2558           1 :         if (!lAlphaBlanks(4)) {
    2559           1 :             state.dataSize->OARequirements(OAIndex).OAPropCtlMinRateSchPtr = GetScheduleIndex(state, Alphas(4));
    2560           1 :             if (state.dataSize->OARequirements(OAIndex).OAPropCtlMinRateSchPtr > 0) {
    2561           1 :                 if (!CheckScheduleValueMinMax(state, state.dataSize->OARequirements(OAIndex).OAPropCtlMinRateSchPtr, ">=", 0.0, "<=", 1.0)) {
    2562           0 :                     ShowSevereError(state,
    2563           0 :                                     std::string{RoutineName} + CurrentModuleObject + "=\"" + state.dataSize->OARequirements(OAIndex).Name + "\",");
    2564           0 :                     ShowContinueError(state, "Error found in " + cAlphaFields(4) + " = " + Alphas(4));
    2565           0 :                     ShowContinueError(state, "Schedule values must be (>=0., <=1.)");
    2566           0 :                     ErrorsFound = true;
    2567             :                 }
    2568             :             } else {
    2569           0 :                 ShowSevereError(state, std::string{RoutineName} + CurrentModuleObject + "=\"" + state.dataSize->OARequirements(OAIndex).Name + "\",");
    2570           0 :                 ShowContinueError(state, "...Not Found " + cAlphaFields(4) + "=\"" + Alphas(4) + "\".");
    2571           0 :                 ErrorsFound = true;
    2572             :             }
    2573             :         }
    2574             :     }
    2575        3820 : }
    2576             : 
    2577         771 : void GetZoneAirDistribution(EnergyPlusData &state)
    2578             : {
    2579             : 
    2580             :     // SUBROUTINE INFORMATION:
    2581             :     //       AUTHOR         T. Hong - LBNL
    2582             :     //       DATE WRITTEN   March 2012
    2583             :     //       MODIFIED       na
    2584             :     //       RE-ENGINEERED  na
    2585             : 
    2586             :     // PURPOSE OF THIS SUBROUTINE:
    2587             :     // Obtains input data for the zone air distribution objects and stores it in
    2588             :     // appropriate data structure.
    2589             : 
    2590             :     // METHODOLOGY EMPLOYED:
    2591             :     // Uses InputProcessor "Get" routines to obtain data.
    2592             :     // This object requires only a name where the default values are assumed
    2593             :     // if subsequent fields are not entered.
    2594             : 
    2595             :     // Using/Aliasing
    2596             :     using ScheduleManager::CheckScheduleValueMinMax;
    2597             :     using ScheduleManager::GetScheduleIndex;
    2598             : 
    2599             :     // SUBROUTINE PARAMETER DEFINITIONS:
    2600             :     static constexpr std::string_view RoutineName("GetZoneAirDistribution: "); // include trailing blank space
    2601             : 
    2602             :     // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
    2603             :     int NumAlphas;  // Number of Alphas for each GetObjectItem call
    2604             :     int NumNumbers; // Number of Numbers for each GetObjectItem call
    2605             :     int TotalArgs;  // Total number of alpha and numeric arguments (max) for a
    2606             :     int IOStatus;   // Used in GetObjectItem
    2607             :     int ZADIndex;
    2608         771 :     bool ErrorsFound(false); // If errors detected in input
    2609             : 
    2610        1542 :     std::string CurrentModuleObject; // for ease in getting objects
    2611        1542 :     Array1D_string Alphas;           // Alpha input items for object
    2612        1542 :     Array1D_string cAlphaFields;     // Alpha field names
    2613        1542 :     Array1D_string cNumericFields;   // Numeric field names
    2614        1542 :     Array1D<Real64> Numbers;         // Numeric input items for object
    2615        1542 :     Array1D_bool lAlphaBlanks;       // Logical array, alpha field input BLANK = .TRUE.
    2616        1542 :     Array1D_bool lNumericBlanks;     // Logical array, numeric field input BLANK = .TRUE.
    2617             : 
    2618         771 :     CurrentModuleObject = "DesignSpecification:ZoneAirDistribution";
    2619         771 :     state.dataSize->NumZoneAirDistribution = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, CurrentModuleObject);
    2620         771 :     state.dataInputProcessing->inputProcessor->getObjectDefMaxArgs(state, CurrentModuleObject, TotalArgs, NumAlphas, NumNumbers);
    2621             : 
    2622         771 :     Alphas.allocate(NumAlphas);
    2623         771 :     cAlphaFields.allocate(NumAlphas);
    2624         771 :     cNumericFields.allocate(NumNumbers);
    2625         771 :     Numbers.dimension(NumNumbers, 0.0);
    2626         771 :     lAlphaBlanks.dimension(NumAlphas, true);
    2627         771 :     lNumericBlanks.dimension(NumNumbers, true);
    2628             : 
    2629         771 :     if (state.dataSize->NumZoneAirDistribution > 0) {
    2630          80 :         state.dataSize->ZoneAirDistribution.allocate(state.dataSize->NumZoneAirDistribution);
    2631             : 
    2632             :         // Start Loading the zone air distribution input
    2633         546 :         for (ZADIndex = 1; ZADIndex <= state.dataSize->NumZoneAirDistribution; ++ZADIndex) {
    2634             : 
    2635         466 :             state.dataInputProcessing->inputProcessor->getObjectItem(state,
    2636             :                                                                      CurrentModuleObject,
    2637             :                                                                      ZADIndex,
    2638             :                                                                      Alphas,
    2639             :                                                                      NumAlphas,
    2640             :                                                                      Numbers,
    2641             :                                                                      NumNumbers,
    2642             :                                                                      IOStatus,
    2643             :                                                                      lNumericBlanks,
    2644             :                                                                      lAlphaBlanks,
    2645             :                                                                      cAlphaFields,
    2646             :                                                                      cNumericFields);
    2647         466 :             UtilityRoutines::IsNameEmpty(state, Alphas(1), CurrentModuleObject, ErrorsFound);
    2648             : 
    2649         466 :             state.dataSize->ZoneAirDistribution(ZADIndex).Name = Alphas(1);
    2650             : 
    2651             :             // Zone Air Distribution Effectiveness in Cooling Mode
    2652         466 :             if (NumNumbers > 0) {
    2653         466 :                 state.dataSize->ZoneAirDistribution(ZADIndex).ZoneADEffCooling = Numbers(1);
    2654             :             } else {
    2655             :                 // default value
    2656           0 :                 state.dataSize->ZoneAirDistribution(ZADIndex).ZoneADEffCooling = 1.0;
    2657             :             }
    2658             : 
    2659             :             // Zone Air Distribution Effectiveness in Heating Mode
    2660         466 :             if (NumNumbers > 1) {
    2661         466 :                 state.dataSize->ZoneAirDistribution(ZADIndex).ZoneADEffHeating = Numbers(2);
    2662             :             } else {
    2663             :                 // default value
    2664           0 :                 state.dataSize->ZoneAirDistribution(ZADIndex).ZoneADEffHeating = 1.0;
    2665             :             }
    2666             : 
    2667             :             // Zone Secondary Recirculation Fraction
    2668         466 :             if (NumNumbers > 2) {
    2669          22 :                 state.dataSize->ZoneAirDistribution(ZADIndex).ZoneSecondaryRecirculation = Numbers(3);
    2670             :             } else {
    2671             :                 // default value
    2672         444 :                 state.dataSize->ZoneAirDistribution(ZADIndex).ZoneSecondaryRecirculation = 0.0;
    2673             :             }
    2674             : 
    2675             :             // Zone Ventilation Efficiency
    2676         466 :             if (NumNumbers > 3) {
    2677          11 :                 state.dataSize->ZoneAirDistribution(ZADIndex).ZoneVentilationEff = Numbers(4);
    2678             :             } else {
    2679             :                 // default value
    2680         455 :                 state.dataSize->ZoneAirDistribution(ZADIndex).ZoneVentilationEff = 0.0;
    2681             :             }
    2682             : 
    2683         466 :             if (NumAlphas > 1) {
    2684          53 :                 if (!lAlphaBlanks(2)) {
    2685           5 :                     state.dataSize->ZoneAirDistribution(ZADIndex).ZoneADEffSchName = Alphas(2);
    2686           5 :                     state.dataSize->ZoneAirDistribution(ZADIndex).ZoneADEffSchPtr = GetScheduleIndex(state, Alphas(2));
    2687           5 :                     if (state.dataSize->ZoneAirDistribution(ZADIndex).ZoneADEffSchPtr > 0) {
    2688           5 :                         if (!CheckScheduleValueMinMax(state, state.dataSize->ZoneAirDistribution(ZADIndex).ZoneADEffSchPtr, ">", 0.0)) {
    2689           0 :                             ShowSevereError(state,
    2690           0 :                                             std::string{RoutineName} + CurrentModuleObject + "=\"" +
    2691           0 :                                                 state.dataSize->ZoneAirDistribution(ZADIndex).Name + "\",");
    2692           0 :                             ShowContinueError(state, "Error found in " + cAlphaFields(2) + " = " + Alphas(2));
    2693           0 :                             ShowContinueError(state, "Schedule values must be >0.0)");
    2694           0 :                             ErrorsFound = true;
    2695             :                         }
    2696             :                     } else {
    2697           0 :                         ShowSevereError(state,
    2698           0 :                                         std::string{RoutineName} + CurrentModuleObject + "=\"" + state.dataSize->ZoneAirDistribution(ZADIndex).Name +
    2699             :                                             "\",");
    2700           0 :                         ShowContinueError(state, "...Not Found " + cAlphaFields(2) + "=\"" + Alphas(2) + "\".");
    2701           0 :                         ErrorsFound = true;
    2702             :                     }
    2703             :                 }
    2704             :             }
    2705             :         }
    2706             : 
    2707          80 :         Alphas.deallocate();
    2708          80 :         cAlphaFields.deallocate();
    2709          80 :         cNumericFields.deallocate();
    2710          80 :         Numbers.deallocate();
    2711          80 :         lAlphaBlanks.deallocate();
    2712          80 :         lNumericBlanks.deallocate();
    2713             : 
    2714          80 :         if (ErrorsFound) {
    2715           0 :             ShowFatalError(state, std::string{RoutineName} + "Errors found in input.  Preceding condition(s) cause termination.");
    2716             :         }
    2717             :     }
    2718         771 : }
    2719             : 
    2720         771 : void GetSizingParams(EnergyPlusData &state)
    2721             : {
    2722             : 
    2723             :     // SUBROUTINE INFORMATION:
    2724             :     //       AUTHOR         Fred Buhl
    2725             :     //       DATE WRITTEN   January 2002
    2726             :     //       MODIFIED       na
    2727             :     //       RE-ENGINEERED  na
    2728             : 
    2729             :     // PURPOSE OF THIS SUBROUTINE:
    2730             :     // Obtains input data for the Sizing Parameters object and stores it in
    2731             :     // appropriate data structure.
    2732             : 
    2733             :     // METHODOLOGY EMPLOYED:
    2734             :     // Uses InputProcessor "Get" routines to obtain data.
    2735             : 
    2736             :     // Using/Aliasing
    2737             : 
    2738             :     // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
    2739             :     int NumAlphas;  // Number of Alphas for each GetObjectItem call
    2740             :     int NumNumbers; // Number of Numbers for each GetObjectItem call
    2741             :     int IOStatus;   // Used in GetObjectItem
    2742             :     int NumSizParams;
    2743             :     int Temp;
    2744         771 :     auto &cCurrentModuleObject = state.dataIPShortCut->cCurrentModuleObject;
    2745         771 :     cCurrentModuleObject = "Sizing:Parameters";
    2746         771 :     NumSizParams = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject);
    2747             : 
    2748         771 :     if (NumSizParams == 1) {
    2749        2464 :         state.dataInputProcessing->inputProcessor->getObjectItem(state,
    2750             :                                                                  cCurrentModuleObject,
    2751             :                                                                  1,
    2752         352 :                                                                  state.dataIPShortCut->cAlphaArgs,
    2753             :                                                                  NumAlphas,
    2754         352 :                                                                  state.dataIPShortCut->rNumericArgs,
    2755             :                                                                  NumNumbers,
    2756             :                                                                  IOStatus,
    2757         352 :                                                                  state.dataIPShortCut->lNumericFieldBlanks,
    2758         352 :                                                                  state.dataIPShortCut->lAlphaFieldBlanks,
    2759         352 :                                                                  state.dataIPShortCut->cAlphaFieldNames,
    2760         352 :                                                                  state.dataIPShortCut->cNumericFieldNames);
    2761         352 :         if (state.dataIPShortCut->lNumericFieldBlanks(1) || state.dataIPShortCut->rNumericArgs(1) < 0.0) {
    2762           0 :             state.dataSize->GlobalHeatSizingFactor = 1.0;
    2763             :         } else {
    2764         352 :             state.dataSize->GlobalHeatSizingFactor = state.dataIPShortCut->rNumericArgs(1);
    2765             :         }
    2766         352 :         if (state.dataIPShortCut->lNumericFieldBlanks(2) || state.dataIPShortCut->rNumericArgs(2) < 0.0) {
    2767           0 :             state.dataSize->GlobalCoolSizingFactor = 1.0;
    2768             :         } else {
    2769         352 :             state.dataSize->GlobalCoolSizingFactor = state.dataIPShortCut->rNumericArgs(2);
    2770             :         }
    2771         352 :         if (state.dataIPShortCut->lNumericFieldBlanks(3) || state.dataIPShortCut->rNumericArgs(3) <= 0.0) {
    2772         274 :             state.dataSize->NumTimeStepsInAvg = state.dataGlobal->NumOfTimeStepInHour;
    2773             :         } else {
    2774          78 :             state.dataSize->NumTimeStepsInAvg = int(state.dataIPShortCut->rNumericArgs(3));
    2775             :         }
    2776         419 :     } else if (NumSizParams == 0) {
    2777         419 :         state.dataSize->GlobalHeatSizingFactor = 1.0;
    2778         419 :         state.dataSize->GlobalCoolSizingFactor = 1.0;
    2779         419 :         state.dataSize->NumTimeStepsInAvg = state.dataGlobal->NumOfTimeStepInHour;
    2780             :     } else {
    2781           0 :         ShowFatalError(state, cCurrentModuleObject + ": More than 1 occurrence of this object; only 1 allowed");
    2782             :     }
    2783         771 :     if (state.dataGlobal->OverrideTimestep) {
    2784           1 :         state.dataSize->NumTimeStepsInAvg = state.dataGlobal->NumOfTimeStepInHour;
    2785           1 :         ShowWarningError(state,
    2786             :                          "Due to the use of the fast simulation mode, the time step for simulation and averaging window of sizing is overwritten to "
    2787             :                          "one hour. Original user inputs for averaging window and timestep are no longer used.");
    2788             :     }
    2789         771 :     if (state.dataSize->NumTimeStepsInAvg < state.dataGlobal->NumOfTimeStepInHour) {
    2790           0 :         ShowWarningError(state,
    2791           0 :                          format("{}: note {} entered value=[{}] is less than 1 hour (i.e., {} timesteps).",
    2792             :                                 cCurrentModuleObject,
    2793           0 :                                 state.dataIPShortCut->cNumericFieldNames(3),
    2794           0 :                                 state.dataSize->NumTimeStepsInAvg,
    2795           0 :                                 state.dataGlobal->NumOfTimeStepInHour));
    2796             :     }
    2797             : 
    2798         771 :     cCurrentModuleObject = "OutputControl:Sizing:Style";
    2799         771 :     Temp = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject);
    2800             : 
    2801         771 :     if (Temp == 0) {
    2802         770 :         state.dataIPShortCut->cAlphaArgs(1) = "Comma";
    2803         770 :         state.dataSize->SizingFileColSep = CharComma; // comma
    2804           1 :     } else if (Temp == 1) {
    2805           7 :         state.dataInputProcessing->inputProcessor->getObjectItem(state,
    2806             :                                                                  cCurrentModuleObject,
    2807             :                                                                  1,
    2808           1 :                                                                  state.dataIPShortCut->cAlphaArgs,
    2809             :                                                                  NumAlphas,
    2810           1 :                                                                  state.dataIPShortCut->rNumericArgs,
    2811             :                                                                  NumNumbers,
    2812             :                                                                  IOStatus,
    2813           1 :                                                                  state.dataIPShortCut->lNumericFieldBlanks,
    2814           1 :                                                                  state.dataIPShortCut->lAlphaFieldBlanks,
    2815           1 :                                                                  state.dataIPShortCut->cAlphaFieldNames,
    2816           1 :                                                                  state.dataIPShortCut->cNumericFieldNames);
    2817           1 :         if (state.dataIPShortCut->cAlphaArgs(1) == "COMMA") {
    2818           1 :             state.dataSize->SizingFileColSep = CharComma; // comma
    2819           1 :             state.dataIPShortCut->cAlphaArgs(1) = "Comma";
    2820           0 :         } else if (state.dataIPShortCut->cAlphaArgs(1) == "TAB") {
    2821           0 :             state.dataSize->SizingFileColSep = CharTab; // tab
    2822           0 :             state.dataIPShortCut->cAlphaArgs(1) = "Tab";
    2823           0 :         } else if (state.dataIPShortCut->cAlphaArgs(1) == "FIXED" || state.dataIPShortCut->cAlphaArgs(1) == "SPACE") {
    2824           0 :             state.dataSize->SizingFileColSep = CharSpace; // space
    2825           0 :             state.dataIPShortCut->cAlphaArgs(1) = "Space";
    2826             :         } else {
    2827           0 :             state.dataSize->SizingFileColSep = CharComma; // comma
    2828           0 :             ShowWarningError(state,
    2829           0 :                              cCurrentModuleObject + ": invalid " + state.dataIPShortCut->cAlphaFieldNames(1) + " entered value=\"" +
    2830           0 :                                  state.dataIPShortCut->cAlphaArgs(1) + "\", Commas will be used to separate fields.");
    2831           0 :             state.dataIPShortCut->cAlphaArgs(1) = "Comma";
    2832             :         }
    2833           1 :         print(state.files.eio, "! <Sizing Output Files>,Style\n");
    2834           1 :         print(state.files.eio, "Sizing Output Files,{}\n", state.dataIPShortCut->cAlphaArgs(1));
    2835             :     }
    2836         771 : }
    2837             : 
    2838         771 : void GetZoneSizingInput(EnergyPlusData &state)
    2839             : {
    2840             : 
    2841             :     // SUBROUTINE INFORMATION:
    2842             :     //       AUTHOR         Fred Buhl
    2843             :     //       DATE WRITTEN   December 2000
    2844             :     //       MODIFIED       Mangesh Basarkar, 06/2011: Specifying zone outside air based on design specification object
    2845             :     //       RE-ENGINEERED  na
    2846             : 
    2847             :     // PURPOSE OF THIS SUBROUTINE:
    2848             :     // Obtains input data for zone sizing objects and stores it in
    2849             :     // appropriate data structures.
    2850             : 
    2851             :     // METHODOLOGY EMPLOYED:
    2852             :     // Uses InputProcessor "Get" routines to obtain data.
    2853             : 
    2854             :     // Using/Aliasing
    2855             : 
    2856             :     // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
    2857             :     int ZoneSizIndex;        // loop index
    2858             :     int NumAlphas;           // Number of Alphas for each GetObjectItem call
    2859             :     int NumNumbers;          // Number of Numbers for each GetObjectItem call
    2860             :     int IOStatus;            // Used in GetObjectItem
    2861         771 :     bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
    2862             :     int NumDesDays;          // Number of design days in input
    2863             :     int NumSizingZoneStatements;
    2864             :     int Item;
    2865             :     int Item1;
    2866             :     int ZLItem;
    2867             :     bool errFlag;
    2868        1542 :     Array1D_string ZoneNames;
    2869             :     int NumZones;
    2870             :     int NumZoneLists;
    2871             :     int OAIndex;  // Index of design specification object
    2872             :     int ObjIndex; // Index of zone air distribution effectiveness object name
    2873             :     bool DesHeatMaxAirFlowPerAreaUsrInp;
    2874             :     bool DesHeatMaxAirFlowUsrInp;
    2875             :     bool DesHeatMaxAirFlowFracUsrInp;
    2876             : 
    2877        7471 :     struct GlobalMiscObject
    2878             :     {
    2879             :         // Members
    2880             :         std::string Name;
    2881             :         int ZoneOrZoneListPtr;
    2882             :         int NumOfZones;
    2883             :         int StartPtr;
    2884             :         bool ZoneListActive;
    2885             : 
    2886             :         // Default Constructor
    2887         771 :         GlobalMiscObject() : ZoneOrZoneListPtr(0), NumOfZones(0), StartPtr(0), ZoneListActive(false)
    2888             :         {
    2889         771 :         }
    2890             :     };
    2891             : 
    2892             :     // Object Data
    2893        1542 :     Array1D<ZoneListData> ZoneListNames;
    2894        1542 :     Array1D<GlobalMiscObject> SizingZoneObjects;
    2895         771 :     auto &cCurrentModuleObject = state.dataIPShortCut->cCurrentModuleObject;
    2896         771 :     cCurrentModuleObject = "Sizing:Zone";
    2897         771 :     NumSizingZoneStatements = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject);
    2898         771 :     SizingZoneObjects.allocate(NumSizingZoneStatements);
    2899             : 
    2900         771 :     if (NumSizingZoneStatements > 0) {
    2901         420 :         errFlag = false;
    2902         420 :         GetZoneAndZoneListNames(state, errFlag, NumZones, ZoneNames, NumZoneLists, ZoneListNames);
    2903             :     }
    2904             : 
    2905         771 :     cCurrentModuleObject = "Sizing:Zone";
    2906         771 :     state.dataSize->NumZoneSizingInput = 0;
    2907         771 :     errFlag = false;
    2908        4121 :     for (Item = 1; Item <= NumSizingZoneStatements; ++Item) {
    2909       23450 :         state.dataInputProcessing->inputProcessor->getObjectItem(state,
    2910             :                                                                  cCurrentModuleObject,
    2911             :                                                                  Item,
    2912        3350 :                                                                  state.dataIPShortCut->cAlphaArgs,
    2913             :                                                                  NumAlphas,
    2914        3350 :                                                                  state.dataIPShortCut->rNumericArgs,
    2915             :                                                                  NumNumbers,
    2916             :                                                                  IOStatus,
    2917        3350 :                                                                  state.dataIPShortCut->lNumericFieldBlanks,
    2918        3350 :                                                                  state.dataIPShortCut->lAlphaFieldBlanks,
    2919        3350 :                                                                  state.dataIPShortCut->cAlphaFieldNames,
    2920        3350 :                                                                  state.dataIPShortCut->cNumericFieldNames);
    2921        3350 :         UtilityRoutines::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), cCurrentModuleObject, ErrorsFound);
    2922             : 
    2923        3350 :         SizingZoneObjects(Item).Name = state.dataIPShortCut->cAlphaArgs(1);
    2924             : 
    2925        3350 :         Item1 = UtilityRoutines::FindItemInList(state.dataIPShortCut->cAlphaArgs(1), ZoneNames, NumZones);
    2926        3350 :         ZLItem = 0;
    2927        3350 :         if (Item1 == 0 && NumZoneLists > 0) ZLItem = UtilityRoutines::FindItemInList(state.dataIPShortCut->cAlphaArgs(1), ZoneListNames);
    2928        3350 :         if (Item1 > 0) {
    2929        3349 :             SizingZoneObjects(Item).StartPtr = state.dataSize->NumZoneSizingInput + 1;
    2930        3349 :             ++state.dataSize->NumZoneSizingInput;
    2931        3349 :             SizingZoneObjects(Item).NumOfZones = 1;
    2932        3349 :             SizingZoneObjects(Item).ZoneListActive = false;
    2933        3349 :             SizingZoneObjects(Item).ZoneOrZoneListPtr = Item1;
    2934           1 :         } else if (ZLItem > 0) {
    2935           1 :             SizingZoneObjects(Item).StartPtr = state.dataSize->NumZoneSizingInput + 1;
    2936           1 :             state.dataSize->NumZoneSizingInput += ZoneListNames(ZLItem).NumOfZones;
    2937           1 :             SizingZoneObjects(Item).NumOfZones = ZoneListNames(ZLItem).NumOfZones;
    2938           1 :             SizingZoneObjects(Item).ZoneListActive = true;
    2939           1 :             SizingZoneObjects(Item).ZoneOrZoneListPtr = ZLItem;
    2940             :         } else {
    2941           0 :             ShowSevereError(state,
    2942           0 :                             cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\" invalid " +
    2943           0 :                                 state.dataIPShortCut->cAlphaFieldNames(1) + " not found.");
    2944           0 :             ErrorsFound = true;
    2945           0 :             errFlag = true;
    2946             :         }
    2947             :     }
    2948             : 
    2949         771 :     if (errFlag) {
    2950           0 :         ShowSevereError(state, "GetZoneSizingInput: Errors with invalid names in " + cCurrentModuleObject + " objects.");
    2951           0 :         ShowContinueError(state, "...These will not be read in.  Other errors may occur.");
    2952           0 :         state.dataSize->NumZoneSizingInput = 0;
    2953             :     }
    2954             : 
    2955         771 :     if (state.dataSize->NumZoneSizingInput > 0) {
    2956        1680 :         NumDesDays = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, "SizingPeriod:DesignDay") +
    2957         840 :                      state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, "SizingPeriod:WeatherFileDays") +
    2958         840 :                      state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, "SizingPeriod:WeatherFileConditionType");
    2959         420 :         if (NumDesDays == 0 && (state.dataGlobal->DoZoneSizing || state.dataGlobal->DoSystemSizing || state.dataGlobal->DoPlantSizing)) {
    2960           0 :             ShowSevereError(state, "Zone Sizing calculations need SizingPeriod:* input. None found.");
    2961           0 :             ErrorsFound = true;
    2962             :         }
    2963         420 :         state.dataSize->ZoneSizingInput.allocate(state.dataSize->NumZoneSizingInput);
    2964             : 
    2965         420 :         ZoneSizIndex = 0;
    2966        3770 :         for (Item = 1; Item <= NumSizingZoneStatements; ++Item) {
    2967             : 
    2968       23450 :             state.dataInputProcessing->inputProcessor->getObjectItem(state,
    2969             :                                                                      cCurrentModuleObject,
    2970             :                                                                      Item,
    2971        3350 :                                                                      state.dataIPShortCut->cAlphaArgs,
    2972             :                                                                      NumAlphas,
    2973        3350 :                                                                      state.dataIPShortCut->rNumericArgs,
    2974             :                                                                      NumNumbers,
    2975             :                                                                      IOStatus,
    2976        3350 :                                                                      state.dataIPShortCut->lNumericFieldBlanks,
    2977        3350 :                                                                      state.dataIPShortCut->lAlphaFieldBlanks,
    2978        3350 :                                                                      state.dataIPShortCut->cAlphaFieldNames,
    2979        3350 :                                                                      state.dataIPShortCut->cNumericFieldNames);
    2980             : 
    2981        6702 :             for (Item1 = 1; Item1 <= SizingZoneObjects(Item).NumOfZones; ++Item1) {
    2982        3352 :                 ++ZoneSizIndex;
    2983        3352 :                 auto &zoneSizingIndex = state.dataSize->ZoneSizingInput(ZoneSizIndex);
    2984        3352 :                 if (!SizingZoneObjects(Item).ZoneListActive) {
    2985        3349 :                     if (SizingZoneObjects(Item).ZoneOrZoneListPtr > 0) {
    2986        3349 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneName = ZoneNames(SizingZoneObjects(Item).ZoneOrZoneListPtr);
    2987             :                     } else {
    2988             :                         // Invalid zone, will be caught later
    2989           0 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneName = "Invalid Zone Name";
    2990             :                     }
    2991             :                 } else { // Zone list active
    2992           3 :                     if (SizingZoneObjects(Item).ZoneOrZoneListPtr > 0 && ZoneListNames(SizingZoneObjects(Item).ZoneOrZoneListPtr).Zones(Item1) > 0) {
    2993           6 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneName =
    2994           6 :                             ZoneNames(ZoneListNames(SizingZoneObjects(Item).ZoneOrZoneListPtr).Zones(Item1));
    2995             :                     } else {
    2996             :                         // Invalid zone, will be caught later
    2997           0 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneName = "Invalid Zone Name";
    2998             :                     }
    2999             :                 }
    3000        3352 :                 bool const nameEmpty = UtilityRoutines::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), cCurrentModuleObject, ErrorsFound);
    3001        3352 :                 if (nameEmpty && !SizingZoneObjects(Item).ZoneListActive) {
    3002           0 :                     ShowContinueError(state, "Zone may have been entered in a ZoneList assignment.");
    3003             :                 }
    3004             : 
    3005             :                 //  A2, \field Zone Cooling Design Supply Air Temperature Input Method
    3006             :                 //      \required-field
    3007             :                 //      \type choice
    3008             :                 //      \key SupplyAirTemperature
    3009             :                 //      \key TemperatureDifference
    3010             :                 //      \default SupplyAirTemperature
    3011             :                 {
    3012        6704 :                     auto const coolingSATMethod(state.dataIPShortCut->cAlphaArgs(2));
    3013        3352 :                     if (coolingSATMethod == "SUPPLYAIRTEMPERATURE") {
    3014        3352 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).ZnCoolDgnSAMethod = SupplyAirTemperature;
    3015           0 :                     } else if (coolingSATMethod == "TEMPERATUREDIFFERENCE") {
    3016           0 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).ZnCoolDgnSAMethod = TemperatureDifference;
    3017             :                     } else {
    3018           0 :                         ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\", invalid data.");
    3019           0 :                         ShowContinueError(
    3020           0 :                             state, "... incorrect " + state.dataIPShortCut->cAlphaFieldNames(2) + "=\"" + state.dataIPShortCut->cAlphaArgs(2) + "\"");
    3021           0 :                         ShowContinueError(state, "... valid values are SupplyAirTemperature or TemperatureDifference.");
    3022           0 :                         ErrorsFound = true;
    3023             :                     }
    3024             :                 }
    3025             :                 //  N1, \field Zone Cooling Design Supply Air Temperature
    3026             :                 //      \type real
    3027             :                 //      \units C
    3028             :                 //      \note Zone Cooling Design Supply Air Temperature is only used when Zone Cooling Design
    3029             :                 //      \note Supply Air Temperature Input Method = SupplyAirTemperature
    3030        3352 :                 Real64 lowTempLimit = 0.0;
    3031        3352 :                 if (state.dataIPShortCut->lNumericFieldBlanks(1)) {
    3032           0 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).CoolDesTemp = 0.0;
    3033        3352 :                 } else if (state.dataSize->ZoneSizingInput(ZoneSizIndex).ZnCoolDgnSAMethod == SupplyAirTemperature) {
    3034        3352 :                     ReportTemperatureInputError(state, cCurrentModuleObject, 1, lowTempLimit, false, ErrorsFound);
    3035        3352 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).CoolDesTemp = state.dataIPShortCut->rNumericArgs(1);
    3036             :                 } else {
    3037           0 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).CoolDesTemp = 0.0;
    3038             :                 }
    3039             :                 //  N2, \field Zone Cooling Design Supply Air Temperature Difference
    3040             :                 //      \type real
    3041             :                 //      \units delta C
    3042             :                 //      \note Zone Cooling Design Supply Air Temperature is only used when Zone Cooling Design
    3043             :                 //      \note Supply Air Temperature Input Method = TemperatureDifference
    3044             :                 //      \note The absolute of this value is value will be subtracted from room temperature
    3045             :                 //      \note at peak load to calculate Zone Cooling Design Supply Air Temperature.
    3046        3352 :                 if (state.dataIPShortCut->lNumericFieldBlanks(2)) {
    3047        3130 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).CoolDesTempDiff = 0.0;
    3048         222 :                 } else if (state.dataSize->ZoneSizingInput(ZoneSizIndex).ZnCoolDgnSAMethod == TemperatureDifference) {
    3049           0 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).CoolDesTempDiff = state.dataIPShortCut->rNumericArgs(2);
    3050             :                 } else {
    3051         222 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).CoolDesTempDiff = 0.0;
    3052             :                 }
    3053             :                 //  A3, \field Zone Heating Design Supply Air Temperature Input Method
    3054             :                 //      \required-field
    3055             :                 //      \type choice
    3056             :                 //      \key SupplyAirTemperature
    3057             :                 //      \key TemperatureDifference
    3058             :                 //      \default SupplyAirTemperature
    3059             :                 {
    3060        6704 :                     auto const heatingSATMethod(state.dataIPShortCut->cAlphaArgs(3));
    3061        3352 :                     if (heatingSATMethod == "SUPPLYAIRTEMPERATURE") {
    3062        3352 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).ZnHeatDgnSAMethod = SupplyAirTemperature;
    3063           0 :                     } else if (heatingSATMethod == "TEMPERATUREDIFFERENCE") {
    3064           0 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).ZnHeatDgnSAMethod = TemperatureDifference;
    3065             :                     }
    3066             :                 }
    3067             :                 //  N3, \field Zone Heating Design Supply Air Temperature
    3068             :                 //      \type real
    3069             :                 //      \units C
    3070             :                 //      \note Zone Heating Design Supply Air Temperature is only used when Zone Heating Design
    3071             :                 //      \note Supply Air Temperature Input Method = SupplyAirTemperature
    3072        3352 :                 if (state.dataIPShortCut->lNumericFieldBlanks(3)) {
    3073           0 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).HeatDesTemp = 0.0;
    3074        3352 :                 } else if (state.dataSize->ZoneSizingInput(ZoneSizIndex).ZnHeatDgnSAMethod == SupplyAirTemperature) {
    3075        3352 :                     ReportTemperatureInputError(state, cCurrentModuleObject, 3, lowTempLimit, false, ErrorsFound);
    3076        3352 :                     ReportTemperatureInputError(
    3077        3352 :                         state, cCurrentModuleObject, 3, state.dataSize->ZoneSizingInput(ZoneSizIndex).CoolDesTemp, true, ErrorsFound);
    3078        3352 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).HeatDesTemp = state.dataIPShortCut->rNumericArgs(3);
    3079             :                 } else {
    3080           0 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).HeatDesTemp = 0.0;
    3081             :                 }
    3082             :                 //  N4, \field Zone Heating Design Supply Air Temperature Difference
    3083             :                 //      \type real
    3084             :                 //      \units deltaC
    3085             :                 //      \note Zone Heating Design Supply Air Temperature is only used when Zone Heating Design
    3086             :                 //      \note Supply Air Temperature Input Method = TemperatureDifference
    3087             :                 //      \note The absolute of this value is value will be added to room temperature
    3088             :                 //      \note at peak load to calculate Zone Heating Design Supply Air Temperature.
    3089        3352 :                 if (state.dataIPShortCut->lNumericFieldBlanks(4)) {
    3090        3325 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).HeatDesTempDiff = 0.0;
    3091          27 :                 } else if (state.dataSize->ZoneSizingInput(ZoneSizIndex).ZnHeatDgnSAMethod == TemperatureDifference) {
    3092           0 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).HeatDesTempDiff = state.dataIPShortCut->rNumericArgs(4);
    3093             :                 } else {
    3094          27 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).HeatDesTempDiff = 0.0;
    3095             :                 }
    3096             :                 //  N5, \field Zone Cooling Design Supply Air Humidity Ratio
    3097             :                 //      \required-field
    3098             :                 //      \minimum 0.0
    3099             :                 //      \type real
    3100             :                 //      \units kgWater/kgDryAir
    3101        3352 :                 if (state.dataIPShortCut->lNumericFieldBlanks(5)) {
    3102           0 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).CoolDesHumRat = 0.0;
    3103        3352 :                 } else if (state.dataIPShortCut->rNumericArgs(5) < 0.0) {
    3104           0 :                     ShowSevereError(state,
    3105           0 :                                     format("{}: incorrect {}: {:.2R}",
    3106             :                                            cCurrentModuleObject,
    3107           0 :                                            state.dataIPShortCut->cNumericFieldNames(5),
    3108           0 :                                            state.dataIPShortCut->rNumericArgs(5)));
    3109           0 :                     ShowContinueError(state, ".. value should not be negative. Occurs in Sizing Object=" + state.dataIPShortCut->cAlphaArgs(1));
    3110           0 :                     ErrorsFound = true;
    3111             :                 } else {
    3112        3352 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).CoolDesHumRat = state.dataIPShortCut->rNumericArgs(5);
    3113             :                 }
    3114             :                 //  N6, \field Zone Heating Design Supply Air Humidity Ratio
    3115             :                 //      \required-field
    3116             :                 //      \minimum 0.0
    3117             :                 //      \type real
    3118             :                 //      \units kgWater/kgDryAir
    3119        3352 :                 if (state.dataIPShortCut->lNumericFieldBlanks(6)) {
    3120           0 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).HeatDesHumRat = 0.0;
    3121        3352 :                 } else if (state.dataIPShortCut->rNumericArgs(6) < 0.0) {
    3122           0 :                     ShowSevereError(state,
    3123           0 :                                     format("{}: incorrect {}: {:.2R}",
    3124             :                                            cCurrentModuleObject,
    3125           0 :                                            state.dataIPShortCut->cNumericFieldNames(6),
    3126           0 :                                            state.dataIPShortCut->rNumericArgs(6)));
    3127           0 :                     ShowContinueError(state, ".. value should not be negative. Occurs in Sizing Object=" + state.dataIPShortCut->cAlphaArgs(1));
    3128           0 :                     ErrorsFound = true;
    3129             :                 } else {
    3130        3352 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).HeatDesHumRat = state.dataIPShortCut->rNumericArgs(6);
    3131             :                 }
    3132             :                 //  A4, \field Design Specification Outdoor Air Object Name
    3133             :                 //      \type object-list
    3134             :                 //      \object-list DesignSpecificationOutdoorAirNames
    3135        3352 :                 state.dataSize->ZoneSizingInput(ZoneSizIndex).DesignSpecOAObjName = state.dataIPShortCut->cAlphaArgs(4);
    3136             : 
    3137             :                 // Getting zone OA parameters from Design Specification object
    3138        3352 :                 if (!state.dataIPShortCut->lAlphaFieldBlanks(4)) {
    3139        3334 :                     OAIndex = UtilityRoutines::FindItemInList(state.dataSize->ZoneSizingInput(ZoneSizIndex).DesignSpecOAObjName,
    3140        3334 :                                                               state.dataSize->OARequirements);
    3141        3334 :                     if (OAIndex > 0) {
    3142        3334 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneDesignSpecOAIndex = OAIndex;
    3143             :                     } else {
    3144           0 :                         ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\", invalid data.");
    3145           0 :                         ShowContinueError(state,
    3146           0 :                                           "... incorrect " + state.dataIPShortCut->cAlphaFieldNames(4) + "=\"" + state.dataIPShortCut->cAlphaArgs(4) +
    3147             :                                               "\".");
    3148           0 :                         ErrorsFound = true;
    3149             :                     }
    3150             :                 } else { // If no design spec object specified, i.e. no OA, then leave ZoneDesignSpecOAIndex = 0
    3151             :                 }
    3152             : 
    3153             :                 //  N7, \field Zone Heating Sizing Factor
    3154             :                 //      \note if blank, global heating sizing factor from Sizing:Parameters is used.
    3155             :                 //      \minimum> 0
    3156        3352 :                 if (state.dataIPShortCut->lNumericFieldBlanks(7) || state.dataIPShortCut->rNumericArgs(7) == 0.0) {
    3157        3297 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).HeatSizingFactor = state.dataSize->GlobalHeatSizingFactor;
    3158          55 :                 } else if (state.dataIPShortCut->rNumericArgs(7) < 0.0) {
    3159           0 :                     ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\", invalid data.");
    3160           0 :                     ShowContinueError(state,
    3161           0 :                                       format("... incorrect {}=[{:.2R}],  value should not be negative.",
    3162           0 :                                              state.dataIPShortCut->cNumericFieldNames(7),
    3163           0 :                                              state.dataIPShortCut->rNumericArgs(7)));
    3164           0 :                     ErrorsFound = true;
    3165             :                 } else {
    3166          55 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).HeatSizingFactor = state.dataIPShortCut->rNumericArgs(7);
    3167             :                 }
    3168             :                 //  N8, \field Zone Cooling Sizing Factor
    3169             :                 //      \note if blank, global cooling sizing factor from Sizing:Parameters is used.
    3170             :                 //      \minimum> 0
    3171        3352 :                 if (state.dataIPShortCut->lNumericFieldBlanks(8) || state.dataIPShortCut->rNumericArgs(8) == 0.0) {
    3172        3297 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).CoolSizingFactor = state.dataSize->GlobalCoolSizingFactor;
    3173          55 :                 } else if (state.dataIPShortCut->rNumericArgs(8) < 0.0) {
    3174           0 :                     ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\", invalid data.");
    3175           0 :                     ShowContinueError(state,
    3176           0 :                                       format("... incorrect {}=[{:.2R}],  value should not be negative.",
    3177           0 :                                              state.dataIPShortCut->cNumericFieldNames(8),
    3178           0 :                                              state.dataIPShortCut->rNumericArgs(8)));
    3179           0 :                     ErrorsFound = true;
    3180             :                 } else {
    3181          55 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).CoolSizingFactor = state.dataIPShortCut->rNumericArgs(8);
    3182             :                 }
    3183             :                 //  N9, \field Cooling Design Air Flow Rate
    3184             :                 //      \type real
    3185             :                 //      \units m3/s
    3186             :                 //      \minimum 0
    3187             :                 //      \default 0
    3188             :                 //      \note This input is used if Cooling Design Air Flow Method is Flow/Zone
    3189             :                 //      \note This value will be multiplied by the global or zone sizing factor and
    3190             :                 //      \note by zone multipliers.
    3191        3352 :                 if (state.dataIPShortCut->lNumericFieldBlanks(9)) {
    3192        1658 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).DesCoolAirFlow = 0.0;
    3193        1694 :                 } else if (state.dataIPShortCut->rNumericArgs(9) < 0.0) {
    3194           0 :                     ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\", invalid data.");
    3195           0 :                     ShowContinueError(state,
    3196           0 :                                       format("... incorrect {}=[{:.2R}],  value should not be negative.",
    3197           0 :                                              state.dataIPShortCut->cNumericFieldNames(9),
    3198           0 :                                              state.dataIPShortCut->rNumericArgs(9)));
    3199           0 :                     ErrorsFound = true;
    3200             :                 } else {
    3201        1694 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).DesCoolAirFlow = state.dataIPShortCut->rNumericArgs(9);
    3202             :                 }
    3203             :                 //  N10,\field Cooling Minimum Air Flow per Zone Floor Area
    3204             :                 //      \type real
    3205             :                 //      \units m3/s-m2
    3206             :                 //      \minimum 0
    3207             :                 //      \default .000762
    3208             :                 //      \note default is .15 cfm/ft2
    3209             :                 //      \note This input is used if Cooling Design Air Flow Method is design day with limit
    3210        3352 :                 if (state.dataIPShortCut->lNumericFieldBlanks(10)) {
    3211        3260 :                     if (state.dataIPShortCut->rNumericArgs(10) <= 0.0) { // in case someone changes the default in the IDD
    3212           0 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).DesCoolMinAirFlowPerArea = 0.000762;
    3213             :                     } else {
    3214        3260 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).DesCoolMinAirFlowPerArea = state.dataIPShortCut->rNumericArgs(10);
    3215             :                     }
    3216          92 :                 } else if (state.dataIPShortCut->rNumericArgs(10) < 0.0) {
    3217           0 :                     ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\", invalid data.");
    3218           0 :                     ShowContinueError(state,
    3219           0 :                                       format("... incorrect {}=[{:.2R}],  value should not be negative.",
    3220           0 :                                              state.dataIPShortCut->cNumericFieldNames(108),
    3221           0 :                                              state.dataIPShortCut->rNumericArgs(10)));
    3222           0 :                     ErrorsFound = true;
    3223             :                 } else {
    3224          92 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).DesCoolMinAirFlowPerArea = state.dataIPShortCut->rNumericArgs(10);
    3225             :                 }
    3226             :                 //  N11,\field Cooling Minimum Air Flow
    3227             :                 //      \type real
    3228             :                 //      \units m3/s
    3229             :                 //      \minimum 0
    3230             :                 //      \default 0
    3231             :                 //      \note This input is used if Cooling Design Air Flow Method is design day with limit
    3232        3352 :                 if (state.dataIPShortCut->lNumericFieldBlanks(11)) {
    3233        2407 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).DesCoolMinAirFlow = 0.0;
    3234         945 :                 } else if (state.dataIPShortCut->rNumericArgs(11) < 0.0) {
    3235           0 :                     ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\", invalid data.");
    3236           0 :                     ShowContinueError(state,
    3237           0 :                                       format("... incorrect {}=[{:.2R}],  value should not be negative.",
    3238           0 :                                              state.dataIPShortCut->cNumericFieldNames(11),
    3239           0 :                                              state.dataIPShortCut->rNumericArgs(11)));
    3240           0 :                     ErrorsFound = true;
    3241             :                 } else {
    3242         945 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).DesCoolMinAirFlow = state.dataIPShortCut->rNumericArgs(11);
    3243             :                 }
    3244             :                 //  N12,\field Cooling Minimum Air Flow Fraction
    3245        3352 :                 if (state.dataIPShortCut->rNumericArgs(12) < 0.0) {
    3246           0 :                     ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\", invalid data.");
    3247           0 :                     ShowContinueError(state,
    3248           0 :                                       format("... incorrect {}=[{:.2R}],  value should not be negative.",
    3249           0 :                                              state.dataIPShortCut->cNumericFieldNames(12),
    3250           0 :                                              state.dataIPShortCut->rNumericArgs(12)));
    3251           0 :                     ErrorsFound = true;
    3252             :                 } else {
    3253        3352 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).DesCoolMinAirFlowFrac = state.dataIPShortCut->rNumericArgs(12);
    3254             :                 }
    3255             : 
    3256             :                 //  N13,\field Heating Design Air Flow Rate
    3257             :                 //      \type real
    3258             :                 //      \units m3/s
    3259             :                 //      \minimum 0
    3260             :                 //      \default 0
    3261             :                 //      \note This input is used if Heating Design Air Flow Method is Flow/Zone.
    3262             :                 //      \note This value will be multiplied by the global or zone sizing factor and
    3263             :                 //      \note by zone multipliers.
    3264        3352 :                 if (state.dataIPShortCut->lNumericFieldBlanks(13)) {
    3265        1047 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatAirFlow = 0.0;
    3266        2305 :                 } else if (state.dataIPShortCut->rNumericArgs(13) < 0.0) {
    3267           0 :                     ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\", invalid data.");
    3268           0 :                     ShowContinueError(state,
    3269           0 :                                       format("... incorrect {}=[{:.2R}],  value should not be negative.",
    3270           0 :                                              state.dataIPShortCut->cNumericFieldNames(13),
    3271           0 :                                              state.dataIPShortCut->rNumericArgs(13)));
    3272           0 :                     ErrorsFound = true;
    3273             :                 } else {
    3274        2305 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatAirFlow = state.dataIPShortCut->rNumericArgs(13);
    3275             :                 }
    3276             :                 //  N14,\field Heating Maximum Air Flow per Zone Floor Area
    3277             :                 //      \type real
    3278             :                 //      \units m3/s-m2
    3279             :                 //      \minimum 0
    3280             :                 //      \default .002032
    3281             :                 //      \note default is .40 cfm/ft2
    3282             :                 //      \note This input is not currently used for autosizing any of the components.
    3283        3352 :                 DesHeatMaxAirFlowPerAreaUsrInp = false;
    3284        3352 :                 if (state.dataIPShortCut->lNumericFieldBlanks(14)) {
    3285        3321 :                     if (state.dataIPShortCut->rNumericArgs(14) <= 0.0) { // in case someone changes the default in the IDD
    3286           0 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlowPerArea = 0.002032;
    3287             :                     } else {
    3288        3321 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlowPerArea = state.dataIPShortCut->rNumericArgs(14);
    3289             :                     }
    3290          31 :                 } else if (state.dataIPShortCut->rNumericArgs(14) < 0.0) {
    3291           0 :                     ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\", invalid data.");
    3292           0 :                     ShowContinueError(state,
    3293           0 :                                       format("... incorrect {}=[{:.2R}],  value should not be negative.",
    3294           0 :                                              state.dataIPShortCut->cNumericFieldNames(14),
    3295           0 :                                              state.dataIPShortCut->rNumericArgs(14)));
    3296           0 :                     ErrorsFound = true;
    3297             :                 } else {
    3298          31 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlowPerArea = state.dataIPShortCut->rNumericArgs(14);
    3299          31 :                     DesHeatMaxAirFlowPerAreaUsrInp = true;
    3300             :                 }
    3301             :                 //  N15,\field Heating Maximum Air Flow
    3302             :                 //      \type real
    3303             :                 //      \units m3/s
    3304             :                 //      \minimum 0
    3305             :                 //      \default .1415762
    3306             :                 //      \note default is 300 cfm
    3307             :                 //      \note This input is not currently used for autosizing any of the components.
    3308        3352 :                 DesHeatMaxAirFlowUsrInp = false;
    3309        3352 :                 if (state.dataIPShortCut->lNumericFieldBlanks(15)) {
    3310        3321 :                     if (state.dataIPShortCut->rNumericArgs(15) <= 0.0) { // in case someone changes the default in the IDD
    3311           0 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlow = 0.1415762;
    3312             :                     } else {
    3313        3321 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlow = state.dataIPShortCut->rNumericArgs(15);
    3314             :                     }
    3315          31 :                 } else if (state.dataIPShortCut->rNumericArgs(15) < 0.0) {
    3316           0 :                     ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\", invalid data.");
    3317           0 :                     ShowContinueError(state,
    3318           0 :                                       format("... incorrect {}=[{:.2R}],  value should not be negative.",
    3319           0 :                                              state.dataIPShortCut->cNumericFieldNames(15),
    3320           0 :                                              state.dataIPShortCut->rNumericArgs(15)));
    3321           0 :                     ErrorsFound = true;
    3322             :                 } else {
    3323          31 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlow = state.dataIPShortCut->rNumericArgs(15);
    3324          31 :                     DesHeatMaxAirFlowUsrInp = true;
    3325             :                 }
    3326             :                 //  N16;\field Heating Maximum Air Flow Fraction
    3327             :                 //      \note fraction of the Heating Design Air Flow Rate
    3328             :                 //      \note This input is not currently used for autosizing any of the components.
    3329             :                 //      \type real
    3330             :                 //      \minimum 0
    3331             :                 //      \default 0.3
    3332        3352 :                 DesHeatMaxAirFlowFracUsrInp = false;
    3333        3352 :                 if (state.dataIPShortCut->lNumericFieldBlanks(16)) {
    3334        2875 :                     if (state.dataIPShortCut->rNumericArgs(16) <= 0.0) { // in case someone changes the default in the IDD
    3335           0 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlowFrac = 0.3;
    3336             :                     } else {
    3337        2875 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlowFrac = state.dataIPShortCut->rNumericArgs(16);
    3338             :                     }
    3339         477 :                 } else if (state.dataIPShortCut->rNumericArgs(16) < 0.0) {
    3340           0 :                     ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\", invalid data.");
    3341           0 :                     ShowContinueError(state,
    3342           0 :                                       format("... incorrect {}=[{:.2R}],  value should not be negative.",
    3343           0 :                                              state.dataIPShortCut->cNumericFieldNames(16),
    3344           0 :                                              state.dataIPShortCut->rNumericArgs(16)));
    3345           0 :                     ErrorsFound = true;
    3346             :                 } else {
    3347         477 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlowFrac = state.dataIPShortCut->rNumericArgs(16);
    3348         477 :                     DesHeatMaxAirFlowFracUsrInp = true;
    3349             :                 }
    3350             :                 // make sure the user specified inputs of the previous 3 inputs override the defaults
    3351        3352 :                 if (DesHeatMaxAirFlowPerAreaUsrInp || DesHeatMaxAirFlowUsrInp || DesHeatMaxAirFlowFracUsrInp) {
    3352         478 :                     if (!DesHeatMaxAirFlowPerAreaUsrInp) {
    3353         447 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlowPerArea = 0.0;
    3354             :                     }
    3355         478 :                     if (!DesHeatMaxAirFlowUsrInp) {
    3356         447 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlow = 0.0;
    3357             :                     }
    3358         478 :                     if (!DesHeatMaxAirFlowFracUsrInp) {
    3359           1 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlowFrac = 0.0;
    3360             :                     }
    3361             :                 }
    3362             : 
    3363             :                 //  A7, \field Zone Air Distribution Object Name and add its inputs
    3364        3352 :                 if (!state.dataIPShortCut->lAlphaFieldBlanks(7)) {
    3365         534 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneAirDistEffObjName = state.dataIPShortCut->cAlphaArgs(7);
    3366         534 :                     ObjIndex = UtilityRoutines::FindItemInList(state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneAirDistEffObjName,
    3367         534 :                                                                state.dataSize->ZoneAirDistribution);
    3368         534 :                     if (ObjIndex > 0) {
    3369         534 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneADEffCooling =
    3370         534 :                             state.dataSize->ZoneAirDistribution(ObjIndex).ZoneADEffCooling;
    3371         534 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneADEffHeating =
    3372         534 :                             state.dataSize->ZoneAirDistribution(ObjIndex).ZoneADEffHeating;
    3373         534 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneSecondaryRecirculation =
    3374         534 :                             state.dataSize->ZoneAirDistribution(ObjIndex).ZoneSecondaryRecirculation;
    3375         534 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneAirDistributionIndex = ObjIndex;
    3376         534 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneVentilationEff =
    3377         534 :                             state.dataSize->ZoneAirDistribution(ObjIndex).ZoneVentilationEff;
    3378             :                     } else {
    3379             :                         // generate a warning message
    3380           0 :                         ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\", invalid data.");
    3381           0 :                         ShowContinueError(state,
    3382           0 :                                           "... not found " + state.dataIPShortCut->cAlphaFieldNames(7) + "=\"" + state.dataIPShortCut->cAlphaArgs(7) +
    3383             :                                               "\".");
    3384           0 :                         ErrorsFound = true;
    3385             :                     }
    3386             :                 } else {
    3387             :                     // assume defaults
    3388        2818 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneADEffCooling = 1.0;
    3389        2818 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneADEffHeating = 1.0;
    3390        2818 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneSecondaryRecirculation = 0.0;
    3391             :                 }
    3392             : 
    3393             :                 {
    3394        6704 :                     auto const coolAirDesMethod(state.dataIPShortCut->cAlphaArgs(5));
    3395        3352 :                     if (coolAirDesMethod == "DESIGNDAY") {
    3396        2489 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).CoolAirDesMethod = FromDDCalc;
    3397         863 :                     } else if (coolAirDesMethod == "FLOW/ZONE") {
    3398           3 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).CoolAirDesMethod = InpDesAirFlow;
    3399         860 :                     } else if (coolAirDesMethod == "DESIGNDAYWITHLIMIT") {
    3400         860 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).CoolAirDesMethod = DesAirFlowWithLim;
    3401             :                     } else {
    3402           0 :                         ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\", invalid data.");
    3403           0 :                         ShowContinueError(state,
    3404           0 :                                           "... incorrect " + state.dataIPShortCut->cAlphaFieldNames(5) + "=\"" + state.dataIPShortCut->cAlphaArgs(5) +
    3405             :                                               "\".");
    3406           0 :                         ShowContinueError(state, "... valid values are DesignDay, Flow/Zone or DesignDayWithLimit.");
    3407           0 :                         ErrorsFound = true;
    3408             :                     }
    3409             :                 }
    3410             :                 {
    3411        6704 :                     auto const heatAirDesMethod(state.dataIPShortCut->cAlphaArgs(6));
    3412        3352 :                     if (heatAirDesMethod == "DESIGNDAY") {
    3413        3352 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).HeatAirDesMethod = FromDDCalc;
    3414           0 :                     } else if (heatAirDesMethod == "FLOW/ZONE") {
    3415           0 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).HeatAirDesMethod = InpDesAirFlow;
    3416           0 :                     } else if (heatAirDesMethod == "DESIGNDAYWITHLIMIT") {
    3417           0 :                         state.dataSize->ZoneSizingInput(ZoneSizIndex).HeatAirDesMethod = DesAirFlowWithLim;
    3418             :                     } else {
    3419           0 :                         ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\", invalid data.");
    3420           0 :                         ShowContinueError(state,
    3421           0 :                                           "... incorrect " + state.dataIPShortCut->cAlphaFieldNames(6) + "=\"" + state.dataIPShortCut->cAlphaArgs(6) +
    3422             :                                               "\".");
    3423           0 :                         ShowContinueError(state, "... valid values are DesignDay, Flow/Zone or DesignDayWithLimit.");
    3424           0 :                         ErrorsFound = true;
    3425             :                     }
    3426             :                 }
    3427        3352 :                 if (state.dataIPShortCut->cAlphaArgs(8) == "YES") {
    3428          55 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).AccountForDOAS = true;
    3429             :                 } else {
    3430        3297 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).AccountForDOAS = false;
    3431             :                 }
    3432        3352 :                 if (state.dataSize->ZoneSizingInput(ZoneSizIndex).AccountForDOAS) {
    3433             :                     {
    3434         110 :                         auto const DOASControlMethod(state.dataIPShortCut->cAlphaArgs(9));
    3435          55 :                         if (DOASControlMethod == "NEUTRALSUPPLYAIR") {
    3436           5 :                             state.dataSize->ZoneSizingInput(ZoneSizIndex).DOASControlStrategy = DOANeutralSup;
    3437          50 :                         } else if (DOASControlMethod == "NEUTRALDEHUMIDIFIEDSUPPLYAIR") {
    3438           0 :                             state.dataSize->ZoneSizingInput(ZoneSizIndex).DOASControlStrategy = DOANeutralDehumSup;
    3439          50 :                         } else if (DOASControlMethod == "COLDSUPPLYAIR") {
    3440          50 :                             state.dataSize->ZoneSizingInput(ZoneSizIndex).DOASControlStrategy = DOACoolSup;
    3441             :                         } else {
    3442           0 :                             ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\", invalid data.");
    3443           0 :                             ShowContinueError(state,
    3444           0 :                                               "... incorrect " + state.dataIPShortCut->cAlphaFieldNames(9) + "=\"" +
    3445           0 :                                                   state.dataIPShortCut->cAlphaArgs(9) + "\".");
    3446           0 :                             ShowContinueError(state, "... valid values are NeutralSupplyAir, NeutralDehumidifiedSupplyAir or ColdSupplyAir.");
    3447           0 :                             ErrorsFound = true;
    3448             :                         }
    3449             :                     }
    3450          55 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).DOASLowSetpoint = state.dataIPShortCut->rNumericArgs(17);
    3451          55 :                     state.dataSize->ZoneSizingInput(ZoneSizIndex).DOASHighSetpoint = state.dataIPShortCut->rNumericArgs(18);
    3452         110 :                     if (state.dataIPShortCut->rNumericArgs(17) > 0.0 && state.dataIPShortCut->rNumericArgs(18) > 0.0 &&
    3453          55 :                         state.dataIPShortCut->rNumericArgs(17) >= state.dataIPShortCut->rNumericArgs(18)) {
    3454           0 :                         ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\", invalid data.");
    3455           0 :                         ShowContinueError(state, "... Dedicated Outside Air Low Setpoint for Design must be less than the High Setpoint");
    3456           0 :                         ErrorsFound = true;
    3457             :                     }
    3458             :                 }
    3459        3352 :                 zoneSizingIndex.zoneSizingMethod = static_cast<DataSizing::ZoneSizing>(
    3460        6704 :                     getEnumerationValue(DataSizing::ZoneSizingMethodNamesUC, state.dataIPShortCut->cAlphaArgs(10)));
    3461        3352 :                 if (zoneSizingIndex.zoneSizingMethod != ZoneSizing::SensibleOnly) {
    3462           8 :                     zoneSizingIndex.zoneLatentSizing = true;
    3463           8 :                     state.dataHeatBal->DoLatentSizing = true;
    3464             :                 }
    3465        3352 :                 zoneSizingIndex.ZnLatCoolDgnSAMethod =
    3466        3352 :                     (state.dataIPShortCut->cAlphaArgs(11) == "SUPPLYAIRHUMIDITYRATIO") ? SupplyAirHumidityRatio : HumidityRatioDifference;
    3467        3352 :                 zoneSizingIndex.LatentCoolDesHumRat = state.dataIPShortCut->rNumericArgs(19);
    3468        3352 :                 zoneSizingIndex.CoolDesHumRatDiff = state.dataIPShortCut->rNumericArgs(20);
    3469        3352 :                 zoneSizingIndex.ZnLatHeatDgnSAMethod =
    3470        3352 :                     (state.dataIPShortCut->cAlphaArgs(12) == "SUPPLYAIRHUMIDITYRATIO") ? SupplyAirHumidityRatio : HumidityRatioDifference;
    3471        3352 :                 zoneSizingIndex.LatentHeatDesHumRat = state.dataIPShortCut->rNumericArgs(21);
    3472        3352 :                 zoneSizingIndex.HeatDesHumRatDiff = state.dataIPShortCut->rNumericArgs(22);
    3473        3352 :                 if (NumAlphas > 12 && !state.dataIPShortCut->lAlphaFieldBlanks(13)) {
    3474           3 :                     zoneSizingIndex.zoneRHDehumidifySchIndex = ScheduleManager::GetScheduleIndex(state, state.dataIPShortCut->cAlphaArgs(13));
    3475           3 :                     if (zoneSizingIndex.zoneRHDehumidifySchIndex == 0) {
    3476           0 :                         ShowWarningError(state,
    3477           0 :                                          format("{} = \"{}\", invalid Zone Humidistat Dehumidification Set Point Schedule Name = {}. Schedule will "
    3478             :                                                 "not be used and simulation continues.",
    3479             :                                                 cCurrentModuleObject,
    3480           0 :                                                 state.dataIPShortCut->cAlphaArgs(1),
    3481           0 :                                                 state.dataIPShortCut->cAlphaArgs(13)));
    3482             :                     }
    3483             :                 }
    3484        3352 :                 if (NumAlphas > 13 && !state.dataIPShortCut->lAlphaFieldBlanks(14)) {
    3485           3 :                     zoneSizingIndex.zoneRHHumidifySchIndex = ScheduleManager::GetScheduleIndex(state, state.dataIPShortCut->cAlphaArgs(14));
    3486           3 :                     if (zoneSizingIndex.zoneRHHumidifySchIndex == 0) {
    3487           0 :                         ShowWarningError(state,
    3488           0 :                                          format("{} = \"{}\", invalid Zone Humidistat Humidification Set Point Schedule Name = {}. Schedule will "
    3489             :                                                 "not be used and simulation continues.",
    3490             :                                                 cCurrentModuleObject,
    3491           0 :                                                 state.dataIPShortCut->cAlphaArgs(1),
    3492           0 :                                                 state.dataIPShortCut->cAlphaArgs(14)));
    3493           3 :                     } else if (zoneSizingIndex.zoneRHDehumidifySchIndex) {
    3494             :                         // check max and min of each schedule and compare RHHumidify > RHDehumidify and warn
    3495           3 :                         Real64 maxHumidify = ScheduleManager::GetScheduleMaxValue(state, zoneSizingIndex.zoneRHHumidifySchIndex);
    3496           3 :                         Real64 minDehumidify = ScheduleManager::GetScheduleMinValue(state, zoneSizingIndex.zoneRHDehumidifySchIndex);
    3497           3 :                         if (maxHumidify > minDehumidify) {
    3498           0 :                             ShowWarningError(
    3499             :                                 state,
    3500           0 :                                 format("{} = \"{}\", maximum value ({}%) of Zone Humidistat Humidification Set Point Schedule Name = {} is "
    3501             :                                        "greater than minimum value ({}%) of Zone Humidistat Dehumidifcation Set Point Schedule Name = {}. "
    3502             :                                        "Humidification set point will be limited by Dehumidification set point during zone sizing and simulation "
    3503             :                                        "continues.",
    3504             :                                        cCurrentModuleObject,
    3505           0 :                                        state.dataIPShortCut->cAlphaArgs(1),
    3506             :                                        maxHumidify,
    3507           0 :                                        state.dataIPShortCut->cAlphaArgs(14),
    3508             :                                        minDehumidify,
    3509           0 :                                        state.dataIPShortCut->cAlphaArgs(13)));
    3510             :                         }
    3511             :                     }
    3512             :                 }
    3513             :             }
    3514             :         }
    3515             :     }
    3516             : 
    3517         771 :     if (ErrorsFound) {
    3518           0 :         ShowFatalError(state, cCurrentModuleObject + ": Errors found in getting input. Program terminates.");
    3519             :     }
    3520         771 : }
    3521             : 
    3522       10056 : void ReportTemperatureInputError(
    3523             :     EnergyPlusData &state, std::string cObjectName, int const paramNum, Real64 comparisonTemperature, bool const shouldFlagSevere, bool &ErrorsFound)
    3524             : {
    3525       10056 :     if (state.dataIPShortCut->rNumericArgs(paramNum) < comparisonTemperature) {
    3526           0 :         if (shouldFlagSevere) { // heating supply air temperature is lower than cooling supply air temperature--not allowed
    3527           0 :             ShowSevereError(state, cObjectName + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\" has invalid data.");
    3528           0 :             ShowContinueError(state,
    3529           0 :                               format("... incorrect {}=[{:.2R}] is less than {}=[{:.2R}]",
    3530           0 :                                      state.dataIPShortCut->cNumericFieldNames(paramNum),
    3531           0 :                                      state.dataIPShortCut->rNumericArgs(paramNum),
    3532           0 :                                      state.dataIPShortCut->cNumericFieldNames(paramNum - 2),
    3533           0 :                                      state.dataIPShortCut->rNumericArgs(paramNum - 2)));
    3534           0 :             ShowContinueError(state, "This is not allowed.  Please check and revise your input.");
    3535           0 :             ErrorsFound = true;
    3536             :         } else { // then input is lower than comparison tempeature--just produce a warning for user to check input
    3537           0 :             ShowWarningError(state, cObjectName + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\" has invalid data.");
    3538           0 :             ShowContinueError(state,
    3539           0 :                               format("... incorrect {}=[{:.2R}] is less than [{:.2R}]",
    3540           0 :                                      state.dataIPShortCut->cNumericFieldNames(paramNum),
    3541           0 :                                      state.dataIPShortCut->rNumericArgs(paramNum),
    3542           0 :                                      comparisonTemperature));
    3543           0 :             ShowContinueError(state, "Please check your input to make sure this is correct.");
    3544             :         }
    3545             :     }
    3546       10056 : }
    3547             : 
    3548         420 : void GetZoneAndZoneListNames(
    3549             :     EnergyPlusData &state, bool &ErrorsFound, int &NumZones, Array1D_string &ZoneNames, int &NumZoneLists, Array1D<ZoneListData> &ZoneListNames)
    3550             : {
    3551             : 
    3552             :     // SUBROUTINE INFORMATION:
    3553             :     //       AUTHOR         Linda Lawrie
    3554             :     //       DATE WRITTEN   October 2010
    3555             :     //       MODIFIED       na
    3556             :     //       RE-ENGINEERED  na
    3557             : 
    3558             :     // PURPOSE OF THIS SUBROUTINE:
    3559             :     // Get Zone and ZoneList Names so Sizing:Zone can use global ZoneList.
    3560             :     // This is not a full validation of these objects -- only enough to fill
    3561             :     // structures for the Sizing:Zone object.
    3562             : 
    3563             :     // Using/Aliasing
    3564             : 
    3565             :     // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
    3566             :     int Item;
    3567             :     int Found;
    3568             :     int Item1;
    3569             :     int NumAlphas;
    3570             :     int NumNumbers;
    3571             :     int IOStatus;
    3572             :     bool InErrFlag; // Preserve (no current use) the input status of ErrorsFound
    3573             : 
    3574         420 :     InErrFlag = ErrorsFound;
    3575         420 :     auto &cCurrentModuleObject = state.dataIPShortCut->cCurrentModuleObject;
    3576         420 :     cCurrentModuleObject = "Zone";
    3577         420 :     NumZones = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject);
    3578         420 :     ZoneNames.allocate(NumZones);
    3579             : 
    3580        4283 :     for (Item = 1; Item <= NumZones; ++Item) {
    3581       27041 :         state.dataInputProcessing->inputProcessor->getObjectItem(state,
    3582             :                                                                  cCurrentModuleObject,
    3583             :                                                                  Item,
    3584        3863 :                                                                  state.dataIPShortCut->cAlphaArgs,
    3585             :                                                                  NumAlphas,
    3586        3863 :                                                                  state.dataIPShortCut->rNumericArgs,
    3587             :                                                                  NumNumbers,
    3588             :                                                                  IOStatus,
    3589        3863 :                                                                  state.dataIPShortCut->lNumericFieldBlanks,
    3590        3863 :                                                                  state.dataIPShortCut->lAlphaFieldBlanks,
    3591        3863 :                                                                  state.dataIPShortCut->cAlphaFieldNames,
    3592        3863 :                                                                  state.dataIPShortCut->cNumericFieldNames);
    3593             :         // validation, but no error
    3594        3863 :         Found = UtilityRoutines::FindItemInList(state.dataIPShortCut->cAlphaArgs(1), ZoneNames, Item - 1);
    3595        3863 :         if (Found == 0) {
    3596        3863 :             ZoneNames(Item) = state.dataIPShortCut->cAlphaArgs(1);
    3597             :         } else {
    3598           0 :             ZoneNames(Item) = "xxxxx";
    3599             :         }
    3600             :     }
    3601             : 
    3602         420 :     cCurrentModuleObject = "ZoneList";
    3603         420 :     NumZoneLists = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject);
    3604         420 :     ZoneListNames.allocate(NumZoneLists);
    3605             : 
    3606         446 :     for (Item = 1; Item <= NumZoneLists; ++Item) {
    3607         182 :         state.dataInputProcessing->inputProcessor->getObjectItem(state,
    3608             :                                                                  cCurrentModuleObject,
    3609             :                                                                  Item,
    3610          26 :                                                                  state.dataIPShortCut->cAlphaArgs,
    3611             :                                                                  NumAlphas,
    3612          26 :                                                                  state.dataIPShortCut->rNumericArgs,
    3613             :                                                                  NumNumbers,
    3614             :                                                                  IOStatus,
    3615          26 :                                                                  state.dataIPShortCut->lNumericFieldBlanks,
    3616          26 :                                                                  state.dataIPShortCut->lAlphaFieldBlanks,
    3617          26 :                                                                  state.dataIPShortCut->cAlphaFieldNames,
    3618          26 :                                                                  state.dataIPShortCut->cNumericFieldNames);
    3619             :         // validation, but no error
    3620          26 :         Found = UtilityRoutines::FindItemInList(state.dataIPShortCut->cAlphaArgs(1), ZoneListNames, Item - 1);
    3621          26 :         if (Found == 0) {
    3622          26 :             ZoneListNames(Item).Name = state.dataIPShortCut->cAlphaArgs(1);
    3623             :         } else {
    3624           0 :             ZoneListNames(Item).Name = "xxxxx";
    3625             :         }
    3626          26 :         ZoneListNames(Item).Zones.allocate(NumAlphas - 1);
    3627          26 :         ZoneListNames(Item).NumOfZones = NumAlphas - 1;
    3628         145 :         for (Item1 = 2; Item1 <= NumAlphas; ++Item1) {
    3629         119 :             Found = UtilityRoutines::FindItemInList(state.dataIPShortCut->cAlphaArgs(Item1), ZoneNames, NumZones);
    3630         119 :             ZoneListNames(Item).Zones(Item1 - 1) = Found;
    3631             :         }
    3632             :     }
    3633         420 : }
    3634             : 
    3635         771 : void GetSystemSizingInput(EnergyPlusData &state)
    3636             : {
    3637             : 
    3638             :     // SUBROUTINE INFORMATION:
    3639             :     //       AUTHOR         Fred Buhl
    3640             :     //       DATE WRITTEN   January 2001
    3641             :     //       MODIFIED       na
    3642             :     //       RE-ENGINEERED  na
    3643             : 
    3644             :     // PURPOSE OF THIS SUBROUTINE:
    3645             :     // Obtains input data for System Sizing objects and stores it in
    3646             :     // appropriate data structures.
    3647             : 
    3648             :     // METHODOLOGY EMPLOYED:
    3649             :     // Uses InputProcessor "Get" routines to obtain data.
    3650             : 
    3651             :     // Using/Aliasing
    3652             : 
    3653             :     // Sizing:System;
    3654         771 :     constexpr int iNameAlphaNum = 1;                          // A1, \field AirLoop Name
    3655         771 :     constexpr int iLoadTypeSizeAlphaNum = 2;                  // A2, \field Type of Load to Size On
    3656         771 :     constexpr int iCoolCapControlAlphaNum = 11;               // A11 \field Central Cooling Capacity Control Method
    3657         771 :     constexpr int iDesignOAVolFlowNumericNum = 1;             // N1, \field Design Outdoor Air Flow Rate
    3658         771 :     constexpr int iMinSysAirFlowRatioNumericNum = 2;          // N2, \field Minimum System Air Flow Ratio
    3659         771 :     constexpr int iPreheatDesignTempNumericNum = 3;           // N3, \field Preheat Design Temperature
    3660         771 :     constexpr int iPreheatDesignHumRatNumericNum = 4;         // N4, \field Preheat Design Humidity Ratio
    3661         771 :     constexpr int iPrecoolDesignTempNumericNum = 5;           // N5, \field Precool Design Temperature
    3662         771 :     constexpr int iPrecoolDesignHumRatNumericNum = 6;         // N6, \field Precool Design Humidity Ratio
    3663         771 :     constexpr int iCentralCoolDesignSATempNumericNum = 7;     // N7, \field Central Cooling Design Supply Air Temperature
    3664         771 :     constexpr int iCentralHeatDesignSATempNumericNum = 8;     // N8, \field Central Heating Design Supply Air Temperature
    3665         771 :     constexpr int iSizingOptionAlphaNum = 3;                  //  A3, \field Sizing Option
    3666         771 :     constexpr int i100PercentOACoolingAlphaNum = 4;           //  A4, \field 100% Outdoor Air in Cooling
    3667         771 :     constexpr int i100PercentOAHeatingAlphaNum = 5;           //  A5, \field 100% Outdoor Air in Heating
    3668         771 :     constexpr int iCentralCoolDesignSAHumRatNumericNum = 9;   // N9, \field Central Cooling Design Supply Air Humidity Ratio
    3669         771 :     constexpr int iCentralHeatDesignSAHumRatNumericNum = 10;  // N10, \field Central Heating Design Supply Air Humidity Ratio
    3670         771 :     constexpr int iCoolSAFMAlphaNum = 6;                      // A6, \field Cooling Design Air Flow Method
    3671         771 :     constexpr int iMaxCoolAirVolFlowNumericNum = 11;          // N11, \field Cooling Design Air Flow Rate {m3/s}
    3672         771 :     constexpr int iCoolFlowPerFloorAreaNumericNum = 12;       // N12, \field Supply Air Flow Rate Per Floor Area During Cooling Operation {m3/s-m2}
    3673         771 :     constexpr int iCoolFlowPerFracCoolNumericNum = 13;        // N13, \field Fraction of Autosized Design Cooling Supply Air Flow Rate {-}
    3674         771 :     constexpr int iCoolFlowPerCoolCapNumericNum = 14;         // N14, \field Design Supply Air Flow Rate Per Unit Cooling Capacity {m3/s-W}
    3675         771 :     constexpr int iHeatSAFMAlphaNum = 7;                      // A7, \field Heating Design Air Flow Method
    3676         771 :     constexpr int iMaxHeatAirVolFlowNumericNum = 15;          // N15, \field Heating Design Air Flow Rate {m3/s}
    3677         771 :     constexpr int iHeatFlowPerFloorAreaNumericNum = 16;       // N16, \field Supply Air Flow Rate Per Floor Area During Heating Operation {m3/s-m2}
    3678         771 :     constexpr int iHeatFlowPerFracHeatNumericNum = 17;        // N17, \field Fraction of Autosized Design Heating Supply Air Flow Rate {-}
    3679         771 :     constexpr int iHeatFlowPerFracCoolNumericNum = 18;        // N18, \field Fraction of Autosized Design Cooling Supply Air Flow Rate {-}
    3680         771 :     constexpr int iHeatFlowPerHeatCapNumericNum = 19;         // N19, \field Design Supply Air Flow Rate Per Unit Heating Capacity {m3/s-W}
    3681         771 :     constexpr int iSystemOASMethodAlphaNum = 8;               // A8,  \field System Outdoor Air Method
    3682         771 :     constexpr int iZoneMaxOAFractionNumericNum = 20;          // N20, \field Zone Maximum Outdoor Air Fraction
    3683         771 :     constexpr int iCoolCAPMAlphaNum(9);                       // A9, \field Cooling Design Capacity Method
    3684         771 :     constexpr int iCoolDesignCapacityNumericNum(21);          // N21, \field Cooling Design Capacity {W}
    3685         771 :     constexpr int iCoolCapacityPerFloorAreaNumericNum(22);    // N22, \field Cooling Design Capacity Per Floor Area {W/m2}
    3686         771 :     constexpr int iCoolFracOfAutosizedCapacityNumericNum(23); // N23, \field Fraction of Autosized Cooling Design Capacity {-}
    3687         771 :     constexpr int iHeatCAPMAlphaNum(10);                      // A10, \field Heating Design Capacity Method
    3688         771 :     constexpr int iHeatDesignCapacityNumericNum(24);          // N24, \field Heating Design Capacity {W}
    3689         771 :     constexpr int iHeatCapacityPerFloorAreaNumericNum(25);    // N25, \field Heating Design Capacity Per Floor Area {W/m2}
    3690         771 :     constexpr int iHeatFracOfAutosizedCapacityNumericNum(26); // N26, \field Fraction of Autosized Cooling Design Capacity {-}
    3691         771 :     constexpr int iOccupantDiversity = 27;                    // N26, \field Occupant Diversity
    3692             : 
    3693             :     // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
    3694             :     int SysSizIndex;         // loop index
    3695             :     int NumAlphas;           // Number of Alphas for each GetObjectItem call
    3696             :     int NumNumbers;          // Number of Numbers for each GetObjectItem call
    3697             :     int IOStatus;            // Used in GetObjectItem
    3698         771 :     bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
    3699             :     int NumDesDays;          // Number of design days in input
    3700             : 
    3701         771 :     auto &SysSizInput(state.dataSize->SysSizInput);
    3702             : 
    3703         771 :     state.dataSizingManager->NumAirLoops = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, "AirLoopHVAC");
    3704         771 :     auto &cCurrentModuleObject = state.dataIPShortCut->cCurrentModuleObject;
    3705         771 :     cCurrentModuleObject = "Sizing:System";
    3706         771 :     state.dataSize->NumSysSizInput = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject);
    3707             : 
    3708         771 :     if (state.dataSize->NumSysSizInput > 0) {
    3709        1340 :         NumDesDays = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, "SizingPeriod:DesignDay") +
    3710         670 :                      state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, "SizingPeriod:WeatherFileDays") +
    3711         670 :                      state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, "SizingPeriod:WeatherFileConditionType");
    3712         335 :         if (NumDesDays == 0 && (state.dataGlobal->DoSystemSizing || state.dataGlobal->DoPlantSizing)) {
    3713           0 :             ShowSevereError(state, "System Sizing calculations need SizingPeriod:* input. None found.");
    3714           0 :             ErrorsFound = true;
    3715             :         }
    3716         335 :         SysSizInput.allocate(state.dataSize->NumSysSizInput);
    3717             :     }
    3718             : 
    3719        1710 :     for (SysSizIndex = 1; SysSizIndex <= state.dataSize->NumSysSizInput; ++SysSizIndex) {
    3720        6573 :         state.dataInputProcessing->inputProcessor->getObjectItem(state,
    3721             :                                                                  cCurrentModuleObject,
    3722             :                                                                  SysSizIndex,
    3723         939 :                                                                  state.dataIPShortCut->cAlphaArgs,
    3724             :                                                                  NumAlphas,
    3725         939 :                                                                  state.dataIPShortCut->rNumericArgs,
    3726             :                                                                  NumNumbers,
    3727             :                                                                  IOStatus,
    3728         939 :                                                                  state.dataIPShortCut->lNumericFieldBlanks,
    3729         939 :                                                                  state.dataIPShortCut->lAlphaFieldBlanks,
    3730         939 :                                                                  state.dataIPShortCut->cAlphaFieldNames,
    3731         939 :                                                                  state.dataIPShortCut->cNumericFieldNames);
    3732         939 :         UtilityRoutines::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum), cCurrentModuleObject, ErrorsFound);
    3733             : 
    3734         939 :         SysSizInput(SysSizIndex).AirPriLoopName = state.dataIPShortCut->cAlphaArgs(iNameAlphaNum);
    3735             : 
    3736         939 :         constexpr std::array<std::string_view, static_cast<int>(DataSizing::LoadSizing::Num)> LoadSizingNamesUC{
    3737             :             "SENSIBLE", "LATENT", "TOTAL", "VENTILATIONREQUIREMENT"};
    3738         939 :         SysSizInput(SysSizIndex).loadSizingType = static_cast<DataSizing::LoadSizing>(
    3739        1878 :             getEnumerationValue(LoadSizingNamesUC, UtilityRoutines::MakeUPPERCase(state.dataIPShortCut->cAlphaArgs(iLoadTypeSizeAlphaNum))));
    3740             : 
    3741             :         // assign PeakLoad based on LoadSizing for now
    3742         939 :         if (SysSizInput(SysSizIndex).loadSizingType == DataSizing::LoadSizing::Sensible) {
    3743         905 :             SysSizInput(SysSizIndex).coolingPeakLoad = DataSizing::PeakLoad::SensibleCooling;
    3744          69 :         } else if (SysSizInput(SysSizIndex).loadSizingType == DataSizing::LoadSizing::Total ||
    3745          26 :                    (SysSizInput(SysSizIndex).loadSizingType == DataSizing::LoadSizing::Latent && state.dataHeatBal->DoLatentSizing)) {
    3746          10 :             SysSizInput(SysSizIndex).coolingPeakLoad = DataSizing::PeakLoad::TotalCooling;
    3747             :         } else {
    3748          24 :             SysSizInput(SysSizIndex).coolingPeakLoad = DataSizing::PeakLoad::SensibleCooling;
    3749             :         }
    3750             :         // set the CoolCapControl input
    3751         939 :         constexpr std::array<std::string_view, static_cast<int>(CapacityControl::Num)> CapacityControlNamesUC{"VAV", "BYPASS", "VT", "ONOFF"};
    3752         939 :         SysSizInput(SysSizIndex).CoolCapControl = static_cast<CapacityControl>(
    3753        1878 :             getEnumerationValue(CapacityControlNamesUC, UtilityRoutines::MakeUPPERCase(state.dataIPShortCut->cAlphaArgs(iCoolCapControlAlphaNum))));
    3754             : 
    3755             :         {
    3756        1878 :             auto const sizingOption(state.dataIPShortCut->cAlphaArgs(iSizingOptionAlphaNum));
    3757         939 :             if (sizingOption == "COINCIDENT") {
    3758          93 :                 SysSizInput(SysSizIndex).SizingOption = Coincident;
    3759         846 :             } else if (sizingOption == "NONCOINCIDENT") {
    3760         846 :                 SysSizInput(SysSizIndex).SizingOption = NonCoincident;
    3761             :             } else {
    3762           0 :                 ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(iNameAlphaNum) + "\", invalid data.");
    3763           0 :                 ShowContinueError(state,
    3764           0 :                                   "... incorrect " + state.dataIPShortCut->cAlphaFieldNames(iSizingOptionAlphaNum) + "=\"" +
    3765           0 :                                       state.dataIPShortCut->cAlphaArgs(iSizingOptionAlphaNum) + "\".");
    3766           0 :                 ShowContinueError(state, "... valid values are Coincident or NonCoincident.");
    3767           0 :                 ErrorsFound = true;
    3768             :             }
    3769             :         }
    3770             :         {
    3771        1878 :             auto const coolOAOption(state.dataIPShortCut->cAlphaArgs(i100PercentOACoolingAlphaNum));
    3772         939 :             if (coolOAOption == "YES") {
    3773          38 :                 SysSizInput(SysSizIndex).CoolOAOption = AllOA;
    3774         901 :             } else if (coolOAOption == "NO") {
    3775         901 :                 SysSizInput(SysSizIndex).CoolOAOption = MinOA;
    3776             :             } else {
    3777           0 :                 ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(iNameAlphaNum) + "\", invalid data.");
    3778           0 :                 ShowContinueError(state,
    3779           0 :                                   "... incorrect " + state.dataIPShortCut->cAlphaFieldNames(i100PercentOACoolingAlphaNum) + "=\"" +
    3780           0 :                                       state.dataIPShortCut->cAlphaArgs(i100PercentOACoolingAlphaNum) + "\".");
    3781           0 :                 ShowContinueError(state, "... valid values are Yes or No.");
    3782           0 :                 ErrorsFound = true;
    3783             :             }
    3784             :         }
    3785             :         {
    3786        1878 :             auto const heatOAOption(state.dataIPShortCut->cAlphaArgs(i100PercentOAHeatingAlphaNum));
    3787         939 :             if (heatOAOption == "YES") {
    3788          36 :                 SysSizInput(SysSizIndex).HeatOAOption = 1;
    3789         903 :             } else if (heatOAOption == "NO") {
    3790         903 :                 SysSizInput(SysSizIndex).HeatOAOption = 2;
    3791             :             } else {
    3792           0 :                 ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(iNameAlphaNum) + "\", invalid data.");
    3793           0 :                 ShowContinueError(state,
    3794           0 :                                   "... incorrect " + state.dataIPShortCut->cAlphaFieldNames(i100PercentOAHeatingAlphaNum) + "=\"" +
    3795           0 :                                       state.dataIPShortCut->cAlphaArgs(i100PercentOAHeatingAlphaNum) + "\".");
    3796           0 :                 ShowContinueError(state, "... valid values are Yes or No.");
    3797           0 :                 ErrorsFound = true;
    3798             :             }
    3799             :         }
    3800             : 
    3801             :         //  N1, \field Design Outdoor Air Flow Rate
    3802             :         //      \type real
    3803             :         //      \default autosize
    3804             :         //      \minimum 0.0
    3805             :         // int const  iDesignOAVolFlowNumericNum = 1;     // N1, \field Design Outdoor Air Flow Rate
    3806         939 :         if (state.dataIPShortCut->lNumericFieldBlanks(iDesignOAVolFlowNumericNum)) {
    3807           0 :             SysSizInput(SysSizIndex).DesOutAirVolFlow = AutoSize;
    3808        1832 :         } else if (state.dataIPShortCut->rNumericArgs(iDesignOAVolFlowNumericNum) < 0.0 &&
    3809         893 :                    state.dataIPShortCut->rNumericArgs(iDesignOAVolFlowNumericNum) != AutoSize) {
    3810           0 :             ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(iNameAlphaNum) + "\", invalid data.");
    3811           0 :             ShowContinueError(state,
    3812           0 :                               format("... incorrect {}=[{:.2R}],  value should not be negative.",
    3813           0 :                                      state.dataIPShortCut->cNumericFieldNames(iDesignOAVolFlowNumericNum),
    3814           0 :                                      state.dataIPShortCut->rNumericArgs(iDesignOAVolFlowNumericNum)));
    3815           0 :             ErrorsFound = true;
    3816             :         } else {
    3817         939 :             SysSizInput(SysSizIndex).DesOutAirVolFlow = state.dataIPShortCut->rNumericArgs(iDesignOAVolFlowNumericNum);
    3818             :         }
    3819         939 :         if (SysSizInput(SysSizIndex).DesOutAirVolFlow == AutoSize) {
    3820         893 :             SysSizInput(SysSizIndex).OAAutoSized = true;
    3821             :         }
    3822             : 
    3823             :         //  N2, \field Minimum System Air Flow Ratio
    3824             :         //      \required-field
    3825             :         //      \type real
    3826             :         //      \minimum 0.0
    3827             :         //      \maximum 1.0
    3828             :         // int const iMinSysAirFlowRatioNumericNum = 2;  // N2, \field Minimum System Air Flow Ratio
    3829         939 :         if (state.dataIPShortCut->lNumericFieldBlanks(iMinSysAirFlowRatioNumericNum)) {
    3830           0 :             SysSizInput(SysSizIndex).SysAirMinFlowRat = 0.0;
    3831         939 :         } else if ((state.dataIPShortCut->rNumericArgs(iMinSysAirFlowRatioNumericNum) < 0.0) &&
    3832           0 :                    (state.dataIPShortCut->rNumericArgs(iMinSysAirFlowRatioNumericNum) != DataSizing::AutoSize)) {
    3833           0 :             ShowSevereError(state,
    3834           0 :                             cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(iMinSysAirFlowRatioNumericNum) + "\", invalid data.");
    3835           0 :             ShowContinueError(state,
    3836           0 :                               format("... incorrect {}=[{:.2R}],  value should not be negative.",
    3837           0 :                                      state.dataIPShortCut->cNumericFieldNames(iMinSysAirFlowRatioNumericNum),
    3838           0 :                                      state.dataIPShortCut->rNumericArgs(iMinSysAirFlowRatioNumericNum)));
    3839           0 :             ErrorsFound = true;
    3840             :         } else {
    3841         939 :             SysSizInput(SysSizIndex).SysAirMinFlowRat = state.dataIPShortCut->rNumericArgs(iMinSysAirFlowRatioNumericNum);
    3842         939 :             if (state.dataIPShortCut->rNumericArgs(iMinSysAirFlowRatioNumericNum) == DataSizing::AutoSize) {
    3843           0 :                 SysSizInput(SysSizIndex).SysAirMinFlowRatWasAutoSized = true;
    3844             :             }
    3845             :         }
    3846             :         // int const iPreheatDesignTempNumericNum = 3; // N3, \field Preheat Design Temperature
    3847             :         // int const iPreheatDesignHumRatNumericNum = 4; // N4, \field Preheat Design Humidity Ratio
    3848             :         // int const iPrecoolDesignTempNumericNum = 5; // N5, \field Precool Design Temperature
    3849             :         // int const iPrecoolDesignHumRatNumericNum = 6; // N6, \field Precool Design Humidity Ratio
    3850             :         // int const iCentralCoolDesignSATempNumericNum = 7; // N7, \field Central Cooling Design Supply Air Temperature
    3851             :         // int const iCentralHeatDesignSATempNumericNum = 8; // N8, \field Central Heating Design Supply Air Temperature
    3852             :         // int const iCentralCoolDesignSAHumRatNumericNum = 9; // N9, \field Central Cooling Design Supply Air Humidity Ratio
    3853             :         // int const iCentralHeatDesignSAHumRatNumericNum = 10; // N10, \field Central Heating Design Supply Air Humidity Ratio
    3854         939 :         SysSizInput(SysSizIndex).PreheatTemp = state.dataIPShortCut->rNumericArgs(iPreheatDesignTempNumericNum);
    3855         939 :         SysSizInput(SysSizIndex).PreheatHumRat = state.dataIPShortCut->rNumericArgs(iPreheatDesignHumRatNumericNum);
    3856         939 :         SysSizInput(SysSizIndex).PrecoolTemp = state.dataIPShortCut->rNumericArgs(iPrecoolDesignTempNumericNum);
    3857         939 :         SysSizInput(SysSizIndex).PrecoolHumRat = state.dataIPShortCut->rNumericArgs(iPrecoolDesignHumRatNumericNum);
    3858         939 :         SysSizInput(SysSizIndex).CoolSupTemp = state.dataIPShortCut->rNumericArgs(iCentralCoolDesignSATempNumericNum);
    3859         939 :         SysSizInput(SysSizIndex).HeatSupTemp = state.dataIPShortCut->rNumericArgs(iCentralHeatDesignSATempNumericNum);
    3860         939 :         SysSizInput(SysSizIndex).CoolSupHumRat = state.dataIPShortCut->rNumericArgs(iCentralCoolDesignSAHumRatNumericNum);
    3861         939 :         SysSizInput(SysSizIndex).HeatSupHumRat = state.dataIPShortCut->rNumericArgs(iCentralHeatDesignSAHumRatNumericNum);
    3862             :         //  N11, \field Cooling Design Air Flow Rate
    3863             :         //      \note This input is used if Cooling Design Air Flow Method is Flow/System
    3864             :         //      \note This value will *not* be multiplied by any sizing factor or by zone multipliers.
    3865             :         //      \note If using zone multipliers, this value must be large enough to serve the multiplied zones.
    3866             :         //      \type real
    3867             :         //      \units m3/s
    3868             :         //      \minimum 0
    3869             :         //      \default 0
    3870             :         // int const iCoolSAFMAlphaNum = 6; // A6, \field Cooling Design Air Flow Method
    3871             :         // int const iMaxCoolAirVolFlowNumericNum = 11; // N11, \field Cooling Design Air Flow Rate {m3/s}
    3872             :         // int const iCoolFlowPerFloorAreaNumericNum = 12; // N12, \field Supply Air Flow Rate Per Floor Area During Cooling Operation {m3/s-m2}
    3873             :         // int const iCoolFlowPerFracCoolNumericNum = 13; // N13, \field Fraction of Autosized Design Cooling Supply Air Flow Rate {-}
    3874             :         // int const iCoolFlowPerCoolCapNumericNum = 14; // N14, \field Design Supply Air Flow Rate Per Unit Cooling Capacity {m3/s-W}
    3875             : 
    3876         939 :         if (state.dataIPShortCut->lNumericFieldBlanks(iMaxCoolAirVolFlowNumericNum)) {
    3877         164 :             SysSizInput(SysSizIndex).DesCoolAirFlow = 0.0;
    3878         775 :         } else if (state.dataIPShortCut->rNumericArgs(iMaxCoolAirVolFlowNumericNum) < 0.0) {
    3879           0 :             ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(iNameAlphaNum) + "\", invalid data.");
    3880           0 :             ShowContinueError(state,
    3881           0 :                               format("... incorrect {}=[{:.2R}],  value should not be negative.",
    3882           0 :                                      state.dataIPShortCut->cNumericFieldNames(iMaxCoolAirVolFlowNumericNum),
    3883           0 :                                      state.dataIPShortCut->rNumericArgs(iMaxCoolAirVolFlowNumericNum)));
    3884           0 :             ErrorsFound = true;
    3885             :         } else {
    3886         775 :             SysSizInput(SysSizIndex).DesCoolAirFlow = state.dataIPShortCut->rNumericArgs(iMaxCoolAirVolFlowNumericNum);
    3887             :         }
    3888             :         //  N12;\field Heating Design Air Flow Rate
    3889             :         //      \note This input is used if Heating Design Air Flow Method is Flow/System
    3890             :         //      \note This value will *not* be multiplied by any sizing factor or by zone multipliers.
    3891             :         //      \note If using zone multipliers, this value must be large enough to serve the multiplied zones.
    3892             :         //      \type real
    3893             :         //      \units m3/s
    3894             :         //      \minimum 0
    3895             :         //      \default 0
    3896             :         // int const iHeatSAFMAlphaNum = 7; // A7, \field Heating Design Air Flow Method
    3897             :         // int const iMaxHeatAirVolFlowNumericNum = 12; // N15, \field Heating Design Air Flow Rate {m3/s}
    3898             :         // int const iHeatFlowPerFloorAreaNumericNum = 16; // N16, \field Supply Air Flow Rate Per Floor Area During Heating Operation {m3/s-m2}
    3899             :         // int const iHeatFlowPerFracHeatNumericNum = 17; // N17, \field Fraction of Autosized Design Heating Supply Air Flow Rate {-}
    3900             :         // int const iHeatFlowPerFracCoolNumericNum = 18; // N18, \field Fraction of Autosized Design Cooling Supply Air Flow Rate {-}
    3901             :         // int const iHeatFlowPerHeatCapNumericNum = 19; // N19, \field Design Supply Air Flow Rate Per Unit Heating Capacity {m3/s-W}
    3902             :         // add input fields for other cooling sizing methods
    3903         939 :         if (state.dataIPShortCut->lNumericFieldBlanks(iMaxHeatAirVolFlowNumericNum)) {
    3904         164 :             SysSizInput(SysSizIndex).DesHeatAirFlow = 0.0;
    3905         775 :         } else if (state.dataIPShortCut->rNumericArgs(iMaxHeatAirVolFlowNumericNum) < 0.0) {
    3906           0 :             ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(iNameAlphaNum) + "\", invalid data.");
    3907           0 :             ShowContinueError(state,
    3908           0 :                               format("... incorrect {}=[{:.2R}],  value should not be negative.",
    3909           0 :                                      state.dataIPShortCut->cNumericFieldNames(iMaxHeatAirVolFlowNumericNum),
    3910           0 :                                      state.dataIPShortCut->rNumericArgs(iMaxHeatAirVolFlowNumericNum)));
    3911           0 :             ErrorsFound = true;
    3912             :         } else {
    3913         775 :             SysSizInput(SysSizIndex).DesHeatAirFlow = state.dataIPShortCut->rNumericArgs(iMaxHeatAirVolFlowNumericNum);
    3914             :         }
    3915             :         //  N13;\field Maximum Zone Outdoor Air Fraction
    3916             :         //      \type real
    3917             :         //      \default 1.0
    3918             :         //      \minimum> 0.0
    3919             :         //      \units dimensionless
    3920             :         // int const iSystemOASMethodAlphaNum = 8; // A8,  \field System Outdoor Air Method
    3921             :         // int const iZoneMaxOAFractionNumericNum = 13; // N20, \field Zone Maximum Outdoor Air Fraction
    3922             : 
    3923             :         // add input fields for other heating sizing methods
    3924         939 :         if (state.dataIPShortCut->lNumericFieldBlanks(iZoneMaxOAFractionNumericNum)) {
    3925         179 :             SysSizInput(SysSizIndex).MaxZoneOAFraction = 0.0;
    3926         760 :         } else if (state.dataIPShortCut->rNumericArgs(iZoneMaxOAFractionNumericNum) < 0.0) {
    3927           0 :             ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(iNameAlphaNum) + "\", invalid data.");
    3928           0 :             ShowContinueError(state,
    3929           0 :                               format("... incorrect {}=[{:.2R}],  value should not be negative.",
    3930           0 :                                      state.dataIPShortCut->cNumericFieldNames(iZoneMaxOAFractionNumericNum),
    3931           0 :                                      state.dataIPShortCut->rNumericArgs(iZoneMaxOAFractionNumericNum)));
    3932           0 :             ErrorsFound = true;
    3933             :         } else {
    3934         760 :             SysSizInput(SysSizIndex).MaxZoneOAFraction = state.dataIPShortCut->rNumericArgs(iZoneMaxOAFractionNumericNum);
    3935             :         }
    3936             :         {
    3937        1878 :             auto const coolAirDesMethod(state.dataIPShortCut->cAlphaArgs(iCoolSAFMAlphaNum));
    3938         939 :             if (coolAirDesMethod == "DESIGNDAY") {
    3939         934 :                 SysSizInput(SysSizIndex).CoolAirDesMethod = FromDDCalc;
    3940           5 :             } else if (coolAirDesMethod == "FLOW/SYSTEM") {
    3941           4 :                 SysSizInput(SysSizIndex).CoolAirDesMethod = InpDesAirFlow;
    3942           1 :             } else if (coolAirDesMethod == "FLOWPERFLOORAREA") {
    3943           0 :                 SysSizInput(SysSizIndex).CoolAirDesMethod = InpDesAirFlow;
    3944           0 :                 SysSizInput(SysSizIndex).ScaleCoolSAFMethod = FlowPerFloorArea;
    3945           0 :                 SysSizInput(SysSizIndex).FlowPerFloorAreaCooled = state.dataIPShortCut->rNumericArgs(iCoolFlowPerFloorAreaNumericNum);
    3946           1 :             } else if (coolAirDesMethod == "FRACTIONOFAUTOSIZEDCOOLINGAIRFLOW") {
    3947           0 :                 SysSizInput(SysSizIndex).CoolAirDesMethod = FromDDCalc;
    3948           0 :                 SysSizInput(SysSizIndex).ScaleCoolSAFMethod = FractionOfAutosizedCoolingAirflow;
    3949           0 :                 SysSizInput(SysSizIndex).FractionOfAutosizedCoolingAirflow = state.dataIPShortCut->rNumericArgs(iCoolFlowPerFracCoolNumericNum);
    3950           1 :             } else if (coolAirDesMethod == "FLOWPERCOOLINGCAPACITY") {
    3951           1 :                 SysSizInput(SysSizIndex).CoolAirDesMethod = FromDDCalc;
    3952           1 :                 SysSizInput(SysSizIndex).ScaleCoolSAFMethod = FlowPerCoolingCapacity;
    3953           1 :                 SysSizInput(SysSizIndex).FlowPerCoolingCapacity = state.dataIPShortCut->rNumericArgs(iCoolFlowPerCoolCapNumericNum);
    3954             :             } else {
    3955           0 :                 ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(iNameAlphaNum) + "\", invalid data.");
    3956           0 :                 ShowContinueError(state,
    3957           0 :                                   "... incorrect " + state.dataIPShortCut->cAlphaFieldNames(iCoolSAFMAlphaNum) + "=\"" +
    3958           0 :                                       state.dataIPShortCut->cAlphaArgs(iCoolSAFMAlphaNum) + "\".");
    3959           0 :                 ShowContinueError(state,
    3960             :                                   "... valid values are DesignDay, Flow/System, FlowPerFloorArea, FractionOfAutosizedCoolingAirflow, or "
    3961             :                                   "FlowPerCoolingCapacity.");
    3962           0 :                 ErrorsFound = true;
    3963             :             }
    3964             :         }
    3965             :         {
    3966        1878 :             auto const heatAirDesMethod(state.dataIPShortCut->cAlphaArgs(iHeatSAFMAlphaNum));
    3967         939 :             if (heatAirDesMethod == "DESIGNDAY") {
    3968         935 :                 SysSizInput(SysSizIndex).HeatAirDesMethod = FromDDCalc;
    3969           4 :             } else if (heatAirDesMethod == "FLOW/SYSTEM") {
    3970           3 :                 SysSizInput(SysSizIndex).HeatAirDesMethod = InpDesAirFlow;
    3971           1 :             } else if (heatAirDesMethod == "FLOWPERFLOORAREA") {
    3972           0 :                 SysSizInput(SysSizIndex).HeatAirDesMethod = InpDesAirFlow;
    3973           0 :                 SysSizInput(SysSizIndex).ScaleHeatSAFMethod = FlowPerFloorArea;
    3974           0 :                 SysSizInput(SysSizIndex).FlowPerFloorAreaHeated = state.dataIPShortCut->rNumericArgs(iHeatFlowPerFloorAreaNumericNum);
    3975           1 :             } else if (heatAirDesMethod == "FRACTIONOFAUTOSIZEDHEATINGAIRFLOW") {
    3976           0 :                 SysSizInput(SysSizIndex).HeatAirDesMethod = FromDDCalc;
    3977           0 :                 SysSizInput(SysSizIndex).ScaleHeatSAFMethod = FractionOfAutosizedHeatingAirflow;
    3978           0 :                 SysSizInput(SysSizIndex).FractionOfAutosizedHeatingAirflow = state.dataIPShortCut->rNumericArgs(iHeatFlowPerFracHeatNumericNum);
    3979           1 :             } else if (heatAirDesMethod == "FRACTIONOFAUTOSIZEDCOOLINGAIRFLOW") {
    3980           0 :                 SysSizInput(SysSizIndex).HeatAirDesMethod = FromDDCalc;
    3981           0 :                 SysSizInput(SysSizIndex).ScaleHeatSAFMethod = FractionOfAutosizedCoolingAirflow;
    3982           0 :                 SysSizInput(SysSizIndex).FractionOfAutosizedCoolingAirflow = state.dataIPShortCut->rNumericArgs(iHeatFlowPerFracCoolNumericNum);
    3983           1 :             } else if (heatAirDesMethod == "FLOWPERHEATINGCAPACITY") {
    3984           1 :                 SysSizInput(SysSizIndex).HeatAirDesMethod = FromDDCalc;
    3985           1 :                 SysSizInput(SysSizIndex).ScaleHeatSAFMethod = FlowPerHeatingCapacity;
    3986           1 :                 SysSizInput(SysSizIndex).FlowPerHeatingCapacity = state.dataIPShortCut->rNumericArgs(iHeatFlowPerHeatCapNumericNum);
    3987             :             } else {
    3988           0 :                 ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(iNameAlphaNum) + "\", invalid data.");
    3989           0 :                 ShowContinueError(state,
    3990           0 :                                   "... incorrect " + state.dataIPShortCut->cAlphaFieldNames(iHeatSAFMAlphaNum) + "=\"" +
    3991           0 :                                       state.dataIPShortCut->cAlphaArgs(iHeatSAFMAlphaNum) + "\".");
    3992           0 :                 ShowContinueError(state,
    3993             :                                   "... valid values are DesignDay, Flow/System, FlowPerFloorArea, FractionOfAutosizedHeatingAirflow, or "
    3994             :                                   "FlowPerHeatingCapacity.");
    3995           0 :                 ErrorsFound = true;
    3996             :             }
    3997             :         }
    3998             :         {
    3999        1878 :             auto const systemOAMethod(state.dataIPShortCut->cAlphaArgs(iSystemOASMethodAlphaNum));
    4000         939 :             if (systemOAMethod == "ZONESUM") {
    4001         929 :                 SysSizInput(SysSizIndex).SystemOAMethod = SysOAMethod::ZoneSum;
    4002          10 :             } else if (systemOAMethod == "STANDARD62.1VENTILATIONRATEPROCEDURE") {
    4003           7 :                 SysSizInput(SysSizIndex).SystemOAMethod = SysOAMethod::VRP;
    4004           7 :                 if (SysSizInput(SysSizIndex).loadSizingType == DataSizing::LoadSizing::Ventilation) {
    4005           0 :                     ShowWarningError(
    4006           0 :                         state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(iNameAlphaNum) + "\", invalid combination of inputs.");
    4007           0 :                     ShowContinueError(state,
    4008           0 :                                       state.dataIPShortCut->cAlphaFieldNames(iLoadTypeSizeAlphaNum) + " = " +
    4009           0 :                                           state.dataIPShortCut->cAlphaArgs(iLoadTypeSizeAlphaNum) + " and " +
    4010           0 :                                           state.dataIPShortCut->cAlphaFieldNames(iSystemOASMethodAlphaNum) + " = " +
    4011           0 :                                           state.dataIPShortCut->cAlphaArgs(iSystemOASMethodAlphaNum) + ".");
    4012           0 :                     ShowContinueError(state, "Resetting System Outdoor Air Method to ZoneSum.");
    4013           0 :                     SysSizInput(SysSizIndex).SystemOAMethod = SysOAMethod::ZoneSum;
    4014             :                 } else {
    4015           7 :                     if (SysSizInput(SysSizIndex).DesOutAirVolFlow > 0) {
    4016           0 :                         ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(iNameAlphaNum) + "\", invalid data.");
    4017           0 :                         ShowContinueError(state,
    4018           0 :                                           "SystemOAMethod is set to VRP and " + state.dataIPShortCut->cNumericFieldNames(iDesignOAVolFlowNumericNum) +
    4019             :                                               " > 0, user entry will be ignored.");
    4020             :                     }
    4021             :                 }
    4022           3 :             } else if (systemOAMethod == "STANDARD62.1SIMPLIFIEDPROCEDURE") {
    4023           3 :                 SysSizInput(SysSizIndex).SystemOAMethod = SysOAMethod::SP;
    4024             :             } else {
    4025           0 :                 ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(iNameAlphaNum) + "\", invalid data.");
    4026           0 :                 ShowContinueError(state,
    4027           0 :                                   "... incorrect " + state.dataIPShortCut->cAlphaFieldNames(iSystemOASMethodAlphaNum) + "=\"" +
    4028           0 :                                       state.dataIPShortCut->cAlphaArgs(iSystemOASMethodAlphaNum) + "\".");
    4029           0 :                 ShowContinueError(state, "... valid values are ZoneSum or Standard62.1VentilationRateProcedure.");
    4030           0 :                 ErrorsFound = true;
    4031             :             }
    4032             :         }
    4033             : 
    4034             :         // Determine SysSizInput electric Cooling design capacity sizing method
    4035         939 :         if (UtilityRoutines::SameString(state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum), "COOLINGDESIGNCAPACITY")) {
    4036         938 :             SysSizInput(SysSizIndex).CoolingCapMethod = CoolingDesignCapacity;
    4037             :             // SysSizInput( SysSizIndex ).ScaledCoolingCapacity = AutoSize can be set to autosize cooling capacity
    4038         938 :             SysSizInput(SysSizIndex).ScaledCoolingCapacity = state.dataIPShortCut->rNumericArgs(iCoolDesignCapacityNumericNum);
    4039         938 :             if (SysSizInput(SysSizIndex).ScaledCoolingCapacity < 0.0 && SysSizInput(SysSizIndex).ScaledCoolingCapacity != AutoSize) {
    4040           0 :                 ShowSevereError(state, cCurrentModuleObject + " = " + SysSizInput(SysSizIndex).AirPriLoopName);
    4041           0 :                 ShowContinueError(state,
    4042           0 :                                   format("Illegal {} = {:.7T}",
    4043           0 :                                          state.dataIPShortCut->cNumericFieldNames(iCoolDesignCapacityNumericNum),
    4044           0 :                                          state.dataIPShortCut->rNumericArgs(iCoolDesignCapacityNumericNum)));
    4045           0 :                 ErrorsFound = true;
    4046             :             }
    4047           1 :         } else if (UtilityRoutines::SameString(state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum), "CAPACITYPERFLOORAREA")) {
    4048           0 :             SysSizInput(SysSizIndex).CoolingCapMethod = CapacityPerFloorArea;
    4049           0 :             if (!state.dataIPShortCut->lNumericFieldBlanks(iCoolCapacityPerFloorAreaNumericNum)) {
    4050           0 :                 SysSizInput(SysSizIndex).ScaledCoolingCapacity = state.dataIPShortCut->rNumericArgs(iCoolCapacityPerFloorAreaNumericNum);
    4051           0 :                 if (SysSizInput(SysSizIndex).ScaledCoolingCapacity <= 0.0) {
    4052           0 :                     ShowSevereError(state, cCurrentModuleObject + " = " + SysSizInput(SysSizIndex).AirPriLoopName);
    4053           0 :                     ShowContinueError(state,
    4054           0 :                                       "Input for " + state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum) + " = " +
    4055           0 :                                           state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum));
    4056           0 :                     ShowContinueError(state,
    4057           0 :                                       format("Illegal {} = {:.7T}",
    4058           0 :                                              state.dataIPShortCut->cNumericFieldNames(iCoolCapacityPerFloorAreaNumericNum),
    4059           0 :                                              state.dataIPShortCut->rNumericArgs(iCoolCapacityPerFloorAreaNumericNum)));
    4060           0 :                     ErrorsFound = true;
    4061           0 :                 } else if (SysSizInput(SysSizIndex).ScaledCoolingCapacity == AutoSize) {
    4062           0 :                     ShowSevereError(state, cCurrentModuleObject + " = " + SysSizInput(SysSizIndex).AirPriLoopName);
    4063           0 :                     ShowContinueError(state,
    4064           0 :                                       "Input for " + state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum) + " = " +
    4065           0 :                                           state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum));
    4066           0 :                     ShowContinueError(state,
    4067           0 :                                       "Illegal " + state.dataIPShortCut->cNumericFieldNames(iCoolCapacityPerFloorAreaNumericNum) + " = Autosize");
    4068           0 :                     ErrorsFound = true;
    4069             :                 }
    4070             :             } else {
    4071           0 :                 ShowSevereError(state, cCurrentModuleObject + " = " + SysSizInput(SysSizIndex).AirPriLoopName);
    4072           0 :                 ShowContinueError(state,
    4073           0 :                                   "Input for " + state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum) + " = " +
    4074           0 :                                       state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum));
    4075           0 :                 ShowContinueError(state,
    4076           0 :                                   "Blank field not allowed for " + state.dataIPShortCut->cNumericFieldNames(iCoolCapacityPerFloorAreaNumericNum));
    4077           0 :                 ErrorsFound = true;
    4078             :             }
    4079           1 :         } else if (UtilityRoutines::SameString(state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum), "FRACTIONOFAUTOSIZEDCOOLINGCAPACITY")) {
    4080           1 :             SysSizInput(SysSizIndex).CoolingCapMethod = FractionOfAutosizedCoolingCapacity;
    4081           1 :             if (!state.dataIPShortCut->lNumericFieldBlanks(iCoolFracOfAutosizedCapacityNumericNum)) {
    4082           1 :                 SysSizInput(SysSizIndex).ScaledCoolingCapacity = state.dataIPShortCut->rNumericArgs(iCoolFracOfAutosizedCapacityNumericNum);
    4083           1 :                 if (SysSizInput(SysSizIndex).ScaledCoolingCapacity < 0.0) {
    4084           0 :                     ShowSevereError(state, cCurrentModuleObject + " = " + SysSizInput(SysSizIndex).AirPriLoopName);
    4085           0 :                     ShowContinueError(state,
    4086           0 :                                       format("Illegal {} = {:.7T}",
    4087           0 :                                              state.dataIPShortCut->cNumericFieldNames(iCoolFracOfAutosizedCapacityNumericNum),
    4088           0 :                                              state.dataIPShortCut->rNumericArgs(iCoolFracOfAutosizedCapacityNumericNum)));
    4089           0 :                     ErrorsFound = true;
    4090             :                 }
    4091             :             } else {
    4092           0 :                 ShowSevereError(state, cCurrentModuleObject + " = " + SysSizInput(SysSizIndex).AirPriLoopName);
    4093           0 :                 ShowContinueError(state,
    4094           0 :                                   "Input for " + state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum) + " = " +
    4095           0 :                                       state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum));
    4096           0 :                 ShowContinueError(state,
    4097           0 :                                   "Blank field not allowed for " + state.dataIPShortCut->cNumericFieldNames(iCoolFracOfAutosizedCapacityNumericNum));
    4098           0 :                 ErrorsFound = true;
    4099             :             }
    4100           0 :         } else if (UtilityRoutines::SameString(state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum), "NONE")) {
    4101           0 :             SysSizInput(SysSizIndex).CoolingCapMethod = None;
    4102           0 :             SysSizInput(SysSizIndex).ScaledCoolingCapacity = 0.0;
    4103             :         } else {
    4104           0 :             ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(iNameAlphaNum) + "\", invalid data.");
    4105           0 :             ShowContinueError(state,
    4106           0 :                               "... incorrect " + state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum) + "=\"" +
    4107           0 :                                   state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum) + "\".");
    4108           0 :             ShowContinueError(state,
    4109             :                               "... valid values are CoolingDesignCapacity, CapacityPerFloorArea, FractionOfAutosizedCoolingCapacity, or None.");
    4110           0 :             ErrorsFound = true;
    4111             :         }
    4112             : 
    4113             :         // Determine SysSizInput electric heating design capacity sizing method
    4114         939 :         if (UtilityRoutines::SameString(state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum), "HEATINGDESIGNCAPACITY")) {
    4115         938 :             SysSizInput(SysSizIndex).HeatingCapMethod = HeatingDesignCapacity;
    4116             :             // SysSizInput( SysSizIndex ).ScaledHeatingCapacity = AutoSize can be set to autosize heating capacity
    4117         938 :             SysSizInput(SysSizIndex).ScaledHeatingCapacity = state.dataIPShortCut->rNumericArgs(iHeatDesignCapacityNumericNum);
    4118         938 :             if (SysSizInput(SysSizIndex).ScaledHeatingCapacity < 0.0 && SysSizInput(SysSizIndex).ScaledHeatingCapacity != AutoSize) {
    4119           0 :                 ShowSevereError(state, cCurrentModuleObject + " = " + SysSizInput(SysSizIndex).AirPriLoopName);
    4120           0 :                 ShowContinueError(state,
    4121           0 :                                   format("Illegal {} = {:.7T}",
    4122           0 :                                          state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum),
    4123           0 :                                          state.dataIPShortCut->rNumericArgs(iHeatDesignCapacityNumericNum)));
    4124           0 :                 ErrorsFound = true;
    4125             :             }
    4126           1 :         } else if (UtilityRoutines::SameString(state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum), "CAPACITYPERFLOORAREA")) {
    4127           0 :             SysSizInput(SysSizIndex).HeatingCapMethod = CapacityPerFloorArea;
    4128           0 :             if (!state.dataIPShortCut->lNumericFieldBlanks(iHeatCapacityPerFloorAreaNumericNum)) {
    4129           0 :                 SysSizInput(SysSizIndex).ScaledHeatingCapacity = state.dataIPShortCut->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum);
    4130           0 :                 if (SysSizInput(SysSizIndex).ScaledHeatingCapacity <= 0.0) {
    4131           0 :                     ShowSevereError(state, cCurrentModuleObject + " = " + SysSizInput(SysSizIndex).AirPriLoopName);
    4132           0 :                     ShowContinueError(state,
    4133           0 :                                       "Input for " + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum) + " = " +
    4134           0 :                                           state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum));
    4135           0 :                     ShowContinueError(state,
    4136           0 :                                       format("Illegal {} = {:.7T}",
    4137           0 :                                              state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum),
    4138           0 :                                              state.dataIPShortCut->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum)));
    4139           0 :                     ErrorsFound = true;
    4140           0 :                 } else if (SysSizInput(SysSizIndex).ScaledHeatingCapacity == AutoSize) {
    4141           0 :                     ShowSevereError(state, cCurrentModuleObject + " = " + SysSizInput(SysSizIndex).AirPriLoopName);
    4142           0 :                     ShowContinueError(state,
    4143           0 :                                       "Input for " + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum) + " = " +
    4144           0 :                                           state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum));
    4145           0 :                     ShowContinueError(state,
    4146           0 :                                       "Illegal " + state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum) + " = Autosize");
    4147           0 :                     ErrorsFound = true;
    4148             :                 }
    4149             :             } else {
    4150           0 :                 ShowSevereError(state, cCurrentModuleObject + " = " + SysSizInput(SysSizIndex).AirPriLoopName);
    4151           0 :                 ShowContinueError(state,
    4152           0 :                                   "Input for " + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum) + " = " +
    4153           0 :                                       state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum));
    4154           0 :                 ShowContinueError(state,
    4155           0 :                                   "Blank field not allowed for " + state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum));
    4156           0 :                 ErrorsFound = true;
    4157             :             }
    4158           1 :         } else if (UtilityRoutines::SameString(state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum), "FRACTIONOFAUTOSIZEDHEATINGCAPACITY")) {
    4159           1 :             SysSizInput(SysSizIndex).HeatingCapMethod = FractionOfAutosizedHeatingCapacity;
    4160           1 :             if (!state.dataIPShortCut->lNumericFieldBlanks(iHeatFracOfAutosizedCapacityNumericNum)) {
    4161           1 :                 SysSizInput(SysSizIndex).ScaledHeatingCapacity = state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum);
    4162           1 :                 if (SysSizInput(SysSizIndex).ScaledHeatingCapacity < 0.0) {
    4163           0 :                     ShowSevereError(state, cCurrentModuleObject + " = " + SysSizInput(SysSizIndex).AirPriLoopName);
    4164           0 :                     ShowContinueError(state,
    4165           0 :                                       format("Illegal {} = {:.7T}",
    4166           0 :                                              state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum),
    4167           0 :                                              state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum)));
    4168           0 :                     ErrorsFound = true;
    4169             :                 }
    4170             :             } else {
    4171           0 :                 ShowSevereError(state, cCurrentModuleObject + " = " + SysSizInput(SysSizIndex).AirPriLoopName);
    4172           0 :                 ShowContinueError(state,
    4173           0 :                                   "Input for " + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum) + " = " +
    4174           0 :                                       state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum));
    4175           0 :                 ShowContinueError(state,
    4176           0 :                                   "Blank field not allowed for " + state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum));
    4177           0 :                 ErrorsFound = true;
    4178             :             }
    4179           0 :         } else if (UtilityRoutines::SameString(state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum), "NONE")) {
    4180           0 :             SysSizInput(SysSizIndex).HeatingCapMethod = None;
    4181           0 :             SysSizInput(SysSizIndex).ScaledHeatingCapacity = 0.0;
    4182             :         } else {
    4183           0 :             ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(iNameAlphaNum) + "\", invalid data.");
    4184           0 :             ShowContinueError(state,
    4185           0 :                               "... incorrect " + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum) + "=\"" +
    4186           0 :                                   state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum) + "\".");
    4187           0 :             ShowContinueError(state,
    4188             :                               "... valid values are HeatingDesignCapacity, CapacityPerFloorArea, FractionOfAutosizedHeatingCapacity, or None.");
    4189           0 :             ErrorsFound = true;
    4190             :         }
    4191             : 
    4192             :         //  N27; \field Occupant Diversity
    4193             :         //      \type real
    4194             :         //      \maximum 1.0
    4195             :         //      \minimum> 0.0
    4196             :         // int const  iOccupantDiversity = 27;     // N27, \field Occupant Diversity
    4197         939 :         if (state.dataIPShortCut->lNumericFieldBlanks(iOccupantDiversity)) {
    4198         936 :             SysSizInput(SysSizIndex).OccupantDiversity = AutoSize;
    4199           4 :         } else if (state.dataIPShortCut->rNumericArgs(iOccupantDiversity) <= 0.0 &&
    4200           1 :                    state.dataIPShortCut->rNumericArgs(iOccupantDiversity) != AutoSize) {
    4201           0 :             ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(iNameAlphaNum) + "\", invalid data.");
    4202           0 :             ShowContinueError(state,
    4203           0 :                               format("... incorrect {}=[{:.2R}],  value should not be negative.",
    4204           0 :                                      state.dataIPShortCut->cNumericFieldNames(iOccupantDiversity),
    4205           0 :                                      state.dataIPShortCut->rNumericArgs(iOccupantDiversity)));
    4206           0 :             ErrorsFound = true;
    4207           3 :         } else if (state.dataIPShortCut->rNumericArgs(iOccupantDiversity) > 1.0 &&
    4208           0 :                    state.dataIPShortCut->rNumericArgs(iOccupantDiversity) != AutoSize) {
    4209           0 :             ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(iNameAlphaNum) + "\", invalid data.");
    4210           0 :             ShowContinueError(state,
    4211           0 :                               format("... incorrect {}=[{:.2R}],  value should not be greater than 1.0.",
    4212           0 :                                      state.dataIPShortCut->cNumericFieldNames(iOccupantDiversity),
    4213           0 :                                      state.dataIPShortCut->rNumericArgs(iOccupantDiversity)));
    4214           0 :             ErrorsFound = true;
    4215             :         } else {
    4216           3 :             SysSizInput(SysSizIndex).OccupantDiversity = state.dataIPShortCut->rNumericArgs(iOccupantDiversity);
    4217             :         }
    4218             :     }
    4219             : 
    4220         771 :     if (ErrorsFound) {
    4221           0 :         ShowFatalError(state, cCurrentModuleObject + ": Errors found in getting input. Program terminates.");
    4222             :     }
    4223         771 : }
    4224             : 
    4225         771 : void GetPlantSizingInput(EnergyPlusData &state)
    4226             : {
    4227             : 
    4228             :     // SUBROUTINE INFORMATION:
    4229             :     //       AUTHOR         Fred Buhl
    4230             :     //       DATE WRITTEN   October 2001
    4231             :     //       MODIFIED       na
    4232             :     //       RE-ENGINEERED  na
    4233             : 
    4234             :     // PURPOSE OF THIS SUBROUTINE:
    4235             :     // Obtains input data for Plant Sizing objects and stores it in
    4236             :     // appropriate data structures.
    4237             : 
    4238             :     // METHODOLOGY EMPLOYED:
    4239             :     // Uses InputProcessor "Get" routines to obtain data.
    4240             : 
    4241             :     // Using/Aliasing
    4242             : 
    4243             :     // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
    4244             :     int PltSizIndex;         // loop index
    4245             :     int NumAlphas;           // Number of Alphas for each GetObjectItem call
    4246             :     int NumNumbers;          // Number of Numbers for each GetObjectItem call
    4247             :     int IOStatus;            // Used in GetObjectItem
    4248         771 :     bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
    4249             :     int NumDesDays;          // Number of design days in input
    4250         771 :     auto &cCurrentModuleObject = state.dataIPShortCut->cCurrentModuleObject;
    4251         771 :     cCurrentModuleObject = "Sizing:Plant";
    4252         771 :     state.dataSize->NumPltSizInput = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject);
    4253             : 
    4254         771 :     if (state.dataSize->NumPltSizInput > 0) {
    4255        1276 :         NumDesDays = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, "SizingPeriod:DesignDay") +
    4256         638 :                      state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, "SizingPeriod:WeatherFileDays") +
    4257         638 :                      state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, "SizingPeriod:WeatherFileConditionType");
    4258         319 :         if (NumDesDays == 0 && state.dataGlobal->DoPlantSizing) {
    4259           0 :             ShowSevereError(state, "Plant Sizing calculations need SizingPeriod:* input");
    4260           0 :             ErrorsFound = true;
    4261             :         }
    4262         319 :         state.dataSize->PlantSizData.allocate(state.dataSize->NumPltSizInput);
    4263        1084 :         for (auto &e : state.dataSize->PlantSizData) {
    4264         765 :             e.PlantLoopName.clear();
    4265         765 :             e.ExitTemp = 0.0;
    4266         765 :             e.DeltaT = 0.0;
    4267         765 :             e.LoopType = 0;
    4268         765 :             e.DesVolFlowRate = 0.0;
    4269             :         }
    4270        1084 :         for (int i = 1; i <= state.dataSize->NumPltSizInput; ++i) {
    4271         765 :             state.dataSize->PlantSizData(i).ConcurrenceOption = NonCoincident;
    4272         765 :             state.dataSize->PlantSizData(i).NumTimeStepsInAvg = 1;
    4273             :         }
    4274             :     }
    4275             : 
    4276        1536 :     for (PltSizIndex = 1; PltSizIndex <= state.dataSize->NumPltSizInput; ++PltSizIndex) {
    4277        5355 :         state.dataInputProcessing->inputProcessor->getObjectItem(state,
    4278             :                                                                  cCurrentModuleObject,
    4279             :                                                                  PltSizIndex,
    4280         765 :                                                                  state.dataIPShortCut->cAlphaArgs,
    4281             :                                                                  NumAlphas,
    4282         765 :                                                                  state.dataIPShortCut->rNumericArgs,
    4283             :                                                                  NumNumbers,
    4284             :                                                                  IOStatus,
    4285         765 :                                                                  state.dataIPShortCut->lNumericFieldBlanks,
    4286         765 :                                                                  state.dataIPShortCut->lAlphaFieldBlanks,
    4287         765 :                                                                  state.dataIPShortCut->cAlphaFieldNames,
    4288         765 :                                                                  state.dataIPShortCut->cNumericFieldNames);
    4289         765 :         UtilityRoutines::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), cCurrentModuleObject, ErrorsFound);
    4290             : 
    4291         765 :         state.dataSize->PlantSizData(PltSizIndex).PlantLoopName = state.dataIPShortCut->cAlphaArgs(1);
    4292         765 :         state.dataSize->PlantSizData(PltSizIndex).ExitTemp = state.dataIPShortCut->rNumericArgs(1);
    4293         765 :         state.dataSize->PlantSizData(PltSizIndex).DeltaT = state.dataIPShortCut->rNumericArgs(2);
    4294         765 :         if (NumNumbers > 2) {
    4295          45 :             state.dataSize->PlantSizData(PltSizIndex).NumTimeStepsInAvg = state.dataIPShortCut->rNumericArgs(3);
    4296             :         } else {
    4297         720 :             state.dataSize->PlantSizData(PltSizIndex).NumTimeStepsInAvg = 1.0;
    4298             :         }
    4299             : 
    4300             :         {
    4301        1530 :             auto const loopType(state.dataIPShortCut->cAlphaArgs(2));
    4302         765 :             if (loopType == "HEATING") {
    4303         363 :                 state.dataSize->PlantSizData(PltSizIndex).LoopType = HeatingLoop;
    4304         402 :             } else if (loopType == "COOLING") {
    4305         242 :                 state.dataSize->PlantSizData(PltSizIndex).LoopType = CoolingLoop;
    4306         160 :             } else if (loopType == "CONDENSER") {
    4307         153 :                 state.dataSize->PlantSizData(PltSizIndex).LoopType = CondenserLoop;
    4308           7 :             } else if (loopType == "STEAM") {
    4309           7 :                 state.dataSize->PlantSizData(PltSizIndex).LoopType = SteamLoop;
    4310             :             } else {
    4311           0 :                 ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\", invalid data.");
    4312           0 :                 ShowContinueError(state,
    4313           0 :                                   "...incorrect " + state.dataIPShortCut->cAlphaFieldNames(2) + "=\"" + state.dataIPShortCut->cAlphaArgs(2) + "\".");
    4314           0 :                 ShowContinueError(state, R"(...Valid values are "Heating", "Cooling", "Condenser" or "Steam".)");
    4315           0 :                 ErrorsFound = true;
    4316             :             }
    4317             :         }
    4318             : 
    4319         765 :         if (NumAlphas > 2) {
    4320             :             {
    4321          90 :                 auto const concurrenceOption(state.dataIPShortCut->cAlphaArgs(3));
    4322          45 :                 if (concurrenceOption == "NONCOINCIDENT") {
    4323           6 :                     state.dataSize->PlantSizData(PltSizIndex).ConcurrenceOption = NonCoincident;
    4324          39 :                 } else if (concurrenceOption == "COINCIDENT") {
    4325          39 :                     state.dataSize->PlantSizData(PltSizIndex).ConcurrenceOption = Coincident;
    4326             :                 } else {
    4327           0 :                     ShowSevereError(state, cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\", invalid data.");
    4328           0 :                     ShowContinueError(
    4329           0 :                         state, "...incorrect " + state.dataIPShortCut->cAlphaFieldNames(3) + "=\"" + state.dataIPShortCut->cAlphaArgs(3) + "\".");
    4330           0 :                     ShowContinueError(state, R"(...Valid values are "NonCoincident" or "Coincident".)");
    4331           0 :                     ErrorsFound = true;
    4332             :                 }
    4333             :             }
    4334             :         }
    4335         765 :         if (NumAlphas > 3) {
    4336             :             {
    4337          90 :                 auto const sizingFactorOption(state.dataIPShortCut->cAlphaArgs(4));
    4338          45 :                 if (sizingFactorOption == "NONE") {
    4339          40 :                     state.dataSize->PlantSizData(PltSizIndex).SizingFactorOption = NoSizingFactorMode;
    4340           5 :                 } else if (sizingFactorOption == "GLOBALHEATINGSIZINGFACTOR") {
    4341           0 :                     state.dataSize->PlantSizData(PltSizIndex).SizingFactorOption = GlobalHeatingSizingFactorMode;
    4342           5 :                 } else if (sizingFactorOption == "GLOBALCOOLINGSIZINGFACTOR") {
    4343           5 :                     state.dataSize->PlantSizData(PltSizIndex).SizingFactorOption = GlobalCoolingSizingFactorMode;
    4344           0 :                 } else if (sizingFactorOption == "LOOPCOMPONENTSIZINGFACTOR") {
    4345           0 :                     state.dataSize->PlantSizData(PltSizIndex).SizingFactorOption = LoopComponentSizingFactorMode;
    4346             :                 }
    4347             :             }
    4348             :         }
    4349        2295 :         SetupEMSInternalVariable(state,
    4350             :                                  "Plant Design Volume Flow Rate",
    4351         765 :                                  state.dataSize->PlantSizData(PltSizIndex).PlantLoopName,
    4352             :                                  "[m3/s]",
    4353        2295 :                                  state.dataSize->PlantSizData(PltSizIndex).DesVolFlowRate);
    4354             :     }
    4355             : 
    4356         771 :     if (ErrorsFound) {
    4357           0 :         ShowFatalError(state, cCurrentModuleObject + ": Errors found in getting input. Program terminates.");
    4358             :     }
    4359         771 : }
    4360             : 
    4361         406 : void SetupZoneSizing(EnergyPlusData &state, bool &ErrorsFound)
    4362             : {
    4363             : 
    4364             :     // SUBROUTINE INFORMATION:
    4365             :     //       AUTHOR         L. Lawrie/F. Buhl
    4366             :     //       DATE WRITTEN   March 2010
    4367             :     //       MODIFIED       na
    4368             :     //       RE-ENGINEERED  na
    4369             : 
    4370             :     // PURPOSE OF THIS SUBROUTINE:
    4371             :     //  execute a few (1) time steps of a simulation to facilitate setting up model for zone sizing
    4372             :     //  developed to resolve reverse DD problems caused be the differences
    4373             :     //  that stem from setup and information gathering that occurs during the first pass.
    4374             : 
    4375             :     // METHODOLOGY EMPLOYED:
    4376             :     // Using global flag (kickoff sizing simulation), only a few time steps are executed.
    4377             :     // global flag is used in other parts of simulation to terminate quickly.
    4378             : 
    4379         406 :     bool Available = true;
    4380             : 
    4381         406 :     state.dataSize->CurOverallSimDay = 0;
    4382        2082 :     while (Available) { // do for each environment
    4383             : 
    4384        1244 :         GetNextEnvironment(state, Available, ErrorsFound);
    4385             : 
    4386        1244 :         if (!Available) break;
    4387         839 :         if (ErrorsFound) break;
    4388             : 
    4389             :         // check that environment is one of the design days
    4390         839 :         if (state.dataGlobal->KindOfSim == DataGlobalConstants::KindOfSim::RunPeriodWeather) {
    4391           0 :             continue;
    4392             :         }
    4393             : 
    4394         839 :         state.dataGlobal->BeginEnvrnFlag = true;
    4395         839 :         state.dataGlobal->EndEnvrnFlag = false;
    4396         839 :         state.dataEnvrn->EndMonthFlag = false;
    4397         839 :         state.dataGlobal->WarmupFlag = true;
    4398         839 :         state.dataGlobal->DayOfSim = 0;
    4399             : 
    4400         839 :         state.dataSize->CurEnvirNumSimDay = 1;
    4401         839 :         ++state.dataSize->CurOverallSimDay;
    4402             : 
    4403         839 :         ++state.dataGlobal->DayOfSim;
    4404         839 :         state.dataGlobal->BeginDayFlag = true;
    4405         839 :         state.dataGlobal->EndDayFlag = false;
    4406             : 
    4407         839 :         state.dataGlobal->HourOfDay = 1;
    4408             : 
    4409         839 :         state.dataGlobal->BeginHourFlag = true;
    4410         839 :         state.dataGlobal->EndHourFlag = false;
    4411             : 
    4412         839 :         state.dataGlobal->TimeStep = 1;
    4413             : 
    4414         839 :         state.dataGlobal->BeginTimeStepFlag = true;
    4415             : 
    4416         839 :         ManageWeather(state);
    4417             : 
    4418         839 :         ManageHeatBalance(state);
    4419             : 
    4420         838 :         state.dataGlobal->BeginHourFlag = false;
    4421         838 :         state.dataGlobal->BeginDayFlag = false;
    4422         838 :         state.dataGlobal->BeginEnvrnFlag = false;
    4423         838 :         state.dataGlobal->BeginSimFlag = false;
    4424             : 
    4425             :         //          ! do another timestep=1
    4426         838 :         ManageWeather(state);
    4427             : 
    4428         838 :         ManageHeatBalance(state);
    4429             : 
    4430             :         //         do an end of day, end of environment time step
    4431             : 
    4432         838 :         state.dataGlobal->HourOfDay = 24;
    4433         838 :         state.dataGlobal->TimeStep = state.dataGlobal->NumOfTimeStepInHour;
    4434         838 :         state.dataGlobal->EndEnvrnFlag = true;
    4435             : 
    4436         838 :         ManageWeather(state);
    4437             : 
    4438         838 :         ManageHeatBalance(state);
    4439             : 
    4440             :     } // ... End environment loop.
    4441         405 : }
    4442             : 
    4443        6561 : void ReportZoneSizing(EnergyPlusData &state,
    4444             :                       std::string const &ZoneName,   // the name of the zone
    4445             :                       std::string const &LoadType,   // the description of the input variable
    4446             :                       Real64 const CalcDesLoad,      // the value from the sizing calculation [W]
    4447             :                       Real64 const UserDesLoad,      // the value from the sizing calculation modified by user input [W]
    4448             :                       Real64 const CalcDesFlow,      // calculated design air flow rate [m3/s]
    4449             :                       Real64 const UserDesFlow,      // user input or modified design air flow rate [m3/s]
    4450             :                       std::string const &DesDayName, // the name of the design day that produced the peak
    4451             :                       std::string const &PeakHrMin,  // time stamp of the peak
    4452             :                       Real64 const PeakTemp,         // temperature at peak [C]
    4453             :                       Real64 const PeakHumRat,       // humidity ratio at peak [kg water/kg dry air]
    4454             :                       Real64 const FloorArea,        // zone floor area [m2]
    4455             :                       Real64 const TotOccs,          // design number of occupants for the zone
    4456             :                       Real64 const MinOAVolFlow,     // zone design minimum outside air flow rate [m3/s]
    4457             :                       Real64 const DOASHeatAddRate   // zone design heat addition rate from the DOAS [W]
    4458             : )
    4459             : {
    4460             : 
    4461             :     // SUBROUTINE INFORMATION:
    4462             :     //       AUTHOR         Fred Buhl
    4463             :     //       DATE WRITTEN   Decenber 2001
    4464             :     //       MODIFIED       August 2008, Greg Stark
    4465             :     //       RE-ENGINEERED  na
    4466             : 
    4467             :     // PURPOSE OF THIS SUBROUTINE:
    4468             :     // This subroutine writes one item of zone sizing data to the "eio" file..
    4469             : 
    4470        6561 :     if (state.dataSizingManager->ReportZoneSizingMyOneTimeFlag) {
    4471             :         static constexpr std::string_view Format_990(
    4472             :             "! <Zone Sizing Information>, Zone Name, Load Type, Calc Des Load {W}, User Des Load {W}, Calc Des Air Flow "
    4473             :             "Rate {m3/s}, User Des Air Flow Rate {m3/s}, Design Day Name, Date/Time of Peak, Temperature at Peak {C}, "
    4474             :             "Humidity Ratio at Peak {kgWater/kgDryAir}, Floor Area {m2}, # Occupants, Calc Outdoor Air Flow Rate {m3/s}, "
    4475             :             "Calc DOAS Heat Addition Rate {W}");
    4476         404 :         print(state.files.eio, "{}\n", Format_990);
    4477         404 :         state.dataSizingManager->ReportZoneSizingMyOneTimeFlag = false;
    4478             :     }
    4479             : 
    4480             :     static constexpr std::string_view Format_991(
    4481             :         " Zone Sizing Information, {}, {}, {:.5R}, {:.5R}, {:.5R}, {:.5R}, {}, {}, {:.5R}, {:.5R}, {:.5R}, {:.5R}, {:.5R}, {:.5R}\n");
    4482        6561 :     print(state.files.eio,
    4483             :           Format_991,
    4484             :           ZoneName,
    4485             :           LoadType,
    4486             :           CalcDesLoad,
    4487             :           UserDesLoad,
    4488             :           CalcDesFlow,
    4489             :           UserDesFlow,
    4490             :           DesDayName,
    4491             :           PeakHrMin,
    4492             :           PeakTemp,
    4493             :           PeakHumRat,
    4494             :           FloorArea,
    4495             :           TotOccs,
    4496             :           MinOAVolFlow,
    4497             :           DOASHeatAddRate);
    4498             : 
    4499             :     // BSLLC Start
    4500        6561 :     if (state.dataSQLiteProcedures->sqlite) {
    4501        2180 :         state.dataSQLiteProcedures->sqlite->addSQLiteZoneSizingRecord(ZoneName,
    4502             :                                                                       LoadType,
    4503             :                                                                       CalcDesLoad,
    4504             :                                                                       UserDesLoad,
    4505             :                                                                       CalcDesFlow,
    4506             :                                                                       UserDesFlow,
    4507             :                                                                       DesDayName,
    4508             :                                                                       PeakHrMin,
    4509             :                                                                       PeakTemp,
    4510             :                                                                       PeakHumRat,
    4511             :                                                                       MinOAVolFlow,
    4512             :                                                                       DOASHeatAddRate);
    4513             :     }
    4514             :     // BSLLC Finish
    4515        6561 : }
    4516             : 
    4517             : // Writes system sizing data to EIO file using one row per system
    4518        1850 : void ReportSysSizing(EnergyPlusData &state,
    4519             :                      std::string const &SysName,      // the name of the zone
    4520             :                      std::string const &LoadType,     // either "Cooling" or "Heating"
    4521             :                      std::string const &PeakLoadKind, // either "Sensible" or "Total"
    4522             :                      Real64 const UserDesCap,         // User  Design Capacity
    4523             :                      Real64 const CalcDesVolFlow,     // Calculated  Design Air Flow Rate
    4524             :                      Real64 const UserDesVolFlow,     // User Design Air Flow Rate
    4525             :                      std::string const &DesDayName,   // the name of the design day that produced the peak
    4526             :                      std::string const &DesDayDate,   // the date that produced the peak
    4527             :                      int const TimeStepIndex          // time step of the peak
    4528             : )
    4529             : {
    4530             : 
    4531        1850 :     if (state.dataSizingManager->ReportSysSizingMyOneTimeFlag) {
    4532         329 :         print(state.files.eio,
    4533             :               "{}\n",
    4534             :               "! <System Sizing Information>, System Name, Load Type, Peak Load Kind, User Design Capacity, Calc Des Air "
    4535         329 :               "Flow Rate [m3/s], User Des Air Flow Rate [m3/s], Design Day Name, Date/Time of Peak");
    4536         329 :         state.dataSizingManager->ReportSysSizingMyOneTimeFlag = false;
    4537             :     }
    4538        3700 :     std::string dateHrMin = DesDayDate + " " + TimeIndexToHrMinString(state, TimeStepIndex);
    4539        1850 :     print(state.files.eio,
    4540             :           " System Sizing Information, {}, {}, {}, {:.2R}, {:.5R}, {:.5R}, {}, {}\n",
    4541             :           SysName,
    4542             :           LoadType,
    4543             :           PeakLoadKind,
    4544             :           UserDesCap,
    4545             :           CalcDesVolFlow,
    4546             :           UserDesVolFlow,
    4547             :           DesDayName,
    4548        1850 :           dateHrMin);
    4549             : 
    4550             :     // BSLLC Start
    4551        1850 :     if (state.dataSQLiteProcedures->sqlite)
    4552         512 :         state.dataSQLiteProcedures->sqlite->addSQLiteSystemSizingRecord(
    4553             :             SysName, LoadType, PeakLoadKind, UserDesCap, CalcDesVolFlow, UserDesVolFlow, DesDayName, dateHrMin);
    4554             :     // BSLLC Finish
    4555        1850 : }
    4556             : 
    4557             : // convert an index for the timestep of the day into a hour minute string in the format 00:00
    4558        1850 : std::string TimeIndexToHrMinString(EnergyPlusData &state, int timeIndex)
    4559             : {
    4560        1850 :     int tMinOfDay = timeIndex * state.dataGlobal->MinutesPerTimeStep;
    4561        1850 :     int tHr = int(tMinOfDay / 60.);
    4562        1850 :     int tMin = tMinOfDay - tHr * 60;
    4563        1850 :     return format(PeakHrMinFmt, tHr, tMin);
    4564             : }
    4565             : 
    4566         771 : void GetZoneHVACSizing(EnergyPlusData &state)
    4567             : {
    4568             :     // SUBROUTINE INFORMATION:
    4569             :     //       AUTHOR         B. Nigusse - FSEC
    4570             :     //       DATE WRITTEN   July 2014
    4571             :     //       MODIFIED       na
    4572             :     //       RE-ENGINEERED  na
    4573             : 
    4574             :     // PURPOSE OF THIS SUBROUTINE:
    4575             :     // Obtains input data for the ZoneHVAC sizing methods object and stores it in
    4576             :     // appropriate data structure.
    4577             : 
    4578             :     // METHODOLOGY EMPLOYED:
    4579             :     // Uses InputProcessor "Get" routines to obtain data.
    4580             :     // This object requires only a name where the default values are assumed
    4581             :     // if subsequent fields are not entered.
    4582             : 
    4583             :     // Using/Aliasing
    4584             : 
    4585             :     // SUBROUTINE PARAMETER DEFINITIONS:
    4586             :     static constexpr std::string_view RoutineName("GetZoneHVACSizing: "); // include trailing blank space
    4587             : 
    4588             :     // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
    4589             : 
    4590             :     int iHeatSAFMAlphaNum;                     // get input index to Zone HVAC sizing heat supp air flow method
    4591             :     int iCoolSAFMAlphaNum;                     // get input index to Zone HVAC sizing cool supp air flow method
    4592             :     int iMaxCoolAirVolFlowNumericNum;          // get input index to Zone HVAC sizing cool supply air flow
    4593             :     int iMaxHeatAirVolFlowNumericNum;          // get input index to Zone HVAC sizing heat supply air flow
    4594             :     int iNoCoolHeatSAFMAlphaNum;               // get input index to Zone HVAC sizing no cool/heat supply air flow
    4595             :     int iMaxNoCoolHeatAirVolFlowNumericNum;    // get input index to Zone HVAC sizing no cool/heat supply air flow
    4596             :     int iCoolFlowPerFloorAreaNumericNum;       // get input index to Zone HVAC sizing cool flow per floor area
    4597             :     int iCoolFlowPerFracCoolNumericNum;        // get input index to Zone HVAC sizing cool flow per fraction cool
    4598             :     int iCoolFlowPerCoolCapNumericNum;         // get input index to Zone HVAC sizing cool flow per cooling cap
    4599             :     int iHeatFlowPerFloorAreaNumericNum;       // get input index to Zone HVAC sizing heat flow per floor area
    4600             :     int iHeatFlowPerFracCoolNumericNum;        // get input index to Zone HVAC sizing heat flow per fraction heat
    4601             :     int iHeatFlowPerHeatCapNumericNum;         // get input index to Zone HVAC sizing heat flow per heating cap
    4602             :     int iNoCoolHeatFlowPerFloorAreaNumericNum; // get input index to Zone HVAC sizing no cool/heat FPA
    4603             :     int iNoCoolHeatFlowPerFracCoolNumericNum;  // get input index to Zone HVAC sizing no cool/heat FPFC
    4604             :     int iNoCoolHeatFlowPerFracHeatNumericNum;  // get input index to Zone HVAC sizing no cool/heat FPFH
    4605             : 
    4606             :     int iCoolCAPMAlphaNum;                      // get input index to Zone HVAC sizing chilled water flow method
    4607             :     int iCoolDesignCapacityNumericNum;          // get input index to Zone HVAC sizing chilled water flow
    4608             :     int iCoolCapacityPerFloorAreaNumericNum;    // get input index to Zone HVAC sizing cooling capacity per floor area
    4609             :     int iCoolFracOfAutosizedCapacityNumericNum; // get input index to Zone HVAC sizing capacity as fraction autozized cooling capacity
    4610             : 
    4611             :     int iHeatCAPMAlphaNum;                      // get input index to Zone HVAC sizing heating capacity
    4612             :     int iHeatDesignCapacityNumericNum;          // get input index to Zone HVAC sizing heating design capacity
    4613             :     int iHeatCapacityPerFloorAreaNumericNum;    // get input index to Zone HVAC sizing heating capacity per floor area
    4614             :     int iHeatFracOfAutosizedCapacityNumericNum; // get input index to Zone HVAC sizing capacity as fraction autozized cooling capacity
    4615             : 
    4616         771 :     iCoolSAFMAlphaNum = 2;               // get input index to Zone HVAC sizing heat supp air flow method
    4617         771 :     iMaxCoolAirVolFlowNumericNum = 1;    // get input index to Zone HVAC sizing cool supply air flow
    4618         771 :     iCoolFlowPerFloorAreaNumericNum = 2; // get input index to Zone HVAC sizing cool flow per floor area
    4619         771 :     iCoolFlowPerFracCoolNumericNum = 3;  // get input index to Zone HVAC sizing cool flow per fraction cool
    4620         771 :     iCoolFlowPerCoolCapNumericNum = 4;   // get input index to Zone HVAC sizing cool flow per cooling cap
    4621             : 
    4622         771 :     iNoCoolHeatSAFMAlphaNum = 3;               // get input index to Zone HVAC sizing no cool/heat supply air flow
    4623         771 :     iMaxNoCoolHeatAirVolFlowNumericNum = 5;    // get input index to Zone HVAC sizing no cool/heat supply air flow
    4624         771 :     iNoCoolHeatFlowPerFloorAreaNumericNum = 6; // get input index to Zone HVAC sizing no cool/heat FPA
    4625         771 :     iNoCoolHeatFlowPerFracCoolNumericNum = 7;  // get input index to Zone HVAC sizing no cool/heat FPFC
    4626         771 :     iNoCoolHeatFlowPerFracHeatNumericNum = 8;  // get input index to Zone HVAC sizing no cool/heat FPFH
    4627             : 
    4628         771 :     iHeatSAFMAlphaNum = 4;                // get input index to Zone HVAC sizing cool supp air flow method
    4629         771 :     iMaxHeatAirVolFlowNumericNum = 9;     // get input index to Zone HVAC sizing heat supply air flow
    4630         771 :     iHeatFlowPerFloorAreaNumericNum = 10; // get input index to Zone HVAC sizing heat flow per floor area
    4631         771 :     iHeatFlowPerFracCoolNumericNum = 11;  // get input index to Zone HVAC sizing heat flow per fraction heat
    4632         771 :     iHeatFlowPerHeatCapNumericNum = 12;   // get input index to Zone HVAC sizing heat flow per heating cap
    4633             : 
    4634         771 :     iCoolCAPMAlphaNum = 5;                       // get input index to Zone HVAC sizing cooling design capacity method
    4635         771 :     iCoolDesignCapacityNumericNum = 13;          // get input index to Zone HVAC sizing cooling design capacity
    4636         771 :     iCoolCapacityPerFloorAreaNumericNum = 14;    // get input index to Zone HVAC sizing cooling design capacity per floor area
    4637         771 :     iCoolFracOfAutosizedCapacityNumericNum = 15; // get input index to Zone HVAC sizing as a fraction of cooling design capacity
    4638             : 
    4639         771 :     iHeatCAPMAlphaNum = 6;                       // get input index to Zone HVAC sizing heating capacity
    4640         771 :     iHeatDesignCapacityNumericNum = 16;          // get input index to Zone HVAC sizing heating design capacity
    4641         771 :     iHeatCapacityPerFloorAreaNumericNum = 17;    // get input index to Zone HVAC sizing heating capacity per floor area
    4642         771 :     iHeatFracOfAutosizedCapacityNumericNum = 18; // get input index to Zone HVAC sizing capacity as fraction autozized heating capacity
    4643             : 
    4644             :     int NumAlphas;           // Number of Alphas for each GetObjectItem call
    4645             :     int NumNumbers;          // Number of Numbers for each GetObjectItem call
    4646             :     int TotalArgs;           // Total number of alpha and numeric arguments (max) for a
    4647             :     int IOStatus;            // Used in GetObjectItem
    4648             :     int zSIndex;             // index of "DesignSpecification:ZoneHVAC:Sizing" objects
    4649         771 :     bool ErrorsFound(false); // If errors detected in input
    4650             :     //  REAL(r64) :: CalcAmt
    4651             : 
    4652        1542 :     std::string CurrentModuleObject; // for ease in getting objects
    4653        1542 :     Array1D_string Alphas;           // Alpha input items for object
    4654        1542 :     Array1D_string cAlphaFields;     // Alpha field names
    4655        1542 :     Array1D_string cNumericFields;   // Numeric field names
    4656        1542 :     Array1D<Real64> Numbers;         // Numeric input items for object
    4657        1542 :     Array1D_bool lAlphaBlanks;       // Logical array, alpha field input BLANK = .TRUE.
    4658        1542 :     Array1D_bool lNumericBlanks;     // Logical array, numeric field input BLANK = .TRUE.
    4659             : 
    4660         771 :     CurrentModuleObject = "DesignSpecification:ZoneHVAC:Sizing";
    4661         771 :     state.dataSize->NumZoneHVACSizing = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, CurrentModuleObject);
    4662         771 :     state.dataInputProcessing->inputProcessor->getObjectDefMaxArgs(state, CurrentModuleObject, TotalArgs, NumAlphas, NumNumbers);
    4663             : 
    4664         771 :     Alphas.allocate(NumAlphas);
    4665         771 :     cAlphaFields.allocate(NumAlphas);
    4666         771 :     cNumericFields.allocate(NumNumbers);
    4667         771 :     Numbers.dimension(NumNumbers, 0.0);
    4668         771 :     lAlphaBlanks.dimension(NumAlphas, true);
    4669         771 :     lNumericBlanks.dimension(NumNumbers, true);
    4670             : 
    4671         771 :     if (state.dataSize->NumZoneHVACSizing > 0) {
    4672           1 :         state.dataSize->ZoneHVACSizing.allocate(state.dataSize->NumZoneHVACSizing);
    4673             : 
    4674             :         // Start Loading the System Input
    4675           4 :         for (zSIndex = 1; zSIndex <= state.dataSize->NumZoneHVACSizing; ++zSIndex) {
    4676             : 
    4677           3 :             Alphas = "";
    4678           3 :             cAlphaFields = "";
    4679           3 :             cNumericFields = "";
    4680           3 :             Numbers = 0;
    4681           3 :             lAlphaBlanks = true;
    4682           3 :             lNumericBlanks = true;
    4683             : 
    4684           3 :             state.dataInputProcessing->inputProcessor->getObjectItem(state,
    4685             :                                                                      CurrentModuleObject,
    4686             :                                                                      zSIndex,
    4687             :                                                                      Alphas,
    4688             :                                                                      NumAlphas,
    4689             :                                                                      Numbers,
    4690             :                                                                      NumNumbers,
    4691             :                                                                      IOStatus,
    4692             :                                                                      lNumericBlanks,
    4693             :                                                                      lAlphaBlanks,
    4694             :                                                                      cAlphaFields,
    4695             :                                                                      cNumericFields);
    4696           3 :             UtilityRoutines::IsNameEmpty(state, Alphas(1), CurrentModuleObject, ErrorsFound);
    4697             : 
    4698           3 :             state.dataSize->ZoneHVACSizing(zSIndex).Name = Alphas(1);
    4699             : 
    4700             :             // Determine supply air flow rate sizing method for cooling mode
    4701           3 :             if (UtilityRoutines::SameString(Alphas(iCoolSAFMAlphaNum), "SupplyAirFlowRate")) {
    4702           1 :                 state.dataSize->ZoneHVACSizing(zSIndex).CoolingSAFMethod = SupplyAirFlowRate;
    4703             : 
    4704           1 :                 if (!lNumericBlanks(iMaxCoolAirVolFlowNumericNum)) {
    4705           1 :                     state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow = Numbers(iMaxCoolAirVolFlowNumericNum);
    4706           1 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow == AutoSize)
    4707           1 :                         state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true;
    4708           2 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow <= 0.0 &&
    4709           1 :                         state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow != AutoSize) {
    4710           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4711           0 :                         ShowContinueError(
    4712             :                             state,
    4713           0 :                             format("Illegal {} = {:.7T}", cNumericFields(iMaxCoolAirVolFlowNumericNum), Numbers(iMaxCoolAirVolFlowNumericNum)));
    4714           0 :                         ErrorsFound = true;
    4715             :                     }
    4716             :                 } else {
    4717           0 :                     ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4718           0 :                     ShowContinueError(state, "Input for " + cAlphaFields(iCoolSAFMAlphaNum) + " = " + Alphas(iCoolSAFMAlphaNum));
    4719           0 :                     ShowContinueError(state, "Blank field not allowed for " + cNumericFields(iMaxCoolAirVolFlowNumericNum));
    4720           0 :                     ErrorsFound = true;
    4721             :                 }
    4722           2 :             } else if (UtilityRoutines::SameString(Alphas(iCoolSAFMAlphaNum), "FlowPerFloorArea")) {
    4723           1 :                 state.dataSize->ZoneHVACSizing(zSIndex).CoolingSAFMethod = FlowPerFloorArea;
    4724           1 :                 if (!lNumericBlanks(iCoolFlowPerFloorAreaNumericNum)) {
    4725           1 :                     state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow = Numbers(iCoolFlowPerFloorAreaNumericNum);
    4726           1 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow <= 0.0 &&
    4727           0 :                         state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow != AutoSize) {
    4728           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4729           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iCoolSAFMAlphaNum) + " = " + Alphas(iCoolSAFMAlphaNum));
    4730           0 :                         ShowContinueError(
    4731             :                             state,
    4732           0 :                             format("Illegal {} = {:.7T}", cNumericFields(iCoolFlowPerFloorAreaNumericNum), Numbers(iCoolFlowPerFloorAreaNumericNum)));
    4733           0 :                         ErrorsFound = true;
    4734             :                         // Autosized input is not allowed
    4735           1 :                     } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow == AutoSize) {
    4736           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4737           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iCoolSAFMAlphaNum) + " = " + Alphas(iCoolSAFMAlphaNum));
    4738           0 :                         ShowContinueError(state, "Illegal " + cNumericFields(iCoolFlowPerFloorAreaNumericNum) + " = Autosize");
    4739           0 :                         ErrorsFound = true;
    4740             :                     } else {
    4741             :                         // user input cooling supply air flow per unit conditioned area is saved in ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow
    4742           1 :                         state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true;
    4743             :                     }
    4744             :                 } else {
    4745           0 :                     ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4746           0 :                     ShowContinueError(state, "Input for " + cAlphaFields(iCoolSAFMAlphaNum) + " = " + Alphas(iCoolSAFMAlphaNum));
    4747           0 :                     ShowContinueError(state, "Blank field not allowed for " + cNumericFields(iCoolFlowPerFloorAreaNumericNum));
    4748           0 :                     ErrorsFound = true;
    4749             :                 }
    4750           1 :             } else if (UtilityRoutines::SameString(Alphas(iCoolSAFMAlphaNum), "FractionOfAutosizedCoolingAirflow")) {
    4751           1 :                 state.dataSize->ZoneHVACSizing(zSIndex).CoolingSAFMethod = FractionOfAutosizedCoolingAirflow;
    4752           1 :                 if (!lNumericBlanks(iCoolFlowPerFracCoolNumericNum)) {
    4753           1 :                     state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow = Numbers(iCoolFlowPerFracCoolNumericNum);
    4754           1 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow <= 0.0 &&
    4755           0 :                         state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow != AutoSize) {
    4756           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4757           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iCoolSAFMAlphaNum) + " = " + Alphas(iCoolSAFMAlphaNum));
    4758           0 :                         ShowContinueError(
    4759             :                             state,
    4760           0 :                             format("Illegal {} = {:.7T}", cNumericFields(iCoolFlowPerFracCoolNumericNum), Numbers(iCoolFlowPerFracCoolNumericNum)));
    4761           0 :                         ErrorsFound = true;
    4762             :                         // Autosized input is not allowed
    4763           1 :                     } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow == AutoSize) {
    4764           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4765           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iCoolSAFMAlphaNum) + " = " + Alphas(iCoolSAFMAlphaNum));
    4766           0 :                         ShowContinueError(state, "Illegal " + cNumericFields(iCoolFlowPerFracCoolNumericNum) + " = Autosize");
    4767           0 :                         ErrorsFound = true;
    4768             :                     } else {
    4769             :                         // user input fraction of cooling supply air flow rate is saved in ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow
    4770           1 :                         state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true;
    4771             :                     }
    4772             :                 } else {
    4773           0 :                     ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4774           0 :                     ShowContinueError(state, "Input for " + cAlphaFields(iCoolSAFMAlphaNum) + " = " + Alphas(iCoolSAFMAlphaNum));
    4775           0 :                     ShowContinueError(state, "Blank field not allowed for " + cNumericFields(iCoolFlowPerFracCoolNumericNum));
    4776           0 :                     ErrorsFound = true;
    4777             :                 }
    4778           0 :             } else if (UtilityRoutines::SameString(Alphas(iCoolSAFMAlphaNum), "FlowPerCoolingCapacity")) {
    4779             : 
    4780           0 :                 state.dataSize->ZoneHVACSizing(zSIndex).CoolingSAFMethod = FlowPerCoolingCapacity;
    4781           0 :                 if (!lNumericBlanks(iCoolFlowPerCoolCapNumericNum)) {
    4782           0 :                     state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow = Numbers(iCoolFlowPerCoolCapNumericNum);
    4783           0 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow <= 0.0 &&
    4784           0 :                         state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow != AutoSize) {
    4785           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4786           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iCoolSAFMAlphaNum) + " = " + Alphas(iCoolSAFMAlphaNum));
    4787           0 :                         ShowContinueError(
    4788             :                             state,
    4789           0 :                             format("Illegal {} = {:.7T}", cNumericFields(iCoolFlowPerCoolCapNumericNum), Numbers(iCoolFlowPerCoolCapNumericNum)));
    4790           0 :                         ErrorsFound = true;
    4791             :                         // Autosized input is not allowed
    4792           0 :                     } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow == AutoSize) {
    4793           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4794           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iCoolSAFMAlphaNum) + " = " + Alphas(iCoolSAFMAlphaNum));
    4795           0 :                         ShowContinueError(state, "Illegal " + cNumericFields(iCoolFlowPerCoolCapNumericNum) + " = Autosize");
    4796           0 :                         ErrorsFound = true;
    4797             :                     } else {
    4798             :                         // user input cooling supply air flow per unit cooling capacity is saved in ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow
    4799           0 :                         state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true;
    4800             :                     }
    4801             :                 } else {
    4802           0 :                     ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4803           0 :                     ShowContinueError(state, "Input for " + cAlphaFields(iCoolSAFMAlphaNum) + " = " + Alphas(iCoolSAFMAlphaNum));
    4804           0 :                     ShowContinueError(state, "Blank field not allowed for " + cNumericFields(iCoolFlowPerCoolCapNumericNum));
    4805           0 :                     ErrorsFound = true;
    4806             :                 }
    4807           0 :             } else if (UtilityRoutines::SameString(Alphas(iCoolSAFMAlphaNum), "None") || lAlphaBlanks(iCoolSAFMAlphaNum)) {
    4808           0 :                 state.dataSize->ZoneHVACSizing(zSIndex).CoolingSAFMethod = None;
    4809           0 :                 state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow = 0.0;
    4810             :                 // cooling supply air flow rate will not be sized, may be cooling coil does not exist
    4811             :             } else {
    4812           0 :                 ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4813           0 :                 ShowContinueError(state, "Illegal " + cAlphaFields(iCoolSAFMAlphaNum) + " = " + Alphas(iCoolSAFMAlphaNum));
    4814           0 :                 ErrorsFound = true;
    4815             :             }
    4816             :             // Determine supply air flow rate sizing method for heating mode
    4817           3 :             if (UtilityRoutines::SameString(Alphas(iHeatSAFMAlphaNum), "SupplyAirFlowRate")) {
    4818           1 :                 state.dataSize->ZoneHVACSizing(zSIndex).HeatingSAFMethod = SupplyAirFlowRate;
    4819           1 :                 if (!lNumericBlanks(iMaxHeatAirVolFlowNumericNum)) {
    4820           1 :                     state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow = Numbers(iMaxHeatAirVolFlowNumericNum);
    4821           1 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow == AutoSize)
    4822           1 :                         state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true;
    4823             : 
    4824           2 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow <= 0.0 &&
    4825           1 :                         state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow != AutoSize) {
    4826           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4827           0 :                         ShowContinueError(
    4828             :                             state,
    4829           0 :                             format("Illegal {} = {:.7T}", cNumericFields(iMaxHeatAirVolFlowNumericNum), Numbers(iMaxHeatAirVolFlowNumericNum)));
    4830           0 :                         ErrorsFound = true;
    4831             :                     }
    4832             :                 } else {
    4833           0 :                     ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4834           0 :                     ShowContinueError(state, "Input for " + cAlphaFields(iHeatSAFMAlphaNum) + " = " + Alphas(iHeatSAFMAlphaNum));
    4835           0 :                     ShowContinueError(state, "Blank field not allowed for " + cNumericFields(iMaxHeatAirVolFlowNumericNum));
    4836           0 :                     ErrorsFound = true;
    4837             :                 }
    4838           2 :             } else if (UtilityRoutines::SameString(Alphas(iHeatSAFMAlphaNum), "FlowPerFloorArea")) {
    4839           1 :                 state.dataSize->ZoneHVACSizing(zSIndex).HeatingSAFMethod = FlowPerFloorArea;
    4840           1 :                 if (!lNumericBlanks(iHeatFlowPerFloorAreaNumericNum)) {
    4841           1 :                     state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow = Numbers(iHeatFlowPerFloorAreaNumericNum);
    4842           1 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow <= 0.0 &&
    4843           0 :                         state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow != AutoSize) {
    4844           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4845           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iHeatSAFMAlphaNum) + " = " + Alphas(iHeatSAFMAlphaNum));
    4846           0 :                         ShowContinueError(
    4847             :                             state,
    4848           0 :                             format("Illegal {} = {:.7T}", cNumericFields(iHeatFlowPerFloorAreaNumericNum), Numbers(iHeatFlowPerFloorAreaNumericNum)));
    4849           0 :                         ErrorsFound = true;
    4850             :                         // Autosized input is not allowed
    4851           1 :                     } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow == AutoSize) {
    4852           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4853           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iHeatSAFMAlphaNum) + " = " + Alphas(iHeatSAFMAlphaNum));
    4854           0 :                         ShowContinueError(state, "Illegal " + cNumericFields(iHeatFlowPerFloorAreaNumericNum) + " = Autosize");
    4855           0 :                         ErrorsFound = true;
    4856             :                     } else {
    4857             :                         // user input heating supply air flow per unit conditioned area is saved in ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow
    4858           1 :                         state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true;
    4859             :                     }
    4860             :                 } else {
    4861           0 :                     ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4862           0 :                     ShowContinueError(state, "Input for " + cAlphaFields(iHeatSAFMAlphaNum) + " = " + Alphas(iHeatSAFMAlphaNum));
    4863           0 :                     ShowContinueError(state, "Blank field not allowed for " + cNumericFields(iHeatFlowPerFloorAreaNumericNum));
    4864           0 :                     ErrorsFound = true;
    4865             :                 }
    4866           1 :             } else if (UtilityRoutines::SameString(Alphas(iHeatSAFMAlphaNum), "FractionOfAutosizedHeatingAirflow")) {
    4867           1 :                 state.dataSize->ZoneHVACSizing(zSIndex).HeatingSAFMethod = FractionOfAutosizedHeatingAirflow;
    4868           1 :                 if (!lNumericBlanks(iHeatFlowPerFracCoolNumericNum)) {
    4869           1 :                     state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow = Numbers(iHeatFlowPerFracCoolNumericNum);
    4870           1 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow <= 0.0 &&
    4871           0 :                         state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow != AutoSize) {
    4872           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4873           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iHeatSAFMAlphaNum) + " = " + Alphas(iHeatSAFMAlphaNum));
    4874           0 :                         ShowContinueError(
    4875             :                             state,
    4876           0 :                             format("Illegal {} = {:.7T}", cNumericFields(iHeatFlowPerFracCoolNumericNum), Numbers(iHeatFlowPerFracCoolNumericNum)));
    4877           0 :                         ErrorsFound = true;
    4878             :                         // Autosized input is not allowed
    4879           1 :                     } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow == AutoSize) {
    4880           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4881           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iHeatSAFMAlphaNum) + " = " + Alphas(iHeatSAFMAlphaNum));
    4882           0 :                         ShowContinueError(state, "Illegal " + cNumericFields(iHeatFlowPerFracCoolNumericNum) + " = Autosize");
    4883           0 :                         ErrorsFound = true;
    4884             :                     } else {
    4885             :                         // user input fraction of heating supply air flow rate is saved in ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow
    4886           1 :                         state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true;
    4887             :                     }
    4888             :                 } else {
    4889           0 :                     ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4890           0 :                     ShowContinueError(state, "Input for " + cAlphaFields(iHeatSAFMAlphaNum) + " = " + Alphas(iHeatSAFMAlphaNum));
    4891           0 :                     ShowContinueError(state, "Blank field not allowed for " + cNumericFields(iHeatFlowPerFracCoolNumericNum));
    4892           0 :                     ErrorsFound = true;
    4893             :                 }
    4894           0 :             } else if (UtilityRoutines::SameString(Alphas(iHeatSAFMAlphaNum), "FlowPerHeatingCapacity")) {
    4895           0 :                 state.dataSize->ZoneHVACSizing(zSIndex).HeatingSAFMethod = FlowPerHeatingCapacity;
    4896           0 :                 if (!lNumericBlanks(iHeatFlowPerHeatCapNumericNum)) {
    4897           0 :                     state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow = Numbers(iHeatFlowPerHeatCapNumericNum);
    4898           0 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow <= 0.0 &&
    4899           0 :                         state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow != AutoSize) {
    4900           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4901           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iHeatSAFMAlphaNum) + " = " + Alphas(iHeatSAFMAlphaNum));
    4902           0 :                         ShowContinueError(
    4903             :                             state,
    4904           0 :                             format("Illegal {} = {:.7T}", cNumericFields(iHeatFlowPerHeatCapNumericNum), Numbers(iHeatFlowPerHeatCapNumericNum)));
    4905           0 :                         ErrorsFound = true;
    4906             :                         // Autosized input is not allowed
    4907           0 :                     } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow == AutoSize) {
    4908           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4909           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iHeatSAFMAlphaNum) + " = " + Alphas(iHeatSAFMAlphaNum));
    4910           0 :                         ShowContinueError(state, "Illegal " + cNumericFields(iHeatFlowPerHeatCapNumericNum) + " = Autosize");
    4911           0 :                         ErrorsFound = true;
    4912             :                     } else {
    4913             :                         // user input heating supply air flow per unit heating capacity is saved in ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow
    4914           0 :                         state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true;
    4915             :                     }
    4916             :                 } else {
    4917           0 :                     ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4918           0 :                     ShowContinueError(state, "Input for " + cAlphaFields(iHeatSAFMAlphaNum) + " = " + Alphas(iHeatSAFMAlphaNum));
    4919           0 :                     ShowContinueError(state, "Blank field not allowed for " + cNumericFields(iHeatFlowPerHeatCapNumericNum));
    4920           0 :                     ErrorsFound = true;
    4921             :                 }
    4922           0 :             } else if (UtilityRoutines::SameString(Alphas(iHeatSAFMAlphaNum), "None") || lAlphaBlanks(iHeatSAFMAlphaNum)) {
    4923           0 :                 state.dataSize->ZoneHVACSizing(zSIndex).HeatingSAFMethod = None;
    4924           0 :                 state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow = 0.0;
    4925             :             } else {
    4926           0 :                 ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4927           0 :                 ShowContinueError(state, "Illegal " + cAlphaFields(iHeatSAFMAlphaNum) + " = " + Alphas(iHeatSAFMAlphaNum));
    4928           0 :                 ErrorsFound = true;
    4929             :             }
    4930             : 
    4931             :             // Determine supply air flow rate sizing method when cooling or heating is not needed
    4932           3 :             if (UtilityRoutines::SameString(Alphas(iNoCoolHeatSAFMAlphaNum), "SupplyAirFlowRate")) {
    4933           2 :                 state.dataSize->ZoneHVACSizing(zSIndex).NoCoolHeatSAFMethod = SupplyAirFlowRate;
    4934           2 :                 if (!lNumericBlanks(iMaxNoCoolHeatAirVolFlowNumericNum)) {
    4935           2 :                     state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow = Numbers(iMaxNoCoolHeatAirVolFlowNumericNum);
    4936           2 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow == AutoSize)
    4937           1 :                         state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true;
    4938           3 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow < 0.0 &&
    4939           1 :                         state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow != AutoSize) {
    4940           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4941           0 :                         ShowContinueError(state,
    4942           0 :                                           format("Illegal {} = {:.7T}",
    4943             :                                                  cNumericFields(iMaxNoCoolHeatAirVolFlowNumericNum),
    4944           0 :                                                  Numbers(iMaxNoCoolHeatAirVolFlowNumericNum)));
    4945           0 :                         ErrorsFound = true;
    4946             :                     }
    4947             :                 } else {
    4948           0 :                     ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4949           0 :                     ShowContinueError(state, "Input for " + cAlphaFields(iNoCoolHeatSAFMAlphaNum) + " = " + Alphas(iNoCoolHeatSAFMAlphaNum));
    4950           0 :                     ShowContinueError(state, "Blank field not allowed for " + cNumericFields(iMaxNoCoolHeatAirVolFlowNumericNum));
    4951           0 :                     ErrorsFound = true;
    4952             :                 }
    4953           1 :             } else if (UtilityRoutines::SameString(Alphas(iNoCoolHeatSAFMAlphaNum), "FlowPerFloorArea")) {
    4954           1 :                 state.dataSize->ZoneHVACSizing(zSIndex).NoCoolHeatSAFMethod = FlowPerFloorArea;
    4955           1 :                 if (!lNumericBlanks(iNoCoolHeatFlowPerFloorAreaNumericNum)) {
    4956           1 :                     state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow = Numbers(iNoCoolHeatFlowPerFloorAreaNumericNum);
    4957           1 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow < 0.0 &&
    4958           0 :                         state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow != AutoSize) {
    4959           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4960           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iNoCoolHeatSAFMAlphaNum) + " = " + Alphas(iNoCoolHeatSAFMAlphaNum));
    4961           0 :                         ShowContinueError(state,
    4962           0 :                                           format("Illegal {} = {:.7T}",
    4963             :                                                  cNumericFields(iNoCoolHeatFlowPerFloorAreaNumericNum),
    4964           0 :                                                  Numbers(iNoCoolHeatFlowPerFloorAreaNumericNum)));
    4965           0 :                         ErrorsFound = true;
    4966             :                         // Autosized input is not allowed
    4967           1 :                     } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow == AutoSize) {
    4968           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4969           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iNoCoolHeatSAFMAlphaNum) + " = " + Alphas(iNoCoolHeatSAFMAlphaNum));
    4970           0 :                         ShowContinueError(state, "Illegal " + cNumericFields(iNoCoolHeatFlowPerFloorAreaNumericNum) + " = Autosize");
    4971           0 :                         ErrorsFound = true;
    4972             :                     } else {
    4973             :                         // user input supply air flow per unit floor area during no cooling or heating area is saved in
    4974             :                         // ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow
    4975           1 :                         state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true;
    4976             :                     }
    4977             :                 } else {
    4978           0 :                     ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4979           0 :                     ShowContinueError(state, "Input for " + cAlphaFields(iNoCoolHeatSAFMAlphaNum) + " = " + Alphas(iNoCoolHeatSAFMAlphaNum));
    4980           0 :                     ShowContinueError(state, "Blank field not allowed for " + cNumericFields(iNoCoolHeatFlowPerFloorAreaNumericNum));
    4981           0 :                     ErrorsFound = true;
    4982             :                 }
    4983           0 :             } else if (UtilityRoutines::SameString(Alphas(iNoCoolHeatSAFMAlphaNum), "FractionOfAutosizedCoolingAirflow")) {
    4984           0 :                 state.dataSize->ZoneHVACSizing(zSIndex).NoCoolHeatSAFMethod = FractionOfAutosizedCoolingAirflow;
    4985           0 :                 if (!lNumericBlanks(iNoCoolHeatFlowPerFracCoolNumericNum)) {
    4986           0 :                     state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow = Numbers(iNoCoolHeatFlowPerFracCoolNumericNum);
    4987           0 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow < 0.0 &&
    4988           0 :                         state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow != AutoSize) {
    4989           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4990           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iNoCoolHeatSAFMAlphaNum) + " = " + Alphas(iNoCoolHeatSAFMAlphaNum));
    4991           0 :                         ShowContinueError(state,
    4992           0 :                                           format("Illegal {} = {:.7T}",
    4993             :                                                  cNumericFields(iNoCoolHeatFlowPerFracCoolNumericNum),
    4994           0 :                                                  Numbers(iNoCoolHeatFlowPerFracCoolNumericNum)));
    4995           0 :                         ErrorsFound = true;
    4996             :                         // Autosized input is not allowed
    4997           0 :                     } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow == AutoSize) {
    4998           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    4999           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iNoCoolHeatSAFMAlphaNum) + " = " + Alphas(iNoCoolHeatSAFMAlphaNum));
    5000           0 :                         ShowContinueError(state, "Illegal " + cNumericFields(iNoCoolHeatFlowPerFracCoolNumericNum) + " = Autosize");
    5001           0 :                         ErrorsFound = true;
    5002             :                     } else {
    5003             :                         // user input frcation of cooling supply air flow rate during no cooling or heating area is saved in
    5004             :                         // ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow
    5005           0 :                         state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true;
    5006             :                     }
    5007             :                 } else {
    5008           0 :                     ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5009           0 :                     ShowContinueError(state, "Input for " + cAlphaFields(iNoCoolHeatSAFMAlphaNum) + " = " + Alphas(iNoCoolHeatSAFMAlphaNum));
    5010           0 :                     ShowContinueError(state, "Blank field not allowed for " + cNumericFields(iNoCoolHeatFlowPerFracCoolNumericNum));
    5011           0 :                     ErrorsFound = true;
    5012             :                 }
    5013           0 :             } else if (UtilityRoutines::SameString(Alphas(iNoCoolHeatSAFMAlphaNum), "FractionOfAutosizedHeatingAirflow")) {
    5014           0 :                 state.dataSize->ZoneHVACSizing(zSIndex).NoCoolHeatSAFMethod = FractionOfAutosizedHeatingAirflow;
    5015           0 :                 if (!lNumericBlanks(iNoCoolHeatFlowPerFracHeatNumericNum)) {
    5016           0 :                     state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow = Numbers(iNoCoolHeatFlowPerFracHeatNumericNum);
    5017           0 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow < 0.0 &&
    5018           0 :                         state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow != AutoSize) {
    5019           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5020           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iNoCoolHeatSAFMAlphaNum) + " = " + Alphas(iNoCoolHeatSAFMAlphaNum));
    5021           0 :                         ShowContinueError(state,
    5022           0 :                                           format("Illegal {} = {:.7T}",
    5023             :                                                  cNumericFields(iNoCoolHeatFlowPerFracHeatNumericNum),
    5024           0 :                                                  Numbers(iNoCoolHeatFlowPerFracHeatNumericNum)));
    5025           0 :                         ErrorsFound = true;
    5026             :                         // Autosized input is not allowed
    5027           0 :                     } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow == AutoSize) {
    5028           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5029           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iNoCoolHeatSAFMAlphaNum) + " = " + Alphas(iNoCoolHeatSAFMAlphaNum));
    5030           0 :                         ShowContinueError(state, "Illegal " + cNumericFields(iNoCoolHeatFlowPerFracHeatNumericNum) + " = Autosize");
    5031           0 :                         ErrorsFound = true;
    5032             :                     } else {
    5033             :                         // user input frcation of heating supply air flow rate during no cooling or heating area is saved in
    5034             :                         // ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow
    5035           0 :                         state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true;
    5036             :                     }
    5037             :                 } else {
    5038           0 :                     ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5039           0 :                     ShowContinueError(state, "Input for " + cAlphaFields(iNoCoolHeatSAFMAlphaNum) + " = " + Alphas(iNoCoolHeatSAFMAlphaNum));
    5040           0 :                     ShowContinueError(state, "Blank field not allowed for " + cNumericFields(iNoCoolHeatFlowPerFracHeatNumericNum));
    5041           0 :                     ErrorsFound = true;
    5042             :                 }
    5043           0 :             } else if (UtilityRoutines::SameString(Alphas(iNoCoolHeatSAFMAlphaNum), "None") || lAlphaBlanks(iNoCoolHeatSAFMAlphaNum)) {
    5044           0 :                 state.dataSize->ZoneHVACSizing(zSIndex).NoCoolHeatSAFMethod = None;
    5045           0 :                 state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow = 0.0;
    5046             :             } else {
    5047           0 :                 ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5048           0 :                 ShowContinueError(state, "Illegal " + cAlphaFields(iNoCoolHeatSAFMAlphaNum) + " = " + Alphas(iNoCoolHeatSAFMAlphaNum));
    5049           0 :                 ErrorsFound = true;
    5050             :             }
    5051             : 
    5052             :             // Determine cooling design capacity of zoneHVAC equipment
    5053           3 :             if (UtilityRoutines::SameString(Alphas(iCoolCAPMAlphaNum), "CoolingDesignCapacity")) {
    5054           1 :                 state.dataSize->ZoneHVACSizing(zSIndex).CoolingCapMethod = CoolingDesignCapacity;
    5055           1 :                 if (!lNumericBlanks(iCoolDesignCapacityNumericNum)) {
    5056           1 :                     state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity = Numbers(iCoolDesignCapacityNumericNum);
    5057           1 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity == AutoSize)
    5058           1 :                         state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true;
    5059           2 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity < 0.0 &&
    5060           1 :                         state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity != AutoSize) {
    5061           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5062           0 :                         ShowContinueError(
    5063             :                             state,
    5064           0 :                             format("Illegal {} = {:.7T}", cNumericFields(iCoolDesignCapacityNumericNum), Numbers(iCoolDesignCapacityNumericNum)));
    5065           0 :                         ErrorsFound = true;
    5066             :                     }
    5067             :                 } else {
    5068           0 :                     ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5069           0 :                     ShowContinueError(state, "Input for " + cAlphaFields(iCoolCAPMAlphaNum) + " = " + Alphas(iCoolCAPMAlphaNum));
    5070           0 :                     ShowContinueError(state, "Blank field not allowed for " + cNumericFields(iCoolDesignCapacityNumericNum));
    5071           0 :                     ErrorsFound = true;
    5072             :                 }
    5073           2 :             } else if (UtilityRoutines::SameString(Alphas(iCoolCAPMAlphaNum), "CapacityPerFloorArea")) {
    5074           1 :                 state.dataSize->ZoneHVACSizing(zSIndex).CoolingCapMethod = CapacityPerFloorArea;
    5075           1 :                 if (!lNumericBlanks(iCoolCapacityPerFloorAreaNumericNum)) {
    5076           1 :                     state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity = Numbers(iCoolCapacityPerFloorAreaNumericNum);
    5077           1 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity <= 0.0) {
    5078           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5079           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iCoolCAPMAlphaNum) + " = " + Alphas(iCoolCAPMAlphaNum));
    5080           0 :                         ShowContinueError(state,
    5081           0 :                                           format("Illegal {} = {:.7T}",
    5082             :                                                  cNumericFields(iCoolCapacityPerFloorAreaNumericNum),
    5083           0 :                                                  Numbers(iCoolCapacityPerFloorAreaNumericNum)));
    5084           0 :                         ErrorsFound = true;
    5085             :                         // Autosized input is not allowed
    5086           1 :                     } else if (state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity == AutoSize) {
    5087           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5088           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iCoolCAPMAlphaNum) + " = " + Alphas(iCoolCAPMAlphaNum));
    5089           0 :                         ShowContinueError(state, "Illegal " + cNumericFields(iCoolCapacityPerFloorAreaNumericNum) + " = Autosize");
    5090           0 :                         ErrorsFound = true;
    5091             :                     }
    5092             :                 } else {
    5093           0 :                     ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5094           0 :                     ShowContinueError(state, "Input for " + cAlphaFields(iCoolCAPMAlphaNum) + " = " + Alphas(iCoolCAPMAlphaNum));
    5095           0 :                     ShowContinueError(state, "Blank field not allowed for " + cNumericFields(iCoolCapacityPerFloorAreaNumericNum));
    5096           0 :                     ErrorsFound = true;
    5097             :                 }
    5098           1 :             } else if (UtilityRoutines::SameString(Alphas(iCoolCAPMAlphaNum), "FractionOfAutosizedCoolingCapacity")) {
    5099           1 :                 state.dataSize->ZoneHVACSizing(zSIndex).CoolingCapMethod = FractionOfAutosizedCoolingCapacity;
    5100           1 :                 if (!lNumericBlanks(iCoolFracOfAutosizedCapacityNumericNum)) {
    5101           1 :                     state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity = Numbers(iCoolFracOfAutosizedCapacityNumericNum);
    5102           1 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity == AutoSize)
    5103           0 :                         state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true;
    5104           1 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity < 0.0 &&
    5105           0 :                         state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity != AutoSize) {
    5106           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5107           0 :                         ShowContinueError(state,
    5108           0 :                                           format("Illegal {} = {:.7T}",
    5109             :                                                  cNumericFields(iCoolFracOfAutosizedCapacityNumericNum),
    5110           0 :                                                  Numbers(iCoolFracOfAutosizedCapacityNumericNum)));
    5111           0 :                         ErrorsFound = true;
    5112             :                     }
    5113             :                 } else {
    5114           0 :                     ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5115           0 :                     ShowContinueError(state, "Input for " + cAlphaFields(iCoolCAPMAlphaNum) + " = " + Alphas(iCoolCAPMAlphaNum));
    5116           0 :                     ShowContinueError(state, "Blank field not allowed for " + cNumericFields(iCoolFracOfAutosizedCapacityNumericNum));
    5117           0 :                     ErrorsFound = true;
    5118             :                 }
    5119           0 :             } else if (UtilityRoutines::SameString(Alphas(iCoolCAPMAlphaNum), "None") || lAlphaBlanks(iCoolCAPMAlphaNum)) {
    5120           0 :                 state.dataSize->ZoneHVACSizing(zSIndex).CoolingCapMethod = None;
    5121             :             } else {
    5122           0 :                 ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5123           0 :                 ShowContinueError(state, "Illegal " + cAlphaFields(iCoolCAPMAlphaNum) + " = " + Alphas(iCoolCAPMAlphaNum));
    5124           0 :                 ErrorsFound = true;
    5125             :             }
    5126             : 
    5127             :             // Determine heating design capacity of zone HVAC equipment
    5128           3 :             if (UtilityRoutines::SameString(Alphas(iHeatCAPMAlphaNum), "HeatingDesignCapacity")) {
    5129           0 :                 state.dataSize->ZoneHVACSizing(zSIndex).HeatingCapMethod = HeatingDesignCapacity;
    5130           0 :                 if (!lNumericBlanks(iHeatDesignCapacityNumericNum)) {
    5131           0 :                     state.dataSize->ZoneHVACSizing(zSIndex).ScaledHeatingCapacity = Numbers(iHeatDesignCapacityNumericNum);
    5132           0 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).ScaledHeatingCapacity == AutoSize)
    5133           0 :                         state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true;
    5134           0 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).ScaledHeatingCapacity < 0.0 &&
    5135           0 :                         state.dataSize->ZoneHVACSizing(zSIndex).ScaledHeatingCapacity != AutoSize) {
    5136           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5137           0 :                         ShowContinueError(
    5138             :                             state,
    5139           0 :                             format("Illegal {} = {:.7T}", cNumericFields(iHeatDesignCapacityNumericNum), Numbers(iHeatDesignCapacityNumericNum)));
    5140           0 :                         ErrorsFound = true;
    5141             :                     }
    5142             :                 } else {
    5143           0 :                     ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5144           0 :                     ShowContinueError(state, "Input for " + cAlphaFields(iHeatCAPMAlphaNum) + " = " + Alphas(iHeatCAPMAlphaNum));
    5145           0 :                     ShowContinueError(state, "Blank field not allowed for " + cNumericFields(iHeatDesignCapacityNumericNum));
    5146           0 :                     ErrorsFound = true;
    5147             :                 }
    5148           3 :             } else if (UtilityRoutines::SameString(Alphas(iHeatCAPMAlphaNum), "CapacityPerFloorArea")) {
    5149           2 :                 state.dataSize->ZoneHVACSizing(zSIndex).HeatingCapMethod = CapacityPerFloorArea;
    5150           2 :                 if (!lNumericBlanks(iHeatCapacityPerFloorAreaNumericNum)) {
    5151           2 :                     state.dataSize->ZoneHVACSizing(zSIndex).ScaledHeatingCapacity = Numbers(iHeatCapacityPerFloorAreaNumericNum);
    5152           2 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).ScaledHeatingCapacity <= 0.0) {
    5153           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5154           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iHeatCAPMAlphaNum) + " = " + Alphas(iHeatCAPMAlphaNum));
    5155           0 :                         ShowContinueError(state,
    5156           0 :                                           format("Illegal {} = {:.7T}",
    5157             :                                                  cNumericFields(iHeatCapacityPerFloorAreaNumericNum),
    5158           0 :                                                  Numbers(iHeatCapacityPerFloorAreaNumericNum)));
    5159           0 :                         ErrorsFound = true;
    5160             :                         // Autosized input is not allowed
    5161           2 :                     } else if (state.dataSize->ZoneHVACSizing(zSIndex).ScaledHeatingCapacity == AutoSize) {
    5162           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5163           0 :                         ShowContinueError(state, "Input for " + cAlphaFields(iHeatCAPMAlphaNum) + " = " + Alphas(iHeatCAPMAlphaNum));
    5164           0 :                         ShowContinueError(state, "Illegal " + cNumericFields(iHeatCapacityPerFloorAreaNumericNum) + " = Autosize");
    5165           0 :                         ErrorsFound = true;
    5166             :                     }
    5167             :                 } else {
    5168           0 :                     ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5169           0 :                     ShowContinueError(state, "Input for " + cAlphaFields(iHeatCAPMAlphaNum) + " = " + Alphas(iHeatCAPMAlphaNum));
    5170           0 :                     ShowContinueError(state, "Blank field not allowed for " + cNumericFields(iHeatCapacityPerFloorAreaNumericNum));
    5171           0 :                     ErrorsFound = true;
    5172             :                 }
    5173           1 :             } else if (UtilityRoutines::SameString(Alphas(iHeatCAPMAlphaNum), "FractionOfAutosizedHeatingCapacity")) {
    5174           1 :                 state.dataSize->ZoneHVACSizing(zSIndex).HeatingCapMethod = FractionOfAutosizedHeatingCapacity;
    5175           1 :                 if (!lNumericBlanks(iHeatFracOfAutosizedCapacityNumericNum)) {
    5176           1 :                     state.dataSize->ZoneHVACSizing(zSIndex).ScaledHeatingCapacity = Numbers(iHeatFracOfAutosizedCapacityNumericNum);
    5177           1 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).ScaledHeatingCapacity == AutoSize)
    5178           0 :                         state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true;
    5179           1 :                     if (state.dataSize->ZoneHVACSizing(zSIndex).ScaledHeatingCapacity < 0.0 &&
    5180           0 :                         state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity != AutoSize) {
    5181           0 :                         ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5182           0 :                         ShowContinueError(state,
    5183           0 :                                           format("Illegal {} = {:.7T}",
    5184             :                                                  cNumericFields(iHeatFracOfAutosizedCapacityNumericNum),
    5185           0 :                                                  Numbers(iHeatFracOfAutosizedCapacityNumericNum)));
    5186           0 :                         ErrorsFound = true;
    5187             :                     }
    5188             :                 } else {
    5189           0 :                     ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5190           0 :                     ShowContinueError(state, "Input for " + cAlphaFields(iHeatCAPMAlphaNum) + " = " + Alphas(iHeatCAPMAlphaNum));
    5191           0 :                     ShowContinueError(state, "Blank field not allowed for " + cNumericFields(iHeatFracOfAutosizedCapacityNumericNum));
    5192           0 :                     ErrorsFound = true;
    5193             :                 }
    5194           0 :             } else if (UtilityRoutines::SameString(Alphas(iHeatCAPMAlphaNum), "None") || lAlphaBlanks(iHeatCAPMAlphaNum)) {
    5195           0 :                 state.dataSize->ZoneHVACSizing(zSIndex).HeatingCapMethod = None;
    5196             :             } else {
    5197           0 :                 ShowSevereError(state, CurrentModuleObject + " = " + state.dataSize->ZoneHVACSizing(zSIndex).Name);
    5198           0 :                 ShowContinueError(state, "Illegal " + cAlphaFields(iHeatCAPMAlphaNum) + " = " + Alphas(iHeatCAPMAlphaNum));
    5199           0 :                 ErrorsFound = true;
    5200             :             }
    5201             :         }
    5202             :     }
    5203             : 
    5204         771 :     Alphas.deallocate();
    5205         771 :     cAlphaFields.deallocate();
    5206         771 :     cNumericFields.deallocate();
    5207         771 :     Numbers.deallocate();
    5208         771 :     lAlphaBlanks.deallocate();
    5209         771 :     lNumericBlanks.deallocate();
    5210             : 
    5211         771 :     if (ErrorsFound) {
    5212           0 :         ShowFatalError(state, std::string{RoutineName} + "Errors found in input.  Preceding condition(s) cause termination.");
    5213             :     }
    5214         771 : }
    5215             : 
    5216         771 : void GetAirTerminalSizing(EnergyPlusData &state)
    5217             : {
    5218             :     // SUBROUTINE INFORMATION:
    5219             :     //       AUTHOR         M.J. Witte
    5220             :     //       DATE WRITTEN   February 2017
    5221             : 
    5222             :     // PURPOSE OF THIS SUBROUTINE:
    5223             :     // Obtains input data for the AirTerminal sizing methods object and stores it in
    5224             :     // appropriate data structure.
    5225             : 
    5226             :     static constexpr std::string_view RoutineName("GetAirTerminalSizing: "); // include trailing blank space
    5227             : 
    5228             :     int NumAlphas;           // Number of Alphas for each GetObjectItem call
    5229             :     int NumNumbers;          // Number of Numbers for each GetObjectItem call
    5230             :     int TotalArgs;           // Total number of alpha and numeric arguments (max) for a
    5231             :     int IOStatus;            // Used in GetObjectItem
    5232         771 :     bool ErrorsFound(false); // If errors detected in input
    5233         771 :     auto &cCurrentModuleObject = state.dataIPShortCut->cCurrentModuleObject;
    5234         771 :     cCurrentModuleObject = "DesignSpecification:AirTerminal:Sizing";
    5235         771 :     state.dataSize->NumAirTerminalSizingSpec = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject);
    5236         771 :     state.dataInputProcessing->inputProcessor->getObjectDefMaxArgs(state, cCurrentModuleObject, TotalArgs, NumAlphas, NumNumbers);
    5237             : 
    5238         771 :     if (state.dataSize->NumAirTerminalSizingSpec > 0) {
    5239           8 :         state.dataSize->AirTerminalSizingSpec.allocate(state.dataSize->NumAirTerminalSizingSpec);
    5240             : 
    5241             :         // Start Loading the System Input
    5242          24 :         for (int zSIndex = 1; zSIndex <= state.dataSize->NumAirTerminalSizingSpec; ++zSIndex) {
    5243             : 
    5244         112 :             state.dataInputProcessing->inputProcessor->getObjectItem(state,
    5245             :                                                                      cCurrentModuleObject,
    5246             :                                                                      zSIndex,
    5247          16 :                                                                      state.dataIPShortCut->cAlphaArgs,
    5248             :                                                                      NumAlphas,
    5249          16 :                                                                      state.dataIPShortCut->rNumericArgs,
    5250             :                                                                      NumNumbers,
    5251             :                                                                      IOStatus,
    5252          16 :                                                                      state.dataIPShortCut->lNumericFieldBlanks,
    5253          16 :                                                                      state.dataIPShortCut->lAlphaFieldBlanks,
    5254          16 :                                                                      state.dataIPShortCut->cAlphaFieldNames,
    5255          16 :                                                                      state.dataIPShortCut->cNumericFieldNames);
    5256             : 
    5257          16 :             UtilityRoutines::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), cCurrentModuleObject, ErrorsFound);
    5258             : 
    5259          16 :             auto &thisATSizing(state.dataSize->AirTerminalSizingSpec(zSIndex));
    5260          16 :             thisATSizing.Name = state.dataIPShortCut->cAlphaArgs(1);
    5261          16 :             thisATSizing.DesSensCoolingFrac = state.dataIPShortCut->rNumericArgs(1);
    5262          16 :             thisATSizing.DesCoolSATRatio = state.dataIPShortCut->rNumericArgs(2);
    5263          16 :             thisATSizing.DesSensHeatingFrac = state.dataIPShortCut->rNumericArgs(3);
    5264          16 :             thisATSizing.DesHeatSATRatio = state.dataIPShortCut->rNumericArgs(4);
    5265          16 :             thisATSizing.MinOAFrac = state.dataIPShortCut->rNumericArgs(5);
    5266             :         }
    5267             :     }
    5268             : 
    5269         771 :     if (ErrorsFound) {
    5270           0 :         ShowFatalError(state, std::string{RoutineName} + "Errors found in input.  Preceding condition(s) cause termination.");
    5271             :     }
    5272         771 : }
    5273             : 
    5274             : // Update the sizing for the entire facilty to gather values for reporting - Glazer January 2017
    5275      134847 : void UpdateFacilitySizing([[maybe_unused]] EnergyPlusData &state, DataGlobalConstants::CallIndicator const CallIndicator)
    5276             : {
    5277      134847 :     int NumOfTimeStepInDay = state.dataGlobal->NumOfTimeStepInHour * 24;
    5278             : 
    5279      134847 :     auto &CalcFacilitySizing(state.dataSize->CalcFacilitySizing);
    5280      134847 :     auto &CalcFinalFacilitySizing(state.dataSize->CalcFinalFacilitySizing);
    5281             : 
    5282             :     //  test if allocated here
    5283      134847 :     if (!CalcFacilitySizing.allocated()) {
    5284         405 :         CalcFacilitySizing.allocate(state.dataEnvrn->TotDesDays + state.dataEnvrn->TotRunDesPersDays);
    5285        1276 :         for (int DDNum = 1; DDNum <= state.dataEnvrn->TotDesDays + state.dataEnvrn->TotRunDesPersDays; ++DDNum) {
    5286         871 :             CalcFacilitySizing(DDNum).DOASHeatAddSeq.allocate(NumOfTimeStepInDay);
    5287         871 :             CalcFacilitySizing(DDNum).DOASLatAddSeq.allocate(NumOfTimeStepInDay);
    5288         871 :             CalcFacilitySizing(DDNum).CoolOutHumRatSeq.allocate(NumOfTimeStepInDay);
    5289         871 :             CalcFacilitySizing(DDNum).CoolOutTempSeq.allocate(NumOfTimeStepInDay);
    5290         871 :             CalcFacilitySizing(DDNum).CoolZoneTempSeq.allocate(NumOfTimeStepInDay);
    5291         871 :             CalcFacilitySizing(DDNum).CoolLoadSeq.allocate(NumOfTimeStepInDay);
    5292         871 :             CalcFacilitySizing(DDNum).HeatOutHumRatSeq.allocate(NumOfTimeStepInDay);
    5293         871 :             CalcFacilitySizing(DDNum).HeatOutTempSeq.allocate(NumOfTimeStepInDay);
    5294         871 :             CalcFacilitySizing(DDNum).HeatZoneTempSeq.allocate(NumOfTimeStepInDay);
    5295         871 :             CalcFacilitySizing(DDNum).HeatLoadSeq.allocate(NumOfTimeStepInDay);
    5296             : 
    5297         871 :             CalcFacilitySizing(DDNum).DOASHeatAddSeq = 0.;
    5298         871 :             CalcFacilitySizing(DDNum).DOASLatAddSeq = 0.;
    5299         871 :             CalcFacilitySizing(DDNum).CoolOutHumRatSeq = 0.;
    5300         871 :             CalcFacilitySizing(DDNum).CoolOutTempSeq = 0.;
    5301         871 :             CalcFacilitySizing(DDNum).CoolZoneTempSeq = 0.;
    5302         871 :             CalcFacilitySizing(DDNum).CoolLoadSeq = 0.;
    5303         871 :             CalcFacilitySizing(DDNum).HeatOutHumRatSeq = 0.;
    5304         871 :             CalcFacilitySizing(DDNum).HeatOutTempSeq = 0.;
    5305         871 :             CalcFacilitySizing(DDNum).HeatZoneTempSeq = 0.;
    5306         871 :             CalcFacilitySizing(DDNum).HeatLoadSeq = 0.;
    5307             :         }
    5308             :     }
    5309      134847 :     if (!CalcFinalFacilitySizing.DOASHeatAddSeq.allocated()) {
    5310         405 :         CalcFinalFacilitySizing.DOASHeatAddSeq.allocate(NumOfTimeStepInDay);
    5311         405 :         CalcFinalFacilitySizing.DOASLatAddSeq.allocate(NumOfTimeStepInDay);
    5312         405 :         CalcFinalFacilitySizing.CoolOutHumRatSeq.allocate(NumOfTimeStepInDay);
    5313         405 :         CalcFinalFacilitySizing.CoolOutTempSeq.allocate(NumOfTimeStepInDay);
    5314         405 :         CalcFinalFacilitySizing.CoolZoneTempSeq.allocate(NumOfTimeStepInDay);
    5315         405 :         CalcFinalFacilitySizing.CoolLoadSeq.allocate(NumOfTimeStepInDay);
    5316         405 :         CalcFinalFacilitySizing.HeatOutHumRatSeq.allocate(NumOfTimeStepInDay);
    5317         405 :         CalcFinalFacilitySizing.HeatOutTempSeq.allocate(NumOfTimeStepInDay);
    5318         405 :         CalcFinalFacilitySizing.HeatZoneTempSeq.allocate(NumOfTimeStepInDay);
    5319         405 :         CalcFinalFacilitySizing.HeatLoadSeq.allocate(NumOfTimeStepInDay);
    5320             : 
    5321         405 :         CalcFinalFacilitySizing.DOASHeatAddSeq = 0.;
    5322         405 :         CalcFinalFacilitySizing.DOASLatAddSeq = 0.;
    5323         405 :         CalcFinalFacilitySizing.CoolOutHumRatSeq = 0.;
    5324         405 :         CalcFinalFacilitySizing.CoolOutTempSeq = 0.;
    5325         405 :         CalcFinalFacilitySizing.CoolZoneTempSeq = 0.;
    5326         405 :         CalcFinalFacilitySizing.CoolLoadSeq = 0.;
    5327         405 :         CalcFinalFacilitySizing.HeatOutHumRatSeq = 0.;
    5328         405 :         CalcFinalFacilitySizing.HeatOutTempSeq = 0.;
    5329         405 :         CalcFinalFacilitySizing.HeatZoneTempSeq = 0.;
    5330         405 :         CalcFinalFacilitySizing.HeatLoadSeq = 0.;
    5331             :     }
    5332      134847 :     if (CallIndicator == DataGlobalConstants::CallIndicator::BeginDay) {
    5333         917 :         CalcFacilitySizing(state.dataSize->CurOverallSimDay).HeatDDNum = state.dataSize->CurOverallSimDay;
    5334         917 :         CalcFacilitySizing(state.dataSize->CurOverallSimDay).CoolDDNum = state.dataSize->CurOverallSimDay;
    5335      133930 :     } else if (CallIndicator == DataGlobalConstants::CallIndicator::DuringDay) {
    5336      131701 :         int TimeStepInDay = (state.dataGlobal->HourOfDay - 1) * state.dataGlobal->NumOfTimeStepInHour + state.dataGlobal->TimeStep;
    5337             :         // save the results of the ideal zone component calculation in the CalcZoneSizing sequence variables
    5338      131701 :         Real64 sumCoolLoad = 0.;
    5339      131701 :         Real64 sumHeatLoad = 0.;
    5340      131701 :         Real64 wghtdCoolZoneTemp = 0.;
    5341      131701 :         Real64 wghtdHeatZoneTemp = 0.;
    5342      131701 :         Real64 wghtdCoolHumRat = 0.;
    5343      131701 :         Real64 wghtdHeatHumRat = 0.;
    5344      131701 :         Real64 wghtdCoolDOASHeatAdd = 0.;
    5345      131701 :         Real64 wghtdCoolDOASLatAdd = 0.;
    5346     1342340 :         for (int CtrlZoneNum = 1; CtrlZoneNum <= state.dataGlobal->NumOfZones; ++CtrlZoneNum) {
    5347     1210639 :             if (!state.dataZoneEquip->ZoneEquipConfig(CtrlZoneNum).IsControlled) continue;
    5348     1066192 :             Real64 curCoolLoad = state.dataSize->CalcZoneSizing(state.dataSize->CurOverallSimDay, CtrlZoneNum).CoolLoadSeq(TimeStepInDay);
    5349     1066192 :             if (curCoolLoad > 0.0) {
    5350      477838 :                 sumCoolLoad += curCoolLoad;
    5351      477838 :                 wghtdCoolZoneTemp +=
    5352      477838 :                     state.dataSize->CalcZoneSizing(state.dataSize->CurOverallSimDay, CtrlZoneNum).CoolZoneTempSeq(TimeStepInDay) * curCoolLoad;
    5353      477838 :                 wghtdCoolHumRat +=
    5354      477838 :                     state.dataSize->CalcZoneSizing(state.dataSize->CurOverallSimDay, CtrlZoneNum).CoolZoneHumRatSeq(TimeStepInDay) * curCoolLoad;
    5355      477838 :                 wghtdCoolDOASHeatAdd +=
    5356      477838 :                     state.dataSize->CalcZoneSizing(state.dataSize->CurOverallSimDay, CtrlZoneNum).DOASHeatAddSeq(TimeStepInDay) * curCoolLoad;
    5357      477838 :                 wghtdCoolDOASLatAdd +=
    5358      477838 :                     state.dataSize->CalcZoneSizing(state.dataSize->CurOverallSimDay, CtrlZoneNum).DOASLatAddSeq(TimeStepInDay) * curCoolLoad;
    5359             :             }
    5360     1066192 :             Real64 curHeatLoad = state.dataSize->CalcZoneSizing(state.dataSize->CurOverallSimDay, CtrlZoneNum).HeatLoadSeq(TimeStepInDay);
    5361     1066192 :             if (curHeatLoad > 0.0) {
    5362      438573 :                 sumHeatLoad += curHeatLoad;
    5363      438573 :                 wghtdHeatZoneTemp +=
    5364      438573 :                     state.dataSize->CalcZoneSizing(state.dataSize->CurOverallSimDay, CtrlZoneNum).HeatZoneTempSeq(TimeStepInDay) * curHeatLoad;
    5365      438573 :                 wghtdHeatHumRat +=
    5366      438573 :                     state.dataSize->CalcZoneSizing(state.dataSize->CurOverallSimDay, CtrlZoneNum).HeatZoneHumRatSeq(TimeStepInDay) * curHeatLoad;
    5367             :             }
    5368             :         }
    5369             : 
    5370      131701 :         CalcFacilitySizing(state.dataSize->CurOverallSimDay).CoolLoadSeq(TimeStepInDay) = sumCoolLoad;
    5371      131701 :         CalcFacilitySizing(state.dataSize->CurOverallSimDay).HeatLoadSeq(TimeStepInDay) = sumHeatLoad;
    5372             : 
    5373      131701 :         if (sumCoolLoad != 0.) {
    5374       58718 :             CalcFacilitySizing(state.dataSize->CurOverallSimDay).CoolZoneTempSeq(TimeStepInDay) = wghtdCoolZoneTemp / sumCoolLoad;
    5375       58718 :             CalcFacilitySizing(state.dataSize->CurOverallSimDay).CoolOutHumRatSeq(TimeStepInDay) = wghtdCoolHumRat / sumCoolLoad;
    5376       58718 :             CalcFacilitySizing(state.dataSize->CurOverallSimDay).DOASHeatAddSeq(TimeStepInDay) = wghtdCoolDOASHeatAdd / sumCoolLoad;
    5377       58718 :             CalcFacilitySizing(state.dataSize->CurOverallSimDay).DOASLatAddSeq(TimeStepInDay) = wghtdCoolDOASLatAdd / sumCoolLoad;
    5378             :         }
    5379      131701 :         if (sumHeatLoad != 0.) {
    5380       60125 :             CalcFacilitySizing(state.dataSize->CurOverallSimDay).HeatZoneTempSeq(TimeStepInDay) = wghtdHeatZoneTemp / sumHeatLoad;
    5381       60125 :             CalcFacilitySizing(state.dataSize->CurOverallSimDay).HeatOutHumRatSeq(TimeStepInDay) = wghtdHeatHumRat / sumHeatLoad;
    5382             :         }
    5383             : 
    5384        2229 :     } else if (CallIndicator == DataGlobalConstants::CallIndicator::EndDay) {
    5385      225913 :         for (int TimeStepIndex = 1; TimeStepIndex <= NumOfTimeStepInDay; ++TimeStepIndex) {
    5386      448224 :             if (CalcFacilitySizing(state.dataSize->CurOverallSimDay).CoolLoadSeq(TimeStepIndex) >
    5387      224112 :                 CalcFacilitySizing(state.dataSize->CurOverallSimDay).DesCoolLoad) {
    5388       15881 :                 CalcFacilitySizing(state.dataSize->CurOverallSimDay).DesCoolLoad =
    5389       15881 :                     CalcFacilitySizing(state.dataSize->CurOverallSimDay).CoolLoadSeq(TimeStepIndex);
    5390       15881 :                 CalcFacilitySizing(state.dataSize->CurOverallSimDay).TimeStepNumAtCoolMax = TimeStepIndex;
    5391             :             }
    5392      448224 :             if (CalcFacilitySizing(state.dataSize->CurOverallSimDay).HeatLoadSeq(TimeStepIndex) >
    5393      224112 :                 CalcFacilitySizing(state.dataSize->CurOverallSimDay).DesHeatLoad) {
    5394       30303 :                 CalcFacilitySizing(state.dataSize->CurOverallSimDay).DesHeatLoad =
    5395       30303 :                     CalcFacilitySizing(state.dataSize->CurOverallSimDay).HeatLoadSeq(TimeStepIndex);
    5396       30303 :                 CalcFacilitySizing(state.dataSize->CurOverallSimDay).TimeStepNumAtHeatMax = TimeStepIndex;
    5397             :             }
    5398             :         }
    5399             : 
    5400         428 :     } else if (CallIndicator == DataGlobalConstants::CallIndicator::EndZoneSizingCalc) {
    5401        1345 :         for (int DDNum = 1; DDNum <= state.dataEnvrn->TotDesDays + state.dataEnvrn->TotRunDesPersDays; ++DDNum) {
    5402         917 :             if (CalcFacilitySizing(DDNum).DesCoolLoad > CalcFinalFacilitySizing.DesCoolLoad) {
    5403         443 :                 CalcFinalFacilitySizing.DesCoolLoad = CalcFacilitySizing(DDNum).DesCoolLoad;
    5404         443 :                 CalcFinalFacilitySizing.TimeStepNumAtCoolMax = CalcFacilitySizing(DDNum).TimeStepNumAtCoolMax;
    5405         443 :                 CalcFinalFacilitySizing.CoolDDNum = CalcFacilitySizing(DDNum).CoolDDNum;
    5406       55619 :                 for (int TimeStepIndex = 1; TimeStepIndex <= NumOfTimeStepInDay; ++TimeStepIndex) {
    5407       55176 :                     CalcFinalFacilitySizing.CoolOutHumRatSeq(TimeStepIndex) = CalcFacilitySizing(DDNum).CoolOutHumRatSeq(TimeStepIndex);
    5408       55176 :                     CalcFinalFacilitySizing.CoolOutTempSeq(TimeStepIndex) = CalcFacilitySizing(DDNum).CoolOutTempSeq(TimeStepIndex);
    5409       55176 :                     CalcFinalFacilitySizing.CoolZoneTempSeq(TimeStepIndex) = CalcFacilitySizing(DDNum).CoolZoneTempSeq(TimeStepIndex);
    5410       55176 :                     CalcFinalFacilitySizing.DOASHeatAddSeq(TimeStepIndex) = CalcFacilitySizing(DDNum).DOASHeatAddSeq(TimeStepIndex);
    5411       55176 :                     CalcFinalFacilitySizing.DOASLatAddSeq(TimeStepIndex) = CalcFacilitySizing(DDNum).DOASLatAddSeq(TimeStepIndex);
    5412             :                 }
    5413             :             }
    5414         917 :             if (CalcFacilitySizing(DDNum).DesHeatLoad > CalcFinalFacilitySizing.DesHeatLoad) {
    5415         427 :                 CalcFinalFacilitySizing.DesHeatLoad = CalcFacilitySizing(DDNum).DesHeatLoad;
    5416         427 :                 CalcFinalFacilitySizing.TimeStepNumAtHeatMax = CalcFacilitySizing(DDNum).TimeStepNumAtHeatMax;
    5417         427 :                 CalcFinalFacilitySizing.HeatDDNum = CalcFacilitySizing(DDNum).HeatDDNum;
    5418       53251 :                 for (int TimeStepIndex = 1; TimeStepIndex <= NumOfTimeStepInDay; ++TimeStepIndex) {
    5419       52824 :                     CalcFinalFacilitySizing.HeatOutHumRatSeq(TimeStepIndex) = CalcFacilitySizing(DDNum).HeatOutHumRatSeq(TimeStepIndex);
    5420       52824 :                     CalcFinalFacilitySizing.HeatOutTempSeq(TimeStepIndex) = CalcFacilitySizing(DDNum).HeatOutTempSeq(TimeStepIndex);
    5421       52824 :                     CalcFinalFacilitySizing.HeatZoneTempSeq(TimeStepIndex) = CalcFacilitySizing(DDNum).HeatZoneTempSeq(TimeStepIndex);
    5422             :                 }
    5423             :             }
    5424             :         }
    5425             :     }
    5426      134847 : }
    5427             : 
    5428         404 : void UpdateTermUnitFinalZoneSizing(EnergyPlusData &state)
    5429             : {
    5430             :     // Move data from FinalZoneSizing to TermUnitFinalZoneSizing and apply terminal unit sizing adjustments
    5431             :     // Called once to initialize before system sizing
    5432             :     // M.J. Witte, July 2017
    5433             : 
    5434        3879 :     for (int termUnitSizingIndex = 1; termUnitSizingIndex <= state.dataSize->NumAirTerminalUnits; ++termUnitSizingIndex) {
    5435        3475 :         auto &thisTUFZSizing(state.dataSize->TermUnitFinalZoneSizing(termUnitSizingIndex));
    5436        3475 :         auto &thisTUSizing(state.dataSize->TermUnitSizing(termUnitSizingIndex));
    5437        3475 :         int ctrlZoneNum = thisTUSizing.CtrlZoneNum;
    5438        3475 :         auto const &thisFZSizing(state.dataSize->FinalZoneSizing(ctrlZoneNum));
    5439             : 
    5440             :         // Copy everything from FinalZoneSizing to TermUnitFinalZoneSizing
    5441        3475 :         thisTUFZSizing = thisFZSizing;
    5442        3475 :         thisTUFZSizing.ADUName = thisTUSizing.ADUName;
    5443             : 
    5444        3475 :         if (state.dataSize->NumAirTerminalSizingSpec > 0) {
    5445             :             // Apply DesignSpecification:AirTerminal:Sizing adjustments - default ratios are 1.0
    5446          40 :             Real64 minOAFrac = thisTUSizing.SpecMinOAFrac;
    5447             :             // Outdoor air
    5448          40 :             thisTUFZSizing.MinOA = thisFZSizing.MinOA * minOAFrac;
    5449          40 :             thisTUFZSizing.TotalOAFromPeople = thisFZSizing.TotalOAFromPeople * minOAFrac;
    5450          40 :             thisTUFZSizing.TotalOAFromArea = thisFZSizing.TotalOAFromArea * minOAFrac;
    5451          40 :             Real64 minOACoolMassFlow = thisTUFZSizing.MinOA * thisFZSizing.DesCoolDens;
    5452          40 :             Real64 minOAHeatMassFlow = thisTUFZSizing.MinOA * thisFZSizing.DesHeatDens;
    5453             :             // Cooling
    5454          40 :             Real64 coolFlowRatio = 1.0;
    5455          40 :             if (thisTUSizing.SpecDesCoolSATRatio > 0.0) {
    5456          40 :                 coolFlowRatio = thisTUSizing.SpecDesSensCoolingFrac / thisTUSizing.SpecDesCoolSATRatio;
    5457             :             } else {
    5458           0 :                 coolFlowRatio = thisTUSizing.SpecDesSensCoolingFrac;
    5459             :             }
    5460          40 :             Real64 coolLoadRatio = thisTUSizing.SpecDesSensCoolingFrac;
    5461          40 :             thisTUFZSizing.DesCoolLoad = thisFZSizing.DesCoolLoad * coolLoadRatio;
    5462          40 :             thisTUFZSizing.CoolMassFlow = thisFZSizing.CoolMassFlow * coolFlowRatio; // this field in TUFSizing doesn't appear to be used
    5463          40 :             thisTUFZSizing.CoolLoadSeq = thisFZSizing.CoolLoadSeq * coolLoadRatio;   // this field in TUFSizing doesn't appear to be used
    5464          40 :             thisTUFZSizing.NonAirSysDesCoolLoad = thisFZSizing.NonAirSysDesCoolLoad * coolLoadRatio;
    5465          40 :             thisTUFZSizing.NonAirSysDesCoolVolFlow = thisFZSizing.NonAirSysDesCoolVolFlow * coolFlowRatio;
    5466             :             // Adjust DesCoolVolFlow, DesCoolMassFlow, and CoolFlowSeq with cooling frac, SAT ratio, and minOA frac adjustments
    5467          40 :             thisTUFZSizing.DesCoolVolFlow = thisTUSizing.applyTermUnitSizingCoolFlow(thisFZSizing.DesCoolVolFlow, thisFZSizing.DesCoolVolFlowNoOA);
    5468          40 :             thisTUFZSizing.DesCoolVolFlow = max(thisTUFZSizing.DesCoolVolFlow, thisTUFZSizing.MinOA);
    5469          40 :             thisTUFZSizing.DesCoolVolFlowNoOA = thisFZSizing.DesCoolVolFlowNoOA * coolFlowRatio;
    5470          40 :             thisTUFZSizing.DesCoolMassFlow = thisTUFZSizing.DesCoolVolFlow * thisFZSizing.DesCoolDens;
    5471          40 :             thisTUFZSizing.DesCoolMassFlow = max(thisTUFZSizing.DesCoolMassFlow, minOACoolMassFlow);
    5472          40 :             thisTUFZSizing.DesCoolMassFlowNoOA = thisTUFZSizing.DesCoolVolFlowNoOA * thisFZSizing.DesCoolDens;
    5473        4360 :             for (int timeIndex = 1; timeIndex <= (state.dataGlobal->NumOfTimeStepInHour * 24); ++timeIndex) {
    5474        4320 :                 thisTUFZSizing.CoolFlowSeq(timeIndex) =
    5475        4320 :                     thisTUSizing.applyTermUnitSizingCoolFlow(thisFZSizing.CoolFlowSeq(timeIndex), thisFZSizing.CoolFlowSeqNoOA(timeIndex));
    5476        4320 :                 thisTUFZSizing.CoolFlowSeq(timeIndex) = max(thisTUFZSizing.CoolFlowSeq(timeIndex), minOACoolMassFlow);
    5477        4320 :                 thisTUFZSizing.CoolFlowSeqNoOA(timeIndex) = thisFZSizing.CoolFlowSeqNoOA(timeIndex) * coolFlowRatio;
    5478             :             }
    5479             :             // Adjust for possible MinOA impact on DesCoolVolFlowMin, with cooling frac adjustment but no SAT adjustment
    5480          40 :             thisTUFZSizing.DesCoolMinAirFlow =
    5481          40 :                 thisFZSizing.DesCoolMinAirFlow * thisTUSizing.SpecDesSensCoolingFrac; // no SAT adjustment, this is a straight flow rate input
    5482          40 :             thisTUFZSizing.DesCoolMinAirFlow2 =
    5483          40 :                 thisFZSizing.DesCoolMinAirFlow2 * thisTUSizing.SpecDesSensCoolingFrac; // no SAT adjustment, this is based on area
    5484          40 :             thisTUFZSizing.DesCoolVolFlowMin = max(thisTUFZSizing.DesCoolMinAirFlow,
    5485             :                                                    thisTUFZSizing.DesCoolMinAirFlow2,
    5486          40 :                                                    thisTUFZSizing.DesCoolVolFlow * thisTUFZSizing.DesCoolMinAirFlowFrac);
    5487             : 
    5488             :             // Heating
    5489          40 :             Real64 heatFlowRatio = 1.0;
    5490          40 :             if (thisTUSizing.SpecDesHeatSATRatio > 0.0) {
    5491          40 :                 heatFlowRatio = thisTUSizing.SpecDesSensHeatingFrac / thisTUSizing.SpecDesHeatSATRatio;
    5492             :             } else {
    5493           0 :                 heatFlowRatio = thisTUSizing.SpecDesSensHeatingFrac;
    5494             :             }
    5495          40 :             Real64 heatLoadRatio = thisTUSizing.SpecDesSensHeatingFrac;
    5496          40 :             thisTUFZSizing.DesHeatLoad = thisFZSizing.DesHeatLoad * heatLoadRatio;
    5497          40 :             thisTUFZSizing.HeatMassFlow = thisFZSizing.HeatMassFlow * heatFlowRatio; // this field in TUFSizing doesn't appear to be used
    5498          40 :             thisTUFZSizing.HeatLoadSeq = thisFZSizing.HeatLoadSeq * heatLoadRatio;   // this field in TUFSizing doesn't appear to be used
    5499          40 :             thisTUFZSizing.NonAirSysDesHeatLoad = thisFZSizing.NonAirSysDesHeatLoad * heatLoadRatio;
    5500          40 :             thisTUFZSizing.NonAirSysDesHeatVolFlow = thisFZSizing.NonAirSysDesHeatVolFlow * heatFlowRatio;
    5501             :             // Adjust DesHeatVolFlow, DesHeatMassFlow, and HeatFlowSeq with Heating frac, SAT ratio, and minOA frac adjustments
    5502          40 :             thisTUFZSizing.DesHeatVolFlow = thisTUSizing.applyTermUnitSizingHeatFlow(thisFZSizing.DesHeatVolFlow, thisFZSizing.DesHeatVolFlowNoOA);
    5503          40 :             thisTUFZSizing.DesHeatVolFlow = max(thisTUFZSizing.DesHeatVolFlow, thisTUFZSizing.MinOA);
    5504          40 :             thisTUFZSizing.DesHeatVolFlowNoOA = thisFZSizing.DesHeatVolFlowNoOA * heatFlowRatio;
    5505          40 :             thisTUFZSizing.DesHeatMassFlow = thisTUFZSizing.DesHeatVolFlow * thisFZSizing.DesHeatDens;
    5506          40 :             thisTUFZSizing.DesHeatMassFlow = max(thisTUFZSizing.DesHeatMassFlow, minOAHeatMassFlow);
    5507          40 :             thisTUFZSizing.DesHeatMassFlowNoOA = thisTUFZSizing.DesHeatVolFlowNoOA * thisFZSizing.DesHeatDens;
    5508        4360 :             for (int timeIndex = 1; timeIndex <= (state.dataGlobal->NumOfTimeStepInHour * 24); ++timeIndex) {
    5509        4320 :                 thisTUFZSizing.HeatFlowSeq(timeIndex) =
    5510        4320 :                     thisTUSizing.applyTermUnitSizingHeatFlow(thisFZSizing.HeatFlowSeq(timeIndex), thisFZSizing.HeatFlowSeqNoOA(timeIndex));
    5511        4320 :                 thisTUFZSizing.HeatFlowSeq(timeIndex) = max(thisTUFZSizing.HeatFlowSeq(timeIndex), minOAHeatMassFlow);
    5512        4320 :                 thisTUFZSizing.HeatFlowSeqNoOA(timeIndex) = thisFZSizing.HeatFlowSeqNoOA(timeIndex) * heatFlowRatio;
    5513             :             }
    5514             :             // DesHeatVolFlowMax is a mixed bag, so just repeat the original comparison from UpdateZoneSizing using the new flows
    5515          40 :             thisTUFZSizing.DesHeatMaxAirFlow =
    5516          40 :                 thisFZSizing.DesHeatMaxAirFlow * thisTUSizing.SpecDesSensHeatingFrac; // no SAT adjustment, this is a straight flow rate input
    5517          40 :             thisTUFZSizing.DesHeatMaxAirFlow2 =
    5518          40 :                 thisFZSizing.DesHeatMaxAirFlow2 * thisTUSizing.SpecDesSensHeatingFrac; // no SAT adjustment, this is based on area
    5519          40 :             thisTUFZSizing.DesHeatVolFlowMax =
    5520          40 :                 max(thisTUFZSizing.DesHeatMaxAirFlow,
    5521             :                     thisTUFZSizing.DesHeatMaxAirFlow2,
    5522          40 :                     max(thisTUFZSizing.DesCoolVolFlow, thisTUFZSizing.DesHeatVolFlow) * thisTUFZSizing.DesHeatMaxAirFlowFrac);
    5523             :             // Outdoor air fractions
    5524          40 :             if (thisTUFZSizing.DesCoolVolFlow > 0.0) {
    5525          40 :                 thisTUFZSizing.DesCoolOAFlowFrac = min(thisFZSizing.MinOA / thisTUFZSizing.DesCoolVolFlow, 1.0);
    5526             :             } else {
    5527           0 :                 thisTUFZSizing.DesCoolOAFlowFrac = 0.0;
    5528             :             }
    5529          40 :             if (thisTUFZSizing.DesHeatVolFlow > 0.0) {
    5530          40 :                 thisTUFZSizing.DesHeatOAFlowFrac = min(thisFZSizing.MinOA / thisTUFZSizing.DesHeatVolFlow, 1.0);
    5531             :             } else {
    5532           0 :                 thisTUFZSizing.DesHeatOAFlowFrac = 0.0;
    5533             :             }
    5534             :         }
    5535             :     }
    5536         404 : }
    5537        2313 : } // namespace EnergyPlus::SizingManager

Generated by: LCOV version 1.13