NatLabRockies / NatLabRockies/SAM
ReOpt error handling, timeout warnings
Open
@brtietz is already working on this.
Since Nov 12, 2025.
battery
bug
- Dominant language
- C++
- Stars
- 486
- Forks
- 219
- Avg merge
- 10h 10m
- Merged PRs (30d)
- 2
Description
Describe the bug
Running ReOpt optimizing size and dispatch API calls exceeds the maximum simulation time of 600 seconds. There's a typo when pulling messages->error (invoke.cpp line 6461), so SAM crashes with a read access violation.
To Reproduce
Steps to reproduce the behavior:
- Go to PV Battery - Commercial
- Go to Battery Cell and System page
- Click on 'Get size and dispatch' button
- Wait 10 minutes, see crash
Expected behavior
Fixing the typo gives the following message:
Investigate timeout issues, see # as well
Screenshots
If applicable, add screenshots to help explain your problem.
Operating System and Version
- OS: [Windows, macOS, Linux]
- Version SAM 2025.4.16r2
Additional context
Found when helping with user support question. ReOpt does not seem to timeout when finding a battery value of 0 kW, 0 kWh.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.