Querying agents based on a location with limit

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Querying agents based on a location with limit

Jonas Andersen
Hi,

I need to find a number of agents closest to a specific location in a continuous space or alternatively grid (based on radius from a given point).
Is there already an existing query in the framework or perhaps an example of something similar? Or any recommendation for implementing such a query?

For example at tick 100, I want to select the 10 agents closest to the center of the space / grid.

Best regards,

Jonas Andersen


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Querying agents based on a location with limit

srcnick
There are the GridWithin and ContinuousWithin queries that should do what you want.


The ContinuousWithin can be slow, but may be OK depending on the number of agents and often its called.

Nick

On Nov 7, 2016, at 4:18 PM, Jonas Andersen <[hidden email]> wrote:

Hi,

I need to find a number of agents closest to a specific location in a continuous space or alternatively grid (based on radius from a given point).
Is there already an existing query in the framework or perhaps an example of something similar? Or any recommendation for implementing such a query?

For example at tick 100, I want to select the 10 agents closest to the center of the space / grid.

Best regards,

Jonas Andersen

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Loading...