From 20416d69f580bf42e98fbfae6037334fcaa08d4f Mon Sep 17 00:00:00 2001 From: Bennett Date: Thu, 12 Dec 2024 12:28:28 -0500 Subject: [PATCH 1/4] rename actual_range as Mission.Summary.Range --- aviary/interface/methods_for_level2.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/aviary/interface/methods_for_level2.py b/aviary/interface/methods_for_level2.py index 01d141f07..90ce3c070 100644 --- a/aviary/interface/methods_for_level2.py +++ b/aviary/interface/methods_for_level2.py @@ -1498,7 +1498,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: @@ -1621,14 +1621,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, } @@ -2779,7 +2779,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)], @@ -2805,8 +2805,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)], From aa3baaff71211536b9f111685dfa3ce6f447f676 Mon Sep 17 00:00:00 2001 From: Bennett Date: Thu, 12 Dec 2024 12:40:36 -0500 Subject: [PATCH 2/4] typo fixes --- aviary/interface/methods_for_level2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aviary/interface/methods_for_level2.py b/aviary/interface/methods_for_level2.py index 90ce3c070..71baff01a 100644 --- a/aviary/interface/methods_for_level2.py +++ b/aviary/interface/methods_for_level2.py @@ -2779,7 +2779,7 @@ def _add_objectives(self): "val": self.target_range, "units": "NM"}, ), promotes_inputs=[ - ("actual_range", Mission.Summary.Range), + ("actual_range", Mission.Summary.RANGE), ("ascent_duration", Mission.Takeoff.ASCENT_DURATION), ], promotes_outputs=[("reg_objective", Mission.Objectives.RANGE)], @@ -2805,7 +2805,7 @@ def _add_objectives(self): range_resid={"val": 30, "units": "NM"}, ), promotes_inputs=[ - ("actual_range", Mission.Summary.RANGE) + ("actual_range", Mission.Summary.RANGE), "target_range", ], promotes_outputs=[ From 85ea83aa403cb6cb9ba1ac50e4b5bd3f6d577e82 Mon Sep 17 00:00:00 2001 From: Bennett Date: Thu, 12 Dec 2024 12:49:57 -0500 Subject: [PATCH 3/4] fixing more case sensitive typos --- aviary/interface/methods_for_level2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aviary/interface/methods_for_level2.py b/aviary/interface/methods_for_level2.py index 71baff01a..57ce4f1b3 100644 --- a/aviary/interface/methods_for_level2.py +++ b/aviary/interface/methods_for_level2.py @@ -1498,7 +1498,7 @@ def link_phases(self): connected=true_unless_mpi) self.model.connect(f'traj.{self.regular_phases[-1]}.timeseries.distance', - Mission.Summary.Range, + Mission.Summary.RANGE, src_indices=[-1], flat_src_indices=True) elif self.mission_method is SOLVED_2DOF: @@ -1628,7 +1628,7 @@ def link_phases(self): connect_map = { "taxi.mass": "traj.mass_initial", Mission.Takeoff.ROTATION_VELOCITY: "traj.SGMGroundroll_velocity_trigger", - "traj.distance_final": Mission.Summary.Range, + "traj.distance_final": Mission.Summary.RANGE, "traj.mass_final": Mission.Landing.TOUCHDOWN_MASS, } From eb283a2e461b0084cf60efb42a48a2b8ffcd4fd8 Mon Sep 17 00:00:00 2001 From: Bennett Date: Mon, 13 Jan 2025 11:03:20 -0500 Subject: [PATCH 4/4] update test value of Mission.Summary.Range in GwGm shooting to correct error in test execution --- aviary/validation_cases/benchmark_tests/test_bench_GwGm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(