Skip to content

Fix for variable bus from pre- to post-mission subsystem#1005

Open
irianordaz wants to merge 6 commits intoOpenMDAO:mainfrom
irianordaz:bus_post_mission
Open

Fix for variable bus from pre- to post-mission subsystem#1005
irianordaz wants to merge 6 commits intoOpenMDAO:mainfrom
irianordaz:bus_post_mission

Conversation

@irianordaz
Copy link

@irianordaz irianordaz commented Feb 24, 2026

Summary

Fixes the subsystem builder bus to allow passing variables from pre-mission to post-mission. Previously, the connections were only made when the parameter contained a target in "mission". If the parameter contained a target only in post_mission, an error would occur.

Related Issues

  • Resolves #

Backwards incompatibilities

None

New Dependencies

None

@irianordaz irianordaz marked this pull request as draft February 24, 2026 19:20
self.connect(
f'pre_mission.{bus_variable}',
post_mission_var_name,
f'pre_mission.{subsystem.name}.{bus_variable}',
Copy link
Member

Choose a reason for hiding this comment

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

The change in these two lines needs to be reverted.


for post_mission_var_name in post_mission_var_names:

if '.' in post_mission_var_name:
Copy link
Member

@Kenneth-T-Moore Kenneth-T-Moore Feb 24, 2026

Choose a reason for hiding this comment

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

I think this split here will break if the user wants to connect to an unpromoted input like post_mission.sub1.sub2.comp.x. We should probably remove it, and change the target in the connect back to post_mission_var_name.

self.connect(
f'pre_mission.{bus_variable}',
post_mission_var_name,
f'{post_mission_var_name}',
Copy link
Member

Choose a reason for hiding this comment

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

Probably cleanest to remove the formatted string now that it isn't needed.

@irianordaz irianordaz marked this pull request as ready for review February 24, 2026 21:58
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