-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Final part full-differetial representation of the LEGION network; Exa…
…mples have been added
- Loading branch information
U-DeBug010-PC\DeBug010
authored and
U-DeBug010-PC\DeBug010
committed
May 2, 2014
1 parent
39d3dfd
commit fa8c7e3
Showing
2 changed files
with
77 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from support import draw_dynamics; | ||
|
||
from nnet.legion import legion_network; | ||
from nnet import *; | ||
|
||
def template_dynamic_legion(num_osc, steps, time, conn_type = conn_type.NONE, stimulus = None, params = None): | ||
net = legion_network(num_osc, stimulus, type_conn = conn_type); | ||
(t, x) = net.simulate(steps, time); | ||
|
||
draw_dynamics(t, x, x_title = "Time", y_title = "x(t)"); | ||
|
||
def one_oscillator_unstimulated(): | ||
template_dynamic_legion(1, 2000, 200); | ||
|
||
def one_oscillator_stimulated(): | ||
template_dynamic_legion(1, 2000, 200, stimulus = [1]); | ||
|
||
def three_oscillator_unstimulated_list(): | ||
template_dynamic_legion(3, 2000, 200, conn_type = conn_type.LIST_BIDIR); | ||
|
||
def three_oscillator_stimulated_list(): | ||
template_dynamic_legion(3, 1000, 500, conn_type = conn_type.LIST_BIDIR, stimulus = [1, 1, 1]); | ||
|
||
def ten_oscillator_stimulated_list(): | ||
template_dynamic_legion(10, 1000, 750, conn_type = conn_type.LIST_BIDIR, stimulus = [1] * 10); | ||
|
||
def ten_oscillator_mix_stimulated_list(): | ||
template_dynamic_legion(10, 1500, 1500, conn_type = conn_type.LIST_BIDIR, stimulus = [1, 1, 1, 0, 0, 0, 0, 1, 1, 1]); | ||
|
||
one_oscillator_unstimulated(); | ||
one_oscillator_stimulated(); | ||
three_oscillator_unstimulated_list(); | ||
three_oscillator_stimulated_list(); | ||
ten_oscillator_stimulated_list(); | ||
ten_oscillator_mix_stimulated_list(); |