-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Add event support mtkmodel #2427
Add event support mtkmodel #2427
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in src
look good.
Test script needs a fix.
test/model_parsing.jl
Outdated
u0 = [model.x => 10, model.y => 0, model.z => 0] | ||
|
||
prob = ODEProblem(model, u0, (0, 5.0)) | ||
sol = solve(prob, tstops = [1.5]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default algorithm choices require DifferentialEquations.jl; the model_parsing.jl
has only OrdinaryDiffEq.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed this by using Tsit5()
test/model_parsing.jl
Outdated
@@ -538,4 +568,4 @@ end | |||
|
|||
@test Equation[ternary_true.ternary_parameter_true ~ 0] == equations(ternary_true) | |||
@test Equation[ternary_false.ternary_parameter_false ~ 0] == equations(ternary_false) | |||
end | |||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Format: missing new line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is weird. In my local version there is an empty line. Git somehow deletes it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed now
Hey, can you help me with those unsuccessful checks? Beside the spelling I do not really get why those are not working |
Pkg.activate()
Pkg.add("JuliaFormatter")
format(".") # when pwd is MTK.jl dir |
I did the auto formatting, but maybe there was a problem with the last new line. Did it again, works now hopefully. |
Sorry for not answering here for some time. I do not really get what those errors mean or why they occur. Can someone please have a look? |
Dependent packages are being upgraded to v9; once they are ready, I'll retrigger the tests. The error is compat related and unrelated to changes introduced by this PR. |
645833e
to
a0d7454
Compare
Hey, thank you. I rebased. |
I tried out this branch locally; tests pass. @YingboMa can you approve the workflow? |
I got it |
Needs formatting |
Formatting done ✅ |
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Here is the issue, related to this pr
Tests and documentation is added.
Since this is my first contribution, feel free to contact me, if i missed some guidlines or so.