Skip to content

Commit

Permalink
Deploying to gh-pages from @ 9e52c8f 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
harisorgn committed Jan 8, 2025
1 parent a390de3 commit a4bdef1
Show file tree
Hide file tree
Showing 17 changed files with 8,348 additions and 8,033 deletions.
4 changes: 2 additions & 2 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1756,9 +1756,9 @@ version = "1.2.0"

[[deps.Neuroblox]]
deps = ["Accessors", "CSV", "ChainRules", "Colors", "Combinatorics", "DSP", "DataFrames", "Distributions", "ExponentialUtilities", "ForwardDiff", "GraphDynamics", "Graphs", "Interpolations", "LinearAlgebra", "LogExpFunctions", "MetaGraphs", "ModelingToolkit", "ModelingToolkitStandardLibrary", "MuladdMacro", "OhMyThreads", "OrderedCollections", "Peaks", "Random", "RecursiveArrayTools", "Reexport", "SciMLBase", "SparseArrays", "Statistics", "StatsBase", "StochasticDiffEq", "Symbolics", "ToeplitzMatrices"]
git-tree-sha1 = "fe931b1c56c8160bd8e830d31d0ad1e1884b7f96"
git-tree-sha1 = "a1728a560cd81b183bd35539739d50ef544f0150"
uuid = "769b91e5-4c60-41ee-bfae-153c84203cb2"
version = "0.5.4"
version = "0.5.5"
weakdeps = ["CairoMakie", "Makie"]

[deps.Neuroblox.extensions]
Expand Down
2 changes: 1 addition & 1 deletion assets/literate/learning.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ add_edge!(g, VAC => AC, weight=3, density=0.1, learning_rule = hebbian_cort) ##
agent = Agent(g; name=model_name);
env = ClassificationEnvironment(stim, N_trials; name=:env, namespace=model_name);
fig = Figure(title="Adjacency matrix", size = (1600, 800))
fig = Figure(size = (1600, 800))
adjacency(fig[1,1], agent; title="Initial weights", colorrange=(0,10))
Expand Down
2 changes: 1 addition & 1 deletion assets/literate/learning_script.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ add_edge!(g, VAC => AC, weight=3, density=0.1, learning_rule = hebbian_cort) ##
agent = Agent(g; name=model_name);
env = ClassificationEnvironment(stim, N_trials; name=:env, namespace=model_name);

fig = Figure(title="Adjacency matrix", size = (1600, 800))
fig = Figure(size = (1600, 800))

adjacency(fig[1,1], agent; title="Initial weights", colorrange=(0,10))

Expand Down
190 changes: 95 additions & 95 deletions assets/pages/CS_circuit/code/output/cort_asc_stack.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
196 changes: 111 additions & 85 deletions assets/pages/CS_circuit/code/output/cort_meanfield.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
288 changes: 144 additions & 144 deletions assets/pages/CS_circuit/code/output/cort_power.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
212 changes: 106 additions & 106 deletions assets/pages/CS_circuit/code/output/cort_stack.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
102 changes: 51 additions & 51 deletions assets/pages/CS_circuit/code/output/wta_stack.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
114 changes: 57 additions & 57 deletions assets/pages/CS_circuit/code/output/wta_wta_stack.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/pages/custom/code/output/ex6.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Main.FD_SANDBOX_13439752999271061286.IzhNeuron(ModelingToolkit.ODESystem(0x0000000000001fed, Symbolics.Equation[Differential(t)(V(t)) ~ 145 + jcn - u(t) + 5V(t) + 0.04(V(t)^2), Differential(t)(u(t)) ~ a*(-u(t) + b*V(t))], t, SymbolicUtils.BasicSymbolic{Real}[V(t), u(t), jcn], SymbolicUtils.BasicSymbolic{Real}[a, b, V_reset, d, θ], nothing, Dict{Any, Any}(:a => a, :b => b, :d => d, :V => V(t), :jcn => jcn, :u => u(t), :θ => θ, :V_reset => V_reset), Any[], Symbolics.Equation[], Base.RefValue{Vector{Symbolics.Num}}(Symbolics.Num[]), Base.RefValue{Any}(Matrix{Symbolics.Num}(undef, 0, 0)), Base.RefValue{Any}(Matrix{Symbolics.Num}(undef, 0, 0)), Base.RefValue{Matrix{Symbolics.Num}}(Matrix{Symbolics.Num}(undef, 0, 0)), Base.RefValue{Matrix{Symbolics.Num}}(Matrix{Symbolics.Num}(undef, 0, 0)), :izh, "", ModelingToolkit.ODESystem[], Dict{Any, Any}(a => 0.02, V_reset => -50, d => 2, u(t) => -13, V(t) => -65, b => 0.2, θ => 30), Dict{Any, Any}(), nothing, nothing, Symbolics.Equation[], nothing, nothing, nothing, ModelingToolkit.SymbolicContinuousCallback[], ModelingToolkit.SymbolicDiscreteCallback[condition: V(t) > θ
Main.FD_SANDBOX_13439752999271061286.IzhNeuron(ModelingToolkit.ODESystem(0x0000000000002011, Symbolics.Equation[Differential(t)(V(t)) ~ 145 + jcn - u(t) + 5V(t) + 0.04(V(t)^2), Differential(t)(u(t)) ~ a*(-u(t) + b*V(t))], t, SymbolicUtils.BasicSymbolic{Real}[V(t), u(t), jcn], SymbolicUtils.BasicSymbolic{Real}[a, b, V_reset, d, θ], nothing, Dict{Any, Any}(:a => a, :b => b, :d => d, :V => V(t), :jcn => jcn, :u => u(t), :θ => θ, :V_reset => V_reset), Any[], Symbolics.Equation[], Base.RefValue{Vector{Symbolics.Num}}(Symbolics.Num[]), Base.RefValue{Any}(Matrix{Symbolics.Num}(undef, 0, 0)), Base.RefValue{Any}(Matrix{Symbolics.Num}(undef, 0, 0)), Base.RefValue{Matrix{Symbolics.Num}}(Matrix{Symbolics.Num}(undef, 0, 0)), Base.RefValue{Matrix{Symbolics.Num}}(Matrix{Symbolics.Num}(undef, 0, 0)), :izh, "", ModelingToolkit.ODESystem[], Dict{Any, Any}(a => 0.02, V_reset => -50, d => 2, u(t) => -13, V(t) => -65, b => 0.2, θ => 30), Dict{Any, Any}(), nothing, nothing, Symbolics.Equation[], nothing, nothing, nothing, ModelingToolkit.SymbolicContinuousCallback[], ModelingToolkit.SymbolicDiscreteCallback[condition: V(t) > θ
affects:
u(t) ~ d + u(t)
V(t) ~ V_reset
Expand Down
2 changes: 1 addition & 1 deletion assets/pages/learning/code/ex1.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ add_edge!(g, VAC => AC, weight=3, density=0.1, learning_rule = hebbian_cort) ##
agent = Agent(g; name=model_name);
env = ClassificationEnvironment(stim, N_trials; name=:env, namespace=model_name);

fig = Figure(title="Adjacency matrix", size = (1600, 800))
fig = Figure(size = (1600, 800))

adjacency(fig[1,1], agent; title="Initial weights", colorrange=(0,10))

Expand Down
8,783 changes: 4,424 additions & 4,359 deletions assets/pages/learning/code/output/adj_RL.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6,276 changes: 3,250 additions & 3,026 deletions assets/pages/learning/code/output/adj_open.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
100 changes: 50 additions & 50 deletions assets/pages/learning/code/output/ex3.out
Original file line number Diff line number Diff line change
@@ -1,78 +1,78 @@
Trial = 1, Category choice = 2, Response = Correct
Trial = 1, Category choice = 1, Response = False
Trial = 2, Category choice = 2, Response = False
Trial = 3, Category choice = 2, Response = False
Trial = 4, Category choice = 2, Response = Correct
Trial = 5, Category choice = 1, Response = Correct
Trial = 4, Category choice = 1, Response = False
Trial = 5, Category choice = 2, Response = False
Trial = 6, Category choice = 1, Response = False
Trial = 7, Category choice = 1, Response = False
Trial = 8, Category choice = 1, Response = False
Trial = 9, Category choice = 1, Response = False
Trial = 10, Category choice = 1, Response = False
Trial = 11, Category choice = 2, Response = Correct
Trial = 10, Category choice = 2, Response = Correct
Trial = 11, Category choice = 1, Response = False
Trial = 12, Category choice = 1, Response = False
Trial = 13, Category choice = 1, Response = Correct
Trial = 13, Category choice = 2, Response = False
Trial = 14, Category choice = 1, Response = False
Trial = 15, Category choice = 2, Response = False
Trial = 16, Category choice = 2, Response = False
Trial = 17, Category choice = 1, Response = Correct
Trial = 15, Category choice = 1, Response = Correct
Trial = 16, Category choice = 1, Response = Correct
Trial = 17, Category choice = 2, Response = False
Trial = 18, Category choice = 1, Response = Correct
Trial = 19, Category choice = 2, Response = False
Trial = 20, Category choice = 1, Response = False
Trial = 19, Category choice = 1, Response = Correct
Trial = 20, Category choice = 2, Response = Correct
Trial = 21, Category choice = 1, Response = Correct
Trial = 22, Category choice = 1, Response = Correct
Trial = 23, Category choice = 2, Response = False
Trial = 23, Category choice = 1, Response = Correct
Trial = 24, Category choice = 2, Response = Correct
Trial = 25, Category choice = 1, Response = Correct
Trial = 26, Category choice = 1, Response = Correct
Trial = 27, Category choice = 2, Response = False
Trial = 28, Category choice = 1, Response = Correct
Trial = 28, Category choice = 2, Response = False
Trial = 29, Category choice = 2, Response = Correct
Trial = 30, Category choice = 1, Response = Correct
Trial = 31, Category choice = 2, Response = Correct
Trial = 31, Category choice = 1, Response = False
Trial = 32, Category choice = 2, Response = False
Trial = 33, Category choice = 1, Response = False
Trial = 34, Category choice = 2, Response = Correct
Trial = 33, Category choice = 2, Response = Correct
Trial = 34, Category choice = 1, Response = False
Trial = 35, Category choice = 1, Response = False
Trial = 36, Category choice = 2, Response = False
Trial = 37, Category choice = 1, Response = Correct
Trial = 38, Category choice = 2, Response = False
Trial = 37, Category choice = 2, Response = False
Trial = 38, Category choice = 1, Response = Correct
Trial = 39, Category choice = 2, Response = Correct
Trial = 40, Category choice = 2, Response = False
Trial = 40, Category choice = 1, Response = Correct
Trial = 41, Category choice = 1, Response = False
Trial = 42, Category choice = 2, Response = False
Trial = 43, Category choice = 1, Response = Correct
Trial = 42, Category choice = 1, Response = Correct
Trial = 43, Category choice = 2, Response = False
Trial = 44, Category choice = 1, Response = False
Trial = 45, Category choice = 2, Response = False
Trial = 46, Category choice = 2, Response = False
Trial = 47, Category choice = 1, Response = Correct
Trial = 48, Category choice = 1, Response = False
Trial = 49, Category choice = 1, Response = False
Trial = 45, Category choice = 1, Response = Correct
Trial = 46, Category choice = 1, Response = Correct
Trial = 47, Category choice = 2, Response = False
Trial = 48, Category choice = 2, Response = Correct
Trial = 49, Category choice = 2, Response = Correct
Trial = 50, Category choice = 1, Response = False
Trial = 51, Category choice = 1, Response = Correct
Trial = 52, Category choice = 2, Response = False
Trial = 53, Category choice = 2, Response = Correct
Trial = 51, Category choice = 2, Response = False
Trial = 52, Category choice = 1, Response = Correct
Trial = 53, Category choice = 1, Response = False
Trial = 54, Category choice = 1, Response = False
Trial = 55, Category choice = 1, Response = False
Trial = 55, Category choice = 2, Response = Correct
Trial = 56, Category choice = 1, Response = False
Trial = 57, Category choice = 1, Response = Correct
Trial = 58, Category choice = 1, Response = Correct
Trial = 59, Category choice = 1, Response = Correct
Trial = 60, Category choice = 1, Response = Correct
Trial = 61, Category choice = 2, Response = Correct
Trial = 62, Category choice = 1, Response = False
Trial = 63, Category choice = 2, Response = Correct
Trial = 59, Category choice = 2, Response = False
Trial = 60, Category choice = 2, Response = False
Trial = 61, Category choice = 1, Response = False
Trial = 62, Category choice = 2, Response = Correct
Trial = 63, Category choice = 1, Response = False
Trial = 64, Category choice = 1, Response = Correct
Trial = 65, Category choice = 1, Response = Correct
Trial = 66, Category choice = 1, Response = False
Trial = 67, Category choice = 2, Response = False
Trial = 67, Category choice = 1, Response = Correct
Trial = 68, Category choice = 1, Response = False
Trial = 69, Category choice = 1, Response = False
Trial = 69, Category choice = 2, Response = Correct
Trial = 70, Category choice = 2, Response = False
Trial = 71, Category choice = 1, Response = Correct
Trial = 72, Category choice = 1, Response = False
Trial = 71, Category choice = 2, Response = False
Trial = 72, Category choice = 2, Response = Correct
Trial = 73, Category choice = 1, Response = False
Trial = 74, Category choice = 1, Response = Correct
Trial = 75, Category choice = 1, Response = Correct
Trial = 74, Category choice = 2, Response = False
Trial = 75, Category choice = 2, Response = False
Trial = 76, Category choice = 2, Response = Correct
Trial = 77, Category choice = 1, Response = Correct
Trial = 78, Category choice = 1, Response = Correct
Expand All @@ -81,20 +81,20 @@ Trial = 80, Category choice = 1, Response = Correct
Trial = 81, Category choice = 1, Response = False
Trial = 82, Category choice = 2, Response = False
Trial = 83, Category choice = 2, Response = False
Trial = 84, Category choice = 2, Response = Correct
Trial = 84, Category choice = 1, Response = False
Trial = 85, Category choice = 1, Response = False
Trial = 86, Category choice = 2, Response = False
Trial = 87, Category choice = 2, Response = False
Trial = 86, Category choice = 1, Response = Correct
Trial = 87, Category choice = 1, Response = Correct
Trial = 88, Category choice = 1, Response = Correct
Trial = 89, Category choice = 1, Response = False
Trial = 89, Category choice = 2, Response = Correct
Trial = 90, Category choice = 2, Response = False
Trial = 91, Category choice = 2, Response = Correct
Trial = 92, Category choice = 2, Response = False
Trial = 92, Category choice = 1, Response = Correct
Trial = 93, Category choice = 1, Response = False
Trial = 94, Category choice = 1, Response = False
Trial = 95, Category choice = 2, Response = False
Trial = 96, Category choice = 2, Response = Correct
Trial = 97, Category choice = 2, Response = Correct
Trial = 98, Category choice = 1, Response = False
Trial = 95, Category choice = 1, Response = Correct
Trial = 96, Category choice = 1, Response = False
Trial = 97, Category choice = 1, Response = False
Trial = 98, Category choice = 2, Response = Correct
Trial = 99, Category choice = 1, Response = Correct
Trial = 100, Category choice = 1, Response = Correct
2 changes: 1 addition & 1 deletion assets/pages/learning/code/output/ex3.res
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(trial = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], correct = Bool[1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1], action = [2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 1])
(trial = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], correct = Bool[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1], action = [1, 2, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1])
2 changes: 1 addition & 1 deletion pages/custom/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

new(sys, namespace)
<span class=hljs-keyword >end</span>
<span class=hljs-keyword >end</span></code></pre> <blockquote> <p><strong><em>NOTE</em>:</strong> In <code>IzhNeuron</code> the <code>jcn</code> variable does not get a default value, only the &#91;input&#61;true&#93; tag. This means that other Bloxs will connect to a <code>IzhNeuron</code> through <code>jcn</code>.</p> <p>Neuroblox automatically initializes a <code>jcn ~ 0</code> equation and then accumulates connection terms in it. This happens with all input variables of Bloxs.</p> <p>Similarly the <code>&#91;output&#61;true&#93;</code> tag designates the <code>V</code> variable as the output variable. It is necessary for every Blox to have one if they rely on generic connection rules that fetch the output variable and add it to the connection equation.</p> <p>Both input and output tags are also useful to note which variables should be used when writing connection rules to or from our Blox.</p> </blockquote> <p>Now we are ready to define the first object of <code>IzhNeuron</code> and connect it with the <code>LIFNeuron</code> we created above.</p> <pre><code class="julia hljs"><span class=hljs-meta >@named</span> izh = IzhNeuron()</code></pre><pre><code class="plaintext hljs">IzhNeuron(ModelingToolkit.ODESystem(0x0000000000001fed, Symbolics.Equation[Differential(t)(V(t)) ~ 145 + jcn - u(t) + 5V(t) + 0.04(V(t)^2), Differential(t)(u(t)) ~ a*(-u(t) + b*V(t))], t, SymbolicUtils.BasicSymbolic{Real}[V(t), u(t), jcn], SymbolicUtils.BasicSymbolic{Real}[a, b, V_reset, d, θ], nothing, Dict{Any, Any}(:a =&gt; a, :b =&gt; b, :d =&gt; d, :V =&gt; V(t), :jcn =&gt; jcn, :u =&gt; u(t), :θ =&gt; θ, :V_reset =&gt; V_reset), Any[], Symbolics.Equation[], Base.RefValue{Vector{Symbolics.Num}}(Symbolics.Num[]), Base.RefValue{Any}(Matrix{Symbolics.Num}(undef, 0, 0)), Base.RefValue{Any}(Matrix{Symbolics.Num}(undef, 0, 0)), Base.RefValue{Matrix{Symbolics.Num}}(Matrix{Symbolics.Num}(undef, 0, 0)), Base.RefValue{Matrix{Symbolics.Num}}(Matrix{Symbolics.Num}(undef, 0, 0)), :izh, &quot;&quot;, ModelingToolkit.ODESystem[], Dict{Any, Any}(a =&gt; 0.02, V_reset =&gt; -50, d =&gt; 2, u(t) =&gt; -13, V(t) =&gt; -65, b =&gt; 0.2, θ =&gt; 30), Dict{Any, Any}(), nothing, nothing, Symbolics.Equation[], nothing, nothing, nothing, ModelingToolkit.SymbolicContinuousCallback[], ModelingToolkit.SymbolicDiscreteCallback[condition: V(t) &gt; θ
<span class=hljs-keyword >end</span></code></pre> <blockquote> <p><strong><em>NOTE</em>:</strong> In <code>IzhNeuron</code> the <code>jcn</code> variable does not get a default value, only the &#91;input&#61;true&#93; tag. This means that other Bloxs will connect to a <code>IzhNeuron</code> through <code>jcn</code>.</p> <p>Neuroblox automatically initializes a <code>jcn ~ 0</code> equation and then accumulates connection terms in it. This happens with all input variables of Bloxs.</p> <p>Similarly the <code>&#91;output&#61;true&#93;</code> tag designates the <code>V</code> variable as the output variable. It is necessary for every Blox to have one if they rely on generic connection rules that fetch the output variable and add it to the connection equation.</p> <p>Both input and output tags are also useful to note which variables should be used when writing connection rules to or from our Blox.</p> </blockquote> <p>Now we are ready to define the first object of <code>IzhNeuron</code> and connect it with the <code>LIFNeuron</code> we created above.</p> <pre><code class="julia hljs"><span class=hljs-meta >@named</span> izh = IzhNeuron()</code></pre><pre><code class="plaintext hljs">IzhNeuron(ModelingToolkit.ODESystem(0x0000000000002011, Symbolics.Equation[Differential(t)(V(t)) ~ 145 + jcn - u(t) + 5V(t) + 0.04(V(t)^2), Differential(t)(u(t)) ~ a*(-u(t) + b*V(t))], t, SymbolicUtils.BasicSymbolic{Real}[V(t), u(t), jcn], SymbolicUtils.BasicSymbolic{Real}[a, b, V_reset, d, θ], nothing, Dict{Any, Any}(:a =&gt; a, :b =&gt; b, :d =&gt; d, :V =&gt; V(t), :jcn =&gt; jcn, :u =&gt; u(t), :θ =&gt; θ, :V_reset =&gt; V_reset), Any[], Symbolics.Equation[], Base.RefValue{Vector{Symbolics.Num}}(Symbolics.Num[]), Base.RefValue{Any}(Matrix{Symbolics.Num}(undef, 0, 0)), Base.RefValue{Any}(Matrix{Symbolics.Num}(undef, 0, 0)), Base.RefValue{Matrix{Symbolics.Num}}(Matrix{Symbolics.Num}(undef, 0, 0)), Base.RefValue{Matrix{Symbolics.Num}}(Matrix{Symbolics.Num}(undef, 0, 0)), :izh, &quot;&quot;, ModelingToolkit.ODESystem[], Dict{Any, Any}(a =&gt; 0.02, V_reset =&gt; -50, d =&gt; 2, u(t) =&gt; -13, V(t) =&gt; -65, b =&gt; 0.2, θ =&gt; 30), Dict{Any, Any}(), nothing, nothing, Symbolics.Equation[], nothing, nothing, nothing, ModelingToolkit.SymbolicContinuousCallback[], ModelingToolkit.SymbolicDiscreteCallback[condition: V(t) &gt; θ
affects:
u(t) ~ d + u(t)
V(t) ~ V_reset
Expand Down
Loading

0 comments on commit a4bdef1

Please sign in to comment.