Incorrect values when saving and loading json files for off-design
@cmbenne3 is already working on this.
Since Feb 12, 2026.
- Dominant language
- Python
- Stars
- 287
- Forks
- 140
- Avg merge
- 6d 14h
- Merged PRs (30d)
- 18
Description
Description
Currently we save the results of a sizing run to a json file using aviary_inputs for the names and values of the data. This is a problem since these values are stored as an option at the time the problem is instantiated and do not get updated after the optimization is finished.
Additionally, there are many unnecessary values being dumped into the json file that are not relevant to the problem at hand (eg: blended wing variables for a non-blended wing aircraft)
Example
In save_sizing_to_json() in methods_for_level2.py, the lines
for data in self.aviary_inputs:
(name, (value, units)) = data
type_value = type(value)
are the source of the issue, changing them to
for data in self.aviary_inputs:
(name, (_, units)) = data
try:
value = self.get_val(name, units=units)
except KeyError:
(_, (value, _)) = data
Appears to solve the issue but is a hacky-fix that doesn't address the issue of bloat
Aviary Version
0.9.4-dev
Relevant environment information
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.