Line data Source code
1 : // EnergyPlus, Copyright (c) 1996-2025, 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 SetPointManager_hh_INCLUDED
49 : #define SetPointManager_hh_INCLUDED
50 :
51 : #include <map>
52 :
53 : // ObjexxFCL Headers
54 : #include <ObjexxFCL/Array1D.hh>
55 :
56 : // EnergyPlus Headers
57 : #include <EnergyPlus/DataEnvironment.hh>
58 : #include <EnergyPlus/DataGlobals.hh>
59 : #include <EnergyPlus/DataLoopNode.hh>
60 : #include <EnergyPlus/EnergyPlus.hh>
61 : #include <EnergyPlus/Plant/Enums.hh>
62 : #include <EnergyPlus/Plant/PlantLocation.hh>
63 :
64 : namespace EnergyPlus {
65 :
66 : // Forward declarations
67 : struct EnergyPlusData;
68 :
69 : namespace SetPointManager {
70 :
71 : enum class SupplyFlowTempStrategy
72 : {
73 : Invalid = -1,
74 : MaxTemp,
75 : MinTemp,
76 : Num
77 : };
78 :
79 : enum class ControlStrategy
80 : {
81 : Invalid = -1,
82 : TempFirst,
83 : FlowFirst,
84 : Num
85 : };
86 :
87 : enum class AirTempType
88 : {
89 : Invalid = -1,
90 : WetBulb,
91 : DryBulb,
92 : Num
93 : };
94 :
95 : enum class ReturnTempType
96 : {
97 : Invalid = -1,
98 : Scheduled,
99 : Constant,
100 : Setpoint,
101 : Num
102 : };
103 :
104 : enum class SPMType
105 : {
106 : Invalid = -1,
107 : Scheduled,
108 : ScheduledDual,
109 : OutsideAir,
110 : SZReheat,
111 : SZHeating,
112 : SZCooling,
113 : SZMinHum,
114 : SZMaxHum,
115 : MixedAir,
116 : OutsideAirPretreat,
117 : Warmest,
118 : Coldest,
119 : WarmestTempFlow,
120 : ReturnAirBypass,
121 : MZCoolingAverage,
122 : MZHeatingAverage,
123 : MZMinHumAverage,
124 : MZMaxHumAverage,
125 : MZMinHum,
126 : MZMaxHum,
127 : FollowOutsideAirTemp,
128 : FollowSystemNodeTemp,
129 : FollowGroundTemp,
130 : CondenserEnteringTemp,
131 : IdealCondenserEnteringTemp,
132 : SZOneStageCooling,
133 : SZOneStageHeating,
134 : ChilledWaterReturnTemp,
135 : HotWaterReturnTemp,
136 : TESScheduled,
137 : SystemNodeTemp,
138 : SystemNodeHum,
139 : Num
140 : };
141 :
142 : struct SPMBase
143 : {
144 : std::string Name;
145 : SPMType type = SPMType::Invalid;
146 :
147 : HVAC::CtrlVarType ctrlVar = HVAC::CtrlVarType::Invalid; // set to CtrlVarType::*
148 :
149 : std::vector<int> ctrlNodeNums; // index to control node
150 :
151 : std::string airLoopName; // name of air loop
152 : int airLoopNum = 0; // index to air loop
153 : int refNodeNum = 0; // index to reference node
154 :
155 : Real64 minSetTemp = 0.0; // minimum supply air setpoint temperature
156 : Real64 maxSetTemp = 0.0; // maximum supply air setpoint temperature
157 :
158 : Real64 minSetHum = 0.0; // minimum supply air setpoint humidity ratio [kg/kg]
159 : Real64 maxSetHum = 0.0; // maximum supply air setpoint humidity ratio [kg/kg]
160 : Real64 setPt = 0.0; // the setpoint
161 :
162 229 : virtual ~SPMBase() = default;
163 :
164 : virtual void calculate(EnergyPlusData &state) = 0;
165 : };
166 :
167 : struct SPMScheduled : SPMBase // Derived type for Scheduled Setpoint Manager data
168 : {
169 : Sched::Schedule *sched = nullptr;
170 :
171 : void calculate(EnergyPlusData &state) override;
172 : };
173 :
174 : struct SPMScheduledDual : SPMBase // Derived type for Scheduled Dual Setpoint Manager
175 : {
176 : Sched::Schedule *hiSched = nullptr;
177 : Sched::Schedule *loSched = nullptr;
178 : Real64 setPtHi = 0.0;
179 : Real64 setPtLo = 0.0;
180 :
181 : void calculate(EnergyPlusData &state) override;
182 : };
183 :
184 : struct SPMOutsideAir : SPMBase // Derived type for Outside Air Setpoint Manager Data
185 : {
186 : // Members
187 : Sched::Schedule *sched = nullptr;
188 :
189 : Real64 lowSetPt1 = 0.0; // 1st setpoint at outside low
190 : Real64 low1 = 0.0; // 1st Outside low
191 : Real64 highSetPt1 = 0.0; // 1st setpoint at outside high
192 : Real64 high1 = 0.0; // 1st Outside high
193 : int invalidSchedValErrorIndex = 0; // index for recurring error when schedule is not 1 or 2
194 : int setPtErrorCount = 0; // countfor recurring error when schedule is not 1 or 2
195 : Real64 lowSetPt2 = 0.0; // 2nd setpoint at outside low (optional)
196 : Real64 low2 = 0.0; // 2nd Outside low (optional)
197 : Real64 highSetPt2 = 0.0; // 2nd setpoint at outside high (optional)
198 : Real64 high2 = 0.0; // 2nd Outside high (optional)
199 :
200 : void calculate(EnergyPlusData &state) override;
201 : };
202 :
203 : struct SPMSingleZoneReheat : SPMBase // Derived type for the Single Zone Reheat Setpoint Manager data
204 : {
205 : // Members
206 : std::string ctrlZoneName; // name of the control zone (zone with main thermostat)
207 : int ctrlZoneNum = 0; // number (index into Zone array) of control zone
208 : int zoneNodeNum = 0; // zone node number
209 : int zoneInletNodeNum = 0; // inlet node number for the SZRH air
210 : int mixedAirNodeNum = 0; // mixed air node number
211 : int fanInNodeNum = 0; // fan inlet node number
212 : int fanOutNodeNum = 0; // fan outlet node number
213 : int oaInNodeNum = 0; // outside airstream inlet node to the OA mixer
214 : int retNodeNum = 0; // return node inlet to OA mixer
215 : int loopInNodeNum = 0; // Primary Air System inlet node
216 :
217 : void calculate(EnergyPlusData &state) override;
218 : };
219 :
220 : // The one can be used for both SZ Heating and SZCooling SPMs
221 : struct SPMSingleZoneTemp : SPMBase
222 : {
223 : // Members
224 : std::string ctrlZoneName; // name of the control zone (zone with main thermostat)
225 : int ctrlZoneNum = 0; // number (index into Zone array) of control zone
226 : int zoneNodeNum = 0; // zone node number
227 : int zoneInletNodeNum = 0; // inlet node number for the supply air
228 :
229 : void calculate(EnergyPlusData &state) override;
230 : };
231 :
232 : // Can be used for both SZMinHum and SZMaxHum SPMs
233 : struct SPMSingleZoneHum : SPMBase // Derived Type for Single Zone Minimum Humidity Setpoint Manager data
234 : {
235 : // Members
236 : int zoneNodeNum = 0; // zone node numbers of zones being controlled
237 : int ctrlZoneNum = 0; // index into ZoneEquipConfig
238 :
239 : void calculate(EnergyPlusData &state) override;
240 : };
241 :
242 : struct SPMMixedAir : SPMBase
243 :
244 : {
245 : // Members
246 : int fanInNodeNum = 0; // supply fan inlet node number
247 : int fanOutNodeNum = 0; // Supplt fan outlet node number
248 : bool mySetPointCheckFlag = true; // used for mixed air SPM test for missing SP
249 : bool freezeCheckEnable = true; // Enable freezing check
250 : int coolCoilInNodeNum = 0; // Cooling coil inlet node number
251 : int coolCoilOutNodeNum = 0; // Cooling coil outlet node number
252 : Real64 minCoolCoilOutTemp = 7.2; // The minimum temperature at cooling coil outlet node
253 :
254 : void calculate(EnergyPlusData &state) override;
255 : };
256 :
257 : struct SPMOutsideAirPretreat : SPMBase
258 : {
259 : // Members
260 : int mixedOutNodeNum = 0; // mixed air outlet node number
261 : int oaInNodeNum = 0; // outside air inlet node number
262 : int returnInNodeNum = 0; // return air inlet node number
263 : bool mySetPointCheckFlag = true; // used for DOAS SPM test for missing SP
264 :
265 : void calculate(EnergyPlusData &state) override;
266 : };
267 :
268 : // Works for both coldest and warmest SPMs
269 : struct SPMTempest : SPMBase
270 : {
271 : // Members
272 : SupplyFlowTempStrategy strategy = SupplyFlowTempStrategy::Invalid; // supply flow and temperature set strategy
273 :
274 : void calculate(EnergyPlusData &state) override;
275 : };
276 :
277 : struct SPMWarmestTempFlow : SPMBase
278 : {
279 : // Members
280 : ControlStrategy strategy = ControlStrategy::Invalid; // supply flow and temperature set strategy
281 : Real64 minTurndown = 0.0; // minimum fractional flow rate
282 : Real64 turndown = 0.0; // fractional flow rate
283 : int critZoneNum = 0;
284 : bool simReady = false;
285 :
286 : void calculate(EnergyPlusData &state) override;
287 : };
288 :
289 : struct SPMReturnAirBypassFlow : SPMBase
290 : {
291 : // Members
292 : Sched::Schedule *sched = nullptr;
293 : Real64 FlowSetPt = 0; // mass flow rate setpoint (kg/s)
294 : int rabMixInNodeNum = 0;
295 : int supMixInNodeNum = 0;
296 : int mixOutNodeNum = 0;
297 : int rabSplitOutNodeNum = 0;
298 : int sysOutNodeNum = 0;
299 :
300 : void calculate(EnergyPlusData &state) override;
301 : };
302 :
303 : struct SPMMultiZoneTemp : SPMBase // derived type for SetpointManager:Multizone:Cooling:Average data
304 : {
305 : void calculate(EnergyPlusData &state) override;
306 : };
307 :
308 : struct SPMMultiZoneHum : SPMBase // derived type for SetpointManager:MultiZone:MinimumHumidity:Average data
309 : {
310 : void calculate(EnergyPlusData &state) override;
311 : };
312 :
313 : struct SPMFollowOutsideAirTemp : SPMBase
314 : {
315 : // Members
316 : AirTempType refTempType = AirTempType::Invalid; // set to iRefTempType_WetBulb or iRefTempType_DryBulb
317 : Real64 offset = 0.0; // Offset temperature difference
318 :
319 : void calculate(EnergyPlusData &state) override;
320 : };
321 :
322 : struct SPMFollowSysNodeTemp : SPMBase
323 : {
324 : // Members
325 : AirTempType refTempType = AirTempType::Invalid; // set to iRefTempType_WetBulb or iRefTempType_DryBulb
326 : Real64 offset = 0.0; // Offset temperature difference
327 :
328 : void calculate(EnergyPlusData &state) override;
329 : };
330 :
331 : struct SPMFollowGroundTemp : SPMBase
332 : {
333 : // Members
334 : // Site:GroundTemperature:BuildingSurface
335 : // Site:GroundTemperature:Shallow
336 : // Site:GroundTemperature:Deep
337 : // Site:GroundTemperature:FCfactorMethod
338 : DataEnvironment::GroundTempType refTempType = DataEnvironment::GroundTempType::Invalid;
339 : Real64 offset = 0.0; // Offset temperature difference
340 :
341 : void calculate(EnergyPlusData &state) override;
342 : };
343 :
344 : struct SPMCondenserEnteringTemp : SPMBase // derived type for SetpointManager:CondenserEnteringReset data
345 : {
346 : // Members
347 : Sched::Schedule *condenserEnteringTempSched = nullptr; // default condenser entering water temperature schedule Index
348 : Real64 towerDesignInletAirWetBulbTemp = 0; // cooling tower design inlet air wetbulb temperature
349 : int minTowerDesignWetBulbCurveNum = 0; // minimum design wetbulb temperature curve name
350 : int minOAWetBulbCurveNum = 0; // minimum outside air wetbulb temperature curve name
351 : int optCondenserEnteringTempCurveNum = 0; // optimized condenser entering water temperature curve name
352 : Real64 minLift = 0.0; // minimum lift
353 : Real64 maxCondenserEnteringTemp = 0.0; // maximum condenser entering water temp
354 : PlantLocation plantPloc; // plant side chiller index
355 : PlantLocation demandPloc;
356 : DataPlant::PlantEquipmentType chillerType; // chiller type number
357 :
358 : void calculate(EnergyPlusData &state) override;
359 : };
360 :
361 : struct SPMVar
362 : {
363 : OutputProcessor::VariableType Type = OutputProcessor::VariableType::Invalid;
364 : int Num = 0;
365 : };
366 :
367 : struct SPMIdealCondenserEnteringTemp : SPMBase // derived type for SetpointManager:CondenserEnteringReset:Ideal data
368 : {
369 : // Members
370 : Real64 minLift = 0.0; // minimum lift
371 : Real64 maxCondenserEnteringTemp = 0.0; // maximum condenser entering water temp
372 : PlantLocation chillerPloc; // plant side chiller index
373 : SPMVar chillerVar;
374 : SPMVar chilledWaterPumpVar;
375 : Array1D<SPMVar> towerVars;
376 : SPMVar condenserPumpVar;
377 : DataPlant::PlantEquipmentType chillerType = DataPlant::PlantEquipmentType::Invalid; // chiller type number
378 : Array1D<PlantLocation> towerPlocs;
379 : int numTowers = 0; // number of towers to query
380 : PlantLocation condenserPumpPloc; // condenser pump number
381 : PlantLocation chilledWaterPumpPloc; // chilled water pump number
382 : bool setupIdealCondEntSetPtVars = true; // flag for initialization of meters and such
383 :
384 : void calculate(EnergyPlusData &state) override;
385 :
386 : void SetupMeteredVarsForSetPt(EnergyPlusData &state);
387 :
388 : Real64 calculateCurrentEnergyUsage(EnergyPlusData &state);
389 :
390 : void setupSetPointAndFlags(Real64 &TotEnergy,
391 : Real64 &TotEnergyPre,
392 : Real64 &CondWaterSetPoint,
393 : Real64 &CondTempLimit,
394 : bool &RunOptCondEntTemp,
395 : bool &RunSubOptCondEntTemp,
396 : bool &RunFinalOptCondEntTemp) const;
397 : };
398 :
399 : struct SPMSingleZoneOneStageCooling : SPMBase // Derived type for the Single Zone One Stage Cooling Setpoint Manager data
400 : {
401 : // Members
402 : int ctrlZoneNum = 0; // number (index into Zone array) of control zone
403 : int zoneNodeNum = 0; // zone node number
404 : Real64 coolingOnSetPt = 0.0; // minimum supply air setpoint temperature
405 : Real64 coolingOffSetPt = 0.0; // maximum supply air setpoint temperature
406 :
407 : void calculate(EnergyPlusData &state) override;
408 : };
409 :
410 : struct SPMSingleZoneOneStageHeating : SPMBase // Derived type for the Single Zone One Stage Cooling Setpoint Manager data
411 : {
412 : // Members
413 : int ctrlZoneNum = 0; // number (index into Zone array) of control zone
414 : int zoneNodeNum = 0; // zone node number
415 : Real64 heatingOnSetPt = 0.0; // minimum supply air setpoint temperature
416 : Real64 heatingOffSetPt = 0.0; // maximum supply air setpoint temperature
417 :
418 : void calculate(EnergyPlusData &state) override;
419 : };
420 :
421 : struct SPMReturnWaterTemp : SPMBase // derived type for SetpointManager:SupplyResetForReturnTemperature:ChilledWater data
422 : {
423 : // Members
424 : int returnNodeNum = 0; // node ID for the plant supply-side return node
425 : int supplyNodeNum = 0; // node ID for the plant supply-side supply node
426 : Sched::Schedule *returnTempSched = nullptr; // scheduled return temperature
427 : Real64 returnTempConstantTarget = 0.0; // the constant value used as the return temperature target; used if schedule index is zero
428 : Real64 currentSupplySetPt = 0.0; // the current supply setpoint temperature
429 : int plantLoopNum = 0; // the index for the plant loop for this manager, zero if not initialized
430 : int plantSetPtNodeNum = 0; // the index for the node where the plant setpoint is set, need to look up after Plant is established
431 : ReturnTempType returnTempType = ReturnTempType::Invalid;
432 :
433 : // Calculation method
434 : void calculate(EnergyPlusData &state) override;
435 : // void calculate(EnergyPlusData &state, DataLoopNode::NodeData &returnNode, DataLoopNode::NodeData &supplyNode);
436 : };
437 :
438 : struct SPMTESScheduled : SPMBase // Derived type for Scheduled TES Setpoint Manager data
439 : {
440 : // Members
441 : Sched::Schedule *sched = nullptr; // Default is AlwaysOff
442 : Sched::Schedule *chargeSched = nullptr; // Default is AlwaysOff
443 : int ctrlNodeNum = 0;
444 : Real64 nonChargeCHWTemp = 0.0;
445 : Real64 chargeCHWTemp = 0.0;
446 : DataPlant::CtrlType compOpType = DataPlant::CtrlType::Invalid;
447 :
448 : // Calculation method
449 : void calculate(EnergyPlusData &state) override;
450 : };
451 :
452 : struct SPMSystemNode : SPMBase // Derived type for System Node Reset Setpoint Manager Data
453 : {
454 : // Members
455 : Real64 lowRefSetPt = 0.0; // Setpoint at Low Reference Temperature or Humidity Ratio (i.e., Maximum Temperature/Humidity Ratio Setpoint)
456 : Real64 highRefSetPt = 0.0; // Setpoint at High Reference Temperature or Humidity Ratio (i.e., Maximum Temperature/Humidity Ratio Setpoint)
457 : Real64 lowRef = 0.0; // Low Reference Temperature or Humidity Ratio
458 : Real64 highRef = 0.0; // High Reference Temperature or Humidity Ratio
459 :
460 : void calculate(EnergyPlusData &state) override;
461 : };
462 :
463 : int GetSetPointManagerIndex(EnergyPlusData const &state, std::string const &Name);
464 :
465 : void ManageSetPoints(EnergyPlusData &state);
466 :
467 : void GetSetPointManagerInputs(EnergyPlusData &state); // wrapper for GetInput to accomodate unit testing
468 :
469 : void GetSetPointManagerInputData(EnergyPlusData &state, bool &ErrorsFound);
470 :
471 : void VerifySetPointManagers(EnergyPlusData &state, bool &ErrorsFound); // flag to denote node conflicts in input. !unused1208
472 :
473 : void InitSetPointManagers(EnergyPlusData &state);
474 :
475 : void SimSetPointManagers(EnergyPlusData &state);
476 :
477 : void UpdateSetPointManagers(EnergyPlusData &state);
478 :
479 : void UpdateMixedAirSetPoints(EnergyPlusData &state);
480 :
481 : void UpdateOAPretreatSetPoints(EnergyPlusData &state);
482 :
483 : int GetSetPointManagerIndexByNode(EnergyPlusData &state, int NodeNum, HVAC::CtrlVarType ctrlVar, SPMType spmType, bool isRefNode);
484 :
485 : bool IsNodeOnSetPtManager(EnergyPlusData &state, int NodeNum, HVAC::CtrlVarType ctrlVar);
486 :
487 : bool NodeHasSPMCtrlVarType(EnergyPlusData &state, int NodeNum, HVAC::CtrlVarType ctrlVar);
488 :
489 : void ResetHumidityRatioCtrlVarType(EnergyPlusData &state, int NodeNum);
490 :
491 : void CheckIfAnyIdealCondEntSetPoint(EnergyPlusData &state);
492 :
493 : HVAC::CtrlVarType GetHumidityRatioVariableType(EnergyPlusData &state, int CtrlNodeNum);
494 :
495 : void SetUpNewScheduledTESSetPtMgr(EnergyPlusData &state,
496 : Sched::Schedule *onPeakSched,
497 : Sched::Schedule *chargeSched,
498 : Real64 NonChargeCHWTemp,
499 : Real64 ChargeCHWTemp,
500 : DataPlant::CtrlType CompOpType,
501 : int ControlNodeNum);
502 :
503 : bool GetCoilFreezingCheckFlag(EnergyPlusData &state, int MixedAirSPMNum);
504 :
505 : int GetMixedAirNumWithCoilFreezingCheck(EnergyPlusData &state, int MixedAirNode);
506 :
507 : Real64 interpSetPoint(Real64 LowVal, Real64 HighVal, Real64 RefVal, Real64 SetptAtLowVal, Real64 SetptAtHighVal);
508 : } // namespace SetPointManager
509 :
510 : struct SetPointManagerData : BaseGlobalStruct
511 : {
512 : bool ManagerOn = false;
513 : bool GetInputFlag = true; // First time, input is "gotten"
514 :
515 : bool InitSetPointManagersOneTimeFlag = true;
516 : bool InitSetPointManagersOneTimeFlag2 = true;
517 : // This will cause a warning to be issued if no "surface" ground temperature object was input.
518 :
519 : std::array<bool, (int)DataEnvironment::GroundTempType::Num> NoGroundTempObjWarning = {true, true, true, true};
520 : bool InitSetPointManagersMyEnvrnFlag = true; // flag for init once at start of environment
521 :
522 : // Object Data
523 : Array1D<SetPointManager::SPMBase *> spms;
524 : std::map<std::string, int> spmMap;
525 :
526 : // IdealCondenserEnteringTemp::calculate() state variables
527 : bool ICET_RunSubOptCondEntTemp = false;
528 : bool ICET_RunFinalOptCondEntTemp = false;
529 : Real64 ICET_CondenserWaterSetPt = 0; // Condenser entering water temperature setpoint this timestep, C
530 : Real64 ICET_TotEnergyPre = 0; // Total energy consumptions at the previous time step
531 :
532 : // Condenser Entering Temp::calculate() state variables
533 : Real64 CET_ActualLoadSum = 0.0;
534 : Real64 CET_DesignLoadSum = 0.0;
535 : Real64 CET_WeightedActualLoadSum = 0.0;
536 : Real64 CET_WeightedDesignLoadSum = 0.0;
537 : Real64 CET_WeightedLoadRatio = 0.0;
538 : Real64 CET_DesignMinCondenserSetPt = 0.0;
539 : Real64 CET_DesignEnteringCondenserTemp = 0.0;
540 : Real64 CET_DesignMinWetBulbTemp = 0.0;
541 : Real64 CET_MinActualWetBulbTemp = 0.0;
542 : Real64 CET_OptCondenserEnteringTemp = 0.0;
543 : Real64 CET_CurMinLift = 0.0;
544 :
545 2126 : void init_constant_state([[maybe_unused]] EnergyPlusData &state) override
546 : {
547 2126 : }
548 :
549 1152 : void init_state([[maybe_unused]] EnergyPlusData &state) override
550 : {
551 1152 : }
552 :
553 2100 : void clear_state() override
554 : {
555 2100 : ManagerOn = false;
556 2100 : GetInputFlag = true; // First time, input is "gotten"
557 : // Object Data
558 2100 : InitSetPointManagersOneTimeFlag = true;
559 2100 : InitSetPointManagersOneTimeFlag2 = true;
560 :
561 2322 : for (int iSPM = 1; iSPM <= (int)spms.size(); ++iSPM) {
562 222 : delete spms(iSPM);
563 : }
564 2100 : spms.deallocate();
565 2100 : spmMap.clear();
566 :
567 2100 : NoGroundTempObjWarning = {true, true, true, true};
568 2100 : InitSetPointManagersMyEnvrnFlag = true;
569 :
570 2100 : ICET_RunSubOptCondEntTemp = false;
571 2100 : ICET_RunFinalOptCondEntTemp = false;
572 2100 : ICET_CondenserWaterSetPt = 0;
573 2100 : ICET_TotEnergyPre = 0;
574 :
575 2100 : CET_ActualLoadSum = 0.0;
576 2100 : CET_DesignLoadSum = 0.0;
577 2100 : CET_WeightedActualLoadSum = 0.0;
578 2100 : CET_WeightedDesignLoadSum = 0.0;
579 2100 : CET_WeightedLoadRatio = 0.0;
580 2100 : CET_DesignMinCondenserSetPt = 0.0;
581 2100 : CET_DesignEnteringCondenserTemp = 0.0;
582 2100 : CET_DesignMinWetBulbTemp = 0.0;
583 2100 : CET_MinActualWetBulbTemp = 0.0;
584 2100 : CET_OptCondenserEnteringTemp = 0.0;
585 2100 : CET_CurMinLift = 0.0;
586 2100 : }
587 : };
588 :
589 : } // namespace EnergyPlus
590 :
591 : #endif
|