Skip to content

Commit

Permalink
removes unused Var6 from PerformanceCurveObject
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchute committed Jun 2, 2021
1 parent b8f984a commit 3159425
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
38 changes: 19 additions & 19 deletions src/EnergyPlus/CurveManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ namespace CurveManager {
// Return value
Real64 CurveValue(0.0);

// need to be careful on where and how resetting curve outputs to some "iactive value" is done
// need to be careful on where and how resetting curve outputs to some "inactive value" is done
// EMS can intercept curves and modify output
if (state.dataGlobal->BeginEnvrnFlag && state.dataCurveManager->CurveValueMyBeginTimeStepFlag) {
ResetPerformanceCurveOutput(state);
Expand All @@ -195,15 +195,17 @@ namespace CurveManager {
ShowFatalError(state, "CurveValue: Invalid curve passed.");
}

{
auto const SELECT_CASE_var(state.dataCurveManager->PerfCurve(CurveIndex).InterpolationType);
if (SELECT_CASE_var == InterpTypeEnum::EvaluateCurveToLimits) {
CurveValue = PerformanceCurveObject(state, CurveIndex, Var1, Var2, Var3, Var4, Var5, Var6);
} else if (SELECT_CASE_var == InterpTypeEnum::BtwxtMethod) {
CurveValue = BtwxtTableInterpolation(state, CurveIndex, Var1, Var2, Var3, Var4, Var5, Var6);
} else {
ShowFatalError(state, "CurveValue: Invalid Interpolation Type");
}
switch (state.dataCurveManager->PerfCurve(CurveIndex).InterpolationType) {
case InterpTypeEnum::EvaluateCurveToLimits: {
CurveValue = PerformanceCurveObject(state, CurveIndex, Var1, Var2, Var3, Var4, Var5);
break;
}
case InterpTypeEnum::BtwxtMethod: {
CurveValue = BtwxtTableInterpolation(state, CurveIndex, Var1, Var2, Var3, Var4, Var5, Var6);
break;
}
default:
ShowFatalError(state, "CurveValue: Invalid Interpolation Type");
}

if (state.dataCurveManager->PerfCurve(CurveIndex).EMSOverrideOn)
Expand Down Expand Up @@ -1341,7 +1343,7 @@ namespace CurveManager {
}
}

// Loop over Fan Pressure Rise curves and load data - udated 15Sep2010 for unit types
// Loop over Fan Pressure Rise curves and load data
CurrentModuleObject = "Curve:FanPressureRise";
for (CurveIndex = 1; CurveIndex <= NumFanPressRise; ++CurveIndex) {
state.dataInputProcessing->inputProcessor->getObjectItem(state,
Expand Down Expand Up @@ -2549,13 +2551,12 @@ namespace CurveManager {
}

Real64 PerformanceCurveObject(EnergyPlusData &state,
int const CurveIndex, // index of curve in curve array
Real64 const Var1, // 1st independent variable
Optional<Real64 const> Var2, // 2nd independent variable
Optional<Real64 const> Var3, // 3rd independent variable
Optional<Real64 const> Var4, // 4th independent variable
Optional<Real64 const> Var5, // 5th independent variable
[[maybe_unused]] Optional<Real64 const> Var6 // 6th independent variable
int const CurveIndex, // index of curve in curve array
Real64 const Var1, // 1st independent variable
Optional<Real64 const> Var2, // 2nd independent variable
Optional<Real64 const> Var3, // 3rd independent variable
Optional<Real64 const> Var4, // 4th independent variable
Optional<Real64 const> Var5 // 5th independent variable
)
{

Expand Down Expand Up @@ -2591,7 +2592,6 @@ namespace CurveManager {
Real64 const V3(Var3.present() ? max(min(Var3, Curve.Var3Max), Curve.Var3Min) : 0.0); // 3rd independent variable after limits imposed
Real64 const V4(Var4.present() ? max(min(Var4, Curve.Var4Max), Curve.Var4Min) : 0.0); // 4th independent variable after limits imposed
Real64 const V5(Var5.present() ? max(min(Var5, Curve.Var5Max), Curve.Var5Min) : 0.0); // 5th independent variable after limits imposed
// Real64 const V6(Var6.present() ? max(min(Var6, Curve.Var6Max), Curve.Var6Min) : 0.0); // 6th independent variable after limits imposed

{
auto const SELECT_CASE_var(Curve.CurveType);
Expand Down
3 changes: 1 addition & 2 deletions src/EnergyPlus/CurveManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,7 @@ namespace CurveManager {
Optional<Real64 const> Var2 = _, // 2nd independent variable
Optional<Real64 const> Var3 = _, // 3rd independent variable
Optional<Real64 const> Var4 = _, // 4th independent variable
Optional<Real64 const> Var5 = _, // 5th independent variable
Optional<Real64 const> Var6 = _ // 6th independent variable
Optional<Real64 const> Var5 = _ // 5th independent variable
);

Real64 BtwxtTableInterpolation(EnergyPlusData &state,
Expand Down

8 comments on commit 3159425

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

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

remove-unused-var6-from-performancecurveobject (mitchute) - x86_64-MacOS-10.15-clang-11.0.0: OK (3084 of 3084 tests passed, 0 test warnings)

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

remove-unused-var6-from-performancecurveobject (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (3123 of 3124 tests passed, 0 test warnings)

Failures:\n

FileSystem Test Summary

  • Passed: 6
  • Failed: 1

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

remove-unused-var6-from-performancecurveobject (mitchute) - Win64-Windows-10-VisualStudio-16: OK (2333 of 2333 tests passed, 0 test warnings)

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

remove-unused-var6-from-performancecurveobject (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: OK (1638 of 1638 tests passed, 0 test warnings)

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

remove-unused-var6-from-performancecurveobject (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: OK (726 of 726 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.

remove-unused-var6-from-performancecurveobject (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: 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.

remove-unused-var6-from-performancecurveobject (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: Tests Failed (0 of 0 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.

remove-unused-var6-from-performancecurveobject (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: Tests Failed (0 of 0 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.