OpenMDAO / Aviary

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

FLOPS validation input data needs to be split into inputs and options #392

Open jkirk5 opened 6 days ago

jkirk5 commented 6 days ago

Desired capability or behavior.

from @erikdolsonva:

Summary of Issue

get_flops_inputs() needs to be refactored to return only non-option input variables, and a new function get_flops_options() needs to be created to return only options.

Description

Unit tests which use FLOPS models for validation generally call get_flops_inputs() to get every input, be they variables or options, and pass them to the model as aviary_options. Then flops_validation_case() calls get_flops_inputs() and sets the desired input variable values in the model from the same collection. This works OK if there's a clear line between input variables and options, but in some cases options are converted to input variables locally. We ran into a case where test_flops_based_static_analysis.py was failing to catch a bug because an input variable's value should have failed to be set, but it was instead being set from the value of the option because they were all jumbled up in the same AviaryValues object. To avoid this happening again, get_flops_inputs() needs to be refactored to return only non-option input variables, and a new function get_flops_options() needs to be created to return only options.

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

No response

Associated Bug Report

No response

jkirk5 commented 6 days ago

Further investigation of this issue is requested to help set priority