Skip to content

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

@hersle

Description

@hersle
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]

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions