Closed felixpollet closed 1 year ago
Thanks for this suggestion.
May I ask what is your use case ? I mean that FAST-OAD currently expects each process variable to be a float (we still do not use OpenMDAO feature for discrete variables), so it won't accept a string value in an XML data file. Therefore, only making the variable viewer able to read such a file may appear of limited interest.
Thank you for your quick reply.
I am developing an extension to FAST-OAD for electric drones. One of the features is discrete selection of off-the-shelf components from catalogs during the design process. So it would be convenient (though not absolutely necessary) to display in the variable viewer the names/references of the selected components.
I was expecting something like this. If I understand well, this is not only about the variable viewer. If you want to use an OpenMDAO component that uses discrete variables, all FAST-OAD needs to be compliant with this feature, and currently, it is not.
For the rare use cases that needed discrete variables, putting integers (indeed processed as float) among other variables was enough. That is why this feature has not been a priority. We may consider to raise the priority for this development, but anyway, I cannot tell a target date for now.
I only use discrete outputs to provide additional information, and I have had no problem adding such outputs to OpenMDAO components. In fact, the selection process is not done with discrete variables, I use continuous variables instead. Therefore, FAST-OAD does not have to handle discrete variables for the sizing process. It only has to read some discrete outputs that do not affect the procedure. Sorry for the misunderstanding.
The discrete outputs are visible in the output xml file. In my specific case, the only missing bridge seems to be between the xml file and the variable viewer.
Actually, I wasn't expecting discrete outputs to show up in the XML file, but you are right 😅. So Ok, it's just about the variable viewer. That should be doable for next release in January. Stay tuned...
Is your feature request related to a problem? Please describe. The variable viewer does not display a variable if its value is a string.
For example, the following variable in the xml file will not appear in the variable viewer: `