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

complete(sys; flatten=false) creates unexpected DEF parameters #3322

Open
hersle opened this issue Jan 14, 2025 · 0 comments
Open

complete(sys; flatten=false) creates unexpected DEF parameters #3322

hersle opened this issue Jan 14, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@hersle
Copy link
Contributor

hersle commented Jan 14, 2025

using ModelingToolkit
@parameters a b
@variables x y
@named S = NonlinearSystem([
    x ~ a
    y ~ b
])
S = compose(S, S) # make a hierarchical system
parameters(complete(S; flatten = true)) # [a, b, S₊a, S₊b], as expected
ModelingToolkit.get_ps(complete(S; flatten = true)) # [a, b, S₊a, S₊b], as expected
parameters(complete(S; flatten = false)) # [a, b, S₊a, S₊b, DEF], but expected [a, b, S₊a, S₊b]
ModelingToolkit.get_ps(complete(S; flatten = false)) # [a, b, DEF, DEF], but expected [a, b]
@hersle hersle added the bug Something isn't working label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant