Search code examples
anylogicagent

Anylogic: Make a source generate 3 different agents


I'm trying to make my source generate 3 different agents (3 different products basically - ProductA, ProductB, ProductC) based on a value read on an Excel file. How can I make the source generate 3 different types of Agents using the inject() function?

I tried several code combinations (inside or outside the source) but none is working.

Thank you in advance, Ale


Solution

  • You cannot and should not. Use 3 Source blocks instead, each creating a different type.

    You can easily send them into the same downstream flow chart blocks, if you like.