I have a basic question. I am making a conditional statement, saying that if any value in the list (list_N_COVID19_p) exceeds a certain value (let's say 1), then a variable that a turtle has would be increased.
The problem is that "one-of" option search for just a random one member of the list, but in my case, it should be indeed "any one of".
"any?" can be used but what I have is a list, not a agent set.
None of the below code works. Could anyone help?
ask turtles [
ask patches with [centroid? = true and DONG_ID = m] [
show list_N_COVID19_p
if any? (patches with ([ list_N_COVID19_p ] > 1) )
[
ask myself [
set SALE_AMNT (SALE_AMNT * 2)
]
]
]
]
ask turtles [
ask patches with [centroid? = true and DONG_ID = m] [
show list_N_COVID19_p
ifelse ( (one-of list_N_COVID19_p) > 1 )
[
ask myself [
set SALE_AMNT (SALE_AMNT * 2)
]
]
[
ask myself [
set SALE_AMNT SALE_AMNT
]
]