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

Add no parameter tests #241

Merged
merged 4 commits into from
Aug 6, 2020
Merged

Add no parameter tests #241

merged 4 commits into from
Aug 6, 2020

Conversation

TorkelE
Copy link
Member

@TorkelE TorkelE commented Aug 4, 2020

Adds a simple test each for ODE, SDE, Jump, and SteadyState Problems, testing that they work fro systems without parameters.

for factor in [1e0, 1e1, 1e2]
u0 = factor*rand(length(no_param_network.states))
sol_ss = solve(SteadyStateProblem(no_param_network,u0),SSRootfind())
@test abs.(sol_ss.u[1]-0.6/3.2) < 10000000*eps()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specify a tolerance for the rootfind and make sure it is roughly achieved?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point, didn't even think of something like that. Will modify accordingly.

u0 = factor*rand(length(no_param_network.states))
prob = ODEProblem(no_param_network,u0,(0.,1000.))
sol = solve(prob,Rosenbrock23())
@test abs.(sol.u[end][1] - 1.5/2) < 1000000*eps()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd just say something like <1e-8

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's better.

@isaacsas
Copy link
Member

isaacsas commented Aug 4, 2020

@TorkelE Apparently the signature for ReactionSystem changed with the addition of some new fields. This is crashing my PR too.

I think it is from this PR to ModelingToolkit:

SciML/ModelingToolkit.jl#400

@isaacsas
Copy link
Member

isaacsas commented Aug 4, 2020

@TorkelE I'm working on a fix in #242 but it might not be merged till tomorrow. I'll ping you when it is in so you can rebase.

@TorkelE TorkelE closed this Aug 5, 2020
@TorkelE TorkelE reopened this Aug 5, 2020
@isaacsas
Copy link
Member

isaacsas commented Aug 5, 2020

@TorkelE You need to merge master into your branch I think.

@TorkelE
Copy link
Member Author

TorkelE commented Aug 5, 2020

Good point

@TorkelE
Copy link
Member Author

TorkelE commented Aug 6, 2020

So I think what's going wrong is that Travis doesn't use a version of MTK that includes SciML/ModelingToolkit.jl#543 (but by no means to knowledgable about how this works, so might be more complicated).

I do not get this error on my machine, but when I roll back my local MTK version to pre SciML/ModelingToolkit.jl#543 I get the same error. Also, Travis seems to run MTK 3.14.2, and checking that, I do not think it includes SciML/ModelingToolkit.jl#543.

If that's the case, we can just wait until the next release of MTK and then this should be fine.

@isaacsas
Copy link
Member

isaacsas commented Aug 6, 2020

@ChrisRackauckas ok to make a new MT release? (Not sure the state of master there currently.)

@ChrisRackauckas
Copy link
Member

It's in the process now.

@isaacsas isaacsas closed this Aug 6, 2020
@isaacsas isaacsas reopened this Aug 6, 2020
@isaacsas
Copy link
Member

isaacsas commented Aug 6, 2020

@TorkelE Looks like it is having SS issues again. I'll try restarting.

@isaacsas isaacsas closed this Aug 6, 2020
@isaacsas isaacsas reopened this Aug 6, 2020
@isaacsas
Copy link
Member

isaacsas commented Aug 6, 2020

@TorkelE Finally passing... Good to merge?

@TorkelE TorkelE merged commit 10b72bb into master Aug 6, 2020
@isaacsas isaacsas deleted the add_no_param_tests branch August 6, 2020 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants