Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/develop' into 10823FanFr…
Browse files Browse the repository at this point in the history
…eeUnitary
  • Loading branch information
mjwitte committed Dec 4, 2024
2 parents 17e34a4 + a119feb commit 9409ec0
Show file tree
Hide file tree
Showing 19 changed files with 1,287 additions and 2,035 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/cpp-problem-matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "gcc-problem-matcher",
"pattern": [
{
"regexp": "^(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
]
}
7 changes: 4 additions & 3 deletions .github/workflows/test_code_integrity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
- uses: actions/checkout@v4

- name: Run clang-format style check for C/C++ source code.
uses: jidicula/clang-format-action@v4.13.0
uses: jidicula/clang-format-action@v4.14.0
if: always()
with:
clang-format-version: '10'
check-path: 'src/EnergyPlus'

- name: Run clang-format style check for C/C++ unit test code.
uses: jidicula/clang-format-action@v4.13.0
uses: jidicula/clang-format-action@v4.14.0
if: always()
with:
clang-format-version: '10'
Expand All @@ -46,7 +46,8 @@ jobs:
--force
--std=c++17
--inline-suppr
--suppress=cppcheckError
--suppress=missingInclude
--suppress=missingIncludeSystem
--suppress=unusedFunction:src/EnergyPlus/api/autosizing.cc
--suppress=unusedFunction:src/EnergyPlus/api/datatransfer.cc
--suppress=unusedFunction:src/EnergyPlus/api/func.cc
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test_develop_commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ jobs:
- name: Build
id: build
working-directory: ./build
run: cmake --build . -j ${{ matrix.nproc }} --config Release
run: |
echo "::add-matcher::./.github/workflows/cpp-problem-matcher.json"
cmake --build . -j ${{ matrix.nproc }} --config Release
echo "::remove-matcher owner=gcc-problem-matcher::"
- name: Test
# Not running test on alternate build yet, I need to test things
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test_pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ jobs:
- name: Branch Build
id: branch_build
working-directory: ./branch/build
run: cmake --build . -j ${{ matrix.nproc }} --config Release
run: |
echo "::add-matcher::./branch/.github/workflows/cpp-problem-matcher.json"
cmake --build . -j ${{ matrix.nproc }} --config Release
echo "::remove-matcher owner=gcc-problem-matcher::"
- name: Branch Test
working-directory: ./branch/build
Expand Down
892 changes: 375 additions & 517 deletions src/EnergyPlus/UnitHeater.cc

Large diffs are not rendered by default.

60 changes: 20 additions & 40 deletions src/EnergyPlus/UnitVentilator.cc

Large diffs are not rendered by default.

22 changes: 9 additions & 13 deletions src/EnergyPlus/UnitarySystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2983,12 +2983,14 @@ namespace UnitarySystems {
if (this->m_CoolCoilExists && this->m_MaxCoolAirVolFlow < 0.0) {
if (!state.dataSize->SysSizingRunDone) {
int BranchNum = BranchInputManager::GetAirBranchIndex(state, "AirloopHVAC:UnitarySystem", this->Name);
std::string FanType = "";
std::string m_FanName = ""; // the notation m_ implies member variables, and this is a local
BranchFanFlow = 0.0;
if (BranchNum > 0.0) BranchInputManager::GetBranchFanTypeName(state, BranchNum, FanType, m_FanName, ErrFound);
if (!ErrFound && BranchNum > 0) {
BranchFanFlow = state.dataFans->fans(this->m_FanIndex)->maxAirFlowRate;
if (BranchNum > 0.0) {
std::string FanType = "";
std::string FanName = "";
BranchInputManager::GetBranchFanTypeName(state, BranchNum, FanType, FanName, ErrFound);
if (!ErrFound) {
BranchFanFlow = state.dataFans->fans(this->m_FanIndex)->maxAirFlowRate;
}
}
if (BranchFanFlow > 0.0) {
this->m_MaxCoolAirVolFlow = BranchFanFlow;
Expand Down Expand Up @@ -6618,10 +6620,7 @@ namespace UnitarySystems {
this->m_MSHeatingSpeedRatio[i] = 1.0;
}
if (this->m_HeatingCoilType_Num == HVAC::Coil_HeatingWaterToAirHPVSEquationFit) {
std::string MultispeedType = "UnitarySystemPerformance:Multispeed";
if (this->m_DesignSpecMSHPIndex == -1) {
std::string MultispeedType = "Fan:SystemModel";
}
std::string MultispeedType = (this->m_DesignSpecMSHPIndex == -1) ? "Fan:SystemModel" : "UnitarySystemPerformance:Multispeed";
int NumOfSpeed = VariableSpeedCoils::GetVSCoilNumOfSpeeds(state, this->m_HeatingCoilName, errorsFound);
if (errorsFound) {
ShowSevereError(state,
Expand Down Expand Up @@ -6664,10 +6663,7 @@ namespace UnitarySystems {
this->m_MSCoolingSpeedRatio[i] = 1.0;
}
if (this->m_CoolingCoilType_Num == HVAC::Coil_CoolingWaterToAirHPVSEquationFit) {
std::string MultispeedType = "UnitarySystemPerformance:Multispeed";
if (this->m_DesignSpecMSHPIndex == -1) {
std::string MultispeedType = "Fan:SystemModel";
}
std::string MultispeedType = (this->m_DesignSpecMSHPIndex == -1) ? "Fan:SystemModel" : "UnitarySystemPerformance:Multispeed";
int NumOfSpeed = VariableSpeedCoils::GetVSCoilNumOfSpeeds(state, this->m_CoolingCoilName, errorsFound);
if (errorsFound) {
ShowSevereError(state,
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/UserDefinedComponents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ namespace UserDefinedComponents {

void UserPlantComponentStruct::onInitLoopEquip(EnergyPlusData &state, const PlantLocation &calledFromLocation)
{
bool anyEMSRan;
Real64 myLoad = 0.0;
int thisLoop = 0;

Expand All @@ -128,6 +127,7 @@ namespace UserDefinedComponents {

if (thisLoop > 0) {
if (this->Loop(thisLoop).ErlInitProgramMngr > 0) {
bool anyEMSRan;
EMSManager::ManageEMS(state, EMSManager::EMSCallFrom::UserDefinedComponentModel, anyEMSRan, this->Loop(thisLoop).ErlInitProgramMngr);
} else if (this->Loop(thisLoop).initPluginLocation > -1) {
state.dataPluginManager->pluginManager->runSingleUserDefinedPlugin(state, this->Loop(thisLoop).initPluginLocation);
Expand Down
Loading

3 comments on commit 9409ec0

@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.

10823FanFreeUnitary (mjwitte) - x86_64-Linux-Ubuntu-24.04-gcc-13.2: OK (2918 of 2918 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.

10823FanFreeUnitary (mjwitte) - x86_64-Linux-Ubuntu-24.04-gcc-13.2-UnitTestsCoverage-RelWithDebInfo: OK (2100 of 2100 tests passed, 0 test warnings)

Build Badge Test Badge Coverage 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.

10823FanFreeUnitary (mjwitte) - x86_64-Linux-Ubuntu-24.04-gcc-13.2-IntegrationCoverage-RelWithDebInfo: OK (801 of 801 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.