Wrong performances of the closest_to operator in Gama 1.7 (dev)
✓ Published0🌍 Public
RRCura
Last edited Oct 30, 2015
Created on Oct 30, 2015
This example benchmarks the performance of three different methods for finding the nearest neighbor among agents in the Gama 1.7 platform: the built-in `closest_to` operator, an optimized variant using `at_distance`, and a manual `minDistance` calculation via distance collection. It measures execution time across four population-size scenarios, from 100 to 10,000 calling and called agents, writing the results to the console. The code uses Gama’s agent-based modeling API, including `create`, `ask`, `machine_time`, and spatial queries like `closest_to` and `at_distance`. The visualization demonstrates how algorithmic choice and agent density affect computational performance.
AI-generated description