How to duplicate a population of agents

774 views Asked by At

I have got a population of agents named as customers and a number of variables, parameters, and statecharts are defined for them. Then I created a second population of agents. They should include everything that I defined for customers and a few more. I tried copying everything in the customer graphical view page and pasting them into the new agents' page, but it does not work. How can I do that?

Thank you

1

There are 1 answers

0
Benjamin On

I assume you want to actually copy your agent-type, add some more variables... and create a population off that new type, correct?

In that case, you need to copy the actual agent-type in the "Projects" window. Right-click the customers agent-type, then "copy.

Now, right-click on the top-level model-object (named like your model) and right-click it. It will allow you to "paste" now. You will have an agent-type "customers" and "customers1" now.

PS: if you have similar agent types that share properties, you should actually use "inheritance" (a Java core functionality that can be used powerfully in AnyLogic).