Skip to content

Commit

Permalink
Merge pull request #1115 from NREL/ssc_1112_fix_period_6_dispatch
Browse files Browse the repository at this point in the history
Correct size versus iprofile index for manual dispatch
  • Loading branch information
brtietz authored Jan 26, 2024
2 parents d4dfcee + d7cdb55 commit 120ec1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shared/lib_battery_dispatch_manual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ void dispatch_manual_t::prepareDispatch(size_t hour_of_year, size_t )
m_batteryPower->canGridCharge = _gridcharge_array[iprofile - 1];
m_batteryPower->canClipCharge = _can_clip_charge;

if (iprofile < _fuelcellcharge_array.size()) {
if (iprofile <= _fuelcellcharge_array.size()) {
m_batteryPower->canFuelCellCharge = _fuelcellcharge_array[iprofile - 1];
}

if (iprofile < _discharge_grid_array.size()) {
if (iprofile <= _discharge_grid_array.size()) {
m_batteryPower->canDischargeToGrid = _discharge_grid_array[iprofile - 1];
}

Expand Down

0 comments on commit 120ec1d

Please sign in to comment.