Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow enforcement of boundary constraints as residuals. #856

Open
robfalck opened this issue Nov 9, 2022 · 0 comments
Open

Allow enforcement of boundary constraints as residuals. #856

robfalck opened this issue Nov 9, 2022 · 0 comments

Comments

@robfalck
Copy link
Contributor

robfalck commented Nov 9, 2022

Proposed feature.

Sometimes users desire to satisfy boundary constraints without the need of an optimizer. Using the solve_segments option to have a nonlinear solver converge the dynamics should obviate the need for an optimizer in enforcing boundary constraints.

However, currently the only way to do this is to pass the resulting boundary value outside of the phase to a BalanceComp or some other implicit component, and have that component drive the residual by using an implicit variable that is then in-turn used as a parameter or time input to the phase.

This requires a nonlinear solver to exist around a large portion of the problem which is likely less performant than minimizing the scope of the nonlinear solver.
Instead, this issue proposes a sibling method to add_boundary_constraint called add_boundary_residual.
It takes the form:

def add_boundary_residual(expr, var, loc, **kwargs)
    """ Impose a boundary residual that drives the given expression to zero at the given location by varying the given variable.

    Parameters
    -----------
    expr : str
        An expression whose value is to be driven to zero.
    var : str
        The variable used to drive the expression to zero.  Must be one of the phase parameters, `t_initial`, or `t_duration`.
    loc : str
        One of `'initial'` or `'final'`.
    """"

Internally, dymos will compute the expression in the time series, and pass the appropriate initial or final value to a balance component which then feeds the specified implicit variable back to the parameter component.

Example

TBD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant