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

Regenerate code objects on each run #31

Closed
mstimberg opened this issue Apr 12, 2013 · 2 comments · Fixed by #34
Closed

Regenerate code objects on each run #31

mstimberg opened this issue Apr 12, 2013 · 2 comments · Fixed by #34
Assignees

Comments

@mstimberg
Copy link
Member

We want to allow to have parameters change between runs, the easiest way to support this is to have codeobjects (state updater, reset, threshold) get regenerated on every run. This is also more robust then to only do changes in the namespace, as a state updater might have replaced constant values with literals already.

I think the cleanest way to do this is to replace the current prepare method in Network and BrianObject with pre_run and post_run. In contrast to the prepare method, which was called at somewhat unspecified times and could be called multiple times, pre_run and post_run should be called exactly once before and after a run.

In NeuronGroup, pre_run would take care of building the code objects.

@ghost ghost assigned mstimberg Apr 12, 2013
@thesamovar
Copy link
Member

Sounds good to me.

@mstimberg
Copy link
Member Author

Closed with merging #34 (commit 4c07014)

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 a pull request may close this issue.

2 participants