Search code examples
repast-simphony

Repast: how to get a particular agent set based on multiple conditions?


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])


Solution

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

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