; Defining the inhibitory connections between neurons, for creating a neural network directed-link-breed [inhibitaxons inhibitAxon] ; Defining the global and neurons (turtles) variables turtles-own [Firing-Rate Damage-Latency Sensitivity Damage Hemisphere Expression-Type Rate-Type Linked-To Linked-From Inhibited? Incoming-Connections Outgoing-Connections] ; Each neuron has a specific, unique value for each variable that may change with time (V) or remain constant (C) ; Firing-Rate is the firing rate of each neuron (V), Damage-Latency is how long each neuron can withstand distension before becoming damaged (C), ; Sensitivity is the sensitivity of each neuron (C), Damage is the damage accumulated by each neuron (V), Hemisphere is the location of each neuron, either left or right (C) ; Expression-Type is the protein expressed, SOM or PKC, of each neuron (C), Rate-Type is the type of firing rate, regular or late or silent, of each neuron (C for regular and late, but V for silent), ; Linked-To is a tracker variable for if a neuron has a connection to it (C), Linked-From is a tracker variable for if a neuron has a connection from it (C) ; Inhibited? is a tracker variable for if a neuron was turned off by a connection (V), Incoming/Outgoing-Connections are variables to count the number of incoming/outgoing connections a neuron has (C) links-own [FR-of-Input] ; FR-off-Input is a variable for the firing rate of end1 after the initial assigning of firing rates globals [Stimulation-Time CR-L-SOM-regular CR-L-PKC-regular CR-L-SOM-late CR-L-PKC-late CR-R-SOM-regular CR-R-PKC-regular CR-R-SOM-late CR-R-PKC-late AR-L-SOM-regular AR-L-PKC-regular AR-L-SOM-late AR-L-PKC-late AR-R-SOM-regular AR-R-PKC-regular AR-R-SOM-late AR-R-PKC-late CD-L-SOM-regular CD-L-PKC-regular CD-L-SOM-late CD-L-PKC-late CD-R-SOM-regular CD-R-PKC-regular CD-R-SOM-late CD-R-PKC-late SOM-Silenced-L? SOM-Silenced-R? PKC-Silenced-L? PKC-Silenced-R? CR-L-SOM CR-L-PKC CR-R-SOM CR-R-PKC Pain Pain-L Pain-R Stimulated? Ratio-L-PKC Ratio-L-SOM Ratio-R-PKC Ratio-R-SOM Ratio-L-Pain Ratio-R-Pain ravailableToPKC ravailableToSOM lavailableToPKC lavailableToSOM ravailableFromPKC ravailableFromSOM lavailableFromPKC lavailableFromSOM SOMInhibited PKCInhibited TotInhibited PKC-Average-OC SOM-Average-OC PKC-Average-IC SOM-Average-IC] ; Observer-level variables for various firing rates and damage accumulation ; CR-L-SOM-regular is the cumulative firing rate of the left SOM regular firing neurons, CR-L-PKC-regular is the cumulative firing rate of the left PKC regular firing neurons, ; CR-L-SOM-late is the cumulative firing rate of the left SOM late firing neurons, CR-L-PKC-late is the cumulative firing rate of the left PKC late firing neurons, ; CR-R-SOM-regular is the cumulative firing rate of the right SOM regular firing neurons, CR-R-PKC-regular is the cumulative firing rate of the right PKC regular firing neurons, ; CR-R-SOM-late is the cumulative firing rate of the right SOM late firing neurons, CR-R-PKC-late is the cumulative firing rate of the right PKC late firing neurons, ; CD-L-SOM-regular is the cumulative damage of the left SOM regular firing neurons, CD-L-PKC-regular is the cumulative damage of the left PKC regular firing neurons, ; CD-L-SOM-late is the cumulative damage of the left SOM late firing neurons, CD-L-PKC-late is the cumulative damage of the left PKC late firing neurons, ; CD-R-SOM-regular is the cumulative damage of the right SOM regular firing neurons, CD-R-PKC-regular is the cumulative damage of the right PKC regular firing neurons, ; CD-R-SOM-late is the cumulative damage of the right SOM late firing neurons, CD-R-PKC-late is the cumulative damage of the right PKC late firing neurons, ; Stimulation-Time is used to track how long stimulation has occurred, Stimulated? is used to track if stimulation is happening or not, ; SOM-Silenced-L? is used to track if all left SOM neurons have been silenced, SOM-Silenced-R? is used to track if all right SOM neurons have been silenced ; PKC-Silenced-L? is used to track if all left PKC neurons have been silenced, PKC-Silenced-R? is used to track if all right PKC neurons have been silenced ; Pain is the pain output of the whole amygdala, Pain-L is the pain output of the left hemisphere, Pain-R is the pain output of the right hemisphere, ; CR-L-SOM is the cumulative firing rate of left SOM neurons, CR-L-PKC is the cumulative firing rate of left PKC neurons, ; CR-R-SOM is the cumulative firing rate of right SOM neurons, CR-R-PKC is the cumulative firing rate of right PKC neurons, ; Ratio-L-PKC is the ratio of left PKC late firing neurons to left PKC neurons, Ratio-L-SOM is the ratio of left SOM regular firing neurons to left SOM neurons, ; Ratio-R-PKC is the ratio of right PKC late firing neurons to right PKC neurons, Ratio-R-SOM is the ratio of right SOM regular firing neurons to right SOM neurons, ; Ratio-L-Pain is the ratio of left hemisphere pain to overall pain, Ratio-R-Pain is the ratio of right hemisphere pain to overall pain, ; ravailableToPKC is the number of PKC neurons that can be connected to in the right hemisphere, ravailableToSOM is the number of SOM neurons that can be connected to in the right hemisphere, ; lavailableToPKC is the number of PKC neurons that can be connected to in the left hemisphere, lavailableToSOM is the number of SOM neurons that can be connected to in the left hemisphere ; ravailableFromPKC is the number of PKC neurons that can be connected from in the right hemisphere, ravailableFromSOM is the number of SOM neurons that can be connected from in the right hemisphere, ; lavailableFromPKC is the number of PKC neurons that can be connected from in the left hemisphere, lavailableFromSOM is the number of SOM neurons that can be connected from in the left hemisphere ; SOMInhibited is the number of SOM neurons that are inhibited by the connections in a time step, PKCInhibited is the number of PKC neurons that are inhibited by the connections in a time step ; TotInhibited is the number of neurons that are inhibited by the connections in a time step, PKC-Average-OC is the average number of outgoing connections from PKC neurons, SOM-Average-OC is the average number of outgoing connections from SOM neurons ; PKC-Average-IC is the average number of incoming connections to PKC neurons, SOM-Average-IC is the average number of incoming connections to SOM neurons to setup ; Code that sets up the world once the Initialize button is activated clear-all ; clears all previous program runs reset-timer ; clears the real world timer reset-ticks ; clears the tick counter file-close-all ; closes all files file-opening-setup ; decides which file to open based on the chooser on the interface of which current values you want to use, procedure below ifelse Neural-Network? ; if the switch Neural-Network? is turned to on, will run the first block, if off the second block [ ask n-of 1640 patches [sprout 1 ] ; creates the grid of neurons, 40 of them to be the other neurons, not SOM or PKC ask patches with [pxcor = 20] [set pcolor 5] ; assigns the patches in the middle column the color gray so it's distinguishable from the neurons ask turtles [set shape "circle" set size 1.02] ask turtles [set color black] ; assigns the neurons the same color before being color-coded by one of the four types based on their color with the following functions ask turtles with [xcor = 20] [set Expression-Type "Other" set color 5] ; assigns the turtles in the middle column to be other neurons to be connected to and the color gray so they are invisible on the interface setup-turtles-Hemisphere ; assigns the neurons which hemisphere they are in based on location, procedure below setup-turtles-expression-type ; assigns the neurons which protein is expressed, procedure below setup-turtles-SOM ; assigns the SOM neurons their type of firing rate, procedure below setup-turtles-PKC ; assigns the PKC neurons their type of firing rate, procedure below ask turtles [set Damage-Latency random (81 - 40) + 40 set Sensitivity random (151 - 50) + 50 set Damage 0 set Linked-To "No" set Linked-From "No" set Inhibited? "No" set Incoming-Connections 0 set Outgoing-Connections 0] ;sets the neuron-specific variables from above, except the firing rates, with a random uniform distribution to define damage latency and sensitivity, damage to zero since the simulation hasn't started yet, linked and inhibited? to No and incoming/outgoing-connections to 0 since the network wasn't created yet create-network ; sets up the neural network, procedure below ] [ ask n-of 1600 patches with [pxcor != 20] [sprout 1 ] ; creates the grid of neurons ask patches with [pxcor = 20] [set pcolor 5] ; assigns the patches in the middle column the color gray so it's distinguishable from the neurons ask turtles [set shape "circle" set size 1.02] ask turtles [set color black] ; assigns the neurons the same color before being color-coded by one of the four types based on their color with the following functions setup-turtles-Hemisphere ; assigns the neurons which hemisphere they are in based on location, procedure below setup-turtles-expression-type ; assigns the neurons which protein is expressed, procedure below setup-turtles-SOM ; assigns the SOM neurons their type of firing rate, procedure below setup-turtles-PKC ; assigns the PKC neurons their type of firing rate, procedure below ask turtles [set Damage-Latency random (81 - 40) + 40 set Sensitivity random (151 - 50) + 50 set Damage 0] ;sets the neuron-specific variables from above, except the firing rates, with a random uniform distribution to define damage latency and sensitivity, damage to zero since the simulation hasn't started yet, and linked to No since the network wasn't created yet ] set SOM-Silenced-L? "No" ; sets the initial value of SOM-Silenced-L? to no since the simulation hasn't started yet set SOM-Silenced-R? "No" ; sets the initial value of SOM-Silenced-R? to no since the simulation hasn't started yet set PKC-Silenced-L? "No" ; sets the initial value of PKC-Silenced-L? to no since the simulation hasn't started yet set PKC-Silenced-R? "No" ; sets the initial value of PKC-Silenced-R? to no since the simulation hasn't started yet end to file-opening-setup ; sets which file to read from for the run let s File-To-Use if s = "Current Values: 120 to 140 to 160 to 180 to 200 to 220 to 120 (each 55 steps)" [file-open "stimulationhistory2.csv"] ; opens the stimulation history file with all current values, which must be located in the same folder as this program, others should only be used for BehaviorSpace experiments if s = "Current Values: 0 - 20 (each 20 steps)" [file-open "stimulationhistory0-20.csv"] ; opens the stimulation history file with values: 0 - 20, which must be located in the same folder as this program if s = "Current Values: 20 - 40 (each 20 steps)" [file-open "stimulationhistory20-40.csv"] ; opens the stimulation history file with values: 20 - 40, which must be located in the same folder as this program if s = "Current Values: 40 - 60 (each 20 steps)" [file-open "stimulationhistory40-60.csv"] ; opens the stimulation history file with values: 40 - 60, which must be located in the same folder as this program if s = "Current Values: 60 - 80 (each 20 steps)" [file-open "stimulationhistory60-80.csv"] ; opens the stimulation history file with values: 60 - 80, which must be located in the same folder as this program if s = "Current Values: 80 - 100 (each 20 steps)" [file-open "stimulationhistory80-100.csv"] ; opens the stimulation history file with values: 80 - 100, which must be located in the same folder as this program if s = "Current Values: 100 - 120 (each 20 steps)" [file-open "stimulationhistory100-120.csv"] ; opens the stimulation history file with values: 100 - 120, which must be located in the same folder as this program if s = "Current Values: 120 - 140 (each 20 steps)" [file-open "stimulationhistory120-140.csv"] ; opens the stimulation history file with values: 120 - 140, which must be located in the same folder as this program if s = "Current Values: 140 - 160 (each 20 steps)" [file-open "stimulationhistory140-160.csv"] ; opens the stimulation history file with values: 140 - 160, which must be located in the same folder as this program if s = "Current Values: 160 - 180 (each 20 steps)" [file-open "stimulationhistory160-180.csv"] ; opens the stimulation history file with values: 160 - 180, which must be located in the same folder as this program if s = "Current Values: 180 - 200 (each 20 steps)" [file-open "stimulationhistory180-200.csv"] ; opens the stimulation history file with values: 180 - 200, which must be located in the same folder as this program if s = "Current Values: 200 - 220 (each 20 steps)" [file-open "stimulationhistory200-220.csv"] ; opens the stimulation history file with values: 200 - 220, which must be located in the same folder as this program if s = "Current Values: 220 - 240 (each 20 steps)" [file-open "stimulationhistory220-240.csv"] ; opens the stimulation history file with values: 220 - 240, which must be located in the same folder as this program if s = "Current Values: All 120 (300 steps)" [file-open "stimulationhistory120.csv"] ; opens the stimulation history file with all values of 120, which must be located in the same folder as this program if s = "Current Values: All 220 (300 steps)" [file-open "stimulationhistory220.csv"] ; opens the stimulation history file with all values of 220, which must be located in the same folder as this program if s = "Current Values: 120 (200 steps) to 220 (100 steps) to 120 (100 steps)" [file-open "stimulationhistory120-220-120.csv"] ; opens the stimulation history file with values of 120, then 220, and back to 120, which must be located in the same folder as this program if s = "Current Values: 220 (200 steps) to 120 (200 steps)" [file-open "stimulationhistory220-120.csv"] ; opens the stimulation history file with values of 220, then 120, which must be located in the same folder as this program if s = "Current Values: 120 (49 steps) to 220 (101 steps) to 120 (100 steps)" [file-open "stimulationhistory120-220-120-short50.csv"] ; opens the stimulation history file with values of 120, then 220, and back to 120, which must be located in the same folder as this program if s = "Current Values: 120 (59 steps) to 220 (101 steps) to 120 (90 steps)" [file-open "stimulationhistory120-220-120-short60.csv"] ; opens the stimulation history file with values of 120, then 220, and back to 120, which must be located in the same folder as this program if s = "Current Values: 120 (69 steps) to 220 (101 steps) to 120 (80 steps)" [file-open "stimulationhistory120-220-120-short70.csv"] ; opens the stimulation history file with values of 120, then 220, and back to 120, which must be located in the same folder as this program if s = "Current Values: 120 (74 steps) to 220 (101 steps) to 120 (75 steps)" [file-open "stimulationhistory120-220-120-short75.csv"] ; opens the stimulation history file with values of 120, then 220, and back to 120, which must be located in the same folder as this program if s = "Current Values: 120 (79 steps) to 220 (101 steps) to 120 (70 steps)" [file-open "stimulationhistory120-220-120-short80.csv"] ; opens the stimulation history file with values of 120, then 220, and back to 120, which must be located in the same folder as this program if s = "Current Values: 120 (89 steps) to 220 (101 steps) to 120 (60 steps)" [file-open "stimulationhistory120-220-120-short90.csv"] ; opens the stimulation history file with values of 120, then 220, and back to 120, which must be located in the same folder as this program if s = "Current Values: 120 (99 steps) to 220 (101 steps) to 120 (50 steps)" [file-open "stimulationhistory120-220-120-short100.csv"] ; opens the stimulation history file with values of 120, then 220, and back to 120, which must be located in the same folder as this program if s = "Current Values: 120 (124 steps) to 220 (101 steps) to 120 (25 steps)" [file-open "stimulationhistory120-220-120-short125.csv"] ; opens the stimulation history file with values of 120, then 220, and back to 120, which must be located in the same folder as this program end to setup-turtles-Hemisphere ;sets which hemisphere neurons are in based on their location ask turtles with [ xcor <= 19 ] ; sets the left hemisphere neurons [set Hemisphere "Left"] ask turtles with [ xcor >= 21] ; sets the right hemisphere neurons [set Hemisphere "Right"] end to setup-turtles-expression-type ;sets the expression type of the neurons as either SOM or PKC (based on the sliders for the percentages) let a count turtles with [Hemisphere = "Left"] ;counts the number of neurons in the left hemisphere let %b Left-SOM ;is a slider determining the number of SOM neurons in the left hemisphere as a decimal between 0 and 1,the rest are PKC Note: sliders are global variables (not listed above) ask n-of (%b * a) turtles with [Hemisphere = "Left"] [set Expression-Type "SOM"] ;set the left SOM neurons ask turtles with [Hemisphere = "Left"] [if Expression-Type != "SOM" [set Expression-Type "PKC"] ;set the left PKC neurons ] let c count turtles with [Hemisphere = "Right"] ;counts the number of neurons in the right hemisphere let %d Right-SOM ;is a slider determining the number of SOM neurons in the right hemisphere as a decimal between 0 and 1,the rest are PKC Note: sliders are global variables (not listed above) ask n-of (%d * c) turtles with [Hemisphere = "Right"] [set Expression-Type "SOM"] ;set the right SOM neurons ask turtles with [Hemisphere = "Right"] [if Expression-Type != "SOM" [set Expression-Type "PKC"] ;set the right PKC neurons ] end to setup-turtles-SOM ;assigns each SOM neuron in the subject, a neural firing rate type (based on color) let d count turtles with [Hemisphere = "Left" and Expression-Type = "SOM"] ; left SOM neurons, *WILL HAVE TO UPDATE ONCE LEFT DATA IS AVAILABLE let %e Left-SOM-regular ;is a slider determining the number of left SOM regular firing neurons in the subject as a decimal between 0 and 1 let %f Left-SOM-late ;is a slider determining the number of left SOM late firing neurons in the subject as a decimal between 0 and 1 ask n-of (%e * d) turtles with [Hemisphere = "Left" and Expression-Type = "SOM"] [ set color 105 ; sets these neurons' color to blue (105) and their rate type to regular firing, which is SOM regular firing neurons in the subject set Rate-Type "Regular" ] ask n-of (%f * d) turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and color = 0] [ set color 85 ; sets these neurons' color to cyan (85) and their rate type to late firing, which is SOM late firing neurons in the subject set Rate-Type "Late" ] ask turtles with [ Hemisphere = "Left" and Expression-Type = "SOM" and color = 0] [ set Rate-Type "Spontaneous" ] let f count turtles with [Hemisphere = "Right" and Expression-Type = "SOM"] ; right SOM neurons let %g Right-SOM-regular ;is a slider determining the number of SOM regular firing neurons in the subject as a decimal between 0 and 1 let %h Right-SOM-late ;is a slider determining the number of SOM late firing neurons in the subject as a decimal between 0 and 1 ask n-of (%g * f) turtles with [Hemisphere = "Right" and Expression-Type = "SOM"] [ set color 105 ; sets these neurons' color to blue (105) and their rate type to regular firing, which is SOM regular firing neurons in the subject set Rate-Type "Regular" ] ask n-of (%h * f) turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and color = 0] [ set color 85 ; sets these neurons' color to cyan (85) and their rate type to late firing, which is SOM late firing neurons in the subject set Rate-Type "Late" ] ask turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and color = 0] [ set Rate-Type "Spontaneous" ] end to setup-turtles-PKC ; same as the setup-turtles-SOM function, but with PKC neurons. See above. let g count turtles with [Hemisphere = "Left" and Expression-Type = "PKC"] ; left PKC neurons, *WILL HAVE TO UPDATE ONCE LEFT DATA IS AVAILABLE let %h Left-PKC-regular ;is a slider determining the number of left PKC regular firing neurons in the subject as a decimal between 0 and 1 let %i Left-PKC-late ;is a slider determining the number of left PKC late firing neurons in the subject as a decimal between 0 and 1 ask n-of (%h * g) turtles with [Hemisphere = "Left" and Expression-Type = "PKC"] [ set color 15 ; sets these neurons' color to red (15) and their rate type to regular firing, which is PKC regular firing neurons in the subject set Rate-Type "Regular" ] ask n-of (%i * g) turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and color = 0] [ set color 135 ; sets these neurons' color to pink (135) and their rate type to late firing, which is PKC late firing neurons in the subject set Rate-Type "Late" ] ask turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and color = 0] [ set Rate-Type "Spontaneous" ] let i count turtles with [Hemisphere = "Right" and Expression-Type = "PKC"] ; right PKC neurons let %j Right-PKC-regular ;is a slider determining the number of PKC regular firing neurons in the subject as a decimal between 0 and 1 let %k Right-PKC-late ;is a slider determining the number of PKC late firing neurons in the subject as a decimal between 0 and 1 ask n-of (%j * i) turtles with [Hemisphere = "Right" and Expression-Type = "PKC"] [ set color 15 ; sets these neurons' color to red (15) and their rate type to regular firing, which is PKC regular firing neurons in the subject set Rate-Type "Regular" ] ask n-of (%k * i) turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and color = 0] [ set color 135 ; sets these neurons' color to pink (135) and their rate type to late firing, which is PKC late firing neurons in the subject set Rate-Type "Late" ] ask turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and color = 0] [ set Rate-Type "Spontaneous" ] end to create-network ; creates the network of neurons ask inhibitaxons [die] ; deletes all previous connections between neurons let %p Number-of-Inputs let %q Number-of-Outputs set ravailableToPKC count turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Linked-To = "No"] ; counts PKC neurons available to be connected to in the right hemisphere set ravailableToSOM count turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Linked-To = "No"] ; counts SOM neurons ... set ravailableFromPKC count turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Linked-From = "No"] ; counts PKC neurons available to make connections in the right hemisphere set ravailableFromSOM count turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Linked-From = "No"] ; counts SOM neurons ... while [ravailableToPKC > 0 and ravailableToSOM > 0 and ravailableFromPKC > 0 and ravailableFromSOM > 0] ; creates the network as long as available SOM or PKC in the right hemisphere exist [ask turtles with [Hemisphere = "Right" and Linked-From = "No"] ; creates connections in the right hemisphere until no more connections are possible, done one at a time and based on if it's a PKC or SOM neuron [ if Expression-Type = "PKC" ; all PKC neurons will only form connections to other PKC neurons or neurons not in the model [ let c random-float 1 ; picks a random number between 0 and 1 if c <= 0.20 [ let w count other turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Linked-To = "No"] ; counts other PKC neurons with no connection to them if w > 0 ; if available neurons exist, a connection will be made [ let a one-of other turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Linked-To = "No"] ; randomly selects another non-connected-to PKC neuron if the random number picked is less than or equal to 0.18 create-inhibitAxon-to a ask a [set Incoming-Connections Incoming-Connections + 1 ] set Outgoing-Connections Outgoing-Connections + 1 if [Incoming-Connections] of a = %p [ask a [set Linked-To "Yes"] set ravailableToPKC ravailableToPKC - 1] if Outgoing-Connections = %q [set Linked-From "Yes" set ravailableFromPKC ravailableFromPKC - 1] ] ] if c > 0.20 and c <= 0.90 [let a one-of turtles with [Expression-Type = "Other"] ; randomly selects a neuron not in the model if the random number picked is greater than 0.18, and links with it. create-inhibitAxon-to a set Outgoing-Connections Outgoing-Connections + 1 if Outgoing-Connections = %q [set Linked-From "Yes" set ravailableFromPKC ravailableFromPKC - 1] ] if c > 0.90 and c <= 1 [ let w count other turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Linked-To = "No"] ; counts other SOM neurons with no connection to them if w > 0 ; if available neurons exist, a connection will be made [ let b one-of other turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Linked-To = "No"] ; randomly selects another SOM neuron is the random number picked is > 0.16 create-inhibitAxon-to b ask b [set Incoming-Connections Incoming-Connections + 1] set Outgoing-Connections Outgoing-Connections + 1 if [Incoming-Connections] of b = %p [ask b [set Linked-To "Yes"] set ravailableToSOM ravailableToSOM - 1] if Outgoing-Connections = %q [set Linked-From "Yes" set ravailableFromPKC ravailableFromPKC - 1] ] ] ] if Expression-Type = "SOM" ; SOM neurons can make connections with either PKC and SOM neurons or other neurons not in the model [ let c random-float 1 ; picks a random number between 0 and 1 if c <= 0.15 [ let w count turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Linked-To = "No"] ; counts PKC neurons with no connection to them if w > 0 ; if available neurons exist, a connection will be made [ let b one-of turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Linked-To = "No"] ; randomly selects a PKC neuron if the random number picked is less than or equal to 0.12 create-inhibitAxon-to b ask b [set Incoming-Connections Incoming-Connections + 1] set Outgoing-Connections Outgoing-Connections + 1 if [Incoming-Connections] of b = %p [ask b [set Linked-To "Yes"] set ravailableToPKC ravailableToPKC - 1] if Outgoing-Connections = %q [set Linked-From "Yes" set ravailableFromSOM ravailableFromSOM - 1] ] ] if c > 0.15 and c <= 0.45 [let b one-of turtles with [Expression-Type = "Other"] ; randomly selects a neuron not in the model is the random number picked is > 0.12 and less than or equal to 0.415 (0.295 likely) create-inhibitAxon-to b set Outgoing-Connections Outgoing-Connections + 1 if Outgoing-Connections = %q [set Linked-From "Yes" set ravailableFromSOM ravailableFromSOM - 1] ] ; connects to the neuron not in the model if c > 0.45 and c <= 1 [ let w count other turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Linked-To = "No"] ; counts other SOM neurons with no connection to them if w > 0 ; if available neurons exist, a connection will be made [ let b one-of other turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Linked-To = "No"] ; randomly selects another SOM neuron is the random number picked is > 0.16 create-inhibitAxon-to b ask b [set Incoming-Connections Incoming-Connections + 1] set Outgoing-Connections Outgoing-Connections + 1 if [Incoming-Connections] of b = %p [ask b [set Linked-To "Yes"] set ravailableToSOM ravailableToSOM - 1] if Outgoing-Connections = %q [set Linked-From "Yes" set ravailableFromSOM ravailableFromSOM - 1] ] ] ] ] ] set lavailableToPKC count turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Linked-To = "No"] set lavailableToSOM count turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Linked-To = "No"] set lavailableFromPKC count turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Linked-From = "No"] set lavailableFromSOM count turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Linked-From = "No"] while [lavailableToPKC > 0 and lavailableToSOM > 0 and lavailableFromPKC > 0 and lavailableFromSOM > 0] [ask turtles with [Hemisphere = "Left" and Linked-From = "No"] [ if Expression-Type = "PKC" ; all PKC neurons will only form connections to other PKC neurons or neurons not in the model [ let c random-float 1 ; picks a random number between 0 and 1 if c <= 0.2 [ let w count other turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Linked-To = "No"] ; counts other PKC neurons with no connection to them if w > 0 ; if available neurons exist, a connection will be made [ let a one-of other turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Linked-To = "No"] ; randomly selects another non-connected-to PKC neuron if the random number picked is less than or equal to 0.18 create-inhibitAxon-to a ask a [set Incoming-Connections Incoming-Connections + 1 ] set Outgoing-Connections Outgoing-Connections + 1 if [Incoming-Connections] of a = %p [ask a [set Linked-To "Yes"] set lavailableToPKC lavailableToPKC - 1] if Outgoing-Connections = %q [set Linked-From "Yes" set lavailableFromPKC lavailableFromPKC - 1] ] ] if c > 0.2 and c <= 0.9 [let a one-of turtles with [Expression-Type = "Other"] ; randomly selects a neuron not in the model if the random number picked is greater than 0.18, and links with it. create-inhibitAxon-to a set Outgoing-Connections Outgoing-Connections + 1 if Outgoing-Connections = %q [set Linked-From "Yes" set lavailableFromPKC lavailableFromPKC - 1] ] if c > 0.9 and c <= 1 [ let w count other turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Linked-To = "No"] ; counts other SOM neurons with no connection to them if w > 0 ; if available neurons exist, a connection will be made [ let b one-of other turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Linked-To = "No"] ; randomly selects another SOM neuron is the random number picked is > 0.16 create-inhibitAxon-to b ask b [set Incoming-Connections Incoming-Connections + 1] set Outgoing-Connections Outgoing-Connections + 1 if [Incoming-Connections] of b = %p [ask b [set Linked-To "Yes"] set lavailableToSOM lavailableToSOM - 1] if Outgoing-Connections = %q [set Linked-From "Yes" set lavailableFromPKC lavailableFromPKC - 1] ] ] ] if Expression-Type = "SOM" ; SOM neurons can make connections with either PKC and SOM neurons or neurons not in the model [ let c random-float 1 ; picks a random number between 0 and 1 if c <= 0.15 [ let w count turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Linked-To = "No"] ; counts PKC neurons with no connection to them if w > 0 ; if available neurons exist, a connection will be made [ let b one-of turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Linked-To = "No"] ; randomly selects a PKC neuron if the random number picked is less than or equal to 0.12 create-inhibitAxon-to b ask b [set Incoming-Connections Incoming-Connections + 1] set Outgoing-Connections Outgoing-Connections + 1 if [Incoming-Connections] of b = %p [ask b [set Linked-To "Yes"] set lavailableToPKC lavailableToPKC - 1] if Outgoing-Connections = %q [set Linked-From "Yes" set lavailableFromSOM lavailableFromSOM - 1] ] ] if c > 0.15 and c <= 0.45 [let b one-of turtles with [Expression-Type = "Other"] ; randomly selects a neuron not in the model is the random number picked is > 0.12 and less than or equal to 0.415 (0.295 likely) create-inhibitAxon-to b set Outgoing-Connections Outgoing-Connections + 1 if Outgoing-Connections = %q [set Linked-From "Yes" set lavailableFromSOM lavailableFromSOM - 1] ] ; connects to the neuron not in the model if c > 0.45 and c <= 1 [ let w count other turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Linked-To = "No"] ; counts other SOM neurons with no connection to them if w > 0 ; if available neurons exist, a connection will be made [ let b one-of other turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Linked-To = "No"] ; randomly selects another SOM neuron is the random number picked is > 0.16 create-inhibitAxon-to b ask b [set Incoming-Connections Incoming-Connections + 1] set Outgoing-Connections Outgoing-Connections + 1 if [Incoming-Connections] of b = %p [ask b [set Linked-To "Yes"] set lavailableToSOM lavailableToSOM - 1] if Outgoing-Connections = %q [set Linked-From "Yes" set lavailableFromSOM lavailableFromSOM - 1] ] ] ] ] ] ask inhibitaxons [set shape "invisible"] set PKC-Average-OC mean [Outgoing-Connections] of turtles with [Expression-Type = "PKC"] set SOM-Average-OC mean [Outgoing-Connections] of turtles with [Expression-Type = "SOM"] set PKC-Average-IC mean [Incoming-Connections] of turtles with [Expression-Type = "PKC"] set SOM-Average-IC mean [Incoming-Connections] of turtles with [Expression-Type = "SOM"] end to go ; code to do the simulation once the Go button is activated ifelse Neural-Network? [ask turtles with [Rate-Type = "Spontaneous" and color = yellow] [set color black]] ; resets the color of previously inhibited silent neurons back to black [] set Stimulated? file-read ; sets Stimulated? to a value between 0 and 220 found in the stimulation history file (current values in pA) if Stimulated? > 0 ; stimulation is happening [ set Stimulation-Time Stimulation-Time + 1 ;this tracks the total "time" measured in ticks that all the neurons have experienced stimulation. It is the same for all neurons but changes with time ; let a count turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type != "Silent"] ; added to deal with the runtime error of division by 0 when all left PKC neurons have been silenced ; if a > 0 ; [ set Ratio-L-PKC (count turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Late"]) / (count turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type != "Silent"])] ; keeps track of the ratio of PKC LF neurons to PKC neurons in the left hemisphere, might change depending on what is recruited from silent neurons, *MIGHT HAVE CHANGE ONCE LEFT DATA IS AVAILABLE ; if a <= 0 ; [ set Ratio-L-PKC 0 ] ; ; let b count turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type != "Silent"] ; added to deal with the runtime error of division by 0 when all right PKC neurons have been silenced ; if b > 0 ; [ set Ratio-R-PKC (count turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Late"]) / (count turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type != "Silent"])] ; keeps track of the ratio of PKC LF neurons to PKC neurons in the right hemisphere ; if b <= 0 ; [ set Ratio-R-PKC 0 ] ; let c count turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type != "Silent"] ; added to deal with the runtime error of division by 0 when all left SOM neurons have been silenced if c > 0 [ set Ratio-L-SOM (count turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Regular"]) / (count turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type != "Silent"])] ; keeps track of the ratio of SOM RS neurons to SOM neurons in the left hemisphere, might change depending on what is recruited from silent neurons *SEE ABOVE if c <= 0 [ set Ratio-L-SOM 0 ] let d count turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type != "Silent"] ; added to deal with the runtime error of division by 0 when all right SOM neurons have been silenced if d > 0 [ set Ratio-R-SOM (count turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Regular"]) / (count turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type != "Silent"])] ; keeps track of the ratio of SOM RS neurons to SOM neurons in the right hemisphere if d <= 0 [ set Ratio-R-SOM 0 ] ask turtles with [Expression-Type != "Other"] [ if Stimulated? < 120 ; if less than the threshold (120) will change shape to a triangle to visually indicate that stimulation is on but not at the damage accumulation mark [set shape "triangle" set size 1.18 if Damage >= 100 [ set Damage 100 ; a necessary redundancy so all neurons stop accumulating damage no matter the pain state ] ] if Stimulated? >= 120 ; if greater than the threshold (120) will change shape to an X to visually indicate that stimulation is on and can accumulate damage [set shape "X" set size 1.18 if Damage >= 100 [ set Damage 100 ; Damage is a normalized so it only takes values between 0 and 100. In order words, this is a percentage whose max value is 100% ] if Damage < 100 and Stimulation-Time >= Damage-Latency ;damage is only accumulated if damage hasn't reach its maximum, pain is on, and the time experiencing Stimulation is greater than the latency ;the damage-latency is the threshold beyond which neurons begin to accumulate damage. Before this threshold, no damage is accumulated even while pain is on. this value remains constant while ;pain is off. This means that, as of now, there is no repair mechanism counter-acting damage accumulation [ set Damage Damage + (100 / Sensitivity) ;updates damage for each neuron based on their initially assigned sensitivity to stimulation if Damage >= 100 [ set Damage 100 ; Damage is a normalized so it only takes values between 0 and 100. In order words, this is a percentage whose max value is 100%, to fix going over 100% damage if Damage >= 100 ] ] ] ; if PKC-Silenced-L? = "No" and Ratio-L-PKC < 0.41 ; if all PKC neurons have not been silenced and the ratio of PKC LF neurons to PKC neurons in the left hemisphere is less than 0.41 (percentage of PKC LF neurons in the injured model), will add more of this type of neurons, *MIGHT HAVE TO UPDATE ONCE LEFT DATA IS AVAILABLE ; [ ; ask turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Silent" and Damage = 100] ; [set Rate-Type "Late"] ; ] ; if PKC-Silenced-R? = "No" and Ratio-R-PKC < 0.41 ; if all PKC neurons have not been silenced and the ratio of PKC LF neurons to PKC neurons in the right hemisphere is less than 0.41 (percentage of PKC LF neurons in the injured model), will add more of this type of neurons ; [ ; ask turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Silent" and Damage = 100] ; [set Rate-Type "Late"] ; ] let %e Left-SOM-regular if SOM-Silenced-L? = "No" and Ratio-L-SOM < (%e + 0.21) ; if all SOM neurons have not been silenced and the ratio of SOM RS neurons to SOM neurons in the left hemisphere is less than 0.48 (percentage of SOM RS neurons in the injured model), will add more of this type of neurons, *MIGHT HAVE TO UPDATE ONCE LEFT DATA IS AVAILABLE [ ask turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Spontaneous" and Damage = 100] [set Rate-Type "Regular"] ] let %g Right-SOM-regular if SOM-Silenced-R? = "No" and Ratio-R-SOM < (%g + 0.21) ; if all SOM neurons have not been silenced and the ratio of SOM RS neurons to SOM neurons in the right hemisphere is less than 0.48 (percentage of SOM RS neurons in the injured model, will add more of this type of neurons [ ask turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Spontaneous" and Damage = 100] [set Rate-Type "Regular"] ] ] ] if Stimulated? <= 0 ; no stimulation [ ask turtles with [Expression-Type != "Other"] [set shape "circle" set size 1.02] ask turtles with [Expression-Type != "Other"] [ if Damage >= 100 [ set Damage 100 ; a necessary redundancy so all neurons stop accumulating damage no matter the pain state ] ] ] let %r SOM-Spontaneous-Firing-Rate let %s PKC-Spontaneous-Firing-Rate ask turtles with [Rate-Type = "Regular" or Rate-Type = "Late"][Assign-Firing-Rates] ; assigns firing rates to each neuron using a linear combo of the control (damage = 0) and injured (damage = 100) data depending on the damage, procedure below ask turtles with [Expression-Type = "SOM" and Rate-Type = "Spontaneous"] [set Firing-Rate %r] ask turtles with [Expression-Type = "PKC" and Rate-Type = "Spontaneous"] [set Firing-Rate %s] ifelse Neural-Network? ; if the network is on, will use the links to re-update the firing rates, first block [ask inhibitaxons [set FR-of-Input [Firing-Rate] of end1] ask turtles with [Incoming-Connections > 0] [ let suminputFRs sum [FR-of-Input] of my-in-links ifelse suminputFRs >= Inhibition-Threshold [set Firing-Rate 0 if Expression-Type != "Other" [set color yellow] set Inhibited? "Yes" ask inhibitaxons with [end1 = myself] [set FR-of-Input [Firing-Rate] of end1]] [] ] ] [] ;the following series of "set" statements are used in some of the plots on the user interface let c count turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type != "Silent"] ; added to deal with the runtime error of division by 0 when all left SOM neurons have been silenced if c > 0 [set AR-L-SOM-regular mean [Firing-Rate] of turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Regular"] ; average firing rates for left SOM regular firing neurons in the subject (red) set AR-L-SOM-late mean [Firing-Rate] of turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Late"] ; average firing rates for left SOM late firing neurons in the subject (pink) ] if c <= 0 [set AR-L-SOM-regular 0 set AR-L-SOM-late 0 ] let a count turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type != "Silent"] ; added to deal with the runtime error of division by 0 when all left PKC neurons have been silenced if a > 0 [set AR-L-PKC-regular mean [Firing-Rate] of turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Regular"] ; average firing rates for left PKC regular firing neurons in the subject (blue) set AR-L-PKC-late mean [Firing-Rate] of turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Late"] ; average firing rates for left PKC late firing neurons in the subject (cyan) ] if a <= 0 [set AR-L-PKC-regular 0 set AR-L-PKC-late 0 ] let d count turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type != "Silent"] ; added to deal with the runtime error of division by 0 when all right SOM neurons have been silenced if d > 0 [set AR-R-SOM-regular mean [Firing-Rate] of turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Regular"] ; average firing rates for right SOM regular firing neurons in the subject (red) set AR-R-SOM-late mean [Firing-Rate] of turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Late"] ; average firing rates for right SOM late firing neurons in the subject (pink) ] if d <= 0 [set AR-R-SOM-regular 0 set AR-R-SOM-late 0 ] let b count turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type != "Silent"] ; added to deal with the runtime error of division by 0 when all right PKC neurons have been silenced if b > 0 [set AR-R-PKC-regular mean [Firing-Rate] of turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Regular"] ; average firing rates for right PKC regular firing neurons in the subject (blue) set AR-R-PKC-late mean [Firing-Rate] of turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Late"] ; average firing rates for right PKC late firing neurons in the subject (cyan) ] if b <= 0 [set AR-R-PKC-regular 0 set AR-R-PKC-late 0 ] ;the following series of "set" statements are used in calculating various firing rate metrics which are used in the measure of pain set CR-L-SOM-regular sum [Firing-Rate] of turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Regular"] ; cumulative firing rates for left SOM regular firing neurons in the subject (red) set CR-L-SOM-late sum [Firing-Rate] of turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Late"] ; cumulative firing rates for left SOM late firing neurons in the subject (pink) set CR-L-PKC-regular sum [Damage / 100 * Firing-Rate] of turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Regular"] ; cumulative firing rates for left PKC regular firing neurons in the subject (blue) set CR-L-PKC-late sum [Damage / 100 * Firing-Rate] of turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Late"] ; cumulative firing rates for left PKC late firing neurons in the subject (cyan) set CR-R-SOM-regular sum [Firing-Rate] of turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Regular"] ; cumulative firing rates for right SOM regular firing neurons in the subject (red) set CR-R-SOM-late sum [Firing-Rate] of turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Late"] ; cumulative firing rates for right SOM late firing neurons in the subject (pink) set CR-R-PKC-regular sum [Damage / 100 * Firing-Rate] of turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Regular"] ; cumulative firing rates for right PKC regular firing neurons in the subject (blue) set CR-R-PKC-late sum [Damage / 100 * Firing-Rate] of turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Late"] ; cumulative firing rates for right PKC late firing neurons in the subject (cyan) ; the following "set statements are normalized calculations of the cumulated average damage for each type of neuron to observed the progression of the entire population to the completely sensitized (damaged) state let q count turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type != "Silent"] ; added to deal with the runtime error of division by 0 when all left PKC neurons are silent if q > 0 [ set CD-L-PKC-regular ((sum [Damage] of turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Regular"])/(count turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Regular"])) ; cumulative damage for left PKC regular firing neurons in the subject (blue) set CD-L-PKC-late ((sum [Damage] of turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Late"])/(count turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Late"])) ; cumulative damage for left PKC late firing neurons in the subject (cyan) ] if q <= 0 [ set CD-L-PKC-regular 0 set CD-L-PKC-late 0 ] let s count turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type != "Silent"] ; added to deal with the runtime error of division by 0 when all right PKC neurons are silent if s > 0 [ set CD-R-PKC-regular ((sum [Damage] of turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Regular"])/(count turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Regular"])) ; cumulative damage for right PKC regular firing neurons in the subject (blue) set CD-R-PKC-late ((sum [Damage] of turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Late"])/(count turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Late"])) ; cumulative damage for right PKC late firing neurons in the subject (cyan) ] if s <= 0 [ set CD-R-PKC-regular 0 set CD-R-PKC-late 0 ] let r count turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type != "Silent"] ; added to deal with the runtime error of division by 0 when all left SOM neurons are silenced if r > 0 [ set CD-L-SOM-regular ((sum [Damage] of turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Regular"])/(count turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Regular"])) ; cumulative damage for left SOM regular firing neurons in the subject (red) set CD-L-SOM-late ((sum [Damage] of turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Late"])/(count turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Late"])) ; cumulative damage for left SOM late firing neurons in the subject (pink) ] if r <= 0 [ set CD-L-SOM-regular 0 set CD-L-SOM-late 0 ] let t count turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type != "Silent"] ; added to deal with the runtime error of division by 0 when all right SOM neurons are silenced if t > 0 [ set CD-R-SOM-regular ((sum [Damage] of turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Regular"])/(count turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Regular"])) ; cumulative damage for right SOM regular firing neurons in the subject (red) set CD-R-SOM-late ((sum [Damage] of turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Late"])/(count turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Late"])) ; cumulative damage for right SOM late firing neurons in the subject (pink) ] if t <= 0 [ set CD-R-SOM-regular 0 set CD-R-SOM-late 0 ] ; the following "set statements are for the calculation of the pain output of the subject set CR-L-SOM (CR-L-SOM-regular + CR-L-SOM-late) ; cumulative firing rate for left SOM neurons set CR-L-PKC (CR-L-PKC-regular + CR-L-PKC-late) ; cumulative firing rate for left PKC neurons set CR-R-SOM (CR-R-SOM-regular + CR-R-SOM-late) ; cumulative firing rate for right SOM neurons set CR-R-PKC (CR-R-PKC-regular + CR-R-PKC-late) ; cumulative firing rate for right PKC neurons set Pain-L (CR-L-PKC - CR-L-SOM) ; pain output of the left hemisphere set Pain-R (CR-R-PKC - CR-R-SOM) ; pain output of the right hemisphere set Pain (Pain-L + Pain-R) ; overall pain output of the whole amygdala let abs-Pain-L abs Pain-L ; absolute value of the pain output of the left hemisphere let abs-Pain-R abs Pain-R ; absolute value of the pain output of the right hemisphere let abs-Pain (abs-Pain-L + abs-Pain-R) if abs-Pain != 0 [set Ratio-L-Pain (abs-Pain-L / abs-Pain) ; contribution to pain from the left hemisphere set Ratio-R-Pain (abs-Pain-R / abs-Pain)] ; contribution to pain from the right hemisphere ;Visual-Snapshots ; calls the visual-snapshots function to obtain data of all the neurons at various time-points, only needed when outputting visual snapshot data ifelse Neural-Network? ; if the network is on, will calculate the number of inhibited neurons, then reset it, first block [set TotInhibited count turtles with [Expression-Type != "Other" and Inhibited? = "Yes"] set SOMInhibited count turtles with [Expression-Type = "SOM" and Inhibited? = "Yes"] set PKCInhibited count turtles with [Expression-Type = "PKC" and Inhibited? = "Yes"] ask turtles with [Inhibited? = "Yes"] [set Inhibited? "No"] ] [] tick ;increases the tick counter by one. ;This entire sequence of code repeats itself every step. The looping occurs as an edit of the button itself. See interface tab end ; the following "to-report" function is the primary method for defining the behavior of each neuron. It is a bounded, normal distribution whose average, standard deviation, min and max are all ; calibrated from the laboratory data, used in the Assign-Firing-Rates procedure to-report random-normal-in-bounds [mn dev mmin mmax] ;this is the main command for the bounded normal distribution let result random-normal mn dev if result < mmin ; if the result is less than the min, will assign the min firing rate to that neuron to more accurately reflect the laboratory data [set result mmin] if result > mmax ; if the result is more than the max, will assign the max firing rate to that neuron ..... (see above) [set result mmax] report result ;the "result" generated is a number that represents the firing rate of a neuron at that moment. Calling the function again yields another firing rate as if its has changed through time end ;the following function "Assign-Firing-Rates" describes the behavior of all the firing neurons depending on whether stimulation is happening and their current damage level to Assign-Firing-Rates ; assigns the firing rates of firing neurons depending on damage, using the control or unsensitized distribution (x) and the injured or sensitized distribution (y) ; in this equation, (((100 - Damage) / 100) * x) + ((Damage / 100) * y), still depends on current *WILL HAVE TO UPDATE VALUES ONCE LEFT DATA IS AVAILABLE if Stimulated? >= 0 and Stimulated? < 20 ; current is from 0 (inclusive) to 20 (exclusive) [ if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Regular" ; left SOM regular firing neurons in the subject [ set Firing-Rate 0 ;THIS is the behavior of the neuron at any one moment (tick) given as a firing rate. It is calculated to allow for a gradual ;change in behavior (gradual sensitization) as the neuron becomes more damaged. At its limits (d=0 or d=100) the variable is only pulling from one of the two distributions directly above. let q scale-color blue Firing-Rate -10 40 ;this provides a visual change in color as the firing rates change as the neuron accumulates damage set color q ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Regular" ; right SOM regular firing neurons in the subject [ set Firing-Rate 0 ;THIS is the behavior of the neuron at any one moment (tick) given as a firing rate. It is calculated to allow for a gradual ;change in behavior (gradual sensitization) as the neuron becomes more damaged. At its limits (d=0 or d=100) the variable is only pulling from one of the two distributions directly above. let q scale-color blue Firing-Rate -10 40 ;this provides a visual change in color as the firing rates change as the neuron accumulates damage set color q ] if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Late" ; left SOM late firing neurons in the subject [ set Firing-Rate 0 let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Late" ; right SOM late firing neurons in the subject [ set Firing-Rate 0 let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Regular" ; left PKC regular firing neurons in the subject [ set Firing-Rate 0 let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Regular" ; right PKC regular firing neurons in the subject [ set Firing-Rate 0 let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Late" ; left PKC late firing neurons in the subject [ set Firing-Rate 0 let t scale-color pink Firing-Rate -10 40 set color t ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Late" ; right PKC late firing neurons in the subject [ set Firing-Rate 0 let t scale-color pink Firing-Rate -10 40 set color t ] ] if Stimulated? >= 20 and Stimulated? < 40 ; current is from 20 (inclusive) to 40 (exclusive) [ if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Regular" ; left SOM regular firing neurons in the subject [ set Firing-Rate 0 let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Regular" ; right SOM regular firing neurons in the subject [ set Firing-Rate 0 let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Late" ; left SOM late firing neurons in the subject [ set Firing-Rate 0 let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Late" ; right SOM late firing neurons in the subject [ set Firing-Rate 0 let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Regular" ; left PKC regular firing neurons in the subject [ let n random-normal-in-bounds 0.1111 0.4646 0 2 let m random-normal-in-bounds 0.2778 0.6691 0 2 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Regular" ; right PKC regular firing neurons in the subject [ let n random-normal-in-bounds 0.1111 0.4646 0 2 let m random-normal-in-bounds 0.2778 0.6691 0 2 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Late" ; left PKC late firing neurons in the subject [ set Firing-Rate 0 let t scale-color pink Firing-Rate -10 40 set color t ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Late" ; right PKC late firing neurons in the subject [ set Firing-Rate 0 let t scale-color pink Firing-Rate -10 40 set color t ] ] if Stimulated? >= 40 and Stimulated? < 60 ; current is from 40 (inclusive) to 60 (exclusive) [ if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Regular" ; left SOM regular firing neurons in the subject [ let x random-normal-in-bounds 0.3077 1.1094 0 4 let y random-normal-in-bounds 0.45 1.2763 0 5 set Firing-Rate (((100 - Damage) / 100) * x) + ((Damage / 100) * y) let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Regular" ; right SOM regular firing neurons in the subject [ let x random-normal-in-bounds 0.3077 1.1094 0 4 let y random-normal-in-bounds 0.45 1.2763 0 5 set Firing-Rate (((100 - Damage) / 100) * x) + ((Damage / 100) * y) let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Late" ; left SOM late firing neurons in the subject [ set Firing-Rate 0 let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Late" ; right SOM late firing neurons in the subject [ set Firing-Rate 0 let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Regular" ; left PKC regular firing neurons in the subject [ let n random-normal-in-bounds 0.5278 1.4830 0 6 let m random-normal-in-bounds 0.8333 1.6890 0 5 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Regular" ; right PKC regular firing neurons in the subject [ let n random-normal-in-bounds 0.5278 1.4830 0 6 let m random-normal-in-bounds 0.8333 1.6890 0 5 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Late" ; left PKC late firing neurons in the subject [ set Firing-Rate 0 let t scale-color pink Firing-Rate -10 40 set color t ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Late" ; right PKC late firing neurons in the subject [ set Firing-Rate 0 let t scale-color pink Firing-Rate -10 40 set color t ] ] if Stimulated? >= 60 and Stimulated? < 80 ; current is from 60 (inclusive) to 80 (exclusive) [ if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Regular" ; left SOM regular firing neurons in the subject [ let x random-normal-in-bounds 2.0769 2.6914 0 8 let y random-normal-in-bounds 1.75 3.3067 0 11 set Firing-Rate (((100 - Damage) / 100) * x) + ((Damage / 100) * y) let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Regular" ; right SOM regular firing neurons in the subject [ let x random-normal-in-bounds 2.0769 2.6914 0 8 let y random-normal-in-bounds 1.75 3.3067 0 11 set Firing-Rate (((100 - Damage) / 100) * x) + ((Damage / 100) * y) let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Late" ; left SOM late firing neurons in the subject [ set Firing-Rate 0 let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Late" ; right SOM late firing neurons in the subject [ set Firing-Rate 0 let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Regular" ; left PKC regular firing neurons in the subject [ let n random-normal-in-bounds 1.2778 2.2375 0 8 let m random-normal-in-bounds 1.8889 2.8052 0 7 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Regular" ; right PKC regular firing neurons in the subject [ let n random-normal-in-bounds 1.2778 2.2375 0 8 let m random-normal-in-bounds 1.8889 2.8052 0 7 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Late" ; left PKC late firing neurons in the subject [ set Firing-Rate 0 let t scale-color pink Firing-Rate -10 40 set color t ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Late" ; right PKC late firing neurons in the subject [ set Firing-Rate 0 let t scale-color pink Firing-Rate -10 40 set color t ] ] if Stimulated? >= 80 and Stimulated? < 100 ; current is from 80 (inclusive) to 100 (exclusive) [ if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Regular" ; left SOM regular firing neurons in the subject [ let x random-normal-in-bounds 4.6154 4.0935 0 13 let y random-normal-in-bounds 3.45 4.8284 0 15 set Firing-Rate (((100 - Damage) / 100) * x) + ((Damage / 100) * y) let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Regular" ; right SOM regular firing neurons in the subject [ let x random-normal-in-bounds 4.6154 4.0935 0 13 let y random-normal-in-bounds 3.45 4.8284 0 15 set Firing-Rate (((100 - Damage) / 100) * x) + ((Damage / 100) * y) let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Late" ; left SOM late firing neurons in the subject [ set Firing-Rate 0 let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Late" ; right SOM late firing neurons in the subject [ set Firing-Rate 0 let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Regular" ; left PKC regular firing neurons in the subject [ let n random-normal-in-bounds 2.4444 3.1932 0 10 let m random-normal-in-bounds 3.3333 3.9705 0 12 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Regular" ; right PKC regular firing neurons in the subject [ let n random-normal-in-bounds 2.4444 3.1932 0 10 let m random-normal-in-bounds 3.3333 3.9705 0 12 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Late" ; left PKC late firing neurons in the subject [ let b random-normal-in-bounds 0.0833 0.2887 0 1 set Firing-Rate ((Damage / 100) * b) let t scale-color pink Firing-Rate -10 40 set color t ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Late" ; right PKC late firing neurons in the subject [ let b random-normal-in-bounds 0.0833 0.2887 0 1 set Firing-Rate ((Damage / 100) * b) let t scale-color pink Firing-Rate -10 40 set color t ] ] if Stimulated? >= 100 and Stimulated? < 120 ; current is from 100 (inclusive) to 120 (exclusive) [ if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Regular" ; left SOM regular firing neurons in the subject [ let x random-normal-in-bounds 8.0769 4.9068 1 17 let y random-normal-in-bounds 5.15 6.1239 0 19 set Firing-Rate (((100 - Damage) / 100) * x) + ((Damage / 100) * y) let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Regular" ; right SOM regular firing neurons in the subject [ let x random-normal-in-bounds 8.0769 4.9068 1 17 let y random-normal-in-bounds 5.15 6.1239 0 19 set Firing-Rate (((100 - Damage) / 100) * x) + ((Damage / 100) * y) let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Late" ; left SOM late firing neurons in the subject [ let z random-normal-in-bounds 0.375 1.0607 0 3 set Firing-Rate (((100 - Damage) / 100) * z) let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Late" ; right SOM late firing neurons in the subject [ let z random-normal-in-bounds 0.375 1.0607 0 3 set Firing-Rate (((100 - Damage) / 100) * z) let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Regular" ; left PKC regular firing neurons in the subject [ let n random-normal-in-bounds 3.9167 4.0169 0 13 let m random-normal-in-bounds 5.3889 4.6291 0 15 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Regular" ; right PKC regular firing neurons in the subject [ let n random-normal-in-bounds 3.9167 4.0169 0 13 let m random-normal-in-bounds 5.3889 4.6291 0 15 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Late" ; left PKC late firing neurons in the subject [ let b random-normal-in-bounds 0.25 0.6216 0 2 set Firing-Rate ((Damage / 100) * b) let t scale-color pink Firing-Rate -10 40 set color t ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Late" ; right PKC late firing neurons in the subject [ let b random-normal-in-bounds 0.25 0.6216 0 2 set Firing-Rate ((Damage / 100) * b) let t scale-color pink Firing-Rate -10 40 set color t ] ] if Stimulated? >= 120 and Stimulated? < 140 ; current is from 120 (inclusive) to 140 (exclusive) [ if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Regular" ; left SOM regular firing neurons in the subject [ let x random-normal-in-bounds 11.2308 5.5551 2 22 let y random-normal-in-bounds 7 7.0038 0 21 set Firing-Rate (((100 - Damage) / 100) * x) + ((Damage / 100) * y) let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Regular" ; right SOM regular firing neurons in the subject [ let x random-normal-in-bounds 11.2308 5.5551 2 22 let y random-normal-in-bounds 7 7.0038 0 21 set Firing-Rate (((100 - Damage) / 100) * x) + ((Damage / 100) * y) let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Late" ; left SOM late firing neurons in the subject [ let z random-normal-in-bounds 1 2.4495 0 7 let v random-normal-in-bounds 0.1429 0.378 0 1 set Firing-Rate (((100 - Damage) / 100) * z) + ((Damage / 100) * v) let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Late" ; right SOM late firing neurons in the subject [ let z random-normal-in-bounds 1 2.4495 0 7 let v random-normal-in-bounds 0.1429 0.378 0 1 set Firing-Rate (((100 - Damage) / 100) * z) + ((Damage / 100) * v) let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Regular" ; left PKC regular firing neurons in the subject [ let n random-normal-in-bounds 5.5833 4.5127 0 14 let m random-normal-in-bounds 7.6111 4.6544 1 17 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Regular" ; right PKC regular firing neurons in the subject [ let n random-normal-in-bounds 5.5833 4.5127 0 14 let m random-normal-in-bounds 7.6111 4.6544 1 17 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Late" ; left PKC late firing neurons in the subject [ let b random-normal-in-bounds 0.9167 1.505 0 5 set Firing-Rate ((Damage / 100) * b) let t scale-color pink Firing-Rate -10 40 set color t ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Late" ; right PKC late firing neurons in the subject [ let b random-normal-in-bounds 0.9167 1.505 0 5 set Firing-Rate ((Damage / 100) * b) let t scale-color pink Firing-Rate -10 40 set color t ] ] if Stimulated? >= 140 and Stimulated? < 160 ; current is from 140 (inclusive) to 160 (exclusive) [ if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Regular" ; left SOM regular firing neurons in the subject [ let x random-normal-in-bounds 13 4.6726 4 23 let y random-normal-in-bounds 8.51 7.0038 0 21 set Firing-Rate (((100 - Damage) / 100) * x) + ((Damage / 100) * y) let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Regular" ; right SOM regular firing neurons in the subject [ let x random-normal-in-bounds 13 4.6726 4 23 let y random-normal-in-bounds 8.51 7.0038 0 21 set Firing-Rate (((100 - Damage) / 100) * x) + ((Damage / 100) * y) let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Late" ; left SOM late firing neurons in the subject [ let z random-normal-in-bounds 1.5 3.2071 0 9 let v random-normal-in-bounds 0.4286 1.1339 0 3 set Firing-Rate (((100 - Damage) / 100) * z) + ((Damage / 100) * v) let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Late" ; right SOM late firing neurons in the subject [ let z random-normal-in-bounds 1.5 3.2071 0 9 let v random-normal-in-bounds 0.4286 1.1339 0 3 set Firing-Rate (((100 - Damage) / 100) * z) + ((Damage / 100) * v) let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Regular" ; left PKC regular firing neurons in the subject [ let n random-normal-in-bounds 7.1389 4.9289 0 15 let m random-normal-in-bounds 9.6111 4.6417 2 19 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Regular" ; right PKC regular firing neurons in the subject [ let n random-normal-in-bounds 7.1389 4.9289 0 15 let m random-normal-in-bounds 9.6111 4.6417 2 19 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Late" ; left PKC late firing neurons in the subject [ let a random-normal-in-bounds 0.1111 0.3234 0 1 let b random-normal-in-bounds 2 2.0889 0 7 set Firing-Rate (((100 - Damage) / 100) * a) + ((Damage / 100) * b) let t scale-color pink Firing-Rate -10 40 set color t ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Late" ; right PKC late firing neurons in the subject [ let a random-normal-in-bounds 0.1111 0.3234 0 1 let b random-normal-in-bounds 2 2.0889 0 7 set Firing-Rate (((100 - Damage) / 100) * a) + ((Damage / 100) * b) let t scale-color pink Firing-Rate -10 40 set color t ] ] if Stimulated? >= 160 and Stimulated? < 180 ; current is from 160 (inclusive) to 180 (exclusive) [ if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Regular" ; left SOM regular firing neurons in the subject [ let x random-normal-in-bounds 14.3077 4.9897 5 28 let y random-normal-in-bounds 10.16 7.0038 0 21 set Firing-Rate (((100 - Damage) / 100) * x) + ((Damage / 100) * y) let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Regular" ; right SOM regular firing neurons in the subject [ let x random-normal-in-bounds 14.3077 4.9897 5 28 let y random-normal-in-bounds 10.16 7.0038 0 21 set Firing-Rate (((100 - Damage) / 100) * x) + ((Damage / 100) * y) let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Late" ; left SOM late firing neurons in the subject [ let z random-normal-in-bounds 2.5 4 0 11 let v random-normal-in-bounds 1.1429 2.2678 0 6 set Firing-Rate (((100 - Damage) / 100) * z) + ((Damage / 100) * v) let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Late" ; right SOM late firing neurons in the subject [ let z random-normal-in-bounds 2.5 4 0 11 let v random-normal-in-bounds 1.1429 2.2678 0 6 set Firing-Rate (((100 - Damage) / 100) * z) + ((Damage / 100) * v) let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Regular" ; left PKC regular firing neurons in the subject [ let n random-normal-in-bounds 8.75 5.1513 1 16 let m random-normal-in-bounds 10.571 4.6417 2 19 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Regular" ; right PKC regular firing neurons in the subject [ let n random-normal-in-bounds 8.75 5.1513 1 16 let m random-normal-in-bounds 10.571 4.6417 2 19 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Late" ; left PKC late firing neurons in the subject [ let a random-normal-in-bounds 0.3889 0.6978 0 2 let b random-normal-in-bounds 3 2.5226 0 8 set Firing-Rate (((100 - Damage) / 100) * a) + ((Damage / 100) * b) let t scale-color pink Firing-Rate -10 40 set color t ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Late" ; right PKC late firing neurons in the subject [ let a random-normal-in-bounds 0.3889 0.6978 0 2 let b random-normal-in-bounds 3 2.5226 0 8 set Firing-Rate (((100 - Damage) / 100) * a) + ((Damage / 100) * b) let t scale-color pink Firing-Rate -10 40 set color t ] ] if Stimulated? >= 180 and Stimulated? < 200 ; current is from 180 (inclusive) to 200 (exclusive) [ if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Regular" ; left SOM regular firing neurons in the subject [ let x random-normal-in-bounds 15.9231 6.1028 6 30 let y random-normal-in-bounds 11.81 7.0038 0 21 set Firing-Rate (((100 - Damage) / 100) * x) + ((Damage / 100) * y) let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Regular" ; right SOM regular firing neurons in the subject [ let x random-normal-in-bounds 15.9231 6.1028 6 30 let y random-normal-in-bounds 11.81 7.0038 0 21 set Firing-Rate (((100 - Damage) / 100) * x) + ((Damage / 100) * y) let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Late" ; left SOM late firing neurons in the subject [ let z random-normal-in-bounds 3.25 4.7734 0 13 let v random-normal-in-bounds 1.8571 2.9114 0 8 set Firing-Rate (((100 - Damage) / 100) * z) + ((Damage / 100) * v) let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Late" ; right SOM late firing neurons in the subject [ let z random-normal-in-bounds 3.25 4.7734 0 13 let v random-normal-in-bounds 1.8571 2.9114 0 8 set Firing-Rate (((100 - Damage) / 100) * z) + ((Damage / 100) * v) let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Regular" ; left PKC regular firing neurons in the subject [ let n random-normal-in-bounds 10.0833 5.261 1 18 let m random-normal-in-bounds 12.18 4.6417 2 19 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Regular" ; right PKC regular firing neurons in the subject [ let n random-normal-in-bounds 10.0833 5.261 1 18 let m random-normal-in-bounds 12.18 4.6417 2 19 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Late" ; left PKC late firing neurons in the subject [ let a random-normal-in-bounds 0.8889 1.1827 0 3 let b random-normal-in-bounds 4.25 2.958 1 10 set Firing-Rate (((100 - Damage) / 100) * a) + ((Damage / 100) * b) let t scale-color pink Firing-Rate -10 40 set color t ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Late" ; right PKC late firing neurons in the subject [ let a random-normal-in-bounds 0.8889 1.1827 0 3 let b random-normal-in-bounds 4.25 2.958 1 10 set Firing-Rate (((100 - Damage) / 100) * a) + ((Damage / 100) * b) let t scale-color pink Firing-Rate -10 40 set color t ] ] if Stimulated? >= 200 and Stimulated? < 220 ; current is from 200 (inclusive) to 220 (exclusive) [ if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Regular" ; left SOM regular firing neurons in the subject [ let x random-normal-in-bounds 16.7692 6.2471 7 30 let y random-normal-in-bounds 13.46 7.0038 0 21 set Firing-Rate (((100 - Damage) / 100) * x) + ((Damage / 100) * y) let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Regular" ; right SOM regular firing neurons in the subject [ let x random-normal-in-bounds 16.7692 6.2471 7 30 let y random-normal-in-bounds 13.46 7.0038 0 21 set Firing-Rate (((100 - Damage) / 100) * x) + ((Damage / 100) * y) let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Late" ; left SOM late firing neurons in the subject [ let z random-normal-in-bounds 4.5 5.6315 0 15 let v random-normal-in-bounds 3.1429 3.9761 0 11 set Firing-Rate (((100 - Damage) / 100) * z) + ((Damage / 100) * v) let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Late" ; right SOM late firing neurons in the subject [ let z random-normal-in-bounds 4.5 5.6315 0 15 let v random-normal-in-bounds 3.1429 3.9761 0 11 set Firing-Rate (((100 - Damage) / 100) * z) + ((Damage / 100) * v) let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Regular" ; left PKC regular firing neurons in the subject [ let n random-normal-in-bounds 11.4444 5.2777 2 20 let m random-normal-in-bounds 13.789 4.6417 2 19 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Regular" ; right PKC regular firing neurons in the subject [ let n random-normal-in-bounds 11.4444 5.2777 2 20 let m random-normal-in-bounds 13.789 4.6417 2 19 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Late" ; left PKC late firing neurons in the subject [ let a random-normal-in-bounds 1.3889 1.4608 0 4 let b random-normal-in-bounds 5.3333 2.9336 2 11 set Firing-Rate (((100 - Damage) / 100) * a) + ((Damage / 100) * b) let t scale-color pink Firing-Rate -10 40 set color t ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Late" ; right PKC late firing neurons in the subject [ let a random-normal-in-bounds 1.3889 1.4608 0 4 let b random-normal-in-bounds 5.3333 2.9336 2 11 set Firing-Rate (((100 - Damage) / 100) * a) + ((Damage / 100) * b) let t scale-color pink Firing-Rate -10 40 set color t ] ] if Stimulated? >= 220 and Stimulated? < 240 ; current is from 220 (inclusive) to 240 (exclusive) [ if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Regular" ; left SOM regular firing neurons in the subject [ let x random-normal-in-bounds 17.1538 5.97 8 31 let y random-normal-in-bounds 15.11 7.0038 0 21 set Firing-Rate (((100 - Damage) / 100) * x) + ((Damage / 100) * y) let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Regular" ; right SOM regular firing neurons in the subject [ let x random-normal-in-bounds 17.1538 5.97 8 31 let y random-normal-in-bounds 15.11 7.0038 0 21 set Firing-Rate (((100 - Damage) / 100) * x) + ((Damage / 100) * y) let q scale-color blue Firing-Rate -10 40 set color q ] if Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type = "Late" ; left SOM late firing neurons in the subject [ let z random-normal-in-bounds 5.625 5.7554 0 16 let v random-normal-in-bounds 4.4286 4.237 0 12 set Firing-Rate (((100 - Damage) / 100) * z) + ((Damage / 100) * v) let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type = "Late" ; right SOM late firing neurons in the subject [ let z random-normal-in-bounds 5.625 5.7554 0 16 let v random-normal-in-bounds 4.4286 4.2370 0 12 set Firing-Rate (((100 - Damage) / 100) * z) + ((Damage / 100) * v) let w scale-color cyan Firing-Rate -10 40 set color w ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Regular" ; left PKC regular firing neurons in the subject [ let n random-normal-in-bounds 12.6389 5.3353 3 21 let m random-normal-in-bounds 15.398 4.6417 2 19 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Regular" ; right PKC regular firing neurons in the subject [ let n random-normal-in-bounds 12.6389 5.3353 3 21 let m random-normal-in-bounds 15.398 4.6417 2 19 set Firing-Rate (((100 - Damage) / 100) * n) + ((Damage / 100) * m) let r scale-color red Firing-Rate -10 40 set color r ] if Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type = "Late" ; left PKC late firing neurons in the subject [ let a random-normal-in-bounds 2.1667 1.9778 0 6 let b random-normal-in-bounds 6.75 3.1659 3 13 set Firing-Rate (((100 - Damage) / 100) * a) + ((Damage / 100) * b) let t scale-color pink Firing-Rate -10 40 set color t ] if Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type = "Late" ; right PKC late firing neurons in the subject [ let a random-normal-in-bounds 2.1667 1.9778 0 6 let b random-normal-in-bounds 6.75 3.1659 3 13 set Firing-Rate (((100 - Damage) / 100) * a) + ((Damage / 100) * b) let t scale-color pink Firing-Rate -10 40 set color t ] ] end to Visual-Snapshots ; for snapshots of neurons purposes, *MIGHT HAVE TO CHANGE TIMES DEPENDING ON THE DAMAGE LEVELS AT CERTAIN TIME POINTS AND WHAT WE ARE INTERESTED IN ; if ticks = 10 ; current is 120 pA before damage ; [export-world "Before Damage 120 Snapshot.csv"] ; ;; if ticks = 80 ; current is transitioning from 140 pA to 160 pA mostly damaged ;; [export-world "140 and 160 Snapshot.csv"] ;; ;; if ticks = 150 ; current is at 220 pA fully damaged ;; [export-world "220 Snapshot.csv"] ; ; if ticks = 120 ; current is 120 pA during damage ; [export-world "During Damage 120 Snapshot.csv"] ; ; if ticks = 250 ; current is at 120 pA fully damaged ; [export-world "After Damage 120 Snapshot.csv"] end to silent-all-SOM-L ; added to manually silence all left SOM neurons in a simulation and keep them silent for the rest of it ask turtles with [Hemisphere = "Left" and Expression-Type = "SOM" and Rate-Type != "Silent"] [ set Rate-Type "Silent" set color black ] set SOM-Silenced-L? "Yes" end to silent-all-SOM-R ; added to manually silence all right SOM neurons in a simulation and keep them silent for the rest of it ask turtles with [Hemisphere = "Right" and Expression-Type = "SOM" and Rate-Type != "Silent"] [ set Rate-Type "Silent" set color black ] set SOM-Silenced-R? "Yes" end to silent-all-PKC-L ; added to manually silence all left PKC neurons in a simulation and keep them silent for the rest of it ask turtles with [Hemisphere = "Left" and Expression-Type = "PKC" and Rate-Type != "Silent"] [ set Rate-Type "Silent" set color black ] set PKC-Silenced-L? "Yes" end to silent-all-PKC-R ; added to manually silence all right PKC neurons in a simulation and keep them silent for the rest of it ask turtles with [Hemisphere = "Right" and Expression-Type = "PKC" and Rate-Type != "Silent"] [ set Rate-Type "Silent" set color black ] set PKC-Silenced-R? "Yes" end @#$#@#$#@ GRAPHICS-WINDOW 293 10 678 387 -1 -1 9.2 1 10 1 1 1 0 0 0 1 0 40 0 39 1 1 1 ticks 30.0 BUTTON 408 534 484 567 Initialize setup NIL 1 T OBSERVER NIL 1 NIL NIL 1 BUTTON 487 534 553 567 Go if file-at-end?\n[\nfile-close-all\nstop\n]\ngo T 1 T OBSERVER NIL 2 NIL NIL 1 CHOOSER 236 394 720 439 File-To-Use File-To-Use "Current Values: 120 to 140 to 160 to 180 to 200 to 220 to 120 (each 55 steps)" "Current Values: 0 - 20 (each 20 steps)" "Current Values: 20 - 40 (each 20 steps)" "Current Values: 40 - 60 (each 20 steps)" "Current Values: 60 - 80 (each 20 steps)" "Current Values: 80 - 100 (each 20 steps)" "Current Values: 100 - 120 (each 20 steps)" "Current Values: 120 - 140 (each 20 steps)" "Current Values: 140 - 160 (each 20 steps)" "Current Values: 160 - 180 (each 20 steps)" "Current Values: 180 - 200 (each 20 steps)" "Current Values: 200 - 220 (each 20 steps)" "Current Values: 220 - 240 (each 20 steps)" "Current Values: All 120 (300 steps)" "Current Values: All 220 (300 steps)" "Current Values: 120 (200 steps) to 220 (100 steps) to 120 (100 steps)" "Current Values: 220 (200 steps) to 120 (200 steps)" "Current Values: 120 (49 steps) to 220 (101 steps) to 120 (100 steps)" "Current Values: 120 (59 steps) to 220 (101 steps) to 120 (90 steps)" "Current Values: 120 (69 steps) to 220 (101 steps) to 120 (80 steps)" "Current Values: 120 (74 steps) to 220 (101 steps) to 120 (75 steps)" "Current Values: 120 (79 steps) to 220 (101 steps) to 120 (70 steps)" "Current Values: 120 (89 steps) to 220 (101 steps) to 120 (60 steps)" "Current Values: 120 (99 steps) to 220 (101 steps) to 120 (50 steps)" "Current Values: 120 (124 steps) to 220 (101 steps) to 120 (25 steps)" 0 SLIDER 744 271 907 304 Right-SOM Right-SOM 0 1 0.5 0.01 1 NIL HORIZONTAL SLIDER 681 316 820 349 Right-SOM-regular Right-SOM-regular 0 1 0.27 0.01 1 NIL HORIZONTAL SLIDER 681 354 821 387 Right-PKC-regular Right-PKC-regular 0 1 0.48 0.01 1 NIL HORIZONTAL MONITOR 717 11 837 48 Right SOM RS neurons count turtles with [Hemisphere = \"Right\" and Expression-Type = \"SOM\" and Rate-Type = \"Regular\"] 0 1 9 MONITOR 717 53 837 90 Right SOM LF neurons count turtles with [Hemisphere = \"Right\" and Expression-Type = \"SOM\" and Rate-Type = \"Late\"] 0 1 9 MONITOR 716 96 837 133 Right SOM Spont neurons count turtles with [Hemisphere = \"Right\" and Expression-Type = \"SOM\" and Rate-Type = \"Spontaneous\"] 0 1 9 MONITOR 840 11 956 48 Right PKC RS neurons count turtles with [Hemisphere = \"Right\" and Expression-Type = \"PKC\" and Rate-Type = \"Regular\"] 0 1 9 MONITOR 840 54 956 91 Right PKC LF neurons count turtles with [Hemisphere = \"Right\" and Expression-Type = \"PKC\" and Rate-Type = \"Late\"] 0 1 9 MONITOR 840 97 957 134 Right PKC Spont neurons count turtles with [Hemisphere = \"Right\" and Expression-Type = \"PKC\" and Rate-Type = \"Spontaneous\"] 0 1 9 MONITOR 842 143 973 180 Right PKC RS Percentage (count turtles with [Hemisphere = \"Right\" and Expression-Type = \"PKC\" and Rate-Type = \"Regular\"])/(count turtles with [Hemisphere = \"Right\" and Expression-Type = \"PKC\"]) 2 1 9 MONITOR 702 144 837 181 Right SOM RS Percentage (count turtles with [Hemisphere = \"Right\" and Expression-Type = \"SOM\" and Rate-Type = \"Regular\"])/(count turtles with [Hemisphere = \"Right\" and Expression-Type = \"SOM\"]) 2 1 9 MONITOR 843 188 974 225 Right PKC LF Percentage (count turtles with [Hemisphere = \"Right\" and Expression-Type = \"PKC\" and Rate-Type = \"Late\"])/(count turtles with [Hemisphere = \"Right\" and Expression-Type = \"PKC\"]) 2 1 9 MONITOR 702 187 838 224 Right SOM LF Percentage (count turtles with [Hemisphere = \"Right\" and Expression-Type = \"SOM\" and Rate-Type = \"Late\"])/(count turtles with [Hemisphere = \"Right\" and Expression-Type = \"SOM\"]) 2 1 9 PLOT 1264 272 1549 480 Right Damage Accumulation Time Damage Percentage 0.0 300.0 0.0 100.0 true true "" "" PENS "SOM RS" 1.0 0 -13345367 true "" "plot CD-R-SOM-regular" "SOM LF" 1.0 0 -11221820 true "" "plot CD-R-SOM-late" "PKC RS" 1.0 0 -2674135 true "" "plot CD-R-PKC-regular" "PKC LF" 1.0 0 -2064490 true "" "plot CD-R-PKC-late" PLOT 1237 529 1549 742 Right PKC and SOM Firing Rates Time Average Firing Rate (AFR) 0.0 300.0 0.0 40.0 true true "" "" PENS "PKC RS" 1.0 0 -2674135 true "" "plot AR-R-PKC-regular" "PKC LF" 1.0 0 -2064490 true "" "plot AR-R-PKC-late" "SOM RS" 1.0 0 -13345367 true "" "plot AR-R-SOM-regular" "SOM LF" 1.0 0 -11221820 true "" "plot AR-R-SOM-late" PLOT 979 10 1231 218 Pain Output Time Pain 0.0 300.0 -1000.0 1000.0 true false "" "" PENS "default" 1.0 0 -16777216 true "" "plot Pain" PLOT 1556 530 1868 742 Right Contribution of SOM and PKC to Pain Time Summation over Neurons 0.0 300.0 0.0 2000.0 true true "" "" PENS "SOM" 1.0 0 -13791810 true "" "plot CR-R-SOM" "PKC" 1.0 0 -5825686 true "" "plot CR-R-PKC" PLOT 1545 10 1796 218 Stimulation History Time Current (pA) 0.0 300.0 0.0 220.0 true false "" "" PENS "default" 1.0 0 -16777216 true "" "plot Stimulated?" MONITOR 1236 487 1379 524 Neurons out of damage bounds count turtles with [Damage < 0 or Damage > 100] 17 1 9 MONITOR 1116 487 1231 524 100% Damaged neurons count turtles with [Damage = 100] 17 1 9 MONITOR 1636 223 1719 260 Stimulation Time Stimulation-Time 17 1 9 MONITOR 493 700 592 737 Right SOM RS CFR CR-R-SOM-regular 4 1 9 MONITOR 596 700 691 737 Right SOM LF CFR CR-R-SOM-late 4 1 9 MONITOR 494 745 592 782 Right PKC RS CFR CR-R-PKC-regular 4 1 9 MONITOR 596 745 692 782 Right PKC LF CFR CR-R-PKC-late 4 1 9 MONITOR 1062 225 1151 262 Current Pain Level Pain 4 1 9 MONITOR 695 699 792 736 Right SOM CFR CR-R-SOM 4 1 9 MONITOR 696 745 791 782 Right PKC CFR CR-R-PKC 4 1 9 MONITOR 20 10 135 47 Left SOM RS neurons count turtles with [Hemisphere = \"Left\" and Expression-Type = \"SOM\" and Rate-Type = \"Regular\"] 0 1 9 MONITOR 139 10 253 47 Left PKC RS neurons count turtles with [Hemisphere = \"Left\" and Expression-Type = \"PKC\" and Rate-Type = \"Regular\"] 0 1 9 MONITOR 19 51 135 88 Left SOM LF neurons count turtles with [Hemisphere = \"Left\" and Expression-Type = \"SOM\" and Rate-Type = \"Late\"] 0 1 9 MONITOR 139 51 253 88 Left PKC LF neurons count turtles with [Hemisphere = \"Left\" and Expression-Type = \"PKC\" and Rate-Type = \"Late\"] 0 1 9 MONITOR 19 94 135 131 Left SOM Spont neurons count turtles with [Hemisphere = \"Left\" and Expression-Type = \"SOM\" and Rate-Type = \"Spontaneous\"] 0 1 9 MONITOR 139 94 253 131 Left PKC Spont neurons count turtles with [Hemisphere = \"Left\" and Expression-Type = \"PKC\" and Rate-Type = \"Spontaneous\"] 0 1 9 MONITOR 6 142 135 179 Left SOM RS Percentage (count turtles with [Hemisphere = \"Left\" and Expression-Type = \"SOM\" and Rate-Type = \"Regular\"])/(count turtles with [Hemisphere = \"Left\" and Expression-Type = \"SOM\"]) 2 1 9 MONITOR 139 142 265 179 Left PKC RS Percentage (count turtles with [Hemisphere = \"Left\" and Expression-Type = \"PKC\" and Rate-Type = \"Regular\"])/(count turtles with [Hemisphere = \"Left\" and Expression-Type = \"PKC\"]) 2 1 9 MONITOR 6 184 135 221 Left SOM LF Percentage (count turtles with [Hemisphere = \"Left\" and Expression-Type = \"SOM\" and Rate-Type = \"Late\"])/(count turtles with [Hemisphere = \"Left\" and Expression-Type = \"SOM\"]) 2 1 9 MONITOR 139 186 266 223 Left PKC LF Percentage (count turtles with [Hemisphere = \"Left\" and Expression-Type = \"PKC\" and Rate-Type = \"Late\"])/(count turtles with [Hemisphere = \"Left\" and Expression-Type = \"PKC\"]) 2 1 9 SLIDER 66 271 228 304 Left-SOM Left-SOM 0 1 0.5 0.01 1 NIL HORIZONTAL SLIDER 7 315 147 348 Left-SOM-regular Left-SOM-regular 0 1 0.27 0.01 1 NIL HORIZONTAL SLIDER 7 352 147 385 Left-PKC-regular Left-PKC-regular 0 1 0.48 0.01 1 NIL HORIZONTAL PLOT 975 273 1260 480 Left Damage Accumulation Time Damage Percentage 0.0 300.0 0.0 100.0 true true "" "" PENS "SOM RS" 1.0 0 -13345367 true "" "plot CD-L-SOM-regular" "SOM LF" 1.0 0 -11221820 true "" "plot CD-L-SOM-late" "PKC RS" 1.0 0 -2674135 true "" "plot CD-L-PKC-regular" "PKC LF" 1.0 0 -2064490 true "" "plot CD-L-PKC-late" PLOT 918 530 1230 742 Left PKC and SOM Firing Rates Time Average Firing Rate (AFR) 0.0 300.0 0.0 40.0 true true "" "" PENS "PKC RS" 1.0 0 -2674135 true "" "plot AR-L-PKC-regular" "PKC LF" 1.0 0 -2064490 true "" "plot AR-L-PKC-late" "SOM RS" 1.0 0 -13345367 true "" "plot AR-L-SOM-regular" "SOM LF" 1.0 0 -11221820 true "" "plot AR-L-SOM-late" MONITOR 194 701 283 738 Left SOM RS CFR CR-L-SOM-regular 4 1 9 MONITOR 288 701 375 738 Left SOM LF CFR CR-L-SOM-late 4 1 9 MONITOR 195 745 283 782 Left PKC RS CFR CR-L-PKC-regular 4 1 9 MONITOR 288 746 375 783 Left PKC LF CFR CR-L-PKC-late 4 1 9 PLOT 1554 272 1866 483 Left Contribution of SOM and PKC to Pain Time Summation over Neurons 0.0 300.0 0.0 2000.0 true true "" "" PENS "SOM" 1.0 0 -13791810 true "" "plot CR-L-SOM" "PKC" 1.0 0 -5825686 true "" "plot CR-L-PKC" MONITOR 380 701 466 738 Left SOM CFR CR-L-SOM 4 1 9 MONITOR 380 746 467 783 Left PKC CFR CR-L-PKC 4 1 9 PLOT 1238 10 1538 218 Hemisphere Pain Output Time Pain 0.0 300.0 -1000.0 1000.0 true true "" "" PENS "Left" 1.0 0 -13840069 true "" "plot Pain-L" "Right" 1.0 0 -8630108 true "" "plot Pain-R" MONITOR 1205 225 1306 262 Left Pain Contribution Ratio-L-Pain 2 1 9 MONITOR 1457 226 1563 263 Right Pain Contribution Ratio-R-Pain 2 1 9 MONITOR 1312 225 1378 262 Left Pain Pain-L 4 1 9 MONITOR 1383 226 1452 263 Right Pain Pain-R 4 1 9 MONITOR 418 574 546 611 Real Time Passed (seconds) timer 0 1 9 BUTTON 134 445 258 478 Silent Left SOM neurons silent-all-SOM-L NIL 1 T OBSERVER NIL NIL NIL NIL 0 BUTTON 704 448 836 481 Silent Right SOM neurons silent-all-SOM-R NIL 1 T OBSERVER NIL NIL NIL NIL 0 BUTTON 6 444 131 477 Silent Left PKC neurons silent-all-PKC-L NIL 1 T OBSERVER NIL NIL NIL NIL 0 BUTTON 839 448 968 481 Silent Right PKC neurons silent-all-PKC-R NIL 1 T OBSERVER NIL NIL NIL NIL 0 MONITOR 72 617 203 654 Percent of PKC to PKC links (count links with [[Expression-Type] of end1 = \"PKC\" and [Expression-Type] of end2 = \"PKC\"])/(count links with [[Expression-Type] of end1 = \"PKC\"]) 3 1 9 MONITOR 342 618 477 655 Percent of PKC to Other links (count links with [[Expression-Type] of end1 = \"PKC\" and [Expression-Type] of end2 = \"Other\"])/(count links with [[Expression-Type] of end1 = \"PKC\"]) 3 1 9 MONITOR 206 618 339 655 Percent of PKC to SOM links (count links with [[Expression-Type] of end1 = \"PKC\" and [Expression-Type] of end2 = \"SOM\"])/(count links with [[Expression-Type] of end1 = \"PKC\"]) 3 1 9 MONITOR 481 618 616 655 Percent of SOM to SOM links (count links with [[Expression-Type] of end1 = \"SOM\" and [Expression-Type] of end2 = \"SOM\"])/(count links with [[Expression-Type] of end1 = \"SOM\"]) 3 1 9 MONITOR 618 619 751 656 Percent of SOM to PKC links (count links with [[Expression-Type] of end1 = \"SOM\" and [Expression-Type] of end2 = \"PKC\"])/(count links with [[Expression-Type] of end1 = \"SOM\"]) 3 1 9 MONITOR 754 620 891 657 Percent of SOM to Other links (count links with [[Expression-Type] of end1 = \"SOM\" and [Expression-Type] of end2 = \"Other\"])/(count links with [[Expression-Type] of end1 = \"SOM\"]) 3 1 9 MONITOR 301 533 404 570 Total Number of Links count links 0 1 9 MONITOR 76 575 189 612 Links starting with SOM count links with [[Expression-Type] of end1 = \"SOM\"] 0 1 9 MONITOR 192 574 301 611 Links ending with SOM count links with [[Expression-Type] of end2 = \"SOM\"] 0 1 9 MONITOR 660 574 769 611 Links starting with PKC count links with [[Expression-Type] of end1 = \"PKC\"] 0 1 9 MONITOR 772 574 877 611 Links ending with PKC count links with [[Expression-Type] of end2 = \"PKC\"] 0 1 9 SWITCH 194 488 324 521 Neural-Network? Neural-Network? 0 1 -1000 MONITOR 111 533 194 570 Links in Left Only count links with [[Hemisphere] of end1 = \"Left\" and [Hemisphere] of end2 = \"Left\"] 0 1 9 MONITOR 783 530 872 567 Links in Right Only count links with [[Hemisphere] of end1 = \"Right\" and [Hemisphere] of end2 = \"Right\"] 0 1 9 MONITOR 199 533 296 570 Links in Left to Other count links with [[Hemisphere] of end1 = \"Left\" and [Hemisphere] of end2 = 0] 0 1 9 MONITOR 671 532 776 569 Links in Right to Other count links with [[Hemisphere] of end1 = \"Right\" and [Hemisphere] of end2 = 0] 0 1 9 MONITOR 557 532 666 569 Total Inhibited Neurons TotInhibited 0 1 9 MONITOR 304 574 414 611 SOM Inhibited Neurons SOMInhibited 0 1 9 MONITOR 550 573 656 610 PKC Inhibited Neurons PKCInhibited 0 1 9 MONITOR 147 659 313 696 SOM Average Incoming Connections SOM-Average-IC 2 1 9 MONITOR 316 659 479 696 PKC Average Incoming Connections PKC-Average-IC 2 1 9 MONITOR 482 659 649 696 SOM Average Outgoing Connections SOM-Average-OC 2 1 9 MONITOR 652 659 816 696 PKC Average Outgoing Connections PKC-Average-OC 2 1 9 SLIDER 330 489 502 522 Inhibition-Threshold Inhibition-Threshold 0 105 15.0 1 1 NIL HORIZONTAL SLIDER 507 489 679 522 Number-of-Inputs Number-of-Inputs 0 5 3.0 1 1 NIL HORIZONTAL SLIDER 685 488 857 521 Number-of-Outputs Number-of-Outputs 0 5 3.0 1 1 NIL HORIZONTAL MONITOR 6 226 135 263 Left SOM Spont Percentage (count turtles with [Hemisphere = \"Left\" and Expression-Type = \"SOM\" and Rate-Type = \"Spontaneous\"])/(count turtles with [Hemisphere = \"Left\" and Expression-Type = \"SOM\"]) 2 1 9 MONITOR 139 227 266 264 Left PKC Spont Percentage (count turtles with [Hemisphere = \"Left\" and Expression-Type = \"PKC\" and Rate-Type = \"Spontaneous\"])/(count turtles with [Hemisphere = \"Left\" and Expression-Type = \"PKC\"]) 2 1 9 SLIDER 151 314 290 347 Left-SOM-late Left-SOM-late 0 1 0.18 0.01 1 NIL HORIZONTAL SLIDER 151 352 290 385 Left-PKC-late Left-PKC-late 0 1 0.25 0.01 1 NIL HORIZONTAL MONITOR 703 229 838 266 Right SOM Spont Percentage (count turtles with [Hemisphere = \"Right\" and Expression-Type = \"SOM\" and Rate-Type = \"Spontaneous\"])/(count turtles with [Hemisphere = \"Right\" and Expression-Type = \"SOM\"]) 2 1 9 MONITOR 843 229 974 266 Right PKC Spont Percentage (count turtles with [Hemisphere = \"Right\" and Expression-Type = \"PKC\" and Rate-Type = \"Spontaneous\"])/(count turtles with [Hemisphere = \"Right\" and Expression-Type = \"PKC\"]) 2 1 9 SLIDER 824 316 964 349 Right-SOM-late Right-SOM-late 0 1 0.18 0.01 1 NIL HORIZONTAL SLIDER 825 354 965 387 Right-PKC-late Right-PKC-late 0 1 0.25 0.01 1 NIL HORIZONTAL SLIDER 485 446 696 479 SOM-Spontaneous-Firing-Rate SOM-Spontaneous-Firing-Rate 0 10 4.887 0.001 1 NIL HORIZONTAL SLIDER 268 447 479 480 PKC-Spontaneous-Firing-Rate PKC-Spontaneous-Firing-Rate 0 10 2.833 0.001 1 NIL HORIZONTAL @#$#@#$#@ ## WHAT IS IT? (a general understanding of what the model is trying to show or explain) ## HOW IT WORKS (what rules the agents use to create the overall behavior of the model) ## HOW TO USE IT (how to use the model, including a description of each of the items in the Interface tab) ## THINGS TO NOTICE (suggested things for the user to notice while running the model) ## THINGS TO TRY (suggested things for the user to try to do (move sliders, switches, etc.) with the model) ## EXTENDING THE MODEL (suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.) ## NETLOGO FEATURES (interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features) ## RELATED MODELS (models in the NetLogo Models Library and elsewhere which are of related interest) ## CREDITS AND REFERENCES (a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links) @#$#@#$#@ default true 0 Polygon -7500403 true true 150 5 40 250 150 205 260 250 airplane true 0 Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15 arrow true 0 Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 box false 0 Polygon -7500403 true true 150 285 285 225 285 75 150 135 Polygon -7500403 true true 150 135 15 75 150 15 285 75 Polygon -7500403 true true 15 75 15 225 150 285 150 135 Line -16777216 false 150 285 150 135 Line -16777216 false 150 135 15 75 Line -16777216 false 150 135 285 75 bug true 0 Circle -7500403 true true 96 182 108 Circle -7500403 true true 110 127 80 Circle -7500403 true true 110 75 80 Line -7500403 true 150 100 80 30 Line -7500403 true 150 100 220 30 butterfly true 0 Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 Circle -16777216 true false 135 90 30 Line -16777216 false 150 105 195 60 Line -16777216 false 150 105 105 60 car false 0 Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180 Circle -16777216 true false 180 180 90 Circle -16777216 true false 30 180 90 Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 Circle -7500403 true true 47 195 58 Circle -7500403 true true 195 195 58 circle false 0 Circle -7500403 true true 0 0 300 circle 2 false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 cow false 0 Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167 Polygon -7500403 true true 73 210 86 251 62 249 48 208 Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 cylinder false 0 Circle -7500403 true true 0 0 300 dot false 0 Circle -7500403 true true 90 90 120 face happy false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240 face neutral false 0 Circle -7500403 true true 8 7 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Rectangle -16777216 true false 60 195 240 225 face sad false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183 fish false 0 Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166 Circle -16777216 true false 215 106 30 flag false 0 Rectangle -7500403 true true 60 15 75 300 Polygon -7500403 true true 90 150 270 90 90 30 Line -7500403 true 75 135 90 135 Line -7500403 true 75 45 90 45 flower false 0 Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 Circle -7500403 true true 85 132 38 Circle -7500403 true true 130 147 38 Circle -7500403 true true 192 85 38 Circle -7500403 true true 85 40 38 Circle -7500403 true true 177 40 38 Circle -7500403 true true 177 132 38 Circle -7500403 true true 70 85 38 Circle -7500403 true true 130 25 38 Circle -7500403 true true 96 51 108 Circle -16777216 true false 113 68 74 Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 house false 0 Rectangle -7500403 true true 45 120 255 285 Rectangle -16777216 true false 120 210 180 285 Polygon -7500403 true true 15 120 150 15 285 120 Line -16777216 false 30 120 270 120 leaf false 0 Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195 Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 line true 0 Line -7500403 true 150 0 150 300 line half true 0 Line -7500403 true 150 0 150 150 pentagon false 0 Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 person false 0 Circle -7500403 true true 110 5 80 Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 Rectangle -7500403 true true 127 79 172 94 Polygon -7500403 true true 195 90 240 150 225 180 165 105 Polygon -7500403 true true 105 90 60 150 75 180 135 105 plant false 0 Rectangle -7500403 true true 135 90 165 300 Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 sheep false 15 Circle -1 true true 203 65 88 Circle -1 true true 70 65 162 Circle -1 true true 150 105 120 Polygon -7500403 true false 218 120 240 165 255 165 278 120 Circle -7500403 true false 214 72 67 Rectangle -1 true true 164 223 179 298 Polygon -1 true true 45 285 30 285 30 240 15 195 45 210 Circle -1 true true 3 83 150 Rectangle -1 true true 65 221 80 296 Polygon -1 true true 195 285 210 285 210 240 240 210 195 210 Polygon -7500403 true false 276 85 285 105 302 99 294 83 Polygon -7500403 true false 219 85 210 105 193 99 201 83 square false 0 Rectangle -7500403 true true 30 30 270 270 square 2 false 0 Rectangle -7500403 true true 30 30 270 270 Rectangle -16777216 true false 60 60 240 240 star false 0 Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108 target false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 Circle -7500403 true true 60 60 180 Circle -16777216 true false 90 90 120 Circle -7500403 true true 120 120 60 tree false 0 Circle -7500403 true true 118 3 94 Rectangle -6459832 true false 120 195 180 300 Circle -7500403 true true 65 21 108 Circle -7500403 true true 116 41 127 Circle -7500403 true true 45 90 120 Circle -7500403 true true 104 74 152 triangle false 0 Polygon -7500403 true true 150 30 15 255 285 255 triangle 2 false 0 Polygon -7500403 true true 150 30 15 255 285 255 Polygon -16777216 true false 151 99 225 223 75 224 truck false 0 Rectangle -7500403 true true 4 45 195 187 Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 Rectangle -1 true false 195 60 195 105 Polygon -16777216 true false 238 112 252 141 219 141 218 112 Circle -16777216 true false 234 174 42 Rectangle -7500403 true true 181 185 214 194 Circle -16777216 true false 144 174 42 Circle -16777216 true false 24 174 42 Circle -7500403 false true 24 174 42 Circle -7500403 false true 144 174 42 Circle -7500403 false true 234 174 42 turtle true 0 Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 wheel false 0 Circle -7500403 true true 3 3 294 Circle -16777216 true false 30 30 240 Line -7500403 true 150 285 150 15 Line -7500403 true 15 150 285 150 Circle -7500403 true true 120 120 60 Line -7500403 true 216 40 79 269 Line -7500403 true 40 84 269 221 Line -7500403 true 40 216 269 79 Line -7500403 true 84 40 221 269 wolf false 0 Polygon -16777216 true false 253 133 245 131 245 133 Polygon -7500403 true true 2 194 13 197 30 191 38 193 38 205 20 226 20 257 27 265 38 266 40 260 31 253 31 230 60 206 68 198 75 209 66 228 65 243 82 261 84 268 100 267 103 261 77 239 79 231 100 207 98 196 119 201 143 202 160 195 166 210 172 213 173 238 167 251 160 248 154 265 169 264 178 247 186 240 198 260 200 271 217 271 219 262 207 258 195 230 192 198 210 184 227 164 242 144 259 145 284 151 277 141 293 140 299 134 297 127 273 119 270 105 Polygon -7500403 true true -1 195 14 180 36 166 40 153 53 140 82 131 134 133 159 126 188 115 227 108 236 102 238 98 268 86 269 92 281 87 269 103 269 113 x false 0 Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ NetLogo 6.0.4 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ setup if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain Pain-L Pain-R setup if file-at-end? [ file-close-all stop ] go TotInhibited SOMInhibited PKCInhibited setup if file-at-end? [ file-close-all stop ] go count links with [[Expression-Type] of end2 = "SOM"] count links with [[Expression-Type] of end2 = "PKC"] PKC-Average-OC SOM-Average-OC SOMInhibited PKCInhibited Pain setup if file-at-end? [ file-close-all stop ] go count links with [[Expression-Type] of end2 = "SOM"] count links with [[Expression-Type] of end2 = "PKC"] PKC-Average-OC SOM-Average-OC SOMInhibited PKCInhibited Pain setup export-world user-new-file if file-at-end? [ file-close-all stop ] go setup export-world user-new-file if file-at-end? [ file-close-all stop ] go setup if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go export-interface "June29-ALL-Yari.png" Pain setup if file-at-end? [ file-close-all stop ] go export-interface "June29-StN120-Yari.png" Pain setup if file-at-end? [ file-close-all stop ] go export-interface "June29-St220-Yari.png" Pain setup if file-at-end? [ file-close-all stop ] go export-interface "June29-StS120-Yari.png" Pain setup if file-at-end? [ file-close-all stop ] go export-interface "June29-ALL-50-50.png" Pain setup if file-at-end? [ file-close-all stop ] go export-interface "June29-C120-50-50.png" Pain setup if file-at-end? [ file-close-all stop ] go export-interface "June29-C220-50-50.png" Pain setup if file-at-end? [ file-close-all stop ] go export-interface "June29-STS120-50-50.png" Pain setup if file-at-end? [ file-close-all stop ] go export-interface "June29-STN120-50-50.png" Pain setup if file-at-end? [ file-close-all stop ] go export-interface "June29-ST220-50-50.png" Pain setup if file-at-end? [ file-close-all stop ] go export-interface "June29-C120-Yari.png" Pain setup if file-at-end? [ file-close-all stop ] go export-interface "June29-C220-Yari.png" Pain setup if file-at-end? [ file-close-all stop ] go export-interface "June16-ALL-Sah.png" Pain setup if file-at-end? [ file-close-all stop ] go export-interface "June16-C120-Sah.png" Pain setup if file-at-end? [ file-close-all stop ] go export-interface "June16-C220-Sah.png" Pain setup if file-at-end? [ file-close-all stop ] go export-interface "June16-STS120-Sah.png" Pain setup if file-at-end? [ file-close-all stop ] go export-interface "June16-STN120-Sah.png" Pain setup if file-at-end? [ file-close-all stop ] go export-interface "June16-ST220-Sah.png" Pain setup if file-at-end? [ file-close-all stop ] go SOMInhibited PKCInhibited setup if file-at-end? [ file-close-all stop ] go count links (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "PKC"])/(1) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "SOM"])/(1) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "Other"])/(1) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "SOM"])/(1) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "PKC"])/(1) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "Other"])/(1) PKC-Average-IC SOM-Average-IC PKC-Average-OC SOM-Average-OC SOMInhibited PKCInhibited Pain mean [Damage] of turtles with [Expression-Type != "Other"] setup if file-at-end? [ file-close-all stop ] go count links (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "PKC"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "SOM"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "Other"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "SOM"])/(count links with [[Expression-Type] of end1 = "SOM"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "PKC"])/(count links with [[Expression-Type] of end1 = "SOM"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "Other"])/(count links with [[Expression-Type] of end1 = "SOM"]) PKC-Average-IC SOM-Average-IC PKC-Average-OC SOM-Average-OC SOMInhibited PKCInhibited Pain setup if file-at-end? [ file-close-all stop ] go count links (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "PKC"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "SOM"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "Other"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "SOM"])/(count links with [[Expression-Type] of end1 = "SOM"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "PKC"])/(count links with [[Expression-Type] of end1 = "SOM"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "Other"])/(count links with [[Expression-Type] of end1 = "SOM"]) PKC-Average-IC SOM-Average-IC PKC-Average-OC SOM-Average-OC SOMInhibited PKCInhibited Pain setup if file-at-end? [ file-close-all stop ] go count links (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "PKC"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "SOM"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "Other"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "SOM"])/(count links with [[Expression-Type] of end1 = "SOM"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "PKC"])/(count links with [[Expression-Type] of end1 = "SOM"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "Other"])/(count links with [[Expression-Type] of end1 = "SOM"]) PKC-Average-IC SOM-Average-IC PKC-Average-OC SOM-Average-OC SOMInhibited PKCInhibited Pain setup if file-at-end? [ file-close-all stop ] go count links (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "PKC"])/(1) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "SOM"])/(1) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "Other"])/(1) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "SOM"])/(1) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "PKC"])/(1) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "Other"])/(1) PKC-Average-IC SOM-Average-IC PKC-Average-OC SOM-Average-OC SOMInhibited PKCInhibited Pain mean [Damage] of turtles with [Expression-Type != "Other"] setup if file-at-end? [ file-close-all stop ] go count links (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "PKC"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "SOM"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "Other"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "SOM"])/(count links with [[Expression-Type] of end1 = "SOM"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "PKC"])/(count links with [[Expression-Type] of end1 = "SOM"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "Other"])/(count links with [[Expression-Type] of end1 = "SOM"]) PKC-Average-IC SOM-Average-IC PKC-Average-OC SOM-Average-OC SOMInhibited PKCInhibited Pain mean [Damage] of turtles with [Expression-Type != "Other"] setup if file-at-end? [ file-close-all stop ] go count links (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "PKC"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "SOM"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "Other"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "SOM"])/(count links with [[Expression-Type] of end1 = "SOM"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "PKC"])/(count links with [[Expression-Type] of end1 = "SOM"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "Other"])/(count links with [[Expression-Type] of end1 = "SOM"]) PKC-Average-IC SOM-Average-IC PKC-Average-OC SOM-Average-OC SOMInhibited PKCInhibited Pain mean [Damage] of turtles with [Expression-Type != "Other"] setup if file-at-end? [ file-close-all stop ] go count links (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "PKC"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "SOM"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "Other"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "SOM"])/(count links with [[Expression-Type] of end1 = "SOM"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "PKC"])/(count links with [[Expression-Type] of end1 = "SOM"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "Other"])/(count links with [[Expression-Type] of end1 = "SOM"]) PKC-Average-IC SOM-Average-IC PKC-Average-OC SOM-Average-OC SOMInhibited PKCInhibited Pain mean [Damage] of turtles with [Expression-Type != "Other"] setup if file-at-end? [ file-close-all stop ] go Pain setup silent-all-PKC-L silent-all-PKC-R if file-at-end? [ file-close-all stop ] go Pain setup silent-all-SOM-L silent-all-SOM-R if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain setup silent-all-PKC-L silent-all-PKC-R if file-at-end? [ file-close-all stop ] go Pain setup silent-all-SOM-L silent-all-SOM-R if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain setup silent-all-PKC-L silent-all-PKC-R if file-at-end? [ file-close-all stop ] go Pain setup silent-all-SOM-L silent-all-SOM-R if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain mean [Damage] of turtles with [Expression-Type != "Other"] setup if file-at-end? [ file-close-all stop ] go Pain mean [Damage] of turtles with [Expression-Type != "Other"] setup if file-at-end? [ file-close-all stop ] go count links (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "PKC"])/(1) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "SOM"])/(1) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "Other"])/(1) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "SOM"])/(1) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "PKC"])/(1) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "Other"])/(1) PKC-Average-IC SOM-Average-IC PKC-Average-OC SOM-Average-OC SOMInhibited PKCInhibited Pain mean [Damage] of turtles with [Expression-Type != "Other"] setup if file-at-end? [ file-close-all stop ] go count links (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "PKC"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "SOM"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "Other"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "SOM"])/(count links with [[Expression-Type] of end1 = "SOM"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "PKC"])/(count links with [[Expression-Type] of end1 = "SOM"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "Other"])/(count links with [[Expression-Type] of end1 = "SOM"]) PKC-Average-IC SOM-Average-IC PKC-Average-OC SOM-Average-OC SOMInhibited PKCInhibited Pain mean [Damage] of turtles with [Expression-Type != "Other"] setup if file-at-end? [ file-close-all stop ] go count links (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "PKC"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "SOM"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "Other"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "SOM"])/(count links with [[Expression-Type] of end1 = "SOM"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "PKC"])/(count links with [[Expression-Type] of end1 = "SOM"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "Other"])/(count links with [[Expression-Type] of end1 = "SOM"]) PKC-Average-IC SOM-Average-IC PKC-Average-OC SOM-Average-OC SOMInhibited PKCInhibited Pain mean [Damage] of turtles with [Expression-Type != "Other"] setup if file-at-end? [ file-close-all stop ] go count links (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "PKC"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "SOM"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "PKC" and [Expression-Type] of end2 = "Other"])/(count links with [[Expression-Type] of end1 = "PKC"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "SOM"])/(count links with [[Expression-Type] of end1 = "SOM"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "PKC"])/(count links with [[Expression-Type] of end1 = "SOM"]) (count links with [[Expression-Type] of end1 = "SOM" and [Expression-Type] of end2 = "Other"])/(count links with [[Expression-Type] of end1 = "SOM"]) PKC-Average-IC SOM-Average-IC PKC-Average-OC SOM-Average-OC SOMInhibited PKCInhibited Pain mean [Damage] of turtles with [Expression-Type != "Other"] setup if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain setup if file-at-end? [ file-close-all stop ] go Pain @#$#@#$#@ @#$#@#$#@ default 0.0 -0.2 0 0.0 1.0 0.0 1 1.0 0.0 0.2 0 0.0 1.0 link direction true 0 Line -7500403 true 150 150 90 180 Line -7500403 true 150 150 210 180 invisible 0.0 -0.2 0 0.0 1.0 0.0 0 0.0 1.0 0.2 0 0.0 1.0 link direction true 0 @#$#@#$#@ 0 @#$#@#$#@