-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
System can't structural_simplify when using multiple SampledData blocks #2475
Comments
This is completely changing with the v9 so after the update please rerun this and it should be fixed. @AayushSabharwal make note. |
This works with v9, once SciML/ModelingToolkitStandardLibrary.jl#271 is merged and the common defintion of |
Is it necessary to use the common definition of t specifically, or can I
still declare my own independent variable?
…On Thu, 22 Feb 2024, 04:33 Aayush Sabharwal, ***@***.***> wrote:
This works with v9, once SciML/ModelingToolkitStandardLibrary.jl#271
<SciML/ModelingToolkitStandardLibrary.jl#271> is
merged and the common defintion of t is used instead of z
—
Reply to this email directly, view it on GitHub
<#2475 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIK476QNCOI5RDT6DCC3LVTYU43KBAVCNFSM6AAAAABDSBXMGOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJZGM3DKNRYGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
All equations must use the same independent variable. For the standard library, its equations are all defined using the common definition of |
If I'm solving an ODE over space instead of time (also with units) is there a recommended way to swap this out? In any case, thanks for the help, I'll close this after I've got v9 and confirmed this. |
I don't think there's a way to swap this out. With the v8 standard library, it doesn't really matter since |
What would be the issue with letting the user pass in the independent variable and letting that have whatever dimensions make sense? Locking users in to just integrating along time feels restrictive - could you elaborate on "a math block that the source then relies on"? |
I'm also not sure about this, but I think StaticNonLinearity + DataInterpolations would run into a similar issue to what I had initially, where swapping out the data needs the system to be remade. Is that accurate, or would this way work the same as SampledData? |
Math blocks ( I just looked a bit deeper into the source code and realized this doesn't solve your problem, though 😅 since math blocks also have time-dependent inputs and outputs. The |
Based on looking at the SampledData source, I think I'd be able to make a component that's almost the same but using my library's |
That should work |
Can this issue be closed now? |
Reopen if there's something that comes up and has a reproducer, indeed this is completed to our knowledge. |
This persists when using I've inspected both the version with
|
Found a workaround: |
Describe the bug 🐞
I'm trying to create a system that uses
SampledData
blocks, so I can run many ODE solves in parallel with slightly different input data (like a parameter sweep but vectorial). When I try to do this as is done in theSampledData
docs with more than oneSampledData
block, I get an error instructural_simplify
.Expected behavior
I expected
structural_simplify
to run correctly and return a model with fewer equations. This is what happens with oneSampledData
block.Minimal Reproducible Example 👇
Error & Stacktrace⚠️
Environment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
Additional context
I tried rebuilding this example based on the SampledData docs, but those don't seem to run correctly now; I'll open a separate issue for this on the ModelingToolkitStandardLibrary github. This seems like an MTK issue more than a standard library one because it relates to the internal functioning of
structural_simplify
.The text was updated successfully, but these errors were encountered: