*/
private InformationParameters getSorroundings(
Coordinate center,
int distance_sense) {
// TODO Optimization for this
InformationParameters information_paramaters = new InformationParametersHash();
List<Serializable> data_elements = new ArrayList<Serializable>();
//Sent all closer Elements in the map
for (Iterator<Element> iterator = elements.iterator(); iterator.hasNext();) {
Element element = iterator.next();
if (center.isClose(element.getCoordinate(), distance_sense)){
//information_paramaters.addParamData(Constants.SURROUND_PROPERTY, element);
}
}
//Sent all closer Agents in the map
for (Iterator<Agent> iterator = agents.iterator(); iterator.hasNext();) {
Agent agent = iterator.next();
if (center.isClose(agent.getCoordinate(), distance_sense)){
information_paramaters.addParamData(Constants.SURROUND_PROPERTY, agent);
}
}
//Add the array to the parameters object
information_paramaters.addArrayParamData(
Constants.SURROUND_PROPERTY,
data_elements);
return information_paramaters;
}