Nearest neighbor

View: New views
2 Messages — Rating Filter:   Alert me  

Nearest neighbor

by Russell Lawrence :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello All

Is there a way in the AE palette to add code for finding an agent's nearest neighbor? I am working with the same model of Farmers (producers) and Elevators (distributors), except now each Farmer is trying to find the Elevator closest to itself. Can an agent measure it's distance to another agent of a different class and then loop over those distances to find the minimum? I see there are methods listed in Java from 2007 in this forum, but I'm not sure how to convert that into code to be used in the AE.

Thanks

Russell

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Repast-interest mailing list
Repast-interest@...
https://lists.sourceforge.net/lists/listinfo/repast-interest

Parent Message unknown Re: Nearest neighbor

by Russell Lawrence :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

To perhaps speed up the reply, here is a link to the post I am referring to:

http://old.nabble.com/Re%3A-on-grandfather-td9747102.html#a9767931

Russell


On 11/10/09 6:41 PM, Russell Lawrence wrote:

> Hello All
>
> Is there a way in the AE palette to add code for finding an agent's nearest neighbor? I am working with the same model of Farmers (producers) and Elevators (distributors), except now each Farmer is trying to find the Elevator closest to itself. Can an agent measure it's distance to another agent of a different class and then loop over those distances to find the minimum? I see there are methods listed in Java from 2007 in this forum, but I'm not sure how to convert that into code to be used in the AE.
>
> Thanks
>
> Russell
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Repast-interest mailing list
> Repast-interest@...
> https://lists.sourceforge.net/lists/listinfo/repast-interest


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Repast-interest mailing list
Repast-interest@...
https://lists.sourceforge.net/lists/listinfo/repast-interest