Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in dashboard 3D model view when getting units #588

Open
hschilling opened this issue Oct 25, 2024 · 0 comments
Open

Error in dashboard 3D model view when getting units #588

hschilling opened this issue Oct 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@hschilling
Copy link
Member

Description

There are issues getting the units for promoted names of variables when they refer to multiple inputs. This occurs in the dashboard Aircraft 3d Model tab creation.

Example

Run this script, run_simple_weight_with_driver_history.py, to generate the files

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.db')

Then run

aviary dashboard run_simple_weight_with_driver_history

In the Results -> Aircraft 3d model tab, there is the error

Unable to create aircraft 3D model display due to error: Can't get units for the promoted name 'aircraft:fuselage:length' because it refers to multiple inputs: ['pre_mission.core_subsystems.core_geometry.characteristic_lengths.aircraft:fuselage:length', 'pre_mission.core_subsystems.core_geometry.fuselage.aircraft:fuselage:length', 'pre_mission.core_subsystems.core_geometry.fuselage_prelim.aircraft:fuselage:length', 'pre_mission.core_subsystems.core_mass.electrical.aircraft:fuselage:length', 'pre_mission.core_subsystems.core_mass.fuselage.aircraft:fuselage:length', 'pre_mission.core_subsystems.core_mass.landing_group.main_landing_gear_length.aircraft:fuselage:length']. Access the units using an absolute path name.

Aviary Version

0.9.4-dev

Relevant environment information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant