Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ repos:
# - id: include-what-you-use

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.34.0
rev: 0.36.0
hooks:
- id: check-github-workflows
- repo: meta
Expand Down
10 changes: 5 additions & 5 deletions src/DemandOptimization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,14 @@ void CDemandOptimizer::SetWorkflowVariable (const string var_name, const dou
//////////////////////////////////////////////////////////////////
/// \brief sets workflow variable
/// \params var_code [in] - history value code - Q, I, h, or A
/// \params p [in] - global subbasin index
/// \params i [in] - history index
/// \params p [in] - global subbasin index
/// \params i [in] - history index
/// \params val [in] - history value
/// \notes - called while parsing .rvc file; throws no warnings, only updates valid contents
/// \notes - called while parsing .rvc file; throws no warnings, only updates valid contents
//
void CDemandOptimizer::SetHistoryVariable (const char var_code, const int p, const int i, const double &val)
{
if ((p<0) || (p>=_pModel->GetNumSubBasins())){return;}
if ((p<0) || (p>=_pModel->GetNumSubBasins())){return;}
if ((i<0) || (i>=_nHistoryItems)){return;}
if (_aSBIndices[p]==DOESNT_EXIST){return;}
if (var_code=='Q'){_aQhist[_aSBIndices[p]][i]=val;}
Expand Down Expand Up @@ -2697,7 +2697,7 @@ void CDemandOptimizer::WriteMajorOutput (ofstream &RVC)
}
for (int p=0;p<_pModel->GetNumSubBasins();p++){
if (_pModel->GetSubBasin(p)->IsEnabled()){
RVC<<":BasinFlowHist "<< p<<",";
RVC<<":BasinFlowHist "<< p<<",";
for(int i=0; i<_nHistoryItems;i++) { RVC<<_aQhist[_aSBIndices[p]][i]<<","; }RVC<<endl;
if (_pModel->GetSubBasin(p)->GetReservoir()!=NULL)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Model.h
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ class CModel: public CModelABC
void DestroyAllChannelXSections();
void CheckForChannelXSectsDuplicates(const optStruct &Options);
void WriteRatingCurves(const optStruct& Options) const;

// Convolution variables
int GetNumConvolutionVariables() const;
void IncrementConvolutionCount();
Expand Down
Loading