diff --git a/src/EnergyPlus/AirflowNetwork/src/Solver.cpp b/src/EnergyPlus/AirflowNetwork/src/Solver.cpp index 26ddf6acdf7..c906d14ba4e 100644 --- a/src/EnergyPlus/AirflowNetwork/src/Solver.cpp +++ b/src/EnergyPlus/AirflowNetwork/src/Solver.cpp @@ -56,7 +56,7 @@ // ObjexxFCL Headers #include #include -#include +// #include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/BaseboardRadiator.cc b/src/EnergyPlus/BaseboardRadiator.cc index d68c003555d..0baef3f7470 100644 --- a/src/EnergyPlus/BaseboardRadiator.cc +++ b/src/EnergyPlus/BaseboardRadiator.cc @@ -50,7 +50,7 @@ // ObjexxFCL Headers #include -#include +// #include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/BoilerSteam.cc b/src/EnergyPlus/BoilerSteam.cc index 8cb9a6534dd..64f345c7cf7 100644 --- a/src/EnergyPlus/BoilerSteam.cc +++ b/src/EnergyPlus/BoilerSteam.cc @@ -50,7 +50,7 @@ // ObjexxFCL Headers #include -#include +// #include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/Boilers.cc b/src/EnergyPlus/Boilers.cc index dd0e9e9d5a0..fde5149bc55 100644 --- a/src/EnergyPlus/Boilers.cc +++ b/src/EnergyPlus/Boilers.cc @@ -50,7 +50,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include @@ -879,7 +878,7 @@ void BoilerSpecs::CalcBoilerModel(EnergyPlusData &state, if ((BoilerDeltaTemp > 0.0) && (this->BoilerLoad > 0.0)) { this->BoilerMassFlowRate = this->BoilerLoad / Cp / BoilerDeltaTemp; - this->BoilerMassFlowRate = min(BoilerMassFlowRateMax, this->BoilerMassFlowRate); + this->BoilerMassFlowRate = std::min(BoilerMassFlowRateMax, this->BoilerMassFlowRate); } else { this->BoilerMassFlowRate = 0.0; } @@ -908,8 +907,8 @@ void BoilerSpecs::CalcBoilerModel(EnergyPlusData &state, this->BoilerOutletTemp = state.dataLoopNodes->Node(BoilerInletNode).Temp; } this->BoilerPLR = this->BoilerLoad / BoilerNomCap; // operating part load ratio - this->BoilerPLR = min(this->BoilerPLR, BoilerMaxPLR); - this->BoilerPLR = max(this->BoilerPLR, BoilerMinPLR); + this->BoilerPLR = std::min(this->BoilerPLR, BoilerMaxPLR); + this->BoilerPLR = std::max(this->BoilerPLR, BoilerMinPLR); // calculate theoretical fuel use based on nominal thermal efficiency Real64 const TheorFuelUse = this->BoilerLoad / BoilerNomEff; // Theoretical (stoichiometric) fuel use diff --git a/src/EnergyPlus/DataBSDFWindow.hh b/src/EnergyPlus/DataBSDFWindow.hh index d4e429c5aa1..d1b64b0a145 100644 --- a/src/EnergyPlus/DataBSDFWindow.hh +++ b/src/EnergyPlus/DataBSDFWindow.hh @@ -52,6 +52,9 @@ #include #include #include +#include + +using ObjexxFCL::Vector3; // EnergyPlus Headers #include diff --git a/src/EnergyPlus/DataEnvironment.hh b/src/EnergyPlus/DataEnvironment.hh index e3cf0dc213d..13fe363dbdb 100644 --- a/src/EnergyPlus/DataEnvironment.hh +++ b/src/EnergyPlus/DataEnvironment.hh @@ -50,6 +50,9 @@ // ObjexxFCL Headers #include +#include + +using ObjexxFCL::Vector3; // EnergyPlus Headers #include diff --git a/src/EnergyPlus/DataGlobalConstants.hh b/src/EnergyPlus/DataGlobalConstants.hh index d0c62c859bf..c2975a06ef2 100644 --- a/src/EnergyPlus/DataGlobalConstants.hh +++ b/src/EnergyPlus/DataGlobalConstants.hh @@ -49,8 +49,6 @@ #define DataGlobalConstants_hh_INCLUDED // EnergyPlus Headers -#include -// #include #include namespace EnergyPlus { @@ -477,21 +475,6 @@ namespace Constant { "customEMS" // customEMS }; - inline std::string unitToString(Units unit) - { - switch (unit) { - case Units::Invalid: - return "invalid"; - default: - const int iUnit = static_cast(unit); - constexpr int numUnitNames = unitNames.size(); - if (0 <= iUnit && iUnit < numUnitNames) { - return fmt::format("[{}]", unitNames[iUnit]); - } - return "invalid-out-of-range"; - } - } - constexpr std::array unitNamesUC = { "KG/S", // kg_s "C", // C diff --git a/src/EnergyPlus/DataSurfaces.hh b/src/EnergyPlus/DataSurfaces.hh index f27b9892941..081e49c013b 100644 --- a/src/EnergyPlus/DataSurfaces.hh +++ b/src/EnergyPlus/DataSurfaces.hh @@ -56,7 +56,9 @@ // ObjexxFCL Headers #include #include -#include +#include + +using ObjexxFCL::Vector4; // EnergyPlus Headers #include diff --git a/src/EnergyPlus/EnergyPlus.hh b/src/EnergyPlus/EnergyPlus.hh index 9d1f11abe98..aabec4e8039 100644 --- a/src/EnergyPlus/EnergyPlus.hh +++ b/src/EnergyPlus/EnergyPlus.hh @@ -137,7 +137,7 @@ using ObjexxFCL::Vector4; // ObjexxFCL Functions #include -#include +// #include #include #include #include diff --git a/src/EnergyPlus/HybridEvapCoolingModel.hh b/src/EnergyPlus/HybridEvapCoolingModel.hh index 0d9deb05080..5e2340d127b 100644 --- a/src/EnergyPlus/HybridEvapCoolingModel.hh +++ b/src/EnergyPlus/HybridEvapCoolingModel.hh @@ -57,7 +57,6 @@ // ObjexxFCL Headers #include -#include #define MINIMUM_LOAD_TO_ACTIVATE 0.5 // (kw) sets a minimum load to avoid the system fluttering on and off. #define IMPLAUSIBLE_POWER 10000000 diff --git a/src/EnergyPlus/InternalHeatGains.cc b/src/EnergyPlus/InternalHeatGains.cc index 05917207897..d652eca2200 100644 --- a/src/EnergyPlus/InternalHeatGains.cc +++ b/src/EnergyPlus/InternalHeatGains.cc @@ -2631,8 +2631,8 @@ namespace InternalHeatGains { } // Calculate nominal min/max equipment level - thisZoneITEq.NomMinDesignLevel = thisZoneITEq.DesignTotalPower * thisZoneITEq.operSched->getMinVal(state); - thisZoneITEq.NomMaxDesignLevel = thisZoneITEq.DesignTotalPower * thisZoneITEq.operSched->getMaxVal(state); + thisZoneITEq.NomMinDesignLevel = thisZoneITEq.DesignTotalPower * thisZoneITEq.cpuLoadSched->getMinVal(state); + thisZoneITEq.NomMaxDesignLevel = thisZoneITEq.DesignTotalPower * thisZoneITEq.cpuLoadSched->getMaxVal(state); thisZoneITEq.DesignFanPowerFrac = IHGNumbers(4); thisZoneITEq.DesignFanPower = thisZoneITEq.DesignFanPowerFrac * thisZoneITEq.DesignTotalPower; diff --git a/src/EnergyPlus/Plant/DataPlant.hh b/src/EnergyPlus/Plant/DataPlant.hh index 2bafa8e200a..eecc1efc69c 100644 --- a/src/EnergyPlus/Plant/DataPlant.hh +++ b/src/EnergyPlus/Plant/DataPlant.hh @@ -53,7 +53,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/Plant/LoopSide.cc b/src/EnergyPlus/Plant/LoopSide.cc index 150d6cea60d..f638be36a21 100644 --- a/src/EnergyPlus/Plant/LoopSide.cc +++ b/src/EnergyPlus/Plant/LoopSide.cc @@ -45,7 +45,6 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#include #include #include diff --git a/src/EnergyPlus/Plant/PlantManager.cc b/src/EnergyPlus/Plant/PlantManager.cc index aab529c0a64..a736f2ad93e 100644 --- a/src/EnergyPlus/Plant/PlantManager.cc +++ b/src/EnergyPlus/Plant/PlantManager.cc @@ -51,7 +51,6 @@ // ObjexxFCL Headers #include -#include #include // EnergyPlus Headers diff --git a/src/EnergyPlus/Psychrometrics.cc b/src/EnergyPlus/Psychrometrics.cc index 5507c31a7f4..2fcaedbab96 100644 --- a/src/EnergyPlus/Psychrometrics.cc +++ b/src/EnergyPlus/Psychrometrics.cc @@ -49,7 +49,7 @@ #include // ObjexxFCL Headers -#include +// #include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/Psychrometrics.hh b/src/EnergyPlus/Psychrometrics.hh index a6ece253d87..866e93da2a8 100644 --- a/src/EnergyPlus/Psychrometrics.hh +++ b/src/EnergyPlus/Psychrometrics.hh @@ -54,7 +54,7 @@ // ObjexxFCL Headers #include -#include +// #include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/Pumps.cc b/src/EnergyPlus/Pumps.cc index 0f8c3e6cbfe..7a2eac75d70 100644 --- a/src/EnergyPlus/Pumps.cc +++ b/src/EnergyPlus/Pumps.cc @@ -51,7 +51,7 @@ // ObjexxFCL Headers #include -#include +// #include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/PurchasedAirManager.cc b/src/EnergyPlus/PurchasedAirManager.cc index b9dce7bd309..40917fa9520 100644 --- a/src/EnergyPlus/PurchasedAirManager.cc +++ b/src/EnergyPlus/PurchasedAirManager.cc @@ -50,7 +50,7 @@ // ObjexxFCL Headers #include -#include +// #include #include // EnergyPlus Headers diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index 75d79569720..9d0cb741edc 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -52,7 +52,7 @@ // ObjexxFCL Headers #include #include -#include +// #include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/RoomAirModelAirflowNetwork.cc b/src/EnergyPlus/RoomAirModelAirflowNetwork.cc index 2e8b0bc112e..6fba453fb56 100644 --- a/src/EnergyPlus/RoomAirModelAirflowNetwork.cc +++ b/src/EnergyPlus/RoomAirModelAirflowNetwork.cc @@ -48,7 +48,7 @@ // ObjexxFCL Headers #include #include -#include +// #include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/RoomAirModelManager.cc b/src/EnergyPlus/RoomAirModelManager.cc index b40850cc5f4..0a94661998f 100644 --- a/src/EnergyPlus/RoomAirModelManager.cc +++ b/src/EnergyPlus/RoomAirModelManager.cc @@ -54,7 +54,7 @@ #include #include #include -#include +// #include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/RoomAirModelUserTempPattern.cc b/src/EnergyPlus/RoomAirModelUserTempPattern.cc index 75c0ae1998f..883d62d42ea 100644 --- a/src/EnergyPlus/RoomAirModelUserTempPattern.cc +++ b/src/EnergyPlus/RoomAirModelUserTempPattern.cc @@ -49,7 +49,7 @@ #include #include #include -#include +// #include #include // EnergyPlus Headers diff --git a/src/EnergyPlus/RootFinder.cc b/src/EnergyPlus/RootFinder.cc index 33d6b880a62..b23265801a5 100644 --- a/src/EnergyPlus/RootFinder.cc +++ b/src/EnergyPlus/RootFinder.cc @@ -49,7 +49,7 @@ #include // ObjexxFCL Headers -#include +// #include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/RuntimeLanguageProcessor.cc b/src/EnergyPlus/RuntimeLanguageProcessor.cc index cfca8eb2e3a..72fa7233a7b 100644 --- a/src/EnergyPlus/RuntimeLanguageProcessor.cc +++ b/src/EnergyPlus/RuntimeLanguageProcessor.cc @@ -53,7 +53,7 @@ #include #include #include -#include +// #include #include #include #include diff --git a/src/EnergyPlus/SZVAVModel.cc b/src/EnergyPlus/SZVAVModel.cc index 2e378cb3f02..9fa183ce52b 100644 --- a/src/EnergyPlus/SZVAVModel.cc +++ b/src/EnergyPlus/SZVAVModel.cc @@ -51,7 +51,6 @@ #include // ObjexxFCL Headers -#include #include // EnergyPlus Headers diff --git a/src/EnergyPlus/ScheduleManager.cc b/src/EnergyPlus/ScheduleManager.cc index 5b9658be01f..19abe1976cb 100644 --- a/src/EnergyPlus/ScheduleManager.cc +++ b/src/EnergyPlus/ScheduleManager.cc @@ -190,7 +190,7 @@ namespace Sched { return false; } // ScheduleDay::checkValsForBadIntegers() - void DaySchedule::populateFromMinuteVals(EnergyPlusData &state, std::array const &minuteVals) + void DaySchedule::populateFromMinuteVals(EnergyPlusData &state, std::vector const &minuteVals) { auto &s_glob = state.dataGlobal; if (this->interpolation == Interpolation::Average) { @@ -342,8 +342,13 @@ namespace Sched { std::string CFld; // Character field for error message // CHARACTER(len=20) CFld1 ! Character field for error message - std::array minuteVals; // Temporary for processing interval schedules - std::array setMinuteVals; // Temporary for processing interval schedules + + std::vector minuteVals; + std::vector setMinuteVals; + + minuteVals.resize(Constant::iMinutesInDay); + setMinuteVals.resize(Constant::iMinutesInDay); + int NumFields; // LOGICAL RptSchedule @@ -2633,8 +2638,8 @@ namespace Sched { Array1S const Numbers, int const NumUntils, int const NumNumbers, - std::array &minuteVals, - std::array &setMinuteVals, + std::vector &minuteVals, + std::vector &setMinuteVals, bool &ErrorsFound, std::string const &DayScheduleName, // Name (used for errors) std::string const &ErrContext, // Context (used for errors) @@ -2665,6 +2670,7 @@ namespace Sched { std::fill(minuteVals.begin(), minuteVals.end(), 0.0); std::fill(setMinuteVals.begin(), setMinuteVals.end(), false); + sFld = 0; Real64 StartValue = 0; diff --git a/src/EnergyPlus/ScheduleManager.hh b/src/EnergyPlus/ScheduleManager.hh index 4edf97def9c..71bec0dbe3e 100644 --- a/src/EnergyPlus/ScheduleManager.hh +++ b/src/EnergyPlus/ScheduleManager.hh @@ -218,7 +218,7 @@ namespace Sched { bool checkValsForLimitViolations(EnergyPlusData &state) const; bool checkValsForBadIntegers(EnergyPlusData &state) const; - void populateFromMinuteVals(EnergyPlusData &state, std::array const &minVals); + void populateFromMinuteVals(EnergyPlusData &state, std::vector const &minuteVals); std::vector const &getDayVals([[maybe_unused]] EnergyPlusData &state, int jDay = -1, int dayOfWeek = -1) { return tsVals; } void setMinMaxVals(EnergyPlusData &state); }; @@ -371,8 +371,8 @@ namespace Sched { Array1S const Numbers, int const NumUntils, int const NumNumbers, - std::array &minuteVals, - std::array &setMinuteVals, + std::vector &minuteVals, + std::vector &setMinuteVals, bool &ErrorsFound, std::string const &DayScheduleName, // Name (used for errors) std::string const &ErrContext, // Context (used for errors) diff --git a/src/EnergyPlus/SimAirServingZones.cc b/src/EnergyPlus/SimAirServingZones.cc index f5c73b4f301..4941b76a470 100644 --- a/src/EnergyPlus/SimAirServingZones.cc +++ b/src/EnergyPlus/SimAirServingZones.cc @@ -53,7 +53,6 @@ // ObjexxFCL Headers #include #include -#include #include // EnergyPlus Headers diff --git a/src/EnergyPlus/SimulationManager.cc b/src/EnergyPlus/SimulationManager.cc index a3209a296a2..6df60eed557 100644 --- a/src/EnergyPlus/SimulationManager.cc +++ b/src/EnergyPlus/SimulationManager.cc @@ -57,7 +57,6 @@ extern "C" { // ObjexxFCL Headers #include #include -#include #include #include diff --git a/src/EnergyPlus/SingleDuct.cc b/src/EnergyPlus/SingleDuct.cc index 1e2e170511c..f8ca22d0357 100644 --- a/src/EnergyPlus/SingleDuct.cc +++ b/src/EnergyPlus/SingleDuct.cc @@ -50,7 +50,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/SolarCollectors.cc b/src/EnergyPlus/SolarCollectors.cc index daad1ae1c39..247eb281b6c 100644 --- a/src/EnergyPlus/SolarCollectors.cc +++ b/src/EnergyPlus/SolarCollectors.cc @@ -50,7 +50,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/SolarReflectionManager.cc b/src/EnergyPlus/SolarReflectionManager.cc index 97343f0929a..fd92f6ea86e 100644 --- a/src/EnergyPlus/SolarReflectionManager.cc +++ b/src/EnergyPlus/SolarReflectionManager.cc @@ -49,9 +49,6 @@ #include #include -// ObjexxFCL Headers -#include - // EnergyPlus Headers #include #include diff --git a/src/EnergyPlus/SolarShading.cc b/src/EnergyPlus/SolarShading.cc index 63b6ebe367e..818869b2733 100644 --- a/src/EnergyPlus/SolarShading.cc +++ b/src/EnergyPlus/SolarShading.cc @@ -53,7 +53,6 @@ // ObjexxFCL Headers #include -#include #include #include diff --git a/src/EnergyPlus/StandardRatings.cc b/src/EnergyPlus/StandardRatings.cc index 2cbbadb7de0..6ccd7e1e417 100644 --- a/src/EnergyPlus/StandardRatings.cc +++ b/src/EnergyPlus/StandardRatings.cc @@ -48,9 +48,6 @@ // C++ Headers #include -// ObjexxFCL Headers -#include - // EnergyPlus Headers #include #include diff --git a/src/EnergyPlus/SteamCoils.cc b/src/EnergyPlus/SteamCoils.cc index 3467cbf4fcb..dc8b9384fec 100644 --- a/src/EnergyPlus/SteamCoils.cc +++ b/src/EnergyPlus/SteamCoils.cc @@ -50,7 +50,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/SurfaceGeometry.cc b/src/EnergyPlus/SurfaceGeometry.cc index d0fa6f63a99..1f1bf9f0b3b 100644 --- a/src/EnergyPlus/SurfaceGeometry.cc +++ b/src/EnergyPlus/SurfaceGeometry.cc @@ -52,7 +52,6 @@ #include // ObjexxFCL Headers -#include #include #include diff --git a/src/EnergyPlus/SurfaceGroundHeatExchanger.cc b/src/EnergyPlus/SurfaceGroundHeatExchanger.cc index e410a160e2d..bc279d207ab 100644 --- a/src/EnergyPlus/SurfaceGroundHeatExchanger.cc +++ b/src/EnergyPlus/SurfaceGroundHeatExchanger.cc @@ -50,7 +50,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/SwimmingPool.cc b/src/EnergyPlus/SwimmingPool.cc index bfca6661048..74b928eda2d 100644 --- a/src/EnergyPlus/SwimmingPool.cc +++ b/src/EnergyPlus/SwimmingPool.cc @@ -50,7 +50,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/SystemAvailabilityManager.cc b/src/EnergyPlus/SystemAvailabilityManager.cc index c743654453f..5893adc975a 100644 --- a/src/EnergyPlus/SystemAvailabilityManager.cc +++ b/src/EnergyPlus/SystemAvailabilityManager.cc @@ -52,7 +52,6 @@ // ObjexxFCL Headers #include #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/SystemReports.cc b/src/EnergyPlus/SystemReports.cc index b597fc87d50..076af1f7a2d 100644 --- a/src/EnergyPlus/SystemReports.cc +++ b/src/EnergyPlus/SystemReports.cc @@ -54,7 +54,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/TARCOGCommon.cc b/src/EnergyPlus/TARCOGCommon.cc index 42e97465ccf..c05076c616f 100644 --- a/src/EnergyPlus/TARCOGCommon.cc +++ b/src/EnergyPlus/TARCOGCommon.cc @@ -47,7 +47,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/TARCOGDeflection.cc b/src/EnergyPlus/TARCOGDeflection.cc index aa2f18d005c..3b9c1ded6ab 100644 --- a/src/EnergyPlus/TARCOGDeflection.cc +++ b/src/EnergyPlus/TARCOGDeflection.cc @@ -47,7 +47,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/TARCOGGasses90.cc b/src/EnergyPlus/TARCOGGasses90.cc index 5232008a40b..60fe998c3be 100644 --- a/src/EnergyPlus/TARCOGGasses90.cc +++ b/src/EnergyPlus/TARCOGGasses90.cc @@ -51,7 +51,6 @@ // ObjexxFCL Headers #include #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/TarcogShading.cc b/src/EnergyPlus/TarcogShading.cc index 99efea25eec..088e666c0f4 100644 --- a/src/EnergyPlus/TarcogShading.cc +++ b/src/EnergyPlus/TarcogShading.cc @@ -47,7 +47,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/ThermalChimney.cc b/src/EnergyPlus/ThermalChimney.cc index c0b8b901cdb..90617b5f5a5 100644 --- a/src/EnergyPlus/ThermalChimney.cc +++ b/src/EnergyPlus/ThermalChimney.cc @@ -48,9 +48,6 @@ // C++ Headers #include -// ObjexxFCL Headers -#include - // EnergyPlus Headers #include #include diff --git a/src/EnergyPlus/ThermalComfort.cc b/src/EnergyPlus/ThermalComfort.cc index a1a9a8cbb1e..0c1cfc4b4fc 100644 --- a/src/EnergyPlus/ThermalComfort.cc +++ b/src/EnergyPlus/ThermalComfort.cc @@ -52,7 +52,6 @@ #include // ObjexxFCL Headers -#include #include // EnergyPlus Headers diff --git a/src/EnergyPlus/ThermalEN673Calc.cc b/src/EnergyPlus/ThermalEN673Calc.cc index 16d252539ed..3073de2cb43 100644 --- a/src/EnergyPlus/ThermalEN673Calc.cc +++ b/src/EnergyPlus/ThermalEN673Calc.cc @@ -47,7 +47,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/ThermalISO15099Calc.cc b/src/EnergyPlus/ThermalISO15099Calc.cc index 0473c4d4841..6fb91bc05ca 100644 --- a/src/EnergyPlus/ThermalISO15099Calc.cc +++ b/src/EnergyPlus/ThermalISO15099Calc.cc @@ -48,9 +48,6 @@ // C++ Headers #include -// ObjexxFCL Headers -#include - // EnergyPlus Headers #include #include diff --git a/src/EnergyPlus/TranspiredCollector.cc b/src/EnergyPlus/TranspiredCollector.cc index 618bdee17cb..8e4869ba38d 100644 --- a/src/EnergyPlus/TranspiredCollector.cc +++ b/src/EnergyPlus/TranspiredCollector.cc @@ -51,7 +51,6 @@ // ObjexxFCL Headers #include -#include #include // EnergyPlus Headers diff --git a/src/EnergyPlus/UFADManager.cc b/src/EnergyPlus/UFADManager.cc index 57a199e82d6..960d7ddcb6f 100644 --- a/src/EnergyPlus/UFADManager.cc +++ b/src/EnergyPlus/UFADManager.cc @@ -50,7 +50,6 @@ // ObjexxFCL Headers #include -#include #include // EnergyPlus Headers diff --git a/src/EnergyPlus/UnitHeater.cc b/src/EnergyPlus/UnitHeater.cc index 88aa2af9c5a..6d8abf43873 100644 --- a/src/EnergyPlus/UnitHeater.cc +++ b/src/EnergyPlus/UnitHeater.cc @@ -50,7 +50,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/UnitVentilator.cc b/src/EnergyPlus/UnitVentilator.cc index f6dac1b1e70..f2f4df2fef5 100644 --- a/src/EnergyPlus/UnitVentilator.cc +++ b/src/EnergyPlus/UnitVentilator.cc @@ -50,7 +50,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/UserDefinedComponents.cc b/src/EnergyPlus/UserDefinedComponents.cc index afa645274a6..f44074fd33d 100644 --- a/src/EnergyPlus/UserDefinedComponents.cc +++ b/src/EnergyPlus/UserDefinedComponents.cc @@ -48,9 +48,6 @@ // C++ Headers #include -// ObjexxFCL Headers -#include - // EnergyPlus Headers #include #include diff --git a/src/EnergyPlus/UtilityRoutines.cc b/src/EnergyPlus/UtilityRoutines.cc index b5b9b8d72b8..851149fd3c8 100644 --- a/src/EnergyPlus/UtilityRoutines.cc +++ b/src/EnergyPlus/UtilityRoutines.cc @@ -57,7 +57,6 @@ extern "C" { // ObjexxFCL Headers #include #include -#include #include #include diff --git a/src/EnergyPlus/Vectors.cc b/src/EnergyPlus/Vectors.cc index 9c33e4f1748..ba763982cdb 100644 --- a/src/EnergyPlus/Vectors.cc +++ b/src/EnergyPlus/Vectors.cc @@ -48,9 +48,6 @@ // C++ Headers #include -// ObjexxFCL Headers -#include - // EnergyPlus Headers #include #include diff --git a/src/EnergyPlus/VentilatedSlab.cc b/src/EnergyPlus/VentilatedSlab.cc index 1aa19935917..f7f06d6118c 100644 --- a/src/EnergyPlus/VentilatedSlab.cc +++ b/src/EnergyPlus/VentilatedSlab.cc @@ -50,7 +50,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/WaterCoils.cc b/src/EnergyPlus/WaterCoils.cc index 647bb131d1d..a1a93e8c433 100644 --- a/src/EnergyPlus/WaterCoils.cc +++ b/src/EnergyPlus/WaterCoils.cc @@ -50,7 +50,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/WaterManager.cc b/src/EnergyPlus/WaterManager.cc index 5e4b1b9dae5..ba511b2e475 100644 --- a/src/EnergyPlus/WaterManager.cc +++ b/src/EnergyPlus/WaterManager.cc @@ -51,7 +51,6 @@ // ObjexxFCL Headers #include #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/WaterToAirHeatPump.cc b/src/EnergyPlus/WaterToAirHeatPump.cc index ed06f4cd8ef..dd24851b20e 100644 --- a/src/EnergyPlus/WaterToAirHeatPump.cc +++ b/src/EnergyPlus/WaterToAirHeatPump.cc @@ -50,7 +50,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/WaterToAirHeatPumpSimple.cc b/src/EnergyPlus/WaterToAirHeatPumpSimple.cc index a236032ff54..7ba30e751f4 100644 --- a/src/EnergyPlus/WaterToAirHeatPumpSimple.cc +++ b/src/EnergyPlus/WaterToAirHeatPumpSimple.cc @@ -50,7 +50,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/WaterUse.cc b/src/EnergyPlus/WaterUse.cc index 1a71a9706aa..bea3f56e34b 100644 --- a/src/EnergyPlus/WaterUse.cc +++ b/src/EnergyPlus/WaterUse.cc @@ -50,7 +50,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/WeatherManager.cc b/src/EnergyPlus/WeatherManager.cc index 7d58e8edcec..2fd5517ea5c 100644 --- a/src/EnergyPlus/WeatherManager.cc +++ b/src/EnergyPlus/WeatherManager.cc @@ -54,7 +54,6 @@ // ObjexxFCL Headers #include #include -#include #include #include diff --git a/src/EnergyPlus/WindTurbine.cc b/src/EnergyPlus/WindTurbine.cc index 2bef0d1d601..3156d49ecbf 100644 --- a/src/EnergyPlus/WindTurbine.cc +++ b/src/EnergyPlus/WindTurbine.cc @@ -51,7 +51,6 @@ // ObjexxFCL Headers #include -#include #include // EnergyPlus Headers diff --git a/src/EnergyPlus/WindowAC.cc b/src/EnergyPlus/WindowAC.cc index 6e5adbbd833..24227e14c8f 100644 --- a/src/EnergyPlus/WindowAC.cc +++ b/src/EnergyPlus/WindowAC.cc @@ -50,7 +50,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/WindowComplexManager.cc b/src/EnergyPlus/WindowComplexManager.cc index d07c6b6426e..3412b6d13ec 100644 --- a/src/EnergyPlus/WindowComplexManager.cc +++ b/src/EnergyPlus/WindowComplexManager.cc @@ -53,7 +53,6 @@ // ObjexxFCL Headers #include #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/WindowEquivalentLayer.cc b/src/EnergyPlus/WindowEquivalentLayer.cc index 695dd2b7f1f..5d843e8203c 100644 --- a/src/EnergyPlus/WindowEquivalentLayer.cc +++ b/src/EnergyPlus/WindowEquivalentLayer.cc @@ -50,7 +50,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/WindowManager.cc b/src/EnergyPlus/WindowManager.cc index 94b20bbc1cb..c5377329c4b 100644 --- a/src/EnergyPlus/WindowManager.cc +++ b/src/EnergyPlus/WindowManager.cc @@ -54,7 +54,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/ZoneAirLoopEquipmentManager.cc b/src/EnergyPlus/ZoneAirLoopEquipmentManager.cc index 92af6665c4b..3df300a9572 100644 --- a/src/EnergyPlus/ZoneAirLoopEquipmentManager.cc +++ b/src/EnergyPlus/ZoneAirLoopEquipmentManager.cc @@ -47,7 +47,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc b/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc index 013b404048f..830effb953c 100644 --- a/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc +++ b/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc @@ -51,7 +51,6 @@ // ObjexxFCL Headers #include #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/ZoneDehumidifier.cc b/src/EnergyPlus/ZoneDehumidifier.cc index d87b2831c9c..2843b8c6bf6 100644 --- a/src/EnergyPlus/ZoneDehumidifier.cc +++ b/src/EnergyPlus/ZoneDehumidifier.cc @@ -48,9 +48,6 @@ // C++ Headers #include -// ObjexxFCL Headers -#include - // EnergyPlus Headers #include #include diff --git a/src/EnergyPlus/ZoneEquipmentManager.cc b/src/EnergyPlus/ZoneEquipmentManager.cc index ca2b6f80040..e951cbe02fc 100644 --- a/src/EnergyPlus/ZoneEquipmentManager.cc +++ b/src/EnergyPlus/ZoneEquipmentManager.cc @@ -52,7 +52,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/ZonePlenum.cc b/src/EnergyPlus/ZonePlenum.cc index fc7983c044c..c94021c9d73 100644 --- a/src/EnergyPlus/ZonePlenum.cc +++ b/src/EnergyPlus/ZonePlenum.cc @@ -49,9 +49,6 @@ #include #include -// ObjexxFCL Headers -#include - // EnergyPlus Headers #include #include diff --git a/src/EnergyPlus/ZoneTempPredictorCorrector.cc b/src/EnergyPlus/ZoneTempPredictorCorrector.cc index 2371e113ef1..be5ac5391ea 100644 --- a/src/EnergyPlus/ZoneTempPredictorCorrector.cc +++ b/src/EnergyPlus/ZoneTempPredictorCorrector.cc @@ -51,7 +51,6 @@ // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/api/datatransfer.cc b/src/EnergyPlus/api/datatransfer.cc index 28eb9bc181b..bdd09aaf198 100644 --- a/src/EnergyPlus/api/datatransfer.cc +++ b/src/EnergyPlus/api/datatransfer.cc @@ -108,7 +108,7 @@ APIDataEntry *getAPIData(EnergyPlusState state, unsigned int *resultingSize) if (meter->Name.empty()) { break; } - localDataEntries.emplace_back("OutputMeter", "", "", meter->Name, EnergyPlus::Constant::unitToString(meter->units)); + localDataEntries.emplace_back("OutputMeter", "", "", meter->Name, format("()", EnergyPlus::Constant::unitNames[(int)meter->units])); } for (auto const *variable : thisState->dataOutputProcessor->outVars) { if (variable->varType != EnergyPlus::OutputProcessor::VariableType::Real) continue; @@ -120,8 +120,7 @@ APIDataEntry *getAPIData(EnergyPlusState state, unsigned int *resultingSize) "", variable->keyUC, variable->units == EnergyPlus::Constant::Units::customEMS - ? variable->unitNameCustomEMS - : EnergyPlus::Constant::unitToString(variable->units)); + ? variable->unitNameCustomEMS : format("{}", EnergyPlus::Constant::unitNames[(int)variable->units])); } *resultingSize = localDataEntries.size(); auto *data = new APIDataEntry[*resultingSize]; @@ -191,9 +190,9 @@ char *listAllAPIDataCSV(EnergyPlusState state) if (meter->Name.empty()) { break; } - output.append("OutputMeter").append(","); + output.append("OutputMeter").append(","); // This multiple append thing is not good output.append(meter->Name).append(","); - output.append(EnergyPlus::Constant::unitToString(meter->units)).append("\n"); + output.append(format("{}\n", EnergyPlus::Constant::unitNames[(int)meter->units])); } output.append("**VARIABLES**\n"); for (auto const *variable : thisState->dataOutputProcessor->outVars) { @@ -204,10 +203,8 @@ char *listAllAPIDataCSV(EnergyPlusState state) output.append("OutputVariable,"); output.append(variable->name).append(","); output.append(variable->keyUC).append(","); - output - .append(variable->units == EnergyPlus::Constant::Units::customEMS ? variable->unitNameCustomEMS - : EnergyPlus::Constant::unitToString(variable->units)) - .append("\n"); + output.append(format("{}\n", variable->units == EnergyPlus::Constant::Units::customEMS ? variable->unitNameCustomEMS + : EnergyPlus::Constant::unitNames[(int)variable->units])); } // note that we cannot just return a c_str to the local string, as the string will be destructed upon leaving // this function, and undefined behavior will occur.