Skip to content

Issue 1033 - Fix Infinite Payload Range Looping #1034

Merged
jkirk5 merged 25 commits intoOpenMDAO:mainfrom
cmbenne3:issue1033
Apr 2, 2026
Merged

Issue 1033 - Fix Infinite Payload Range Looping #1034
jkirk5 merged 25 commits intoOpenMDAO:mainfrom
cmbenne3:issue1033

Conversation

@cmbenne3
Copy link
Copy Markdown
Contributor

@cmbenne3 cmbenne3 commented Mar 20, 2026

Summary

This PR fixes a bug where setting payload_range in aviary inputs triggered an infinite looping of trying to generate a payload_range diagram.

The quick fix is to reset the aviary inputs value immediately after generate_payload_range has been set, ahead of running the first off design problem. Unfortunately this leaves mismatched aviary inputs.settings.payload_range = False and prob.generate_payload_range = True for the original parent problem. It is unclear how to fix this without introducing another variable, which seems unecessary!

There is also a small change to grab max_iter from the design/sizing problem and parse that to the optimizer for the off_design problems. This solved an issue where off_design problems failed due to hitting the default max iteration limit (50).

Related Issues

Backwards incompatibilities

None

New Dependencies

None

@cmbenne3 cmbenne3 marked this pull request as draft March 20, 2026 21:25
@jkirk5
Copy link
Copy Markdown
Contributor

jkirk5 commented Mar 20, 2026

We should test this as well - the original payload-range test doesn't work using the flag because we needed to get access to the off-design problems in order to check their values. I don't know if we can avoid running the whole payload-range suite twice but if would be nice if we can find a way to do so

@cmbenne3 cmbenne3 marked this pull request as ready for review March 23, 2026 13:53
cmbenne3 and others added 3 commits March 23, 2026 09:53
…ll of run_payload_range method. Modify run_payload_range to save the off design problems into the original aviary problem object to enable easier access of off design variables
Comment thread aviary/core/aviary_problem.py
Comment thread aviary/core/aviary_problem.py
Comment thread aviary/core/aviary_problem.py
Comment thread aviary/core/aviary_problem.py
Comment thread aviary/validation_cases/benchmark_tests/test_bench_off_design.py Outdated
Comment thread aviary/core/aviary_problem.py Outdated
Copy link
Copy Markdown
Member

@Kenneth-T-Moore Kenneth-T-Moore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good.

@jkirk5
Copy link
Copy Markdown
Contributor

jkirk5 commented Apr 2, 2026

The quick fix is to reset the aviary inputs value immediately after generate_payload_range has been set, ahead of running the first off design problem. Unfortunately this leaves mismatched aviary inputs.settings.payload_range = False and prob.generate_payload_range = True for the original parent problem. It is unclear how to fix this without introducing another variable, which seems unecessary!

Is a cleaner potential solution to simply check for mission type and only call the payload-range method if a design mission is currently being run?

@cmbenne3
Copy link
Copy Markdown
Contributor Author

cmbenne3 commented Apr 2, 2026

The quick fix is to reset the aviary inputs value immediately after generate_payload_range has been set, ahead of running the first off design problem. Unfortunately this leaves mismatched aviary inputs.settings.payload_range = False and prob.generate_payload_range = True for the original parent problem. It is unclear how to fix this without introducing another variable, which seems unecessary!

Is a cleaner potential solution to simply check for mission type and only call the payload-range method if a design mission is currently being run?

We could do this - is there ever a time when it makes sense to run a payload_range diagram from a non-design mission?

@jkirk5
Copy link
Copy Markdown
Contributor

jkirk5 commented Apr 2, 2026

We could do this - is there ever a time when it makes sense to run a payload_range diagram from a non-design mission?

I can't think of any, and the payload-range method is always available to directly call if you did for some reason.

@jkirk5 jkirk5 added this pull request to the merge queue Apr 2, 2026
Merged via the queue into OpenMDAO:main with commit 90a0fde Apr 2, 2026
6 checks passed
@cmbenne3 cmbenne3 deleted the issue1033 branch April 3, 2026 17:52
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.

csv input of settings:payload_range results in infinite looping of payload range code

3 participants