- Posts: 2
Optimal battery sizing for peak shaving
- Rafael Osmari
- Topic Author
Less
More
05 Aug 2020 11:08 #8522
by Rafael Osmari
Optimal battery sizing for peak shaving was created by Rafael Osmari
Hi SAM support team!
Is it possible to find an optimal battery sizing in a Generic System without PV insertion (PV losses = 100%) for a peak shaving application? I know that BLAST-BTM tool does, but it is not so accurate as SAM since it does not consider battery degradation.
I've been trying to use the REopt API, but I'm getting the following error:
Could not evaluate callback function:call_reopt->on_change[28]: error in call to 'reopt_size_battery()': Must be run from Photovoltaic case with Residential, Commercial, Third Party or Host Developer model.[13]: eval error in statement list
When I try to run from a Photovoltaic case, another error pops up and so on... so, I've decided to ask before inputing all my effort here.
Thanks!
Is it possible to find an optimal battery sizing in a Generic System without PV insertion (PV losses = 100%) for a peak shaving application? I know that BLAST-BTM tool does, but it is not so accurate as SAM since it does not consider battery degradation.
I've been trying to use the REopt API, but I'm getting the following error:
Could not evaluate callback function:call_reopt->on_change[28]: error in call to 'reopt_size_battery()': Must be run from Photovoltaic case with Residential, Commercial, Third Party or Host Developer model.[13]: eval error in statement list
When I try to run from a Photovoltaic case, another error pops up and so on... so, I've decided to ask before inputing all my effort here.
Thanks!
Please Log in or Create an account to join the conversation.
- Paul Gilman
Less
More
- Posts: 5532
06 Aug 2020 15:39 #8523
by Paul Gilman
Replied by Paul Gilman on topic Optimal battery sizing for peak shaving
Hi Rafael,
The ReOpt optimization option only works with the PV Battery configurations when battery dispatch is allowed to charge the battery from the grid.
We're looking into the Generic Battery configurations -- we either need to remove the ReOpt option from that configuration, or fix i so it does not display that error message. I'll follow up when that is resolved.
If the optimization is not working for a system with no PV (DC losses set to 100%), you might try running it with a very small PV system to see how well it works under those conditions.
Best regards,
Paul.
The ReOpt optimization option only works with the PV Battery configurations when battery dispatch is allowed to charge the battery from the grid.
We're looking into the Generic Battery configurations -- we either need to remove the ReOpt option from that configuration, or fix i so it does not display that error message. I'll follow up when that is resolved.
If the optimization is not working for a system with no PV (DC losses set to 100%), you might try running it with a very small PV system to see how well it works under those conditions.
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
- Rafael Osmari
- Topic Author
Less
More
- Posts: 2
06 Aug 2020 16:59 #8530
by Rafael Osmari
Replied by Rafael Osmari on topic Optimal battery sizing for peak shaving
Thanks Paul! I'll wait for the follow up

Please Log in or Create an account to join the conversation.
- Agnes
Less
More
- Posts: 4
11 Dec 2020 09:11 #9100
by Agnes
Replied by Agnes on topic Optimal battery sizing for peak shaving
Hi Paul,
I was wondering if there are any updates with regard to the REopt sizing and dispatch option for the Generic System in the new release of SAM (2020.11.29)?
I would like to use this module in GUI for standalone battery system, with 'Nominal capacity factor' for Generic Power Plant set to 0% and "Plant cost per capacity" set to 0$/W.
After first try, I received the following error:
Many thanks!
I was wondering if there are any updates with regard to the REopt sizing and dispatch option for the Generic System in the new release of SAM (2020.11.29)?
I would like to use this module in GUI for standalone battery system, with 'Nominal capacity factor' for Generic Power Plant set to 0% and "Plant cost per capacity" set to 0$/W.
After first try, I received the following error:
Your advice would be greatly appreciated.Could not evaluate callback function:call_reopt->on_change
[5]: error: _s
[5]: error: _s
[4]: eval error in statement list
Many thanks!
Please Log in or Create an account to join the conversation.
- Paul Gilman
Less
More
- Posts: 5532
11 Dec 2020 16:25 #9101
by Paul Gilman
Replied by Paul Gilman on topic Optimal battery sizing for peak shaving
Hi Agnes,
That is a bug with the Generic - Battery model: The REopt integration does not work for that model in SAM 2020.11.29. We will address this issue in first update. Thank you for bringing it to our attention.
github.com/NREL/SAM/issues/479
Best regards,
Paul.
That is a bug with the Generic - Battery model: The REopt integration does not work for that model in SAM 2020.11.29. We will address this issue in first update. Thank you for bringing it to our attention.
github.com/NREL/SAM/issues/479
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
Moderators: Paul Gilman