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

Strange DEF parameter appears in parameter(sys) for certain systems #3464

Closed
TorkelE opened this issue Mar 16, 2025 · 3 comments
Closed

Strange DEF parameter appears in parameter(sys) for certain systems #3464

TorkelE opened this issue Mar 16, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@TorkelE
Copy link
Member

TorkelE commented Mar 16, 2025

When you call get_parent of a DAE with a subsystem is one case I have found (but I think it might hold for systems with subsystems generally):

using ModelingToolkit
using ModelingToolkit: t_nounits as t, D_nounits as D
@parameters p d
@variables X(t)
eqs_bot = [
    D(X) ~ p - d*X
]
eqs_top = [
    D(X) ~ p - d*X,
    X^3 ~ log(X + Y) - Y^2 + 3.0
]
@named osys_bot = ODESystem(eqs_bot, t)
@mtkbuild osys = ODESystem(eqs, t; systems = [osys_bot])
psys = ModelingToolkit.get_parent(osys)
parameters(psys)
p
 DEF
 d
 osys_bot₊p
 osys_bot₊d

What is this DEF parameter? Also, seems internal, shouldn't parameters filter it out?

@TorkelE TorkelE added the bug Something isn't working label Mar 16, 2025
@ChrisRackauckas
Copy link
Member

That is a bug, should be fixed by #3403

@TorkelE
Copy link
Member Author

TorkelE commented Mar 16, 2025

👍

@TorkelE
Copy link
Member Author

TorkelE commented Mar 16, 2025

Closed as this is a replicate of #3401

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

2 participants