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 "exclude" parameter to integrate_odes() #1097

Open
clinssen opened this issue Sep 13, 2024 · 0 comments
Open

Add "exclude" parameter to integrate_odes() #1097

clinssen opened this issue Sep 13, 2024 · 0 comments

Comments

@clinssen
Copy link
Contributor

In order to enhance readability and allow models to be formulated in a way that minimises the potential for errors, we propose to add an "exclude" parameter to the integrate_odes() function.

Currently, by default, integrate_odes() integrates all variables in the system. Variable names can be explicitly specified as a list, for instance, integrate_odes(x, y).

There might be a scenario, where we want to integrate for example all variables but one, such as all except for V_m in the case the neuron is refractory. In this case, an "exclude" parameter would come in handy.

This might require an "include" parameter to be made explicit as well, to prevent ambiguities, but this might not be necessary.

There is probably no circumstance where one would specify both "include=" and "exclude=".

The specification integrate_odes(include=[x, y], exclude=[z]) is harmless because z is anyway not in the list [x,y]. A warning could issued because the exclude has no effect.

The specification integrate_odes(include=[x,y], exclude=[x]) is probably a typo and should raise an error because we should not prescribe the same variable to be simultaneously included and excluded.

The "include" keyword can potentially be assumed to be there by default, so that we can continue using the integrate_odes(x, y) syntax. We have to check on a technical level if this needs to be replaced by integrate_odes([x, y]) to make it explicit that it is an "include" list.

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

No branches or pull requests

1 participant