I have developed a model that uses four agent types with state-chart and discrete events models simulating a team working behaviour. As a logical step, I started by adding graphs and other analysis elements to observe the behaviour of each agent model. Since the graphs are shown at the upper agent, I was ok with that. Those four agents are “controlled” with four parameters, and I’m interested in using two or three of them in a range for the simulation experiments. The fourth one must be a fixed parameter by the moment. However, the setup of the optimization and calibration experiments, requires the datasets in the main agent and not in the agent type,accordingly with the Anylogic and Nathaniel Osgood’s video tutorials. I have noticed that the optimization experiment video tutorial uses a “function” to summarize all the “outputs” in the Oil terminal example. Those “outputs” are collecting information from other “functions” but everything is allocated in the main agent. My question is: What kind of utility, element, block, or code do I need to pull the data stored in agent type datasets to the main agent to be used to set up the experiments?
What kind of utility, element, block, or code do I need to pull the data stored in agent type datasets to the main agent to be used to set up the experiments?
None. You use Java code. If you have an agent population in main
called myAgents
and you want the dataset in it for the 3rd in that population, you can always access it with main.myAgents.get(2).myDataset
.
But it absolutely depends on where you write that code and what your model structure actually looks like. You need to understand some basic Java principles, check the AnyLogic help for more info.