1

There is an answer about how to get the desired agent set with only one condition: Repast: how to get a particular agent set based on the specific conditions?

How does such thing work for multiple conditions? (e.g. ask rich_people with [wealth > 100000 and age <= 50 and sex = male])

Jack
  • 1,339
  • 1
  • 12
  • 31

1 Answers1

4

You can compose Queries with the AndQuery and the OrQuery. See,

https://repast.github.io/docs/api/repast_simphony/repast/simphony/query/AndQuery.html

Nick Collier
  • 1,786
  • 9
  • 10
  • AndQery only return an iterable over the objects in the intersection of the "two" queries. What if there is more than two conditions to consider? – Jack May 01 '20 at 19:19