-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Running Models with Discrete Data documentation throws errors #267
Comments
Undoing some of my changes in accordance with #253 so I can just use |
Found a workaround, but I don't know if this is idiomatic for MTK; it uses some awkward type mixing.
|
Hi @aditya-sengupta unfortunately the examples are still broken. Have you found a way to get the
Edit: |
I ended up writing my use case directly in OrdinaryDiffEq - I think there
are workarounds but as far as I remember they were too complicated
…On Mon, 20 May 2024, 01:57 Stefan de Lange, ***@***.***> wrote:
Hi @aditya-sengupta <https://github.com/aditya-sengupta> unfortunately
the examples are still broken. Have you found a way to get the TimeVaryingFunction
Component sample (the top one) to work? I fixed the issue with the name ***@***.***
src = TimeVaryingFunction(f)) but the example still doesn't run, throwing:
MethodError: objects of type Vector{Float64} are not callable
Use square brackets [] for indexing an Array.
—
Reply to this email directly, view it on GitHub
<#267 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIK476VVHDCNAW6DFTRVCETZDG3GPAVCNFSM6AAAAABDSCT3FWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJZHE4TGNZZHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I managed to get it running by upgrading datainterpolations.jl |
Yes DataInterpolations v5 should have fixed this, and I can see from this issue that it was opened with v4 |
Describe the bug 🐞
The Running Models with Discrete Data documentation page throws errors, and I'm not able to modify it to get to the correct output.
Expected behavior
The code should run and should insert ODE solutions for the problem with
data1
anddata2
in the variablessol1
andsol2
respectively. I tried to fix any bugs I could with minor modifications, but wasn't able to get past a certain point in trying to get this working; in particular I added@named
to a few intermediate calls. I removed the@sync
and@async
at the end to get a clearer error message.I wasn't able to do anything further to address the error:
no method matching getindex(::Parameter{Float64}, ::Int64)
.Minimal Reproducible Example 👇
Error & Stacktrace⚠️
Environment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
The text was updated successfully, but these errors were encountered: