I'll give you a brief description of my model:
turtles can be red or green, omnivores and vegetarian respectively
two markets (blue squares): meat and substitutes (products that can be consumed instead of meat) market
When I run the model I would like that turtles start to buy meat or substitutes (only when they are in one of the two markets and based on the market they are in), if they are vegetarian and buy meat turn red while if they stop buying meat and buy only substitutes turn them green (after a certain amount of ticks, which I did not decide yet, they can be considered vegetarian).
to go
move-turtles
market
tick
end
to market
ask turtles
[ ifelse pcolor = blue
[buy]
[right random 360 forward 1]
]
end
to buy
if market-patches [set money money - Meat-Price]
if market-patches1 [set money money - Substitutes-Price]
if money = 0 [stop]
end
I do not understand why when I try to run the model it gives me this error back, and I'm sure the error is contained in the last 3 ifs statements:
IF expected input to be a TRUE/FALSE but got the patch (patch 12 11) instead.
Also if you can help me to structure the go procedure I will be eternally grateful.