We are using NetLogo for a simple infection. As a modell we use an imported gephi file. For our purpose we have to start the infection from the same turtle (meaning the one with the same specific label) for several times. In our code we have tried using the "who" number to make sure of that, but as soon as we setup, this number changes. So my question is: Is there the possibility to instead of the who number use the turtle's label in the code?
So far we have been using this code
extensions [nw]
globals
[
num-informed
informed-size
]
turtles-own
[
informed?
]
to setup
clear-all
nw:load-graphml "jk.graphml"
ask turtles [ set size 1.5 ]
layout-radial turtles links turtle 61
ask turtles [set color red]
ask turtles [set shape "dot"]
ask links [set color grey + 1.5]
ask patches [set pcolor white]
ask turtles [set label-color black]
ask turtles [set informed? false]
ask turtle 72
[
set informed? true
set color green
]
set num-informed 1
set informed-size 2
reset-ticks
nw:save-graphml "jk1.graphml"
end
to spread
if (count turtles with [informed? = true] > .9 * count turtles) [stop]
ask turtles with [ informed? = true ]
[
ask link-neighbors with [not informed?]
[
if (random-float 1 <= 0.02)
[
set informed? true
show-turtle
set color green
]
]
]
set num-informed count turtles with [informed? = true]
tick
end
Thank you so much!