dymos
dymos copied to clipboard
Using `set_duration_balance` without `solve_segments` in pseudospectral phases should raise exceptions in certain situations.
Description
Set duration bounds relies on the residual variable being a dependent upon the phase duration. When pseudospectral phases are being solved by the optimizer, there is no direct link between the phase duration and the state values.
Expected Behavior
Using set_duration_balance
with the pseudospectral and Birkhoff transcriptions should raise an exception unless the transcription has solve_segments
set to forward
or backward
for the duration balance variable.
If the duration balance is some function of the a solve_segment variable, dymos cannot detect that this situation exists. In this scenario, the user must set solve_segments
to True at the transcription level (or, equivalently, for all states).
set_duration_balance
will have a new argument, loc='initial'|'final'
. The default value is to use the final
value, which is the current behavior. However, if solve_segments='backward'
, then the loc
of the associated duration balance must be initial
.
Example
TBD
Dymos Version
1.10.1-dev
Relevant environment information
No response