I have a reporter that works fine when I run it but mistakingly when I add a condition to it.
All my turtles have two three dimensional vectors called var_a
and var_b
. When I run this for my whole world there's no problem:
to-report turtle-bounds [p]
let p-lower (([item 0 var_a] of p) - ([item 0 var_b] of p))
let p-upper (([item 0 var_a] of p) + ([item 0 var_b] of p))
let bounds list p-lower p-upper
report bounds
end
But when I run it with a condition,
to condition
let p1 turtles with-max [item 0 var_a]
turtle-bounds p1
end
I get the following:
- expected input to be a number but got the list [0.9967359117803329] instead.
Which is referencing a value of var_a, meaning that my restriction somehow makes the [item 0 var_a] of p
give a list instead of a number.
Any thoughts?