Sleep-Wake_Regulation-Model 01_01
Model was written in NetLogo 6.0.1
•
Viewed 752 times
•
Downloaded 32 times
•
Run 0 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Info tab cannot be displayed because of an encoding error
Comments and Questions
Click to Run Model
globals [ fc-network mc-network pc-network lc-network vlpo-network th-network dr-network ldt-ppt-network ox-network sleep-propencity? main-patches edge-patches ] breed [fc-neurons fc-neuron] breed [mc-neurons mc-neuron] breed [pc-neurons pc-neuron] breed [lc-neurons lc-neuron] breed [vlpo-neurons vlpo-neuron] breed [th-neurons th-neuron] breed [dr-neurons dr-neuron] breed [ldt-ppt-neurons ldt-ppt-neuron] breed [ox-neurons ox-neuron] breed [nodes node] breed [impulses impulse] breed [spinners spinner] undirected-link-breed [rf-links rf-link] undirected-link-breed [slinks slink] directed-link-breed [red-links red-link] directed-link-breed [green-links green-link] patches-own [ adenozin ] impulses-own [location] to setup clear-turtles clear-patches clear-links clear-all-plots clear-drawing import-drawing "Sleep-Wake_Regulation-M01_01.png" create-fc-network create-mc-network create-pc-network create-lc-network create-vlpo-network create-th-network create-dr-network create-ldt-ppt-network create-ox-network create-spinner ask turtles [ set adenozin random 0.1 ] recolor-patches ask patches at-points [[7 -11] [0 0] [2 3] [2 -16] [8 -21]] [ sprout-nodes 1 [ set shape "circle" set size 3 ht ] ] ask nodes [ create-rf-link-with one-of other nodes ] create-impulses 5 [ set shape "circle" set size 1 set color yellow set location one-of nodes move-to location ] set edge-patches patches with [count neighbors != 8] set main-patches patches with [count neighbors = 8] ask spinners [setxy -40 -40] reset-ticks end to create-fc-network create-fc-neurons 20 [ set shape "circle" set color yellow set size 1.5 ] set fc-network patches with [ pxcor > ( - 38 ) and pxcor < ( - 27 ) and pycor > 0 and pycor < 27 ] ask fc-neurons [move-to one-of fc-network ] end to create-mc-network create-mc-neurons 30 [ set shape "circle" set color yellow set size 1.5 ] ask one-of mc-neurons [ set label "Cortex" ] set mc-network patches with [ pxcor > ( - 20 ) and pxcor < 20 and pycor > 20 and pycor < 37 ] ask mc-neurons [move-to one-of mc-network] end to create-pc-network create-pc-neurons 40 [ set shape "circle" set color yellow set size 1.5 ] set pc-network patches with [ pxcor > 18 and pxcor < 38 and pycor > ( - 2) and pycor < 24 ] ask pc-neurons [move-to one-of pc-network] end to create-lc-network create-lc-neurons 1 [ set shape "elipce" set color violet set size 7 set heading (- 10) set label "LC" ] set lc-network patches with [ pxcor > 6 and pxcor < 9 and pycor > ( - 20 ) and pycor < ( - 18) ] ask lc-neurons [move-to one-of lc-network] end to create-vlpo-network create-vlpo-neurons 2 [ set shape "circle" set color green set size 3 ] ask one-of vlpo-neurons [ set label "VLPO" ] set vlpo-network patches with [ pxcor > ( - 8 ) and pxcor < ( - 6 ) and pycor > ( - 5 ) and pycor < 0 ] ask vlpo-neurons [move-to one-of vlpo-network] end to create-th-network create-th-neurons 7 [ set shape "circle" set color orange set size 2 ] ask one-of th-neurons [ set label "Thalamus" ] set th-network patches with [ pxcor > ( - 6 ) and pxcor < 8 and pycor > 2 and pycor < 12 ] ask th-neurons [move-to one-of th-network] end to create-dr-network create-dr-neurons 1 [ set shape "circle" set color magenta set size 2.5 set label "DR" ] set dr-network patches with [ pxcor > 1 and pxcor < 3 and pycor > (-17) and pycor < (-15 ) ] ask dr-neurons [ move-to one-of dr-network ] end to create-ldt-ppt-network create-ldt-ppt-neurons 1 [ set shape "circle" set color pink set size 2.5 set label "LDT/PPT" ] set ldt-ppt-network patches with [ pxcor > 6 and pxcor < 8 and pycor > ( - 12 ) and pycor < ( - 10 ) ] ask ldt-ppt-neurons [move-to one-of ldt-ppt-network ] end to create-ox-network create-ox-neurons 3 [ set shape "pentagon" set color yellow set size 2 set label "Orexin" ] set ox-network patches with [ pxcor > 1 and pxcor < 2 and pycor > 3 and pycor < 4 ] end to go cycle-s-propencity diffuse adenozin 0.7 recolor-patches update-spinner tick end to run-wake-state if not any? fc-neurons [stop] ask one-of fc-neurons [ create-slink-with one-of other fc-neurons ] while [ count slinks > 30 ] [ ask one-of slinks [ die ] ] if not any? mc-neurons [stop] ask one-of mc-neurons [ create-slink-with one-of other mc-neurons ] while [ count slinks > 50 ] [ ask one-of slinks [ die ] ] if not any? pc-neurons [stop] ask one-of pc-neurons [ create-slink-with one-of other pc-neurons ] while [ count slinks > 60 ] [ ask one-of slinks [ die ] ] if not any? th-neurons [stop] ask one-of th-neurons [ create-slink-with one-of other th-neurons ] while [ count slinks > 15 ] [ ask one-of slinks [ die ] ] ask one-of th-neurons [ create-red-link-to one-of pc-neurons ] ask red-links [ set color red set thickness 0.2 ] while [ count red-links > 3 ] [ ask one-of red-links [ die ] ] ask one-of th-neurons [ create-red-link-to one-of mc-neurons ] ask red-links [ set color red set thickness 0.2 ] while [ count red-links > 3 ] [ ask one-of red-links [ die ] ] ask one-of th-neurons [ create-red-link-to one-of fc-neurons ] ask red-links [ set color red set thickness 0.2 ] while [ count red-links > 3 ] [ ask one-of red-links [ die ] ] ask green-links [die] ask turtles [ set adenozin random 0.1 + 0.5 ] ask rf-links [ set thickness 0 set color yellow] ask impulses [ let new-location one-of [rf-link-neighbors] of location ask [rf-link-with new-location] of location [ set thickness 1 ] face new-location move-to new-location set location new-location ] if (scenario = "Normal") and ( round sum [adenozin] of patches ) >= 1000 [ set sleep-propencity? true] if (scenario = "Sleep-deprivation") and (( round sum [adenozin] of patches ) >= 1500) [ set sleep-propencity? true set scenario "Normal" ] end to recolor-patches ask patches [ set pcolor scale-color red adenozin 0 1 ] end to run-sleep-state ask turtles [set adenozin adenozin - 0.2] ask impulses [stop] ask rf-links [set thickness 0] ask slinks [die] ask red-links [die] if not any? vlpo-neurons [stop] ask one-of vlpo-neurons [ create-green-link-to one-of lc-neurons ] ask one-of vlpo-neurons [ create-green-link-to one-of DR-neurons ] ask one-of vlpo-neurons [ create-green-link-to one-of ldt-ppt-neurons ] ask one-of vlpo-neurons [ create-green-link-to one-of ox-neurons ] ask green-links [ set color green set thickness 0.7 ] while [ count green-links > 3 ] [ ask one-of green-links [ die ] ] ask edge-patches [ set adenozin 0 ] repeat 100 [ ask edge-patches [ set adenozin 0 ]] ifelse round sum [adenozin] of patches <= 0 [set sleep-propencity? false] [set sleep-propencity? true] end to cycle-s-propencity ifelse (sleep-propencity? = false) [ run-wake-state ][ run-sleep-state ] end to create-spinner create-spinners 1 [ set shape "clock" set color gray - 1.5 set size 15 set heading -0 set label 0 set label-color green ] end to update-spinner ask spinners [ set heading ticks * 10 set label ticks set adenozin adenozin - 0.3 ] end
There is only one version of this model, created over 7 years ago by Victor Iapascurta.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Sleep-Wake_Regulation-Model 01_01.png | preview | preview file | about 7 years ago, by Victor Iapascurta | Download |
SM_RM2.jpg | jpeg | preview | about 7 years ago, by Victor Iapascurta | Download |
This model does not have any ancestors.
This model does not have any descendants.
Victor Iapascurta
How to make the model run
It looks like import-drawing primitive is not supported. In order to run the model without the brain image the code should be changed and recompiled. After activating "Run in NetLogo Web" and "Click to Run the Model" the line # 48 in the code should be erased/deactivated and the code recompiled by pressing the respective button. After this the model can be run. Sorry for inconvenience. Author of the model
Posted about 7 years ago