Skip to content

Commit

Permalink
reduce and clean
Browse files Browse the repository at this point in the history
  • Loading branch information
rraustad committed Sep 22, 2024
1 parent 6d50951 commit 8a9483a
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions src/EnergyPlus/SimAirServingZones.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ namespace EnergyPlus::SimAirServingZones {
// air systems.

// METHODOLOGY EMPLOYED:
// Successive iteration forward from the return air inlet
// to the supply air outlets.
// Successive iteration forward from the return air inlet to the supply air outlets.

using namespace DataLoopNode;
using namespace DataAirLoop;
Expand Down Expand Up @@ -2778,7 +2777,6 @@ void SolveAirLoopControllers(
// SUBROUTINE INFORMATION
// AUTHOR: Dimitri Curtil (LBNL)
// DATE WRITTEN: Feb 2006
// MODIFIED:
// RE-ENGINEERED: This is reengineered code that used to be in SimAirLoops()

// PURPOSE OF THIS SUBROUTINE:
Expand All @@ -2792,8 +2790,6 @@ void SolveAirLoopControllers(
// (2) The controllers and their actions are simulated.
// (3) Steps 2 and 3 are repeated until the control criteria are satisfied.

// REFERENCES: None

// Using/Aliasing
using namespace DataHVACControllers;
using General::CreateSysTimeIntervalString;
Expand All @@ -2813,10 +2809,6 @@ void SolveAirLoopControllers(
// Maximum iterations of an air system/controllers simulation sequence
int constexpr MaxIter(50);

// INTERFACE BLOCK DEFINITIONS: None

// DERIVED TYPE DEFINITIONS: None

// SUBROUTINE LOCAL VARIABLE DEFINITIONS
// TRUE if controller supports speculative warm restart
bool AllowWarmRestartFlag;
Expand Down Expand Up @@ -3224,7 +3216,6 @@ void ReSolveAirLoopControllers(
// SUBROUTINE INFORMATION
// AUTHOR: Dimitri Curtil (LBNL)
// DATE WRITTEN: Feb 2006
// MODIFIED:
// RE-ENGINEERED: This is new code

// PURPOSE OF THIS SUBROUTINE:
Expand Down Expand Up @@ -3336,8 +3327,6 @@ void SimAirLoopComponents(EnergyPlusData &state,
// SUBROUTINE INFORMATION
// AUTHOR: Dimitri Curtil (LBNL)
// DATE WRITTEN: Feb 2006
// MODIFIED:
// RE-ENGINEERED:

// PURPOSE OF THIS SUBROUTINE:
// This simulates all components on a particular air loop in the primary air system.
Expand All @@ -3353,27 +3342,20 @@ void SimAirLoopComponents(EnergyPlusData &state,
// Sets duct type of current branch to CurDuctType defined in MODULE DataSizing
// Upon exiting, resets both counters to 0.

// SUBROUTINE LOCAL VARIABLE DEFINITIONS: None
int BranchNum; // Branch DO loop index
int CompNum; // Component DO loop index
// std::string CompType; // Component type
// std::string CompName; // Component name
CompType CompType_Num; // Numeric equivalent for CompType

auto &PrimaryAirSystems = state.dataAirSystemsData->PrimaryAirSystems;

for (BranchNum = 1; BranchNum <= PrimaryAirSystems(AirLoopNum).NumBranches; ++BranchNum) { // loop over all branches in air system
for (int BranchNum = 1; BranchNum <= PrimaryAirSystems(AirLoopNum).NumBranches; ++BranchNum) { // loop over all branches in air system

UpdateBranchConnections(state, AirLoopNum, BranchNum, BeforeBranchSim);

state.dataSize->CurBranchNum = BranchNum;
state.dataSize->CurDuctType = PrimaryAirSystems(AirLoopNum).Branch(BranchNum).DuctType;

// Loop over components in branch
for (CompNum = 1; CompNum <= PrimaryAirSystems(AirLoopNum).Branch(BranchNum).TotalComponents; ++CompNum) {
for (int CompNum = 1; CompNum <= PrimaryAirSystems(AirLoopNum).Branch(BranchNum).TotalComponents; ++CompNum) {
// CompType = PrimaryAirSystem( AirLoopNum ).Branch( BranchNum ).Comp( CompNum ).TypeOf;
// CompName = PrimaryAirSystem( AirLoopNum ).Branch( BranchNum ).Comp( CompNum ).Name;
CompType_Num = PrimaryAirSystems(AirLoopNum).Branch(BranchNum).Comp(CompNum).CompType_Num;
CompType CompType_Num = PrimaryAirSystems(AirLoopNum).Branch(BranchNum).Comp(CompNum).CompType_Num;

// Simulate each component on PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%Name
SimAirLoopComponent(state,
Expand Down

4 comments on commit 8a9483a

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CppCheck-ScheduleManager (rraustad) - Win64-Windows-10-VisualStudio-16: Tests Failed (0 of 0 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CppCheck-ScheduleManager (rraustad) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (2913 of 2913 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CppCheck-ScheduleManager (rraustad) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-RelWithDebInfo: OK (799 of 799 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CppCheck-ScheduleManager (rraustad) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-RelWithDebInfo: OK (2097 of 2097 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.