0
votes

I'm new at stackoverflow and I'm a basic AnyLogic user. I have 4 Agents (Product 1,2,3 and Raw Material). In my Assembler-Block 1 Product(Product 1,2 OR 3) (Input1) and 1 Raw Material (Input2) will be assembled. The Problem: My "New Agent" have to be the same Agent as the Agent Input1 was. schematic

For example, I have 1x Product2 and 1x Raw Material the "New Agent" of the Assembler have to be Product2. EDIT: The different Agents get an Id (example:Product1 --> agent.getId()==10)

I can imagine it is a very trivial problem, but I tried to solve it in many ways and couldn't handle it. I hope you can help me.

Thank you very much.

1
Are the 3 products different agent types or the same type? - Benjamin
The products are different agent types. There is an Agent type Product1,an Agent type Product2, an Agent typeProduct3 and an Agent type RawMaterial. - DonScholzer

1 Answers

0
votes

if your products are different agent types but the assembed agent should be the original product, you should not use Assemble but Pickup. Your products "pickup" 1 RawMaterial agent when they pass through but continue to be Product1, 2 or 3. If you RawMaterial is there, the products queue and wait until it becomes available.