NatLabRockies / NatLabRockies/SAM

ReOpt error handling, timeout warnings

Open
#2,131 0 comments 0 reactions 2 assignees View on GitHub

@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:

  1. Go to PV Battery - Commercial
  2. Go to Battery Cell and System page
  3. Click on 'Get size and dispatch' button
  4. Wait 10 minutes, see crash
Expected behavior

Fixing the typo gives the following message:

Image Image

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.