OpenMDAO / OpenMDAO/Aviary

Error in dashboard 3D model view when getting units

Open
#588 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

user interface
Dominant language
Python
Stars
287
Forks
140
Avg merge
6d 14h
Merged PRs (30d)
18

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with run_simple_weight_with_driver_history.py, then run aviary dashboard run_simple_weight_with_driver_history. Start at the Results → Aircraft 3d model dashboard path and trace how units are retrieved for promoted names. Done means the Aircraft 3D model tab renders without the multiple-input units error for this example.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.