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

[WIP] Improving initialization #35

Merged
merged 3 commits into from
Jan 28, 2015
Merged

[WIP] Improving initialization #35

merged 3 commits into from
Jan 28, 2015

Conversation

tshort
Copy link
Owner

@tshort tshort commented Jan 26, 2015

Trying to make successive runs consistent. Added tests to capture this.

Added an experimental initialize! method that uses JuMP to initialize the SimState (issue #28). Things are still broken. It's a work in progress.

Tom Short added 3 commits January 26, 2015 11:25
runs consistent. Added an experimental `initialize!` method that
uses JuMP to initialize the simulation. Things are still broken.
@tshort
Copy link
Owner Author

tshort commented Jan 27, 2015

I've got a working initialize!. The issues are:

  • It only works for scalar Unknowns, not vectors.
  • It uses JuMP, and this increases load times. I tried using @require to make it optional, but I couldn't get it to work. Overall, I think this is okay. We'll have package caching sooner or later. JuMP is an uber-cool package.
  • It doesn't work after events, so if you have events in a model, you don't want to use sim(m, init = :none).

This pull request also adds some general tests for model simulation and compares DASSL and Sundials results. We should add more of that sort of thing.

Unless I hear complaints, I'll probably merge this as is. initialize! isn't perfect, but it might help for models where the built-in initialization doesn't work, and it might be a starting point for more work here.

tshort added a commit that referenced this pull request Jan 28, 2015
[WIP] Improving initialization
@tshort tshort merged commit c947f81 into master Jan 28, 2015
@tshort tshort deleted the init branch February 3, 2015 18:47
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.

1 participant