Skip to content

Clean up range_constraint behavior in sizing. - #1327

Open
Kenneth-T-Moore wants to merge 8 commits into
OpenMDAO:mainfrom
Kenneth-T-Moore:constrain_range
Open

Kenneth-T-Moore wants to merge 8 commits into
OpenMDAO:mainfrom
Kenneth-T-Moore:constrain_range

Conversation

@Kenneth-T-Moore

Copy link
Copy Markdown
Member

Summary

  1. The "constrain_range" post_mission phase_info key was removed. It previously had no effect.
  2. Made behavior for target_range consistent between Energy and 2DOF missions.
  3. We now use the specified range for the constraint ref.

Previously, the Energy method would allow you to run a Sizing mission with no range constraint, while the 2DOF method would use Aircraft.Design.RANGE from the aviary_inputs as the range constraint value if target_range was not specified. This PR changes this behavior so that both Energy and 2DOF will pull the target range from Aircraft.Design.RANGE if it is not specified in post-mission. This only applies to the Sizing problem type.

Related Issues

Backwards incompatibilities

This PR does remove the ability to do unconventional sizing where you don't care about the range. An example is the all-electric UAV work our interns did this summer, where they sized the weight and physical dimensions while flying a typical mission. Note that one of the off-design mission types is probably a better choice for this kind of work, but we may need to add some additional support.

AI Usage

Disclose any AI usage in this PR, including models used and files affected.

else:
target_range = aviary_inputs.get_val(Aircraft.Design.RANGE, units='NM')

aviary_inputs.set_val(Mission.RANGE, target_range, units='NM')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we want to set this value in aviary_inputs? Mission.RANGE is an output of the problem representing how far the aircraft has flown on the mission being analyzed. Having it present in aviary_inputs might be confusing?(if running an off design max range mission then there would be no target range, target range would be set to design range and then aviary_inputs Mission.RANGE would be set=target_range. After the problem solves the problem level Mission.RANGE (probably significantly longer than the design range) would mismatch with the aviary inputs version set here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch. This is a holdover from the 2dof configurator, but since we are caching this value in self.target_range now, we don't need this backchannel.


self.add_constraint(Mission.Constraints.RANGE_RESIDUAL, equals=0, ref=1000)
# If target_range is unspecified, then don't assume we want to fly a fixed range.
if 'target_range' in self.post_mission_info:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't understand why we check for presence of 'target_range' in post mission info only for this problem_type but not the other 2?

@Kenneth-T-Moore Kenneth-T-Moore Oct 1, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hey, Chris. I took a look at our problem_type definitions, and I think I got this mixed up. SIZING and OFF_DESIGN_MIN_FUEL require a target range, but OFF_DESIGN_MAX_RANGE is the one that maximizes distance, so it shouldn't even have a range constraint.

It makes me wonder though, whether we need to add a tru OFF_DESIGN, where we fly it however we want.

@cmbenne3 cmbenne3 Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a fair point! The off_design_min_fuel is helpful for evaluating the performance of an aircraft on an 'economy' mission or similar, and is a hangover from how people traditionally design for a 'design' mission but want to evaluate performance on shorter ranges or with different payloads.
The off_design_max_range is required for generating a payload-range diagram.

You're right though - an aircraft being flown as a communications relay, or as a disaster relief observation aircraft probably wants to maximise endurance with no constraints or care for the range or distance flown - this is not currently possible with Aviary. Maybe we need an OFF_DESIGN_MAX_TIME mission type.

A time to climb mission would require OFF_DESIGN_MIN_TIME. A supersonic aircraft might require a MIN_TIME mission that includes a range constraint...
Not sure if it's worth trying to build some of these in, or whether we wait until someone requests support for them first.

This branch has not been deployed

No deployments
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.

Range constraint in a single-phase mission

2 participants