I have a large number of Agents defined in my model. They represent areas that have been defined as GISRegion map objects and are linked to the map objects by the “start in node” selector. Within a Java function within my AnyLogic Main agent, I am reading the list of agent names and their parameters from a csv text file. In previous models I have used this sort of config file to generate populations of agents. But, in this case, the agents are pre-defined and the names in the config file are used to link the parameters to the agent. I have found several Agent functions that will get agents based on proximity to locations or other agents. But, I have not found any way to get an agent by name. Is there a function that returns the Agent by name so I can set its starting parameter values? I was hoping for something like this:
String agentName = “AnAgentName”;
Agent theAgent = get_Main().getAgent(agentName);
where “AnAgentName” is the name of one of the existing agents.