Skip to content

fix: prevent infinite loop in common ASV single-speed solver - #1721

Merged
olelod merged 1 commit into
mainfrom
fix/common-asv-infinite-loop
Aug 18, 2026
Merged

fix: prevent infinite loop in common ASV single-speed solver#1721
olelod merged 1 commit into
mainfrom
fix/common-asv-infinite-loop

Conversation

@olelod

@olelod olelod commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

When no mass rate in the [min, max] range produces constant ASV-corrected mass rates across all stages, the while-loop incremented inc past 1.0 without ever exiting — logging an error on every iteration indefinitely.

Now returns the result at the original un-recirculated mass rate (minimum_mass_rate_kg_per_hour), which is reported with the appropriate failure status (e.g. BELOW_MINIMUM_FLOW_RATE or target pressure mismatch).

This is legacy code only — the new process simulation solver uses bounded bisection (Bisect with max_iterations=20).

@olelod
olelod requested a review from a team as a code owner August 18, 2026 12:06
@olelod
olelod merged commit 941a571 into main Aug 18, 2026
23 checks passed
@olelod
olelod deleted the fix/common-asv-infinite-loop branch August 18, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants