-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate the entire dynamics for higher-order ODEs (#1139)
- Loading branch information
Showing
7 changed files
with
133 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
tests/nest_tests/resources/alpha_function_2nd_order_ode_neuron.nestml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
""" | ||
alpha_function_2nd_order_ode_neuron.nestml | ||
########################################## | ||
|
||
Tests that for a system of higher-oder ODEs of the form F(x'',x',x)=0, integrate_odes(x) includes the integration of all the higher-order variables involved of the system. | ||
|
||
Copyright statement | ||
+++++++++++++++++++ | ||
|
||
This file is part of NEST. | ||
|
||
Copyright (C) 2004 The NEST Initiative | ||
|
||
NEST is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 2 of the License, or | ||
(at your option) any later version. | ||
|
||
NEST is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License | ||
along with NEST. If not, see <http://www.gnu.org/licenses/>. | ||
""" | ||
model alpha_function_2nd_order_ode_neuron: | ||
state: | ||
x real = 0 | ||
x' ms**-1 = 0 * ms**-1 | ||
y real = 0 | ||
|
||
input: | ||
fX <- spike | ||
|
||
equations: | ||
x'' = - 2 * x' / ms - x / ms**2 | ||
y' = (-y + 42) / s | ||
|
||
update: | ||
integrate_odes(x, y) | ||
|
||
onReceive(fX): | ||
x' += e*fX * s / ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters