Retail rates dispatch grid export#1303
Conversation
…or CA NBT cases. Some ideas for future tweaks to maybe beat manual dispatch
…es_grid_export_tests
Pull Request Test Coverage Report for Build 14251804098Details
💛 - Coveralls |
There was a problem hiding this comment.
Thanks for adding this. I'm having a hard time coming up with a scenario where battery to grid adds a lot of value, but I am seeing the battery discharge to grid.
For the attached file, I would expect battery to discharge to grid during TOU period 2 (Noon-3pm) with a sell rate of $1/kWh, but the battery only discharges to grid at a very low rate when it is also discharging to the load ("Discharge battery only when load exceeds system output" is unchecked). Is this the desired behavior?
|
@cpaulgilman That's a good test - thanks for including it. This is not the intended behavior and highlights a bug in the lib_utility_rate_equations rate_data::get_composite_tou_sell_rate function - where these sell rates are being interpreted as 0 even though they shouldn't be. I'll push a solution to this branch so the battery discharges with the high sell rate you've specified in the case. |
CMPvsamv1BatteryIntegration_cmod_pvsamv1.ResidentialDCBatteryModelPriceSignalDispatchGridExport /Users/imacuser/Public/Projects/GitHub/NREL/ssc/test/ssc_test/cmod_battery_pvsamv1_test.cpp:1248: Failure The difference between batt_stats.peakKwCharge and peakKwCharge is 0.24956223857071747, which exceeds m_error_tolerance_lo, where batt_stats.peakKwCharge evaluates to -4.1395622385707176, peakKwCharge evaluates to -3.8900000000000001, and m_error_tolerance_lo evaluates to 0.10000000000000001. [ FAILED ] CMPvsamv1BatteryIntegration_cmod_pvsamv1.ResidentialDCBatteryModelPriceSignalDispatchGridExport (31634 ms)
… billing buy and sell rates issue
|
The following four tests are now failing on Ubuntu [ FAILED ] 4 tests, listed below: |
Thanks! |
sjanzou
left a comment
There was a problem hiding this comment.
Are we holding off merging this until the Mac tolerance is at a value for the tests to pass?
| { | ||
| if (a.ExportPerKWh() == b.ExportPerKWh()) | ||
| { | ||
| return a.ExportPerKWh() > b.ExportPerKWh(); |
There was a problem hiding this comment.
@brtietz , can you explain the logic here? If the two grid points are equal then return false - always?
There was a problem hiding this comment.
This is a typo. I corrected the tiebreaker to ExportPrice (total paid by utility to discharge at full power) Good catch!
|
Trying to fix windows runner... bash commands on the Windows bash shell seem to not always be the same as for unix... |
…REL/ssc into retail_rates_grid_export_tests
…es_grid_export_tests
|
PR reviewed for Help revisions -- I made a few minor edits, but no major revisions required. |



Add logic to retail rates dispatch that will discharge power to the grid if the checkbox is checked and if a time of use period (or time series sell rate) has a sell rate greater than the buy rate that day.
Test file:
nbt_sam_analysis_pr_test.zip
Expect to see a meaningful amount (~29 kWh) of battery to grid export in August, but not other months. Feel free to experiment with time of use rates to create more substantial grid discharge.
Pairs with NatLabRockies/SAM#2041
Fixes NatLabRockies/SAM#2040