OpenMDAO / Aviary

NASA's aircraft analysis, design, and optimization tool
https://openmdao.github.io/Aviary/
Other
134 stars 59 forks source link

Multiple constraints for the same variable in the `phase_info` object are not respected #264

Closed johnjasa closed 1 week ago

johnjasa commented 5 months ago

Desired capability or behavior.

If you have two constraints in a phase_info['constraints'] dict with the same variable name, only the last one is used. That's because within a dictionary you can only have unique keys. You might need multiple constraints if you want both initial and final boundary constraints on the variable.

We could rework the constraints handling so it's a list of dicts instead of a dict of dicts. This will be backwards incompatible. There might be a way to make constraints handle either a list of dicts and a dict of dicts and that would remove the backwards incompatibility.

Is your feature request related to a problem? Please describe.

No response

Associated Bug Report

No response