-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Unused Var6 from PerformanceCurveObject #8798
Merged
Myoldmopar
merged 1 commit into
develop
from
remove-unused-var6-from-performancecurveobject
Jun 21, 2021
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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); | ||
|
@@ -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"); | ||
} | ||
Comment on lines
+198
to
209
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed this from an IF/ELSE to a switch block since we already have enums. |
||
|
||
if (state.dataCurveManager->PerfCurve(CurveIndex).EMSOverrideOn) | ||
|
@@ -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, | ||
|
@@ -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 | ||
) | ||
{ | ||
|
||
|
@@ -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); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Var6
was removed.