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

Make GetStatus and SetStatus compatible #248

Closed
heplesser opened this issue Mar 2, 2016 · 2 comments
Closed

Make GetStatus and SetStatus compatible #248

heplesser opened this issue Mar 2, 2016 · 2 comments
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Normal Handle this with default priority T: Enhancement New functionality, model or documentation ZC: Kernel DO NOT USE THIS LABEL ZP: Pending DO NOT USE THIS LABEL

Comments

@heplesser
Copy link
Contributor

GetStatus and SetStatus are complementary functions and it is reasonable to expect that the result of GetStatus can be used as input to SetStatus:

nest.SetStatus(nodes, nest.GetStatus(nodes))
nest.SetDefaults(model, nest.GetDefaults(model))

should work. Currently, it does not work (for almost all models). One reason for this is that GetStatus returns a number of read-only values; when these are sent to SetStatus, they are not read out and an UnaccessedDictionaryItem exception is raised.

The same should also apply to getting and setting status on connections.

Note: SetStatus does not provide a full reset!

old_status = nest.GetStatus(nodes)
... do something ...
nest.SetStatus(nodes, old_status)

will not fully reset the nodes, since SetStatus does not change the contents of buffers for incoming spikes and possibly other variables representing the history of the neuron.

This is one part of a follow-up of trac.577.

@heplesser heplesser added ZC: Kernel DO NOT USE THIS LABEL I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) ZP: Pending DO NOT USE THIS LABEL S: Normal Handle this with default priority T: Enhancement New functionality, model or documentation labels Jun 29, 2017
@heplesser
Copy link
Contributor Author

Solving this would require knowing which entries in status dicts are read-only. This can be solved once all models are generated using NESTML.

@jougs
Copy link
Contributor

jougs commented Jun 29, 2017

Closing here as this is now a NESTML issue. Please go there for updates and discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Normal Handle this with default priority T: Enhancement New functionality, model or documentation ZC: Kernel DO NOT USE THIS LABEL ZP: Pending DO NOT USE THIS LABEL
Projects
None yet
Development

No branches or pull requests

2 participants