diff --git a/aviary/interface/methods_for_level2.py b/aviary/interface/methods_for_level2.py index bcba6bc7c..5dbb141c9 100644 --- a/aviary/interface/methods_for_level2.py +++ b/aviary/interface/methods_for_level2.py @@ -1547,7 +1547,7 @@ def link_phases(self): connected=true_unless_mpi) self.model.connect(f'traj.{self.regular_phases[-1]}.timeseries.distance', - 'actual_range', + Mission.Summary.RANGE, src_indices=[-1], flat_src_indices=True) elif self.mission_method is SOLVED_2DOF: @@ -1673,14 +1673,14 @@ def link_phases(self): Mission.Landing.TOUCHDOWN_MASS, src_indices=[-1]) connect_map = { - f"traj.{self.regular_phases[-1]}.timeseries.distance": 'actual_range', + f"traj.{self.regular_phases[-1]}.timeseries.distance": Mission.Summary.RANGE, } else: connect_map = { "taxi.mass": "traj.mass_initial", Mission.Takeoff.ROTATION_VELOCITY: "traj.SGMGroundroll_velocity_trigger", - "traj.distance_final": 'actual_range', + "traj.distance_final": Mission.Summary.RANGE, "traj.mass_final": Mission.Landing.TOUCHDOWN_MASS, } @@ -2888,7 +2888,7 @@ def _add_objectives(self): "val": self.target_range, "units": "NM"}, ), promotes_inputs=[ - "actual_range", + ("actual_range", Mission.Summary.RANGE), ("ascent_duration", Mission.Takeoff.ASCENT_DURATION), ], promotes_outputs=[("reg_objective", Mission.Objectives.RANGE)], @@ -2914,8 +2914,8 @@ def _add_objectives(self): range_resid={"val": 30, "units": "NM"}, ), promotes_inputs=[ - "actual_range", - ("target_range", Mission.Summary.RANGE), + ("actual_range", Mission.Summary.RANGE), + "target_range", ], promotes_outputs=[ ("range_resid", Mission.Constraints.RANGE_RESIDUAL)], diff --git a/aviary/validation_cases/benchmark_tests/test_bench_GwGm.py b/aviary/validation_cases/benchmark_tests/test_bench_GwGm.py index 59d823bb7..84c248366 100644 --- a/aviary/validation_cases/benchmark_tests/test_bench_GwGm.py +++ b/aviary/validation_cases/benchmark_tests/test_bench_GwGm.py @@ -212,7 +212,7 @@ def test_bench_GwGm_shooting(self): ) assert_near_equal( - prob.get_val(Mission.Summary.RANGE, units='NM'), 3675.0, tolerance=rtol + prob.get_val(Mission.Summary.RANGE, units='NM'), 3765.48, tolerance=rtol ) assert_near_equal(