You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Aviary models seem to be missing information about the units for many of the variables.
If an Aviary run is done with optimization history turned on, the resulting case recorder file has metadata for the variables but the units for many variables that should have units, instead have units of None.
Example
Run this script to generate the driver history file.
"""
Run the a mission with a simple external component that computes the wing
and horizontal tail mass.
"""
from copy import deepcopy
import aviary.api as av
from aviary.examples.external_subsystems.simple_weight.simple_weight_builder import WingWeightBuilder
phase_info = deepcopy(av.default_height_energy_phase_info)
# Here we just add the simple weight system to only the pre-mission
phase_info['pre_mission']['external_subsystems'] = [WingWeightBuilder()]
prob = av.AviaryProblem()
# Load aircraft and options data from user
# Allow for user overrides here
prob.load_inputs('models/test_aircraft/aircraft_for_bench_FwFm.csv', phase_info)
# Preprocess inputs
prob.check_and_preprocess_inputs()
prob.add_pre_mission_systems()
prob.add_phases()
prob.add_post_mission_systems()
# Link phases and variables
prob.link_phases()
prob.add_driver("SLSQP")
prob.add_design_variables()
prob.add_objective()
prob.setup()
prob.set_initial_guesses()
prob.run_aviary_problem(suppress_solver_print=True, optimization_history_filename='driver_history_run_simple_weight.db')
print('Engine Mass', prob.get_val(av.Aircraft.Engine.MASS))
print('Wing Mass', prob.get_val(av.Aircraft.Wing.MASS))
print('Horizontal Tail Mass', prob.get_val(av.Aircraft.HorizontalTail.MASS))
print('done')
The units for the variables from the metadata is shown here
mission:objectives:fuel units are 'None'
mission:constraints:range_residual units are 'None'
gtow_constraint.GTOW units are 'None'
mission:constraints:mass_residual units are 'None'
traj.phases.climb->path_constraint->throttle units are 'unitless'
traj.climb.collocation_constraint.defects:mass units are 'None'
traj.climb.collocation_constraint.defects:distance units are 'None'
traj.phases.cruise->initial_boundary_constraint->throttle units are 'unitless'
traj.phases.cruise->final_boundary_constraint->throttle units are 'unitless'
traj.cruise.collocation_constraint.defects:mass units are 'None'
traj.cruise.collocation_constraint.defects:distance units are 'None'
traj.phases.descent->path_constraint->throttle units are 'unitless'
traj.descent.collocation_constraint.defects:mass units are 'None'
traj.descent.collocation_constraint.defects:distance units are 'None'
mission:design:gross_mass units are 'lbm'
mission:summary:gross_mass units are 'lbm'
traj.climb.t_duration units are 'None'
traj.climb.states:mass units are 'None'
traj.climb.states:distance units are 'None'
traj.cruise.t_duration units are 'None'
traj.cruise.states:mass units are 'None'
traj.cruise.states:distance units are 'None'
traj.descent.t_duration units are 'None'
traj.descent.states:mass units are 'None'
traj.descent.states:distance units are 'None'
Aviary Version
0.9.4-dev
Relevant environment information
No response
The text was updated successfully, but these errors were encountered:
Description
Aviary models seem to be missing information about the units for many of the variables.
If an Aviary run is done with optimization history turned on, the resulting case recorder file has metadata for the variables but the units for many variables that should have units, instead have units of
None
.Example
Run this script to generate the driver history file.
The units for the variables from the metadata is shown here
Aviary Version
0.9.4-dev
Relevant environment information
No response
The text was updated successfully, but these errors were encountered: