我将这一变量称为flip-rate
。
globals [
magnetization
]
turtles-own [
opinion
flip-rate
temp-opinion
]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;; AGENT INITIALIZATION ;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
to initialize-hvm ;; turtle procedure
ask turtles [
set opinion one-of n-values number-states [ ?1 -> ?1 ]
recolor
set flip-rate random-float 1
]
set-magnetization
end
instead of having this flip-rate variable set as a random value in agent initialization, how do I set with a slider on the interface section?
I tried moving the flip-rate variable to
globals
but when I try to create a slider with the same name, I get an error saying "There is already a global variable called FLIP-RATE".