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

Ensure that NESTML getters/setters communicate in target platform units #608

Open
clinssen opened this issue Jan 21, 2021 · 0 comments
Open
Assignees
Labels

Comments

@clinssen
Copy link
Contributor

NEST Simulator is units-agnostic. It implicitly assumes that certain variables (expressed as floating point numbers), have certain orders of magnitude, for example, mV for voltages and nS for conductances. However, in the NESTML model, it might be the case that the user wants to declare certain variables with another unit of magnitude, for example pS or uS. These variables should be internally maintained at this order of magnitude, because of potential floating-point precision issues. But when they are exchanged with NEST, the right conversion factor should be multiplied in.

This affects get_status(), set_status() and the recordables map. These in turn call the NESTML-generated getters and setters. Possibly, the multiplicative factors should be inserted into those getters and setters, and we should make sure that they are not otherwise used internally, but only direct references to variables are used (e.g. S_.ode_state[State_::V_m] instead of get_V_m()).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants