LCOV - code coverage report
Current view: top level - EnergyPlus - OutputReportTabular.hh (source / functions) Hit Total Coverage
Test: lcov.output.filtered Lines: 32 330 9.7 %
Date: 2024-08-24 18:31:18 Functions: 12 13 92.3 %

          Line data    Source code
       1             : // EnergyPlus, Copyright (c) 1996-2024, 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             : #ifndef OutputReportTabular_hh_INCLUDED
      49             : #define OutputReportTabular_hh_INCLUDED
      50             : 
      51             : // C++ Headers
      52             : #include <fstream>
      53             : #include <string>
      54             : 
      55             : // ObjexxFCL Headers
      56             : #include <ObjexxFCL/Array1D.hh>
      57             : #include <ObjexxFCL/Array1S.hh>
      58             : #include <ObjexxFCL/Array2D.hh>
      59             : #include <ObjexxFCL/Array2S.hh>
      60             : #include <ObjexxFCL/Array3D.hh>
      61             : #include <ObjexxFCL/Optional.hh>
      62             : 
      63             : // EnergyPlus Headers
      64             : #include <EnergyPlus/Data/BaseData.hh>
      65             : #include <EnergyPlus/DataGlobalConstants.hh>
      66             : #include <EnergyPlus/DataGlobals.hh>
      67             : #include <EnergyPlus/DataHeatBalance.hh>
      68             : #include <EnergyPlus/EnergyPlus.hh>
      69             : #include <EnergyPlus/FileSystem.hh>
      70             : #include <EnergyPlus/OutputProcessor.hh>
      71             : #include <EnergyPlus/WeatherManager.hh>
      72             : 
      73             : namespace EnergyPlus {
      74             : 
      75             : // Forward declarations
      76             : struct EnergyPlusData;
      77             : 
      78             : namespace OutputReportTabular {
      79             : 
      80             :     // Using/Aliasing
      81             : 
      82             :     // Data
      83             :     // MODULE PARAMETER DEFINITIONS:
      84             : 
      85             :     enum class AggType
      86             :     {
      87             :         Invalid = -1,
      88             :         SumOrAvg,
      89             :         Maximum,
      90             :         Minimum,
      91             :         ValueWhenMaxMin,
      92             :         HoursZero,
      93             :         HoursNonZero,
      94             :         HoursPositive,
      95             :         HoursNonPositive,
      96             :         HoursNegative,
      97             :         HoursNonNegative,
      98             :         SumOrAverageHoursShown,
      99             :         MaximumDuringHoursShown,
     100             :         MinimumDuringHoursShown,
     101             :         Num
     102             :     };
     103             : 
     104             :     enum class TableStyle
     105             :     {
     106             :         Invalid = -1,
     107             :         Comma,
     108             :         Tab,
     109             :         Fixed,
     110             :         HTML,
     111             :         XML,
     112             :         Num
     113             :     };
     114             : 
     115             :     enum class UnitsStyle
     116             :     {
     117             :         Invalid = -1,
     118             :         None,
     119             :         JtoKWH,
     120             :         JtoMJ,
     121             :         JtoGJ,
     122             :         InchPound,
     123             :         InchPoundExceptElectricity,
     124             :         NotFound,
     125             :         Num
     126             :     };
     127             :     constexpr std::array<std::string_view, static_cast<int>(UnitsStyle::Num) - 1> UnitsStyleNamesUC{
     128             :         "NONE", "JTOKWH", "JTOMJ", "JTOGJ", "INCHPOUND", "INCHPOUNDEXCEPTELECTRICITY"};
     129             : 
     130             :     enum class EndUseSubTableType
     131             :     {
     132             :         Invalid = -1,
     133             :         BySubCategory,
     134             :         BySpaceType,
     135             :         Num
     136             :     };
     137             : 
     138             :     enum LoadCompCol // These correspond to the columns in the load component table
     139             :     {
     140             :         // Invalid is not necessary since this is not specified by the user in the IDF
     141             :         SensInst = 1,
     142             :         SensDelay,
     143             :         SensRA,
     144             :         Latent,
     145             :         Total,
     146             :         Perc,
     147             :         Area,
     148             :         PerArea
     149             :     };
     150             : 
     151             :     enum LoadCompRow
     152             :     {
     153             :         // Invalid is not necessary since this is not specified by the user in the IDF
     154             :         // internal gains
     155             :         People = 1,
     156             :         Lights,
     157             :         Equip,
     158             :         Refrig,
     159             :         WaterUse,
     160             :         HvacLoss,
     161             :         PowerGen,
     162             : 
     163             :         // misc
     164             :         DOAS,
     165             :         Infil,
     166             :         ZoneVent,
     167             :         IntZonMix,
     168             : 
     169             :         // opaque surfaces
     170             :         Roof,
     171             :         IntZonCeil,
     172             :         OtherRoof,
     173             :         ExtWall,
     174             :         IntZonWall,
     175             :         GrdWall,
     176             :         OtherWall,
     177             :         ExtFlr,
     178             :         IntZonFlr,
     179             :         GrdFlr,
     180             :         OtherFlr,
     181             : 
     182             :         // subsurfaces
     183             :         FeneCond,
     184             :         FeneSolr,
     185             :         OpqDoor,
     186             : 
     187             :         // total
     188             :         GrdTot
     189             :     };
     190             : 
     191             :     // BEPS Report Related Variables
     192             :     // From Report:Table:Predefined - BEPS
     193             :     constexpr int numResourceTypes(14);
     194             :     constexpr int numSourceTypes(12);
     195             : 
     196             :     constexpr const char *validChars("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_:.");
     197             : 
     198             :     enum class OutputType
     199             :     {
     200             :         Invalid = -1,
     201             :         Zone,
     202             :         AirLoop,
     203             :         Facility,
     204             :         Num
     205             :     };
     206             : 
     207             :     // MODULE VARIABLE DECLARATIONS:
     208             : 
     209             :     // The Binned table type is different and only references one variable and its structure is very
     210             :     // different from the others so it is has its own type.
     211             : 
     212             :     constexpr int numNamedMonthly(63);
     213             :     // These reports are detailed/named in routine InitializePredefinedMonthlyTitles
     214             : 
     215             :     // Allow up to five output files to be created
     216             :     constexpr int maxNumStyles(5);
     217             : 
     218             :     // LineTypes for reading the stat file
     219             :     enum class StatLineType
     220             :     {
     221             :         Invalid = -1,
     222             :         Initialized, // used as a dummy placeholder
     223             :         StatisticsLine,
     224             :         LocationLine,
     225             :         LatLongLine,
     226             :         ElevationLine,
     227             :         StdPressureLine,
     228             :         DataSourceLine,
     229             :         WMOStationLine,
     230             :         DesignConditionsLine,
     231             :         HeatingConditionsLine,
     232             :         CoolingConditionsLine,
     233             :         StdHDDLine,
     234             :         StdCDDLine,
     235             :         MaxDryBulbLine,
     236             :         MinDryBulbLine,
     237             :         MaxDewPointLine,
     238             :         MinDewPointLine,
     239             :         WithHDDLine,
     240             :         WithCDDLine,
     241             :         MaxHourlyPrec,
     242             :         MonthlyPrec,
     243             :         KoppenLine,
     244             :         KoppenDes1Line,
     245             :         KoppenDes2Line,
     246             :         AshStdLine,
     247             :         AshStdDes1Line,
     248             :         AshStdDes2Line,
     249             :         AshStdDes3Line,
     250             :         Num
     251             :     };
     252             : 
     253             :     static constexpr std::array<DataHeatBalance::IntGainType, 1> IntGainTypesTubularGCLS = {DataHeatBalance::IntGainType::DaylightingDeviceTubular};
     254             : 
     255             :     // Types
     256             : 
     257             :     struct OutputTableBinnedType
     258             :     {
     259             :         // Members
     260             :         std::string keyValue;       // the key value (usually an asterisk to indicate all variables
     261             :         std::string varOrMeter;     // the name of the variable or meter
     262             :         Real64 intervalStart = 0.0; // The lowest value for the intervals being binned into.
     263             :         Real64 intervalSize = 0.0;  // The size of the bins starting with Interval start.
     264             :         int intervalCount = 0;      // The number of bins used. The number of hours below the start of
     265             :         // the lowest bin and above the value of the last bin are also shown.
     266             :         int resIndex = 0; // result index - pointer to BinResults array
     267             :         int numTables = 0;
     268             :         OutputProcessor::VariableType typeOfVar = OutputProcessor::VariableType::Invalid; // Was NotFound
     269             :         OutputProcessor::StoreType avgSum = OutputProcessor::StoreType::Average;          // Variable  is Averaged=1 or Summed=2
     270             :         OutputProcessor::TimeStepType stepType = OutputProcessor::TimeStepType::Zone;     // Variable time step is Zone=1 or HVAC=2
     271             :         Constant::Units units = Constant::Units::Invalid;                                 // the units enumeration
     272             :         std::string ScheduleName;                                                         // the name of the schedule
     273             :         int scheduleIndex = 0;                                                            // index to the schedule specified - if no schedule use zero
     274             :     };
     275             : 
     276             :     struct BinResultsType
     277             :     {
     278             :         // Members
     279             :         Array1D<Real64> mnth; // monthly bins
     280             :         Array1D<Real64> hrly; // hourly bins
     281             : 
     282             :         // Default Constructor
     283        2208 :         BinResultsType() : mnth(12, 0.0), hrly(24, 0.0)
     284             :         {
     285        2208 :         }
     286             :     };
     287             : 
     288             :     struct BinObjVarIDType
     289             :     {
     290             :         // Members
     291             :         std::string namesOfObj; // name of the object
     292             :         int varMeterNum;        // variable or meter number
     293             : 
     294             :         // Default Constructor
     295         736 :         BinObjVarIDType() : varMeterNum(0)
     296             :         {
     297         736 :         }
     298             :     };
     299             : 
     300             :     struct BinStatisticsType
     301             :     {
     302             :         // Members
     303             :         Real64 sum;     // sum of the variable
     304             :         Real64 sum2;    // sum of the variable squared
     305             :         int n;          // number of items in sum
     306             :         Real64 minimum; // minimum value
     307             :         Real64 maximum; // maximum value
     308             : 
     309             :         // Default Constructor
     310         736 :         BinStatisticsType() : sum(0.0), sum2(0.0), n(0), minimum(0.0), maximum(0.0)
     311             :         {
     312         736 :         }
     313             :     };
     314             : 
     315             :     struct NamedMonthlyType
     316             :     {
     317             :         // Members
     318             :         std::string title; // report title
     319             :         bool show;         // if report should be shown
     320             : 
     321             :         // Default Constructor
     322         753 :         NamedMonthlyType() : show(false)
     323             :         {
     324         753 :         }
     325             :     };
     326             : 
     327             :     struct MonthlyInputType
     328             :     {
     329             :         // Members
     330             :         std::string name;      // identifier
     331             :         int numFieldSet = 0;   // number of monthly field sets
     332             :         int firstFieldSet = 0; // pointer to the first field set
     333             :         int numTables = 0;     // number of tables
     334             :         int firstTable = 0;    // pointer to the first table
     335             :         int showDigits = 0;    // the number of digits to be shown
     336             :         bool isNamedMonthly = false;
     337             :     };
     338             : 
     339             :     struct MonthlyFieldSetInputType
     340             :     {
     341             :         // Members
     342             :         std::string variMeter;      // the name of the variable or meter
     343             :         std::string colHead;        // the column header to use instead of the variable name (only for predefined)
     344             :         AggType aggregate;          // the type of aggregation for the variable (see aggType parameters)
     345             :         Constant::Units varUnits;   // Units enumeration
     346             :         std::string variMeterUpper; // the name of the variable or meter uppercased
     347             :         OutputProcessor::VariableType typeOfVar;
     348             :         int keyCount;                              // noel
     349             :         OutputProcessor::StoreType varAvgSum;      // Variable  is Averaged=1 or Summed=2
     350             :         OutputProcessor::TimeStepType varStepType; // Variable time step is Zone=1 or HVAC=2
     351             :         Array1D_string NamesOfKeys;                // keyNames !noel
     352             :         Array1D_int IndexesForKeyVar;              // keyVarIndexes !noel
     353             : 
     354             :         // Default Constructor
     355         122 :         MonthlyFieldSetInputType()
     356         366 :             : aggregate(AggType::Invalid), varUnits(Constant::Units::None), typeOfVar(OutputProcessor::VariableType::Invalid), keyCount(0),
     357         122 :               varAvgSum(OutputProcessor::StoreType::Average), varStepType(OutputProcessor::TimeStepType::Zone)
     358             :         {
     359         122 :         }
     360             :     };
     361             : 
     362             :     struct MonthlyTablesType
     363             :     {
     364             :         // Members
     365             :         std::string keyValue; // the key value - the object names that result in the variable
     366             :         int firstColumn;      // pointer to the monthly column array for the first item
     367             :         int numColumns;       // number of columns for the table
     368             : 
     369             :         // Default Constructor
     370           6 :         MonthlyTablesType() : firstColumn(0), numColumns(0)
     371             :         {
     372           6 :         }
     373             :     };
     374             : 
     375             :     struct MonthlyColumnsType
     376             :     {
     377             :         // Members
     378             :         std::string varName;                     // name of variable
     379             :         std::string colHead;                     // column header (not used for user defined monthly)
     380             :         int varNum;                              // variable or meter number
     381             :         OutputProcessor::VariableType typeOfVar; // 0=not found, 1=integer, 2=real, 3=meter
     382             :         OutputProcessor::StoreType avgSum;       // Variable  is Averaged=1 or Summed=2
     383             :         OutputProcessor::TimeStepType stepType;  // Variable time step is Zone=1 or HVAC=2
     384             :         Constant::Units units;                   // the units string, may be blank
     385             :         AggType aggType;                         // index to the type of aggregation (see list of parameters)
     386             :         Array1D<Real64> reslt;                   // monthly results
     387             :         Array1D<Real64> duration;                // the time during which results are summed for use in averages
     388             :         Array1D_int timeStamp;                   // encoded timestamp of max or min
     389             :         Real64 aggForStep;                       // holds the aggregation for the HVAC time steps when smaller than
     390             :         // the zone timestep
     391             : 
     392             :         // Default Constructor
     393           6 :         MonthlyColumnsType()
     394          12 :             : varNum(0), typeOfVar(OutputProcessor::VariableType::Invalid), avgSum(OutputProcessor::StoreType::Average),
     395           6 :               stepType(OutputProcessor::TimeStepType::Zone), units(Constant::Units::None), aggType(AggType::Invalid), reslt(12, 0.0),
     396          12 :               duration(12, 0.0), timeStamp(12, 0), aggForStep(0.0)
     397             :         {
     398           6 :         }
     399             :     };
     400             : 
     401             :     struct TOCEntriesType
     402             :     {
     403             :         // Members
     404             :         std::string reportName;  // the name of the individual report
     405             :         std::string sectionName; // the name of the section containing individual reports
     406             :         bool isWritten;          // flag if the entry has been written to TOC
     407             : 
     408             :         // Default Constructor
     409          58 :         TOCEntriesType() : isWritten(false)
     410             :         {
     411          58 :         }
     412             :     };
     413             : 
     414             :     struct UnitConvType
     415             :     {
     416             :         // Members
     417             :         std::string siName; // the name abbreviation or symbol of the SI units
     418             :         std::string ipName; // the name abbreviation or symbol of the IP units
     419             :         Real64 mult;        // the multiplier used to convert from SI to IP in IP = (SI * mult) + offset
     420             :         Real64 offset;      // the offset used to convert from SI to IP in IP = (SI * mult) + offset
     421             :         std::string hint;   // the string used when multiple SI units match
     422             :         bool several;       // several different options for the SI unit to be converted into IP
     423             :         bool is_default;    // if part of a set of "several" this should be used as default
     424             : 
     425             :         // Default Constructor
     426         794 :         UnitConvType() : mult(1.0), offset(0.0), several(false), is_default(false)
     427             :         {
     428         794 :         }
     429             :     };
     430             : 
     431             :     struct CompLoadTablesType
     432             :     {
     433             :         // members
     434             :         int desDayNum = 0;              // design day number
     435             :         int timeStepMax = 0;            // times step of the day that the maximum occurs
     436             :         Array2D<Real64> cells;          // main component table results (column, row)
     437             :         Array2D_bool cellUsed;          // flag if the cell is used for the table of results (column, row)
     438             :         std::string peakDateHrMin = ""; // string containing peak timestamp
     439             :         Real64 outsideDryBulb = 0.0;    // outside dry bulb temperature at peak
     440             :         Real64 outsideWetBulb = 0.0;    // outside wet bulb temperature at peak
     441             :         Real64 outsideHumRatio = 0.0;   // outside humidity ratio at peak
     442             :         Real64 zoneDryBulb = 0.0;       // zone dry bulb temperature at peak
     443             :         Real64 zoneRelHum = 0.0;        // zone relative humidity at peak
     444             :         Real64 zoneHumRatio = 0.0;      // zone humidity ratio at peak
     445             : 
     446             :         Real64 supAirTemp = 0.0;     // supply air temperature
     447             :         Real64 mixAirTemp = 0.0;     // mixed air temperature
     448             :         Real64 mainFanAirFlow = 0.0; // main fan air flow
     449             :         Real64 outsideAirFlow = 0.0; // outside air flow
     450             :         Real64 designPeakLoad = 0.0; // design peak load
     451             :         Real64 diffDesignPeak = 0.0; // difference between Design and Peak Load
     452             : 
     453             :         Real64 peakDesSensLoad = 0.0;    // peak design sensible load
     454             :         Real64 estInstDelSensLoad = 0.0; // estimated instant plus delayed sensible load
     455             :         Real64 diffPeakEst = 0.0;        // difference between the peak design sensible load and the estimated instant plus delayed sensible load
     456             :         Array1D_int zoneIndices;         // the zone numbers covered by the report
     457             : 
     458             :         Real64 outsideAirRatio = 0.0;   // outside Air
     459             :         Real64 floorArea = 0.0;         // floor area
     460             :         Real64 airflowPerFlrArea = 0.0; // airflow per floor area
     461             :         Real64 airflowPerTotCap = 0.0;  // airflow per total capacity
     462             :         Real64 areaPerTotCap = 0.0;     // area per total capacity
     463             :         Real64 totCapPerArea = 0.0;     // total capacity per area
     464             :         Real64 chlPumpPerFlow = 0.0;    // chiller pump power per flow
     465             :         Real64 cndPumpPerFlow = 0.0;    // condenser pump power per flow
     466             :         Real64 numPeople = 0.0;         // number of people
     467             :     };
     468             : 
     469             :     struct ZompComponentAreasType
     470             :     {
     471             :         // members
     472             :         Real64 floor;
     473             :         Real64 roof;
     474             :         Real64 ceiling;
     475             :         Real64 extWall;
     476             :         Real64 intZoneWall;
     477             :         Real64 grndCntWall;
     478             :         Real64 extFloor;
     479             :         Real64 intZoneFloor;
     480             :         Real64 grndCntFloor;
     481             :         Real64 fenestration;
     482             :         Real64 door;
     483             : 
     484             :         // default constructor
     485          27 :         ZompComponentAreasType()
     486          27 :             : floor(0.), roof(0.), ceiling(0.), extWall(0.), intZoneWall(0.), grndCntWall(0.), extFloor(0.), intZoneFloor(0.), grndCntFloor(0.),
     487          27 :               fenestration(0.), door(0.)
     488             :         {
     489          27 :         }
     490             :     };
     491             : 
     492             :     // Functions
     493             : 
     494             :     std::ofstream &open_tbl_stream(EnergyPlusData &state, int const iStyle, fs::path const &filePath, bool output_to_file = true);
     495             : 
     496             :     void UpdateTabularReports(EnergyPlusData &state, OutputProcessor::TimeStepType t_timeStepType); // What kind of data to update (Zone, HVAC)
     497             : 
     498             :     //======================================================================================================================
     499             :     //======================================================================================================================
     500             : 
     501             :     //    GET INPUT ROUTINES
     502             : 
     503             :     //======================================================================================================================
     504             :     //======================================================================================================================
     505             : 
     506             :     void GetInputTabularMonthly(EnergyPlusData &state);
     507             : 
     508             :     int AddMonthlyReport(EnergyPlusData &state, std::string const &inReportName, int const inNumDigitsShown, bool isNamedMonthly = false);
     509             : 
     510             :     void AddMonthlyFieldSetInput(
     511             :         EnergyPlusData &state, int const inMonthReport, std::string const &inVariMeter, std::string const &inColHead, AggType const inAggregate);
     512             : 
     513             :     void InitializeTabularMonthly(EnergyPlusData &state);
     514             : 
     515             :     bool isInvalidAggregationOrder(EnergyPlusData &state);
     516             : 
     517             :     void GetInputTabularTimeBins(EnergyPlusData &state);
     518             : 
     519             :     bool warningAboutKeyNotFound(EnergyPlusData &state, int foundIndex, int inObjIndex, std::string const &moduleName);
     520             : 
     521             :     void GetInputTabularStyle(EnergyPlusData &state);
     522             : 
     523             :     UnitsStyle SetUnitsStyleFromString(std::string const &unitStringIn);
     524             : 
     525             :     void GetInputOutputTableSummaryReports(EnergyPlusData &state);
     526             : 
     527             :     bool isCompLoadRepReq(EnergyPlusData &state);
     528             : 
     529             :     bool hasSizingPeriodsDays(EnergyPlusData &state);
     530             : 
     531             :     void InitializePredefinedMonthlyTitles(EnergyPlusData &state);
     532             : 
     533             :     void CreatePredefinedMonthlyReports(EnergyPlusData &state);
     534             : 
     535             :     void GetInputFuelAndPollutionFactors(EnergyPlusData &state);
     536             : 
     537             :     //======================================================================================================================
     538             :     //======================================================================================================================
     539             : 
     540             :     //    OTHER INITIALIZATION ROUTINES
     541             : 
     542             :     //======================================================================================================================
     543             :     //======================================================================================================================
     544             : 
     545             :     void OpenOutputTabularFile(EnergyPlusData &state);
     546             : 
     547             :     void CloseOutputTabularFile(EnergyPlusData &state);
     548             : 
     549             :     void WriteTableOfContents(EnergyPlusData &state);
     550             : 
     551             :     void AddTOCReportPeriod(const int nReportPeriods,
     552             :                             const std::string &kw,
     553             :                             const Array1D<Weather::ReportPeriodData> &ReportPeriodInputData,
     554             :                             std::ostream &tbl_stream);
     555             : 
     556             :     //======================================================================================================================
     557             :     //======================================================================================================================
     558             : 
     559             :     //    GATHER DATA EACH TIME STEP ROUTINES
     560             : 
     561             :     //======================================================================================================================
     562             :     //======================================================================================================================
     563             : 
     564             :     void GatherBinResultsForTimestep(EnergyPlusData &state, OutputProcessor::TimeStepType t_timeStepType); // What kind of data to update (Zone, HVAC)
     565             : 
     566             :     void GatherMonthlyResultsForTimestep(EnergyPlusData &state,
     567             :                                          OutputProcessor::TimeStepType t_timeStepType); // What kind of data to update (Zone, HVAC)
     568             : 
     569             :     void GatherBEPSResultsForTimestep(EnergyPlusData &state,
     570             :                                       OutputProcessor::TimeStepType t_timeStepType); // What kind of data to update (Zone, HVAC)
     571             : 
     572             :     void GatherSourceEnergyEndUseResultsForTimestep(EnergyPlusData &state,
     573             :                                                     OutputProcessor::TimeStepType t_timeStepType); // What kind of data to update (Zone, HVAC)
     574             : 
     575             :     void GatherPeakDemandForTimestep(EnergyPlusData &state, OutputProcessor::TimeStepType t_timeStepType); // What kind of data to update (Zone, HVAC)
     576             : 
     577             :     void GatherHeatGainReport(EnergyPlusData &state, OutputProcessor::TimeStepType t_timeStepType); // What kind of data to update (Zone, HVAC)
     578             : 
     579             :     void GatherHeatEmissionReport(EnergyPlusData &state, OutputProcessor::TimeStepType t_timeStepType);
     580             : 
     581             :     void CalcHeatEmissionReport(EnergyPlusData &state);
     582             : 
     583             :     //======================================================================================================================
     584             :     //======================================================================================================================
     585             : 
     586             :     //    WRITE OUTPUT FILE ROUTINES
     587             : 
     588             :     //======================================================================================================================
     589             :     //======================================================================================================================
     590             : 
     591             :     void WriteTabularReports(EnergyPlusData &state);
     592             : 
     593             :     void parseStatLine(const std::string &lineIn,
     594             :                        StatLineType &lineType,
     595             :                        bool &desConditionlinepassed,
     596             :                        bool &heatingDesignlinepassed,
     597             :                        bool &coolingDesignlinepassed,
     598             :                        bool isKoppen,
     599             :                        bool &insideLiquidPrecipitation);
     600             : 
     601             :     void FillWeatherPredefinedEntries(EnergyPlusData &state);
     602             : 
     603             :     std::string GetColumnUsingTabs(std::string const &inString, // Input String
     604             :                                    int const colNum             // Column number
     605             :     );
     606             : 
     607             :     void FillRemainingPredefinedEntries(EnergyPlusData &state);
     608             : 
     609             :     void WriteMonthlyTables(EnergyPlusData &state);
     610             : 
     611             :     void WriteTimeBinTables(EnergyPlusData &state);
     612             : 
     613             :     void WriteBEPSTable(EnergyPlusData &state);
     614             : 
     615             :     void writeBEPSEndUseBySubCatOrSpaceType(EnergyPlusData &state,
     616             :                                             EndUseSubTableType tableType,
     617             :                                             Array2D<Real64> &endUseSubOther,
     618             :                                             Array2D<Real64> &collapsedEndUse,
     619             :                                             Array3D<Real64> &collapsedEndUseSub,
     620             :                                             Array1D_bool &needOtherRow,
     621             :                                             const UnitsStyle unitsStyle_cur,
     622             :                                             const bool produceTabular,
     623             :                                             const bool produceSQLite);
     624             : 
     625             :     std::string ResourceWarningMessage(std::string const &resource);
     626             : 
     627             :     Real64 WaterConversionFunct(Real64 WaterTotal, Real64 ConversionFactor);
     628             : 
     629             :     void WriteSourceEnergyEndUseSummary(EnergyPlusData &state);
     630             : 
     631             :     void WriteDemandEndUseSummary(EnergyPlusData &state);
     632             : 
     633             :     void WriteCompCostTable(EnergyPlusData &state);
     634             : 
     635             :     void writeRowReportPeriodInputVeri(const std::string &reportType,
     636             :                                        Array2D_string &tableBody,
     637             :                                        const int rowid,
     638             :                                        const int periodIdx,
     639             :                                        const Array1D<Weather::ReportPeriodData> &ReportPeriodInputData);
     640             : 
     641             :     void WriteVeriSumTable(EnergyPlusData &state);
     642             : 
     643             :     void writeVeriSumSpaceTables(EnergyPlusData &state, bool produceTabular, bool produceSQLite);
     644             : 
     645             :     void WriteAdaptiveComfortTable(EnergyPlusData &state);
     646             : 
     647             :     std::string formatReportPeriodTimestamp(const int year, const int month, const int day, const int hour);
     648             : 
     649             :     void WriteReportHeaderReportingPeriod(EnergyPlusData &state,
     650             :                                           const std::string &reportKeyWord,
     651             :                                           const int periodIdx,
     652             :                                           const Array1D<Weather::ReportPeriodData> &ReportPeriodInputData);
     653             : 
     654             :     void WriteReportPeriodTimeConsumption(EnergyPlusData &state);
     655             : 
     656             :     void WriteThermalResilienceTablesRepPeriod(EnergyPlusData &state, int const periodIdx);
     657             : 
     658             :     void WriteThermalResilienceTables(EnergyPlusData &state);
     659             : 
     660             :     void WriteCO2ResilienceTables(EnergyPlusData &state);
     661             : 
     662             :     void WriteCO2ResilienceTablesRepPeriod(EnergyPlusData &state, const int periodIdx);
     663             : 
     664             :     void WriteVisualResilienceTables(EnergyPlusData &state);
     665             : 
     666             :     void WriteVisualResilienceTablesRepPeriod(EnergyPlusData &state, const int periodIdx);
     667             : 
     668             :     template <int columnNum>
     669             :     void WriteResilienceBinsTable(EnergyPlusData &state,
     670             :                                   std::array<int, columnNum> const &columnHead,
     671             :                                   const std::array<Real64, columnNum> DataHeatBalance::ZoneResilience::*memberPtr,
     672             :                                   Real64 const unitConvMultiplier = 1.0);
     673             : 
     674             :     template <int columnNum>
     675             :     void WriteResilienceBinsTableNonPreDefUseZoneData(EnergyPlusData &state,
     676             :                                                       const std::string &tableName,
     677             :                                                       Array1D_string const &columnHead,
     678             :                                                       Array1D_int &columnWidth,
     679             :                                                       const std::array<Real64, columnNum> DataHeatBalance::ZoneResilience::*memberPtr,
     680             :                                                       Array1D_string &rowHead,
     681             :                                                       Array2D_string &tableBody,
     682             :                                                       Real64 const unitConvMultiplier = 1.0);
     683             : 
     684             :     void WriteResilienceBinsTableReportingPeriod(EnergyPlusData &state,
     685             :                                                  const std::string &tableType,
     686             :                                                  int const columnNum,
     687             :                                                  int const periodIdx,
     688             :                                                  const std::string &periodTitle,
     689             :                                                  const std::string &tableName,
     690             :                                                  Array1D_string const &columnHead,
     691             :                                                  Array1D_int &columnWidth,
     692             :                                                  Array2D<std::vector<Real64>> const &ZoneBins,
     693             :                                                  Array1D_string &rowHead,
     694             :                                                  Array2D_string &tableBody,
     695             :                                                  Real64 const unitConvMultiplier = 1.0);
     696             : 
     697             :     void WriteSETHoursTableNonPreDefUseZoneData(EnergyPlusData &state,
     698             :                                                 int const columnNum,
     699             :                                                 const std::string &tableName,
     700             :                                                 Array1D_string const &columnHead,
     701             :                                                 Array1D_int &columnWidth,
     702             :                                                 const std::array<Real64, 5> DataHeatBalance::ZoneResilience::*memberPtr,
     703             :                                                 Array1D_string &rowHead,
     704             :                                                 Array2D_string &tableBody,
     705             :                                                 Real64 const unitConvMultiplier = 1.0);
     706             : 
     707             :     void WriteSETHoursTableReportingPeriod(EnergyPlusData &state,
     708             :                                            int const columnNum,
     709             :                                            int const periodIdx,
     710             :                                            const std::string &periodTitle,
     711             :                                            const std::string &tableName,
     712             :                                            Array1D_string const &columnHead,
     713             :                                            Array1D_int &columnWidth,
     714             :                                            Array2D<std::vector<Real64>> const &ZoneBins,
     715             :                                            Array1D_string &rowHead,
     716             :                                            Array2D_string &tableBody,
     717             :                                            Real64 const unitConvMultiplier = 1.0);
     718             : 
     719             :     // return the table entry of the rowIndex-th row and columnIndex-th col
     720             :     std::string RetrieveEntryFromTableBody(Array2D_string &tableBody, int const rowIndex, int const columnIndex);
     721             : 
     722             :     void WriteHourOfSafetyTable(EnergyPlusData &state,
     723             :                                 int const columnNum,
     724             :                                 std::vector<int> const &columnHead,
     725             :                                 Array1D<std::vector<Real64>> const &ZoneBins,
     726             :                                 int const dateColIdx);
     727             : 
     728             :     void WriteHourOfSafetyTableNonPreDefUseZoneData(EnergyPlusData &state,
     729             :                                                     int const columnNum,
     730             :                                                     const std::string &tableName,
     731             :                                                     Array1D_string const &columnHead,
     732             :                                                     Array1D_int &columnWidth,
     733             :                                                     const std::array<Real64, 5> DataHeatBalance::ZoneResilience::*memberPtr,
     734             :                                                     Array1D_string &rowHead,
     735             :                                                     Array2D_string &tableBody,
     736             :                                                     int const dateColIdx);
     737             : 
     738             :     void WriteHourOfSafetyTableReportingPeriod(EnergyPlusData &state,
     739             :                                                int const columnNum,
     740             :                                                int const periodIdx,
     741             :                                                const std::string &periodTitle,
     742             :                                                const std::string &tableName,
     743             :                                                Array1D_string const &columnHead,
     744             :                                                Array1D_int &columnWidth,
     745             :                                                Array2D<std::vector<Real64>> const &ZoneBins,
     746             :                                                Array1D_string &rowHead,
     747             :                                                Array2D_string &tableBody,
     748             :                                                int const dateColIdx);
     749             : 
     750             :     void WriteHeatEmissionTable(EnergyPlusData &state);
     751             : 
     752             :     void WritePredefinedTables(EnergyPlusData &state);
     753             : 
     754             :     void WriteComponentSizing(EnergyPlusData &state);
     755             : 
     756             :     void WriteSurfaceShadowing(EnergyPlusData &state);
     757             : 
     758             :     void WriteEioTables(EnergyPlusData &state);
     759             : 
     760             :     int unitsFromHeading(EnergyPlusData &state, std::string &heading);
     761             : 
     762             :     int unitsFromHeading(EnergyPlusData &state, std::string &heading, UnitsStyle unitsStyle_para);
     763             : 
     764             :     std::vector<std::string> splitCommaString(std::string const &inputString);
     765             : 
     766             :     void AddTOCLoadComponentTableSummaries(EnergyPlusData &state);
     767             : 
     768             :     void AllocateLoadComponentArrays(EnergyPlusData &state);
     769             : 
     770             :     void DeallocateLoadComponentArrays(EnergyPlusData &state);
     771             : 
     772             :     void ComputeLoadComponentDecayCurve(EnergyPlusData &state);
     773             : 
     774             :     void GatherComponentLoadsSurface(EnergyPlusData &state);
     775             : 
     776             :     void GatherComponentLoadsHVAC(EnergyPlusData &state);
     777             : 
     778             :     void WriteLoadComponentSummaryTables(EnergyPlusData &state);
     779             : 
     780             :     void GetDelaySequences(EnergyPlusData &state,
     781             :                            int desDaySelected,
     782             :                            bool isCooling,
     783             :                            int zoneIndex,
     784             :                            Array1D<Real64> &peopleDelaySeq,
     785             :                            Array1D<Real64> &equipDelaySeq,
     786             :                            Array1D<Real64> &hvacLossDelaySeq,
     787             :                            Array1D<Real64> &powerGenDelaySeq,
     788             :                            Array1D<Real64> &lightDelaySeq,
     789             :                            Array1D<Real64> &feneSolarDelaySeq,
     790             :                            Array3D<Real64> &feneCondInstantSeq,
     791             :                            Array2D<Real64> &surfDelaySeq);
     792             : 
     793             :     void ComputeTableBodyUsingMovingAvg(EnergyPlusData &state,
     794             :                                         Array2D<Real64> &resultCells,
     795             :                                         Array2D_bool &resultCellsUsed,
     796             :                                         int desDaySelected,
     797             :                                         int timeOfMax,
     798             :                                         int zoneIndex,
     799             :                                         Array1D<Real64> const &peopleDelaySeq,
     800             :                                         Array1D<Real64> const &equipDelaySeq,
     801             :                                         Array1D<Real64> const &hvacLossDelaySeq,
     802             :                                         Array1D<Real64> const &powerGenDelaySeq,
     803             :                                         Array1D<Real64> const &lightDelaySeq,
     804             :                                         Array1D<Real64> const &feneSolarDelaySeq,
     805             :                                         Array3D<Real64> const &feneCondInstantSeqLoc,
     806             :                                         Array2D<Real64> const &surfDelaySeq);
     807             : 
     808             :     void
     809             :     CollectPeakZoneConditions(EnergyPlusData &state, CompLoadTablesType &compLoad, int desDaySelected, int timeOfMax, int zoneIndex, bool isCooling);
     810             : 
     811             :     void ComputeEngineeringChecks(CompLoadTablesType &compLoad);
     812             : 
     813             :     void GetZoneComponentAreas(EnergyPlusData &state, Array1D<ZompComponentAreasType> &areas);
     814             : 
     815             :     void AddAreaColumnForZone(int zoneNum, Array1D<ZompComponentAreasType> const &compAreas, CompLoadTablesType &compLoadTotal);
     816             : 
     817             :     void CombineLoadCompResults(CompLoadTablesType &compLoadTotal, CompLoadTablesType const &compLoadPartial, Real64 multiplier);
     818             : 
     819             :     void AddTotalRowsForLoadSummary(CompLoadTablesType &compLoadTotal);
     820             : 
     821             :     void ComputePeakDifference(CompLoadTablesType &compLoad);
     822             : 
     823             :     void LoadSummaryUnitConversion(EnergyPlusData &state, CompLoadTablesType &compLoadTotal);
     824             : 
     825             :     void LoadSummaryUnitConversion(EnergyPlusData &state, CompLoadTablesType &compLoadTotal, UnitsStyle unitsStyle_para);
     826             : 
     827             :     void CreateListOfZonesForAirLoop(EnergyPlusData &state, CompLoadTablesType &compLoad, Array1D_int const &zoneToAirLoop, int curAirLoop);
     828             : 
     829             :     void OutputCompLoadSummary(EnergyPlusData &state,
     830             :                                EnergyPlus::OutputReportTabular::OutputType kind,
     831             :                                CompLoadTablesType const &compLoadCool,
     832             :                                CompLoadTablesType const &compLoadHeat,
     833             :                                int zoneOrAirLoopIndex,
     834             :                                UnitsStyle unitsStyle_para,
     835             :                                bool produceTabular_para,
     836             :                                bool produceSQLite_para);
     837             : 
     838             :     void WriteReportHeaders(EnergyPlusData &state,
     839             :                             std::string const &reportName,
     840             :                             std::string const &objectName,
     841             :                             OutputProcessor::StoreType const averageOrSum);
     842             : 
     843             :     void WriteSubtitle(EnergyPlusData &state, std::string const &subtitle);
     844             : 
     845             :     void WriteTextLine(EnergyPlusData &state, std::string const &lineOfText, bool const useBold = false);
     846             : 
     847             :     void WriteTable(EnergyPlusData &state,
     848             :                     Array2S_string const body, // row,column
     849             :                     const Array1D_string &rowLabels,
     850             :                     const Array1D_string &columnLabels,
     851             :                     Array1D_int &widthColumn,
     852             :                     bool transposeXML = false,
     853             :                     std::string_view const footnoteText = {});
     854             : 
     855             :     bool produceDualUnitsFlags(int iUnit_Sys,
     856             :                                EnergyPlus::OutputReportTabular::UnitsStyle unitsStyle_Tab,
     857             :                                EnergyPlus::OutputReportTabular::UnitsStyle unitsStyle_Sql,
     858             :                                UnitsStyle &unitsStyle_Cur,
     859             :                                bool &produce_Tab,
     860             :                                bool &produce_Sql);
     861             : 
     862             :     std::string MakeAnchorName(std::string const &reportString, std::string const &objectString);
     863             : 
     864             :     std::string InsertCurrencySymbol(EnergyPlusData &state,
     865             :                                      std::string const &inString, // Input String
     866             :                                      bool const isHTML            // True if an HTML string
     867             :     );
     868             : 
     869             :     std::string ConvertToElementTag(std::string const &inString); // Input String
     870             : 
     871             :     std::string ConvertUnicodeToUTF8(unsigned long const codepoint);
     872             : 
     873             :     std::string ConvertToEscaped(std::string const &inString, // Input String
     874             :                                  bool isXML = true);          // isXML if false assumes HTML and will not convert quotes and apostrophes, for HTML4
     875             : 
     876             :     void DetermineBuildingFloorArea(EnergyPlusData &state);
     877             : 
     878             :     // Tables with Subcategories in particular have a blank for rowHead for display in the HTML output.
     879             :     // This routine will fill up the blanks for output to Sql in particular
     880             :     void FillRowHead(Array1D_string &rowHead);
     881             : 
     882             :     //======================================================================================================================
     883             :     //======================================================================================================================
     884             : 
     885             :     //    ROUTINES TO RESET GATHERED VALUES TO ZERO
     886             : 
     887             :     //======================================================================================================================
     888             :     //======================================================================================================================
     889             : 
     890             :     void ResetTabularReports(EnergyPlusData &state);
     891             : 
     892             :     void ResetMonthlyGathering(EnergyPlusData &state);
     893             : 
     894             :     void ResetBinGathering(EnergyPlusData &state);
     895             : 
     896             :     void ResetBEPSGathering(EnergyPlusData &state);
     897             : 
     898             :     void ResetSourceEnergyEndUseGathering(EnergyPlusData &state);
     899             : 
     900             :     void ResetPeakDemandGathering(EnergyPlusData &state);
     901             : 
     902             :     void ResetHeatGainGathering(EnergyPlusData &state);
     903             : 
     904             :     void ResetRemainingPredefinedEntries(EnergyPlusData &state);
     905             : 
     906             :     void ResetAdaptiveComfort(EnergyPlusData &state);
     907             : 
     908             :     //======================================================================================================================
     909             :     //======================================================================================================================
     910             : 
     911             :     //    ROUTINES RELATED TO IF VALUE IS IN A RANGE
     912             : 
     913             :     //======================================================================================================================
     914             :     //======================================================================================================================
     915             : 
     916             :     bool isInTriangle(
     917             :         Real64 const qx, Real64 const qy, Real64 const x1, Real64 const y1, Real64 const x2, Real64 const y2, Real64 const x3, Real64 const y3);
     918             : 
     919             :     bool isInQuadrilateral(Real64 const qx,
     920             :                            Real64 const qy,
     921             :                            Real64 const ax,
     922             :                            Real64 const ay,
     923             :                            Real64 const bx,
     924             :                            Real64 const by,
     925             :                            Real64 const cx,
     926             :                            Real64 const cy,
     927             :                            Real64 const dx,
     928             :                            Real64 const dy);
     929             : 
     930             :     //======================================================================================================================
     931             :     //======================================================================================================================
     932             : 
     933             :     //    SUPPORT ROUTINES
     934             : 
     935             :     //======================================================================================================================
     936             :     //======================================================================================================================
     937             : 
     938             :     std::string RealToStr(Real64 const RealIn, int const numDigits);
     939             : 
     940             :     Real64 StrToReal(std::string_view stringIn);
     941             : 
     942             :     std::string DateToString(int const codedDate); // word containing encoded month, day, hour, minute
     943             : 
     944             :     bool isNumber(std::string const &s);
     945             : 
     946             :     int digitsAferDecimal(std::string const &s);
     947             : 
     948             :     void AddTOCEntry(EnergyPlusData &state, std::string const &nameSection, std::string const &nameReport);
     949             : 
     950             :     void SetupUnitConversions(EnergyPlusData &state);
     951             : 
     952             :     std::string GetUnitSubString(std::string const &inString); // Input String
     953             : 
     954             :     void LookupSItoIP(EnergyPlusData &state, std::string const &stringInWithSI, int &unitConvIndex, std::string &stringOutWithIP);
     955             : 
     956             :     void LookupJtokWH(EnergyPlusData &state, std::string const &stringInWithJ, int &unitConvIndex, std::string &stringOutWithKWH);
     957             : 
     958             :     Real64 ConvertIP(EnergyPlusData &state, int const unitConvIndex, Real64 const SIvalue);
     959             : 
     960             :     Real64 ConvertIPdelta(EnergyPlusData &state, int const unitConvIndex, Real64 const SIvalue);
     961             : 
     962             :     void GetUnitConversion(EnergyPlusData &state, int const unitConvIndex, Real64 &multiplier, Real64 &offset, std::string &IPunit);
     963             : 
     964             :     Real64 getSpecificUnitMultiplier(EnergyPlusData &state, std::string const &SIunit, std::string const &IPunit);
     965             : 
     966             :     Real64 getSpecificUnitDivider(EnergyPlusData &state, std::string const &SIunit, std::string const &IPunit);
     967             : 
     968             :     Real64 getSpecificUnitIndex(EnergyPlusData &state, std::string const &SIunit, std::string const &IPunit);
     969             : 
     970             : } // namespace OutputReportTabular
     971             : 
     972             : struct OutputReportTabularData : BaseGlobalStruct
     973             : {
     974             : 
     975             :     OutputReportTabular::UnitsStyle unitsStyle = OutputReportTabular::UnitsStyle::None;
     976        9421 :     bool ip() const
     977             :     {
     978       18710 :         return this->unitsStyle == OutputReportTabular::UnitsStyle::InchPound ||
     979       18710 :                this->unitsStyle == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity;
     980             :     }
     981             :     OutputReportTabular::UnitsStyle unitsStyle_SQLite = OutputReportTabular::UnitsStyle::NotFound;
     982             :     int OutputTableBinnedCount = 0;
     983             :     int BinResultsTableCount = 0;
     984             :     int BinResultsIntervalCount = 0;
     985             :     int MonthlyInputCount = 0;
     986             :     int sizeMonthlyInput = 0;
     987             :     int MonthlyFieldSetInputCount = 0;
     988             :     int sizeMonthlyFieldSetInput = 0;
     989             :     int MonthlyTablesCount = 0;
     990             :     int MonthlyColumnsCount = 0;
     991             :     Array1D_bool IsMonthGathered = Array1D_bool(12, false); // shown as true for any month used
     992             :     int TOCEntriesCount = 0;
     993             :     int TOCEntriesSize = 0;
     994             :     int UnitConvSize = 0;
     995             :     bool WriteTabularFiles = false;
     996             :     bool GetInput = true;
     997             : 
     998             :     // From Report:Table:Style
     999             :     int numStyles = 0;
    1000             :     std::ofstream csv_stream; // CSV table stream
    1001             :     std::ofstream tab_stream; // Tab table stream
    1002             :     std::ofstream fix_stream; // Fixed table stream
    1003             :     std::ofstream htm_stream; // HTML table stream
    1004             :     std::ofstream xml_stream; // XML table stream
    1005             :     Array1D<std::ofstream *> TabularOutputFile = Array1D<std::ofstream *>(
    1006             :         OutputReportTabular::maxNumStyles, {&csv_stream, &tab_stream, &fix_stream, &htm_stream, &xml_stream}); // Table stream array
    1007             :     Array1D_string del = Array1D_string(OutputReportTabular::maxNumStyles);                                    // the delimiter to use
    1008             :     Array1D<OutputReportTabular::TableStyle> TableStyle = Array1D<OutputReportTabular::TableStyle>(
    1009             :         OutputReportTabular::maxNumStyles, OutputReportTabular::TableStyle::Invalid); // see list of parameters
    1010             : 
    1011             :     Real64 timeInYear = 0.0;
    1012             : 
    1013             :     // Flags for predefined tabular reports
    1014             :     bool displayTabularBEPS = false;
    1015             :     bool displayLEEDSummary = false;
    1016             :     bool displayTabularCompCosts = false;
    1017             :     bool displayTabularVeriSum = false;
    1018             :     bool displayComponentSizing = false;
    1019             :     bool displaySurfaceShadowing = false;
    1020             :     bool displayDemandEndUse = false;
    1021             :     bool displayAdaptiveComfort = false;
    1022             :     bool displaySourceEnergyEndUseSummary = false;
    1023             :     bool displayZoneComponentLoadSummary = false;
    1024             :     bool displayAirLoopComponentLoadSummary = false;
    1025             :     bool displayFacilityComponentLoadSummary = false;
    1026             :     bool displayLifeCycleCostReport = false;
    1027             :     bool displayTariffReport = false;
    1028             :     bool displayEconomicResultSummary = false;
    1029             :     bool displayHeatEmissionsSummary = false;
    1030             :     bool displayEioSummary = false;
    1031             :     bool displayThermalResilienceSummary = false;
    1032             :     bool displayCO2ResilienceSummary = false;
    1033             :     bool displayVisualResilienceSummary = false;
    1034             :     bool displayThermalResilienceSummaryExplicitly = false;
    1035             :     bool displayCO2ResilienceSummaryExplicitly = false;
    1036             :     bool displayVisualResilienceSummaryExplicitly = false;
    1037             :     // BEPS Report Related Variables
    1038             :     // From Report:Table:Predefined - BEPS
    1039             :     // arrays that hold the meter numbers that are initialized at get input
    1040             : 
    1041             :     Array1D_int meterNumTotalsBEPS = Array1D_int(OutputReportTabular::numResourceTypes, -1);
    1042             :     Array1D_int meterNumTotalsSource = Array1D_int(OutputReportTabular::numSourceTypes, -1);
    1043             :     Array1D_bool fuelfactorsused = Array1D_bool(OutputReportTabular::numSourceTypes, false);
    1044             :     Array1D_bool ffUsed = Array1D_bool(OutputReportTabular::numResourceTypes, false);
    1045             :     Array1D<Real64> SourceFactors = Array1D<Real64>(OutputReportTabular::numResourceTypes, 0.0);
    1046             :     Array1D_bool ffSchedUsed = Array1D_bool(OutputReportTabular::numResourceTypes, false);
    1047             :     Array1D_int ffSchedIndex = Array1D_int(OutputReportTabular::numResourceTypes, 0);
    1048             :     Array2D_int meterNumEndUseBEPS = Array2D_int(OutputReportTabular::numResourceTypes, static_cast<int>(Constant::EndUse::Num), -1);
    1049             :     Array3D_int meterNumEndUseSubBEPS;
    1050             :     Array3D_int meterNumEndUseSpTypeBEPS;
    1051             :     // arrays that hold the names of the resource and end uses
    1052             :     Array1D_string resourceTypeNames = Array1D_string(OutputReportTabular::numResourceTypes);
    1053             :     Array1D_string sourceTypeNames = Array1D_string(OutputReportTabular::numSourceTypes);
    1054             :     Array1D_string endUseNames = Array1D_string(static_cast<int>(Constant::EndUse::Num));
    1055             :     // arrays that hold the actual values for the year
    1056             :     Array1D<Real64> gatherTotalsBEPS = Array1D<Real64>(OutputReportTabular::numResourceTypes, 0.0);
    1057             :     Array1D<Real64> gatherTotalsBySourceBEPS = Array1D<Real64>(OutputReportTabular::numResourceTypes, 0.0);
    1058             :     Array1D<Real64> gatherTotalsSource = Array1D<Real64>(OutputReportTabular::numSourceTypes, 0.0);
    1059             :     Array1D<Real64> gatherTotalsBySource = Array1D<Real64>(OutputReportTabular::numSourceTypes, 0.0);
    1060             :     Array2D<Real64> gatherEndUseBEPS = Array2D<Real64>(OutputReportTabular::numResourceTypes, static_cast<int>(Constant::EndUse::Num), 0.0);
    1061             :     Array2D<Real64> gatherEndUseBySourceBEPS = Array2D<Real64>(OutputReportTabular::numResourceTypes, static_cast<int>(Constant::EndUse::Num), 0.0);
    1062             :     Array3D<Real64> gatherEndUseSubBEPS;
    1063             :     Array3D<Real64> gatherEndUseSpTypeBEPS;
    1064             :     Array1D_bool needOtherRowLEED45 = Array1D_bool(static_cast<int>(Constant::EndUse::Num));
    1065             :     Array1D_bool needOtherRowEndUse = Array1D_bool(static_cast<int>(Constant::EndUse::Num));
    1066             : 
    1067             :     // arrays the hold the demand values
    1068             :     Array1D<Real64> gatherDemandTotal = Array1D<Real64>(OutputReportTabular::numResourceTypes, 0.0);
    1069             :     Array2D<Real64> gatherDemandEndUse = Array2D<Real64>(OutputReportTabular::numResourceTypes, static_cast<int>(Constant::EndUse::Num), 0.0);
    1070             :     Array2D<Real64> gatherDemandIndEndUse = Array2D<Real64>(OutputReportTabular::numResourceTypes, static_cast<int>(Constant::EndUse::Num), 0.0);
    1071             :     Array3D<Real64> gatherDemandEndUseSub;
    1072             :     Array3D<Real64> gatherDemandIndEndUseSub;
    1073             :     Array1D_int gatherDemandTimeStamp = Array1D_int(OutputReportTabular::numResourceTypes, 0);
    1074             : 
    1075             :     // to keep track of hours for the BEPS report gathering
    1076             :     Real64 gatherElapsedTimeBEPS = 0.0;
    1077             :     // for normalization of results
    1078             :     Real64 buildingGrossFloorArea = 0.0;
    1079             :     Real64 buildingConditionedFloorArea = 0.0;
    1080             :     // keep track if schedules are used in fuel factors
    1081             :     bool fuelFactorSchedulesUsed = false;
    1082             :     // for electric load components on BEPS report
    1083             :     int meterNumPowerFuelFireGen = 0;
    1084             :     Real64 gatherPowerFuelFireGen = 0.0;
    1085             :     int meterNumPowerPV = 0;
    1086             :     Real64 gatherPowerPV = 0.0;
    1087             :     int meterNumPowerWind = 0;
    1088             :     Real64 gatherPowerWind = 0.0;
    1089             :     Real64 OverallNetEnergyFromStorage = 0.0;
    1090             :     int meterNumPowerHTGeothermal = 0;
    1091             :     Real64 gatherPowerHTGeothermal = 0.0;
    1092             :     int meterNumElecProduced = 0;
    1093             :     Real64 gatherElecProduced = 0.0;
    1094             :     int meterNumElecPurchased = 0;
    1095             :     Real64 gatherElecPurchased = 0.0;
    1096             :     int meterNumElecSurplusSold = 0;
    1097             :     Real64 gatherElecSurplusSold = 0.0;
    1098             :     int meterNumElecStorage = 0;
    1099             :     Real64 gatherElecStorage = 0.0;
    1100             :     int meterNumPowerConversion = 0;
    1101             :     Real64 gatherPowerConversion = 0.0;
    1102             :     // for on site thermal source components on BEPS report
    1103             :     int meterNumWaterHeatRecovery = 0;
    1104             :     Real64 gatherWaterHeatRecovery = 0.0;
    1105             :     int meterNumAirHeatRecoveryCool = 0;
    1106             :     Real64 gatherAirHeatRecoveryCool = 0.0;
    1107             :     int meterNumAirHeatRecoveryHeat = 0;
    1108             :     Real64 gatherAirHeatRecoveryHeat = 0.0;
    1109             :     int meterNumHeatHTGeothermal = 0;
    1110             :     Real64 gatherHeatHTGeothermal = 0.0;
    1111             :     int meterNumHeatSolarWater = 0;
    1112             :     Real64 gatherHeatSolarWater = 0.0;
    1113             :     int meterNumHeatSolarAir = 0;
    1114             :     Real64 gatherHeatSolarAir = 0.0;
    1115             :     // for on site water components on BEPS report
    1116             :     int meterNumRainWater = 0;
    1117             :     Real64 gatherRainWater = 0.0;
    1118             :     int meterNumCondensate = 0;
    1119             :     Real64 gatherCondensate = 0.0;
    1120             :     int meterNumGroundwater = 0;
    1121             :     Real64 gatherWellwater = 0.0;
    1122             :     int meterNumMains = 0;
    1123             :     Real64 gatherMains = 0.0;
    1124             :     int meterNumWaterEndUseTotal = 0;
    1125             :     Real64 gatherWaterEndUseTotal = 0.0;
    1126             :     // for source energy conversion factors on BEPS report
    1127             :     Real64 sourceFactorElectric = 0.0;
    1128             :     Real64 sourceFactorNaturalGas = 0.0;
    1129             :     Real64 efficiencyDistrictCooling = 0.0;
    1130             :     Real64 efficiencyDistrictHeatingWater = 0.0;
    1131             :     Real64 sourceFactorDistrictHeatingSteam = 0.0;
    1132             :     Real64 sourceFactorGasoline = 0.0;
    1133             :     Real64 sourceFactorDiesel = 0.0;
    1134             :     Real64 sourceFactorCoal = 0.0;
    1135             :     Real64 sourceFactorFuelOil1 = 0.0;
    1136             :     Real64 sourceFactorFuelOil2 = 0.0;
    1137             :     Real64 sourceFactorPropane = 0.0;
    1138             :     Real64 sourceFactorOtherFuel1 = 0.0;
    1139             :     Real64 sourceFactorOtherFuel2 = 0.0;
    1140             : 
    1141             :     Array1D_int td = Array1D_int(8);
    1142             :     //(1)   Current year
    1143             :     //(2)   Current month
    1144             :     //(3)   Current day
    1145             :     //(4)   Time difference with respect to UTC in minutes (0-59)
    1146             :     //(5)   Hour of the day (0-23)
    1147             :     //(6)   Minutes (0-59)
    1148             :     //(7)   Seconds (0-59)
    1149             :     //(8)   Milliseconds (0-999)
    1150             : 
    1151             :     // Design day name storage
    1152             :     Array1D_string DesignDayName;
    1153             :     int DesignDayCount = 0;
    1154             : 
    1155             :     // arrays related to pulse and load component reporting
    1156             :     Array2D_int radiantPulseTimestep;
    1157             :     Array2D<Real64> radiantPulseReceived;
    1158             :     Array3D<Real64> loadConvectedNormal;
    1159             :     Array3D<Real64> loadConvectedWithPulse;
    1160             :     Array3D<Real64> netSurfRadSeq;
    1161             :     Array2D<Real64> decayCurveCool;
    1162             :     Array2D<Real64> decayCurveHeat;
    1163             :     Array3D<Real64> ITABSFseq; // used for determining the radiant fraction on each surface
    1164             :     Array3D<Real64> TMULTseq;  // used for determining the radiant fraction on each surface
    1165             : 
    1166             :     Array3D<Real64> peopleInstantSeq;
    1167             :     Array3D<Real64> peopleLatentSeq;
    1168             :     Array3D<Real64> peopleRadSeq;
    1169             : 
    1170             :     Array3D<Real64> lightInstantSeq;
    1171             :     Array3D<Real64> lightRetAirSeq;
    1172             :     Array3D<Real64> lightLWRadSeq; // long wave thermal radiation
    1173             :     Array3D<Real64> lightSWRadSeq; // short wave visible radiation
    1174             : 
    1175             :     Array3D<Real64> equipInstantSeq;
    1176             :     Array3D<Real64> equipLatentSeq;
    1177             :     Array3D<Real64> equipRadSeq;
    1178             : 
    1179             :     Array3D<Real64> refrigInstantSeq;
    1180             :     Array3D<Real64> refrigRetAirSeq;
    1181             :     Array3D<Real64> refrigLatentSeq;
    1182             : 
    1183             :     Array3D<Real64> waterUseInstantSeq;
    1184             :     Array3D<Real64> waterUseLatentSeq;
    1185             : 
    1186             :     Array3D<Real64> hvacLossInstantSeq;
    1187             :     Array3D<Real64> hvacLossRadSeq;
    1188             : 
    1189             :     Array3D<Real64> powerGenInstantSeq;
    1190             :     Array3D<Real64> powerGenRadSeq;
    1191             :     Array3D<Real64> infilInstantSeq;
    1192             :     Array3D<Real64> infilLatentSeq;
    1193             : 
    1194             :     Array3D<Real64> zoneVentInstantSeq;
    1195             :     Array3D<Real64> zoneVentLatentSeq;
    1196             : 
    1197             :     Array3D<Real64> interZoneMixInstantSeq;
    1198             :     Array3D<Real64> interZoneMixLatentSeq;
    1199             : 
    1200             :     Array3D<Real64> feneCondInstantSeq;
    1201             :     Array3D<Real64> feneSolarRadSeq;
    1202             : 
    1203             :     int maxUniqueKeyCount = 0;
    1204             : 
    1205             :     // for the XML report must keep track fo the active sub-table name and report set by other routines
    1206             :     std::string activeSubTableName;
    1207             :     std::string activeReportNameNoSpace;
    1208             :     std::string activeReportName;
    1209             :     std::string activeForName;
    1210             :     std::string prevReportName;
    1211             : 
    1212             :     // Object Data
    1213             :     Array1D<OutputReportTabular::OutputTableBinnedType> OutputTableBinned;
    1214             :     Array2D<OutputReportTabular::BinResultsType> BinResults;      // table number, number of intervals
    1215             :     Array1D<OutputReportTabular::BinResultsType> BinResultsBelow; // time below the lowest defined bin
    1216             :     Array1D<OutputReportTabular::BinResultsType> BinResultsAbove; // time above the highest defined bin
    1217             :     Array1D<OutputReportTabular::BinObjVarIDType> BinObjVarID;
    1218             :     Array1D<OutputReportTabular::BinStatisticsType> BinStatistics;
    1219             :     Array1D<OutputReportTabular::NamedMonthlyType> namedMonthly; // for predefined monthly report titles
    1220             :     Array1D<OutputReportTabular::MonthlyFieldSetInputType> MonthlyFieldSetInput;
    1221             :     Array1D<OutputReportTabular::MonthlyInputType> MonthlyInput;
    1222             :     Array1D<OutputReportTabular::MonthlyTablesType> MonthlyTables;
    1223             :     Array1D<OutputReportTabular::MonthlyColumnsType> MonthlyColumns;
    1224             :     Array1D<OutputReportTabular::TOCEntriesType> TOCEntries;
    1225             :     Array1D<OutputReportTabular::UnitConvType> UnitConv;
    1226             : 
    1227             :     bool GatherMonthlyResultsForTimestepRunOnce = true;
    1228             :     bool UpdateTabularReportsGetInput = true;
    1229             :     bool GatherHeatGainReportfirstTime = true;
    1230             :     bool AllocateLoadComponentArraysDoAllocate = true;
    1231             :     bool initAdjFenDone = false;
    1232             :     int numPeopleAdaptive = 0;
    1233             : 
    1234             :     Real64 BigNum = 0.0;
    1235             :     int ErrCount1 = 0;
    1236             :     Array1D<OutputProcessor::VariableType> MonthlyColumnsTypeOfVar;
    1237             :     Array1D<OutputProcessor::TimeStepType> MonthlyColumnsStepType;
    1238             :     Array1D<OutputReportTabular::AggType> MonthlyColumnsAggType;
    1239             :     Array1D_int MonthlyColumnsVarNum;
    1240             :     Array1D_int MonthlyTablesNumColumns;
    1241             :     int curFirstColumn = 0;
    1242             :     int iZoneGHGR = 0;
    1243             :     int iRadiantGHGR = 0;
    1244             :     int iunitGHGR = 0;
    1245             :     int curZoneGHGR = 0;
    1246             :     Real64 eqpSensGHGR = 0.0;
    1247             :     Real64 totalGHGR = 0.0; // the following arrays store the radiant total for each timestep
    1248             :     Array1D<Real64> radiantHeat;
    1249             :     Array1D<Real64> radiantCool;
    1250             :     Array1D<Real64> ATUHeat;
    1251             :     Array1D<Real64> ATUCool;
    1252             :     int timestepTimeStampGHGR = 0;
    1253             :     Real64 bldgHtPk = 0.0;
    1254             :     Real64 bldgClPk = 0.0;
    1255             :     Real64 timeStepRatio = 0.0;
    1256             :     Real64 totalVolume = 0.0;
    1257             :     int numUncondZones = 0;
    1258             :     int numCondZones = 0;
    1259             :     Real64 HrsPerWeek = 0.0; // sensible heat gain report totals
    1260             :     Real64 totalZoneEqHt = 0.0;
    1261             :     Real64 totalZoneEqCl = 0.0;
    1262             :     Real64 totalHvacATUHt = 0.0;
    1263             :     Real64 totalHvacATUCl = 0.0;
    1264             :     Real64 totalSurfHt = 0.0;
    1265             :     Real64 totalSurfCl = 0.0;
    1266             :     Real64 totalPeoplAdd = 0.0;
    1267             :     Real64 totalLiteAdd = 0.0;
    1268             :     Real64 totalEquipAdd = 0.0;
    1269             :     Real64 totalWindAdd = 0.0;
    1270             :     Real64 totalIzaAdd = 0.0;
    1271             :     Real64 totalInfilAdd = 0.0;
    1272             :     Real64 totalOtherAdd = 0.0;
    1273             :     Real64 totalEquipRem = 0.0;
    1274             :     Real64 totalWindRem = 0.0;
    1275             :     Real64 totalIzaRem = 0.0;
    1276             :     Real64 totalInfilRem = 0.0;
    1277             :     Real64 totalOtherRem = 0.0;
    1278             :     Real64 curConversionOffset = 0.0;
    1279             :     Real64 leedSiteIntLite = 0.0;
    1280             :     Real64 leedSiteSpHeat = 0.0;
    1281             :     Real64 leedSiteSpCool = 0.0;
    1282             :     Real64 leedSiteFanInt = 0.0;
    1283             :     Real64 leedSiteSrvWatr = 0.0;
    1284             :     Real64 leedSiteRecept = 0.0;
    1285             :     Real64 leedSiteTotal = 0.0;
    1286             :     Real64 m2_unitConv = 0.0;
    1287             :     int unitConvIndexWCCT = 0;
    1288             :     int grandTotal = 1;
    1289             :     int condTotal = 2;
    1290             :     int uncondTotal = 3;
    1291             :     int notpartTotal = 4;
    1292             :     int unitConvIndexWVST = 0;
    1293             :     Real64 m_unitConv = 0.0;
    1294             :     Real64 m2_unitConvWVST = 0.0;
    1295             :     Real64 m3_unitConv = 0.0;
    1296             :     Real64 Wm2_unitConv = 0.0;
    1297             :     Array1D<Real64> zstArea = Array1D<Real64>(4);
    1298             :     Array1D<Real64> zstVolume = Array1D<Real64>(4);
    1299             :     Array1D<Real64> zstWallArea = Array1D<Real64>(4);
    1300             :     Array1D<Real64> zstUndWallArea = Array1D<Real64>(4);
    1301             :     Array1D<Real64> zstWindowArea = Array1D<Real64>(4);
    1302             :     Array1D<Real64> zstOpeningArea = Array1D<Real64>(4);
    1303             :     Array1D<Real64> zstLight = Array1D<Real64>(4);
    1304             :     Array1D<Real64> zstPeople = Array1D<Real64>(4);
    1305             :     Array1D<Real64> zstPlug = Array1D<Real64>(4);
    1306             :     int indexUnitConvWCS = 0;
    1307             :     Real64 curValueSIWCS = 0.0;
    1308             :     Real64 curValueWCS = 0.0;
    1309             :     int ZoneNumCLCDC = 0;
    1310             :     int SurfNumCLCDC = 0;
    1311             :     int TimeStepCLCDC = 0;
    1312             :     int TimeOfPulseCLCDC = 0;
    1313             :     int CoolDesSelectedCLCDC = 0; // design day selected for cooling
    1314             :     int HeatDesSelectedCLCDC = 0; // design day selected for heating
    1315             :     int iSurfGCLS = 0;
    1316             :     int ZoneNumGCLS = 0;
    1317             :     int TimeStepInDayGCLS = 0;
    1318             :     int iZoneGCLH = 0;
    1319             :     int TimeStepInDayGCLH = 0;
    1320             :     Array3D_bool adjFenDone;
    1321             :     Real64 BigNumRMG = 0.0;
    1322             :     int foundGsui = 0;
    1323             :     int iUnitGsui = 0;
    1324             :     int foundGsum = 0;
    1325             :     int iUnitGsum = 0;
    1326             :     std::string footnote;
    1327             :     std::string m_unitName;
    1328             :     std::string m2_unitName;
    1329             :     std::string m3_unitName;
    1330             :     std::string Wm2_unitName;
    1331             :     std::string curColHeadWithSI;
    1332             :     std::string curColHead;
    1333             : 
    1334         796 :     void init_state([[maybe_unused]] EnergyPlusData &state) override
    1335             :     {
    1336         796 :     }
    1337             : 
    1338           0 :     void clear_state() override
    1339             :     {
    1340           0 :         this->unitsStyle = OutputReportTabular::UnitsStyle::None;
    1341           0 :         this->unitsStyle_SQLite = OutputReportTabular::UnitsStyle::NotFound;
    1342           0 :         this->OutputTableBinnedCount = 0;
    1343           0 :         this->BinResultsTableCount = 0;
    1344           0 :         this->BinResultsIntervalCount = 0;
    1345           0 :         this->MonthlyInputCount = 0;
    1346           0 :         this->sizeMonthlyInput = 0;
    1347           0 :         this->MonthlyFieldSetInputCount = 0;
    1348           0 :         this->sizeMonthlyFieldSetInput = 0;
    1349           0 :         this->MonthlyTablesCount = 0;
    1350           0 :         this->MonthlyColumnsCount = 0;
    1351           0 :         this->IsMonthGathered = Array1D_bool(12, false);
    1352           0 :         this->TOCEntriesCount = 0;
    1353           0 :         this->TOCEntriesSize = 0;
    1354           0 :         this->UnitConvSize = 0;
    1355           0 :         this->WriteTabularFiles = false;
    1356           0 :         this->GetInput = true;
    1357           0 :         this->numStyles = 0;
    1358           0 :         this->TabularOutputFile = Array1D<std::ofstream *>(
    1359           0 :             OutputReportTabular::maxNumStyles, {&this->csv_stream, &this->tab_stream, &this->fix_stream, &this->htm_stream, &this->xml_stream});
    1360           0 :         this->del = Array1D_string(OutputReportTabular::maxNumStyles);
    1361           0 :         this->TableStyle = Array1D<OutputReportTabular::TableStyle>(OutputReportTabular::maxNumStyles, OutputReportTabular::TableStyle::Invalid);
    1362           0 :         this->timeInYear = 0.0;
    1363           0 :         this->displayTabularBEPS = false;
    1364           0 :         this->displayLEEDSummary = false;
    1365           0 :         this->displayTabularCompCosts = false;
    1366           0 :         this->displayTabularVeriSum = false;
    1367           0 :         this->displayComponentSizing = false;
    1368           0 :         this->displaySurfaceShadowing = false;
    1369           0 :         this->displayDemandEndUse = false;
    1370           0 :         this->displayAdaptiveComfort = false;
    1371           0 :         this->displaySourceEnergyEndUseSummary = false;
    1372           0 :         this->displayZoneComponentLoadSummary = false;
    1373           0 :         this->displayAirLoopComponentLoadSummary = false;
    1374           0 :         this->displayFacilityComponentLoadSummary = false;
    1375           0 :         this->displayLifeCycleCostReport = false;
    1376           0 :         this->displayTariffReport = false;
    1377           0 :         this->displayEconomicResultSummary = false;
    1378           0 :         this->displayHeatEmissionsSummary = false;
    1379           0 :         this->displayEioSummary = false;
    1380           0 :         this->displayThermalResilienceSummary = false;
    1381           0 :         this->displayCO2ResilienceSummary = false;
    1382           0 :         this->displayVisualResilienceSummary = false;
    1383           0 :         this->displayThermalResilienceSummaryExplicitly = false;
    1384           0 :         this->displayCO2ResilienceSummaryExplicitly = false;
    1385           0 :         this->displayVisualResilienceSummaryExplicitly = false;
    1386           0 :         this->meterNumTotalsBEPS = Array1D_int(OutputReportTabular::numResourceTypes, 0);
    1387           0 :         this->meterNumTotalsSource = Array1D_int(OutputReportTabular::numSourceTypes, 0);
    1388           0 :         this->fuelfactorsused = Array1D_bool(OutputReportTabular::numSourceTypes, false);
    1389           0 :         this->ffUsed = Array1D_bool(OutputReportTabular::numResourceTypes, false);
    1390           0 :         this->SourceFactors = Array1D<Real64>(OutputReportTabular::numResourceTypes, 0.0);
    1391           0 :         this->ffSchedUsed = Array1D_bool(OutputReportTabular::numResourceTypes, false);
    1392           0 :         this->ffSchedIndex = Array1D_int(OutputReportTabular::numResourceTypes, 0);
    1393           0 :         this->meterNumEndUseBEPS = Array2D_int(OutputReportTabular::numResourceTypes, static_cast<int>(Constant::EndUse::Num), 0);
    1394           0 :         this->meterNumEndUseSubBEPS.deallocate();
    1395           0 :         this->meterNumEndUseSpTypeBEPS.deallocate();
    1396           0 :         this->resourceTypeNames = Array1D_string(OutputReportTabular::numResourceTypes);
    1397           0 :         this->sourceTypeNames = Array1D_string(OutputReportTabular::numSourceTypes);
    1398           0 :         this->endUseNames = Array1D_string(static_cast<int>(Constant::EndUse::Num));
    1399           0 :         this->gatherTotalsBEPS = Array1D<Real64>(OutputReportTabular::numResourceTypes, 0.0);
    1400           0 :         this->gatherTotalsBySourceBEPS = Array1D<Real64>(OutputReportTabular::numResourceTypes, 0.0);
    1401           0 :         this->gatherTotalsSource = Array1D<Real64>(OutputReportTabular::numSourceTypes, 0.0);
    1402           0 :         this->gatherTotalsBySource = Array1D<Real64>(OutputReportTabular::numSourceTypes, 0.0);
    1403           0 :         this->gatherEndUseBEPS = Array2D<Real64>(OutputReportTabular::numResourceTypes, static_cast<int>(Constant::EndUse::Num), 0.0);
    1404           0 :         this->gatherEndUseBySourceBEPS = Array2D<Real64>(OutputReportTabular::numResourceTypes, static_cast<int>(Constant::EndUse::Num), 0.0);
    1405           0 :         this->gatherEndUseSubBEPS.deallocate();
    1406           0 :         this->gatherEndUseSpTypeBEPS.deallocate();
    1407           0 :         this->needOtherRowLEED45 = Array1D_bool(static_cast<int>(Constant::EndUse::Num));
    1408           0 :         this->needOtherRowEndUse = Array1D_bool(static_cast<int>(Constant::EndUse::Num));
    1409           0 :         this->gatherDemandTotal = Array1D<Real64>(OutputReportTabular::numResourceTypes, 0.0);
    1410           0 :         this->gatherDemandEndUse = Array2D<Real64>(OutputReportTabular::numResourceTypes, static_cast<int>(Constant::EndUse::Num), 0.0);
    1411           0 :         this->gatherDemandIndEndUse = Array2D<Real64>(OutputReportTabular::numResourceTypes, static_cast<int>(Constant::EndUse::Num), 0.0);
    1412           0 :         this->gatherDemandEndUseSub.deallocate();
    1413           0 :         this->gatherDemandIndEndUseSub.deallocate();
    1414           0 :         this->gatherDemandTimeStamp = Array1D_int(OutputReportTabular::numResourceTypes, 0);
    1415           0 :         this->gatherElapsedTimeBEPS = 0.0;
    1416           0 :         this->buildingGrossFloorArea = 0.0;
    1417           0 :         this->buildingConditionedFloorArea = 0.0;
    1418           0 :         this->fuelFactorSchedulesUsed = false;
    1419           0 :         this->meterNumPowerFuelFireGen = 0;
    1420           0 :         this->gatherPowerFuelFireGen = 0.0;
    1421           0 :         this->meterNumPowerPV = 0;
    1422           0 :         this->gatherPowerPV = 0.0;
    1423           0 :         this->meterNumPowerWind = 0;
    1424           0 :         this->gatherPowerWind = 0.0;
    1425           0 :         this->OverallNetEnergyFromStorage = 0.0;
    1426           0 :         this->meterNumPowerHTGeothermal = 0;
    1427           0 :         this->gatherPowerHTGeothermal = 0.0;
    1428           0 :         this->meterNumElecProduced = 0;
    1429           0 :         this->gatherElecProduced = 0.0;
    1430           0 :         this->meterNumElecPurchased = 0;
    1431           0 :         this->gatherElecPurchased = 0.0;
    1432           0 :         this->meterNumElecSurplusSold = 0;
    1433           0 :         this->gatherElecSurplusSold = 0.0;
    1434           0 :         this->meterNumElecStorage = 0;
    1435           0 :         this->gatherElecStorage = 0.0;
    1436           0 :         this->meterNumPowerConversion = 0;
    1437           0 :         this->gatherPowerConversion = 0.0;
    1438           0 :         this->meterNumWaterHeatRecovery = 0;
    1439           0 :         this->gatherWaterHeatRecovery = 0.0;
    1440           0 :         this->meterNumAirHeatRecoveryCool = 0;
    1441           0 :         this->gatherAirHeatRecoveryCool = 0.0;
    1442           0 :         this->meterNumAirHeatRecoveryHeat = 0;
    1443           0 :         this->gatherAirHeatRecoveryHeat = 0.0;
    1444           0 :         this->meterNumHeatHTGeothermal = 0;
    1445           0 :         this->gatherHeatHTGeothermal = 0.0;
    1446           0 :         this->meterNumHeatSolarWater = 0;
    1447           0 :         this->gatherHeatSolarWater = 0.0;
    1448           0 :         this->meterNumHeatSolarAir = 0;
    1449           0 :         this->gatherHeatSolarAir = 0.0;
    1450           0 :         this->meterNumRainWater = 0;
    1451           0 :         this->gatherRainWater = 0.0;
    1452           0 :         this->meterNumCondensate = 0;
    1453           0 :         this->gatherCondensate = 0.0;
    1454           0 :         this->meterNumGroundwater = 0;
    1455           0 :         this->gatherWellwater = 0.0;
    1456           0 :         this->meterNumMains = 0;
    1457           0 :         this->gatherMains = 0.0;
    1458           0 :         this->meterNumWaterEndUseTotal = 0;
    1459           0 :         this->gatherWaterEndUseTotal = 0.0;
    1460           0 :         this->sourceFactorElectric = 0.0;
    1461           0 :         this->sourceFactorNaturalGas = 0.0;
    1462           0 :         this->efficiencyDistrictCooling = 0.0;
    1463           0 :         this->efficiencyDistrictHeatingWater = 0.0;
    1464           0 :         this->sourceFactorDistrictHeatingSteam = 0.0;
    1465           0 :         this->sourceFactorGasoline = 0.0;
    1466           0 :         this->sourceFactorDiesel = 0.0;
    1467           0 :         this->sourceFactorCoal = 0.0;
    1468           0 :         this->sourceFactorFuelOil1 = 0.0;
    1469           0 :         this->sourceFactorFuelOil2 = 0.0;
    1470           0 :         this->sourceFactorPropane = 0.0;
    1471           0 :         this->sourceFactorOtherFuel1 = 0.0;
    1472           0 :         this->sourceFactorOtherFuel2 = 0.0;
    1473           0 :         this->td = Array1D_int(8);
    1474           0 :         this->DesignDayName.deallocate();
    1475           0 :         this->DesignDayCount = 0;
    1476           0 :         this->radiantPulseTimestep.deallocate();
    1477           0 :         this->radiantPulseReceived.deallocate();
    1478           0 :         this->loadConvectedNormal.deallocate();
    1479           0 :         this->loadConvectedWithPulse.deallocate();
    1480           0 :         this->netSurfRadSeq.deallocate();
    1481           0 :         this->decayCurveCool.deallocate();
    1482           0 :         this->decayCurveHeat.deallocate();
    1483           0 :         this->ITABSFseq.deallocate();
    1484           0 :         this->TMULTseq.deallocate();
    1485           0 :         this->peopleInstantSeq.deallocate();
    1486           0 :         this->peopleLatentSeq.deallocate();
    1487           0 :         this->peopleRadSeq.deallocate();
    1488           0 :         this->lightInstantSeq.deallocate();
    1489           0 :         this->lightRetAirSeq.deallocate();
    1490           0 :         this->lightLWRadSeq.deallocate();
    1491           0 :         this->lightSWRadSeq.deallocate();
    1492           0 :         this->equipInstantSeq.deallocate();
    1493           0 :         this->equipLatentSeq.deallocate();
    1494           0 :         this->equipRadSeq.deallocate();
    1495           0 :         this->refrigInstantSeq.deallocate();
    1496           0 :         this->refrigRetAirSeq.deallocate();
    1497           0 :         this->refrigLatentSeq.deallocate();
    1498           0 :         this->waterUseInstantSeq.deallocate();
    1499           0 :         this->waterUseLatentSeq.deallocate();
    1500           0 :         this->hvacLossInstantSeq.deallocate();
    1501           0 :         this->hvacLossRadSeq.deallocate();
    1502           0 :         this->powerGenInstantSeq.deallocate();
    1503           0 :         this->powerGenRadSeq.deallocate();
    1504           0 :         this->infilInstantSeq.deallocate();
    1505           0 :         this->infilLatentSeq.deallocate();
    1506           0 :         this->zoneVentInstantSeq.deallocate();
    1507           0 :         this->zoneVentLatentSeq.deallocate();
    1508           0 :         this->interZoneMixInstantSeq.deallocate();
    1509           0 :         this->interZoneMixLatentSeq.deallocate();
    1510           0 :         this->feneCondInstantSeq.deallocate();
    1511           0 :         this->feneSolarRadSeq.deallocate();
    1512           0 :         this->maxUniqueKeyCount = 0;
    1513           0 :         this->activeSubTableName.clear();
    1514           0 :         this->activeReportNameNoSpace.clear();
    1515           0 :         this->activeReportName.clear();
    1516           0 :         this->activeForName.clear();
    1517           0 :         this->prevReportName.clear();
    1518           0 :         this->OutputTableBinned.deallocate();
    1519           0 :         this->BinResults.deallocate();
    1520           0 :         this->BinResultsBelow.deallocate();
    1521           0 :         this->BinResultsAbove.deallocate();
    1522           0 :         this->BinObjVarID.deallocate();
    1523           0 :         this->BinStatistics.deallocate();
    1524           0 :         this->namedMonthly.deallocate();
    1525           0 :         this->MonthlyFieldSetInput.deallocate();
    1526           0 :         this->MonthlyInput.deallocate();
    1527           0 :         this->MonthlyTables.deallocate();
    1528           0 :         this->MonthlyColumns.deallocate();
    1529           0 :         this->TOCEntries.deallocate();
    1530           0 :         this->UnitConv.deallocate();
    1531           0 :         this->GatherMonthlyResultsForTimestepRunOnce = true;
    1532           0 :         this->UpdateTabularReportsGetInput = true;
    1533           0 :         this->GatherHeatGainReportfirstTime = true;
    1534           0 :         this->AllocateLoadComponentArraysDoAllocate = true;
    1535           0 :         this->initAdjFenDone = false;
    1536           0 :         this->numPeopleAdaptive = 0;
    1537             : 
    1538           0 :         this->BigNum = 0.0;
    1539           0 :         this->ErrCount1 = 0;
    1540           0 :         this->MonthlyColumnsTypeOfVar.clear();
    1541           0 :         this->MonthlyColumnsStepType.clear();
    1542           0 :         this->MonthlyColumnsAggType.clear();
    1543           0 :         this->MonthlyColumnsVarNum.clear();
    1544           0 :         this->MonthlyTablesNumColumns.clear();
    1545           0 :         this->curFirstColumn = 0;
    1546           0 :         this->iZoneGHGR = 0;
    1547           0 :         this->iRadiantGHGR = 0;
    1548           0 :         this->iunitGHGR = 0;
    1549           0 :         this->curZoneGHGR = 0;
    1550           0 :         this->eqpSensGHGR = 0.0;
    1551           0 :         this->totalGHGR = 0.0;
    1552             :         // the following arrays store the radiant total for each timestep
    1553           0 :         this->radiantHeat.clear();
    1554           0 :         this->radiantCool.clear();
    1555           0 :         this->ATUHeat.clear();
    1556           0 :         this->ATUCool.clear();
    1557           0 :         this->timestepTimeStampGHGR = 0;
    1558           0 :         this->bldgHtPk = 0.0;
    1559           0 :         this->bldgClPk = 0.0;
    1560           0 :         this->timeStepRatio = 0.0;
    1561           0 :         this->totalVolume = 0.0;
    1562           0 :         this->numUncondZones = 0;
    1563           0 :         this->numCondZones = 0;
    1564           0 :         this->HrsPerWeek = 0.0;
    1565             :         // sensible heat gain report totals
    1566           0 :         this->totalZoneEqHt = 0.0;
    1567           0 :         this->totalZoneEqCl = 0.0;
    1568           0 :         this->totalHvacATUHt = 0.0;
    1569           0 :         this->totalHvacATUCl = 0.0;
    1570           0 :         this->totalSurfHt = 0.0;
    1571           0 :         this->totalSurfCl = 0.0;
    1572           0 :         this->totalPeoplAdd = 0.0;
    1573           0 :         this->totalLiteAdd = 0.0;
    1574           0 :         this->totalEquipAdd = 0.0;
    1575           0 :         this->totalWindAdd = 0.0;
    1576           0 :         this->totalIzaAdd = 0.0;
    1577           0 :         this->totalInfilAdd = 0.0;
    1578           0 :         this->totalOtherAdd = 0.0;
    1579           0 :         this->totalEquipRem = 0.0;
    1580           0 :         this->totalWindRem = 0.0;
    1581           0 :         this->totalIzaRem = 0.0;
    1582           0 :         this->totalInfilRem = 0.0;
    1583           0 :         this->totalOtherRem = 0.0;
    1584           0 :         this->curConversionOffset = 0.0;
    1585           0 :         this->leedSiteIntLite = 0.0;
    1586           0 :         this->leedSiteSpHeat = 0.0;
    1587           0 :         this->leedSiteSpCool = 0.0;
    1588           0 :         this->leedSiteFanInt = 0.0;
    1589           0 :         this->leedSiteSrvWatr = 0.0;
    1590           0 :         this->leedSiteRecept = 0.0;
    1591           0 :         this->leedSiteTotal = 0.0;
    1592           0 :         this->m2_unitConv = 0.0;
    1593           0 :         this->unitConvIndexWCCT = 0;
    1594           0 :         this->grandTotal = 1;
    1595           0 :         this->condTotal = 2;
    1596           0 :         this->uncondTotal = 3;
    1597           0 :         this->notpartTotal = 4;
    1598           0 :         this->unitConvIndexWVST = 0;
    1599           0 :         this->m_unitConv = 0.0;
    1600           0 :         this->m2_unitConvWVST = 0.0;
    1601           0 :         this->m3_unitConv = 0.0;
    1602           0 :         this->Wm2_unitConv = 0.0;
    1603           0 :         this->zstArea = Array1D<Real64>(4);
    1604           0 :         this->zstVolume = Array1D<Real64>(4);
    1605           0 :         this->zstWallArea = Array1D<Real64>(4);
    1606           0 :         this->zstUndWallArea = Array1D<Real64>(4);
    1607           0 :         this->zstWindowArea = Array1D<Real64>(4);
    1608           0 :         this->zstOpeningArea = Array1D<Real64>(4);
    1609           0 :         this->zstLight = Array1D<Real64>(4);
    1610           0 :         this->zstPeople = Array1D<Real64>(4);
    1611           0 :         this->zstPlug = Array1D<Real64>(4);
    1612           0 :         this->indexUnitConvWCS = 0;
    1613           0 :         this->curValueSIWCS = 0.0;
    1614           0 :         this->curValueWCS = 0.0;
    1615           0 :         this->ZoneNumCLCDC = 0;
    1616           0 :         this->SurfNumCLCDC = 0;
    1617           0 :         this->TimeStepCLCDC = 0;
    1618           0 :         this->TimeOfPulseCLCDC = 0;
    1619           0 :         this->CoolDesSelectedCLCDC = 0; // design day selected for cooling
    1620           0 :         this->HeatDesSelectedCLCDC = 0; // design day selected for heating
    1621           0 :         this->iSurfGCLS = 0;
    1622           0 :         this->ZoneNumGCLS = 0;
    1623           0 :         this->TimeStepInDayGCLS = 0;
    1624           0 :         this->iZoneGCLH = 0;
    1625           0 :         this->TimeStepInDayGCLH = 0;
    1626           0 :         this->adjFenDone.clear();
    1627           0 :         this->BigNumRMG = 0.0;
    1628           0 :         this->foundGsui = 0;
    1629           0 :         this->iUnitGsui = 0;
    1630           0 :         this->foundGsum = 0;
    1631           0 :         this->iUnitGsum = 0;
    1632           0 :         this->footnote.clear();
    1633           0 :         this->m_unitName.clear();
    1634           0 :         this->m2_unitName.clear();
    1635           0 :         this->m3_unitName.clear();
    1636           0 :         this->Wm2_unitName.clear();
    1637           0 :         this->curColHeadWithSI.clear();
    1638           0 :         this->curColHead.clear();
    1639           0 :     }
    1640             : };
    1641             : 
    1642             : } // namespace EnergyPlus
    1643             : 
    1644             : #endif

Generated by: LCOV version 1.14