Skip to content

Commit 6a0cac3

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c408c86 commit 6a0cac3

23 files changed

+228
-230
lines changed

src/CommonFunctions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1834,7 +1834,7 @@ void quickSort(double arr[], int left, int right)
18341834
}
18351835
//////////////////////////////////////////////////////////////////
18361836
/// \brief adds value v to end of integer array a[] of original size n, expands a[] to size n+1
1837-
//
1837+
//
18381838
void pushIntoIntArray(int*&a, const int &v, int &n)
18391839
{
18401840
int *tmp=new int [n+1];

src/DemandExpressionHandling.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ bool CDemandOptimizer::ConvertToExpressionTerm(const string s, expressionTerm* t
302302
return true;
303303

304304
}
305-
}
305+
}
306306
else {
307307
warn="ConvertToExpression:: Unparseable term in history expression starting with !/$ - only !Q, !I, !D, !h, $B, or $E currently supported. "+warnstring;
308308
ExitGracefully(warn.c_str(), BAD_DATA_WARN);
@@ -393,7 +393,7 @@ bool CDemandOptimizer::ConvertToExpressionTerm(const string s, expressionTerm* t
393393
return true;
394394
}
395395
//----------------------------------------------------------------------
396-
else if (s[0] == '$')
396+
else if (s[0] == '$')
397397
{
398398
if ((s[1] == 'B') || (s[1] == 'E')) //Subbasin-indexed
399399
{
@@ -1115,7 +1115,7 @@ void CDemandOptimizer::AddConstraintToLP(const int ii, const int kk, lp_lib::lpr
11151115
pE= pC->pOperRegimes[0]->pExpression; //inactive expression
11161116
}
11171117

1118-
if ((kk==DOESNT_EXIST) || (!constraint_valid)) // INACTIVE/INVALID GOAL/CONSTRAINT
1118+
if ((kk==DOESNT_EXIST) || (!constraint_valid)) // INACTIVE/INVALID GOAL/CONSTRAINT
11191119
{
11201120
if (!pC->is_goal) {
11211121
col_ind[i]=1;
@@ -1150,7 +1150,7 @@ void CDemandOptimizer::AddConstraintToLP(const int ii, const int kk, lp_lib::lpr
11501150
#endif
11511151

11521152
//////////////////////////////////////////////////////////////////
1153-
/// evaluates difference between right hand side and left hand side of expression, or value of RHS if RHS_only==true and statement only has one term left of (in)equality
1153+
/// evaluates difference between right hand side and left hand side of expression, or value of RHS if RHS_only==true and statement only has one term left of (in)equality
11541154
/// does not support active decision variables in expression (only to be used for conditionals and demand/return expressions)
11551155
/// \params pE [in] - conditional expression
11561156
/// \param t [in] - current model time
@@ -1192,7 +1192,7 @@ double CDemandOptimizer::EvaluateExpression(const expressionStruct* pE,const dou
11921192
}
11931193
}
11941194
}
1195-
1195+
11961196
RHS-=coeff; //term group goes on right hand side
11971197
}
11981198
}
@@ -1207,7 +1207,7 @@ double CDemandOptimizer::EvaluateExpression(const expressionStruct* pE,const dou
12071207
//
12081208
bool CDemandOptimizer::EvaluateConditionExp(const expressionStruct* pE,const double &t) const
12091209
{
1210-
1210+
12111211
double RHSminusLHS=EvaluateExpression(pE,t,false);
12121212

12131213
if (fabs(RHSminusLHS-RAV_BLANK_DATA)<REAL_SMALL) {return true;}//condition assumed satisfied if no data in conditional

src/DemandGroups.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
CDemandGroup::CDemandGroup(string tag, int global_ind)
1313
{
1414
_name=tag;
15-
_nDemands=0;
15+
_nDemands=0;
1616
_pDemands=NULL;
1717
_global_ii=global_ind;
1818
}
@@ -91,4 +91,3 @@ void CDemandGroup::AddDemand(CDemand *pDem)
9191
void CDemandGroup::Initialize()
9292
{
9393
}
94-

0 commit comments

Comments
 (0)