Skip to content

Fixed an issue where default values in add_control or set_control_options were no longer being respected. #1165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 5, 2025

Conversation

robfalck
Copy link
Contributor

@robfalck robfalck commented Apr 4, 2025

Summary

The default control values were set using a call to set_input_defaults, which went away because the ControlInterpComp is no longer housed in a ControlGroup. Values are now applied at add_input, and the test to make sure these default values stick has been fixed.

Related Issues

Backwards incompatibilities

None

New Dependencies

None

robfalck added 2 commits April 4, 2025 16:18
…t_input_defaults call was no longer meaningful.

These default values had to be applied at add_input instead.

Also, the test to see if default values were sticking was no longer valid because it depended on a problem creation function that was overriding the values after setup anyway.
These issues have been fixed.
Copy link
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.

This definitely fixes my issue.

robfalck added 3 commits April 4, 2025 19:27
…es in the phase.

Fixed a numpy deprecation regarding scalar reshapes in reshape_val.
No longer add state and control continuity constraints in ODEEvaluationGroup for the purpose of being able to compute their derivatives when running in simulation and derivatives are not needed.
@coveralls
Copy link

Coverage Status

coverage: 92.719% (-0.1%) from 92.831%
when pulling 0ffc822 on robfalck:default_control_val_fix
into 3efd103 on OpenMDAO:master.

@robfalck robfalck merged commit da8cfbb into OpenMDAO:master Apr 5, 2025
12 checks passed
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.

Default val set in add_control or set_control_options is not applied.
3 participants