CS 420/527 — Biologically Inspired Computation
NetLogo Simulation

Excitable Medium in the Phase Plane


This page was automatically generated by NetLogo 4.1. Questions, problems? Contact feedback@ccl.northwestern.edu.

The applet requires Java 5 or higher. Java must be enabled in your browser settings. Mac users must have Mac OS X 10.4 or higher. Windows and Linux users may obtain the latest Java from Sun's Java site. If the display appear cut off with Firefox, then try another browser (Safari works).



powered by NetLogo

view/download model file: EM-Phase-Plane.nlogo

WHAT IS IT?

This section could give a general understanding of what the model is trying to show or explain.


HOW IT WORKS

This section could explain what rules the agents use to create the overall behavior of the model.


HOW TO USE IT

This section could explain how to use the model, including a description of each of the items in the interface tab.

Epsilon controls the speed of the dynamics without changing the nullclines. Do you see why?


THINGS TO NOTICE

This section could give some ideas of things for the user to notice while running the model.


THINGS TO TRY

This section could give some ideas of things for the user to try to do (move sliders, switches, etc.) with the model.

Begin with function G-II, which gives a Type II model. Start with Default parameters, including B = 0, and you will see the state go to the fixed point where the nullclines cross. (The calculated fixed point is u = -1.5, w = -0.3. How do your observations compare?) Rerun with greater values of B. For B > 1.24 you should see oscillatory behavior. Try several B values in the range [1.24, 1.56] and estimate the oscillation frequency for each. What happens for B > 1.57? Can you explain the significance of the B values 1.24 and 1.57 in terms of the shape of the u-nullcline where the w-nullcline crosses it?

Now try function G-I, which gives a type I model, and start again with the Default parameters. Once again it should exhibit fixed point behavior, and as you increase B you should find a threshold for oscillatory behavior at about B = 1.11. Estimate the frequency at several B values less than 1.57. Observe how Type I behavior differs from Type II. For B > 1.57 you will have fixed point behavior again; try to explain the thresholds by observing the nullclines for various B values.


EXTENDING THE MODEL

This section could give some ideas of things to add or change in the procedures tab to make the model more complicated, detailed, accurate, etc.


NETLOGO FEATURES

This section could point out any especially interesting or unusual features of NetLogo that the model makes use of, particularly in the Procedures tab. It might also point out places where workarounds were needed because of missing features.


RELATED MODELS

This section could give the names of models in the NetLogo Models Library or elsewhere which are of related interest.


CREDITS AND REFERENCES

This section could contain a reference to the model's URL on the web if it has one, as well as any other necessary credits or references.


PROCEDURES

globals [
u-lwb
u-upb
w-lwb
w-upb
u-color
w-color
prev-B
]

breed [states state]
breed [scribes scribe]
breed [icons icon]

states-own [
cur-u
cur-w
]

to set-defaults
set B 0
set epsilon 0.1
set a0 0.02
set a1 0.8
set b0 2
set b1 1.5
set G-function "G-II"
set init-u -3
set init-w -1
set delta-t 0.01
set delay 0.002
set impulse-size 1
end
to setup
ca
set u-lwb -3
set u-upb 3
set w-lwb -3
set w-upb 5
set u-color red
set w-color green
set prev-B B
draw-nullclines
init-icons
set-plot-pen-interval delta-t
set-plot-x-range 0 nominal-graph-width
create-states
1 [ init-state ]
end
to init-icons
create-icons
1 [
setxy 0 (max-pycor - 2)
set color u-color
set heading 270
set label "-"
]
create-icons
1 [
setxy 0 (min-pycor + 2)
set color u-color
set heading 90
set label "+"
]
create-icons
1 [
setxy (min-pxcor + 2) 0
set color w-color
set heading 180
set label "-"
]
create-icons
1 [
setxy (max-pxcor - 2) 0
set color w-color
set heading 0
set label "+"
]
ask icons [
set size 2
set label-color black
]
end
to init-state
set color white
set cur-u init-u
set cur-w init-w
setxy (xcor-from-u init-u) (ycor-from-w init-w)
set heading 90
end
to draw-nullclines
clear-drawing
create-scribes
1 [ ]
draw-u-nullcline
draw-w-nullcline
ask scribes [ die ]
end
to go
if prev-B != B [ draw-nullclines set prev-B B ]
ask states [
let delta-u delta-t * (F cur-u cur-w)
let delta-w delta-t * (G cur-u cur-w)
set cur-u cur-u + delta-u
set cur-w cur-w + delta-w
facexy (xcor-from-u cur-u) (ycor-from-w cur-w)
setxy (xcor-from-u cur-u) (ycor-from-w cur-w)
plot cur-u
ifelse draw-trajectory?
[
if pen-mode = "up" [ pen-down ] ]
[
if pen-mode = "down" [ pen-up ] ]
]
wait delay
end
to-report F [u w]
report u - u ^ 3 / 3 - w + B
end
to-report G [u w]
ifelse G-function = "G-I"
[
report epsilon * (a0 * u + exp (a1 * u) - w) ]
[
report epsilon * (b0 + b1 * u - w) ]
end
to-report u-nullcline [u]
report u - u ^ 3 / 3 + B
end
to-report w-nullcline [u]
ifelse G-function = "G-I"
[
report a0 + exp (a1 * u) ]
[
report b0 + b1 * u ]
end
to draw-u-nullcline
ask scribes [
set color red
setxy
(xcor-from-u u-lwb)
(
min list max-pycor (max list min-pycor (ycor-from-w (u-nullcline u-lwb))))
foreach n-values 1000 [ u-lwb + ? * (u-upb - u-lwb) / 1000 ] [
let x xcor-from-u ?
let y ycor-from-w (u-nullcline ?)
ifelse x >= min-pxcor and x <= max-pxcor and y >= min-pycor and y <= max-pycor
[
pd setxy x y ]
[
pu setxy x y ]
]
pu
]
end
to draw-w-nullcline
ask scribes [
set color green
setxy
(xcor-from-u u-lwb)
(
min list max-pycor (max list min-pycor (ycor-from-w (w-nullcline u-lwb))))
foreach n-values 1000 [ u-lwb + ? * (u-upb - u-lwb) / 1000 ] [
let x xcor-from-u ?
let y ycor-from-w (w-nullcline ?)
ifelse x >= min-pxcor and x <= max-pxcor and y >= min-pycor and y <= max-pycor
[
pd setxy x y ]
[
pu setxy x y ]
]
pu
]
end
to-report xcor-from-u [u]
report min-pxcor + (u - u-lwb) * (max-pxcor - min-pxcor) / (u-upb - u-lwb)
end
to-report ycor-from-w [w]
report min-pycor + (w - w-lwb) * (max-pycor - min-pycor) / (w-upb - w-lwb)
end
to-report u-from-xcor [x]
end
to-report w-from-ycoy [y]
end

Return to CS 420/527 home page

Return to MacLennan's home page

Send mail to Bruce MacLennan / MacLennan@utk.edu

Valid HTML 4.01!This page is web.eecs.utk.edu/~mclennan/Classes/420/NetLogo/EM-Phase-Plane.html
Last updated: 2010-09-16.