I am trying to generate resourcepool agents with parameters read from the database. So first thing I did I connected the Database with my resourcepool agent population, see image
Next in resourcepool (Team) block, I added the new units to my population teammembers
But since, I am adding new populations to my custom population the generated resourcepool agents just adds to the population. All I need is to use the five agents read from database with their parameters in the resourcepool. How to do this?
I found a temporary solution, I used an event function to set the parameters of the population after they are generated. But still, I want to generate the parameter values at the model creation time.
ResourcePools work like that: you typically only define the number of resources.
To assign them specific param values directly, use the "on new unit" code as below. It is called for each new unit created.
So if you have an initial pool size of 5, add a little counter variable to keep track of which unit you already assigned param values: