From 287dd7cc5589d2862f87f3e27c6c3a554d4bf2cc Mon Sep 17 00:00:00 2001 From: Rob Falck Date: Tue, 19 Nov 2024 11:05:39 -0500 Subject: [PATCH] use endpoint component for initial and final boundary constraints in radau new --- dymos/utils/introspection.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dymos/utils/introspection.py b/dymos/utils/introspection.py index bb7acd17e..4f67de4c7 100644 --- a/dymos/utils/introspection.py +++ b/dymos/utils/introspection.py @@ -228,7 +228,7 @@ def _configure_constraint_introspection(phase): con['shape'] = control_shape con['units'] = get_rate_units(control_units, time_units, deriv=1) \ if con['units'] is None else con['units'] - if birkhoff and constraint_type in ('initial', 'final'): + if (birkhoff or radau_new) and constraint_type in ('initial', 'final'): con['constraint_path'] = f'boundary_vals.{var}' else: con['constraint_path'] = f'timeseries.{prefix}{var}' @@ -241,7 +241,7 @@ def _configure_constraint_introspection(phase): con['shape'] = control_shape con['units'] = get_rate_units(control_units, time_units, deriv=2) \ if con['units'] is None else con['units'] - if birkhoff and constraint_type in ('initial', 'final'): + if (birkhoff or radau_new) and constraint_type in ('initial', 'final'): con['constraint_path'] = f'boundary_vals.{var}' else: con['constraint_path'] = f'timeseries.{prefix}{var}' @@ -260,7 +260,7 @@ def _configure_constraint_introspection(phase): con['shape'] = meta['shape'] con['units'] = meta['units'] - if birkhoff and constraint_type in ('initial', 'final'): + if (birkhoff or radau_new) and constraint_type in ('initial', 'final'): con['constraint_path'] = f'boundary_vals.{var}' else: con['constraint_path'] = f'timeseries.{con["constraint_name"]}'