2

I have 8 different breeds in my model. Some of them share similar traits. Anyway, lets suppose that my breeds are

breed [ humans human ]
breed [ dogs dog ]
breed [ cats cat ]
breed [ horses horse ]
breed [ elephants elephant ]
breed [ mouses mouse ]
breed [ monkeys monkey ]
breed [ birds bird ]

My question is how to ask for example everyone except birds. I don't want to ask each breed individually. I know that when you want to ask every breed than you go with ask turtles.

desertnaut
  • 57,590
  • 26
  • 140
  • 166
Anajlim
  • 71
  • 6

2 Answers2

5

You will want some combination of turtle-set and member? primitives. For example, let wanted (turtle-set humans horses mouses) will get an agentset named 'wanted' with all the humans, horses and mouses. For your specific example, let wanted turtles with [not member? self birds] will get all the turtles except birds.

JenB
  • 17,620
  • 2
  • 17
  • 45
4

Don't forget that turtles have a built-in variable breed (look it up). All you need is ask turtles with [breed != birds]

Seth Tisue
  • 29,985
  • 11
  • 82
  • 149
Steve Railsback
  • 1,251
  • 6
  • 7