

#Anylogic if type code
Later, you can just check if the connected docs are completed in order to join them in an article again. Anylogic is written in Java and turns models into Java AnyLogic offers lots of ways to insert snippets (hooks) of Java code You will need these if you want to e.g. I don't know if your original agent has to be connected, but you would follow the same principle to do that. Read more on link to agents on the help documentation if you don't know what that is.Īt the end of the service block, on the on exit action, you can do the following: Document1 doc1=add_Document1()

On each one of the agent types, you will add a link to agents in order to be able to connect the documents to each other.

I will assume your documents correspond to 2 different agent types called Document1 and Document2 Then after, when the documents are processed you can check for which ones have the same id to merge them into an article.īut if you want to get more complicated, there's also the following option:Ĭreate 2 enter blocks (enter1 and enter2), one for each document. maybe each original agent has an id and the copies in the split block will have something like Then after, when the documents are processed you can check for which ones have the same id to merge. maybe each original agent has an id and the copies in the split block will have something like agent.id=original.id You can use 2 split blocks to generate 2 independent documents and connect them through a variable or link to agents. You can use 2 split blocks to generate 2 independent documents and connect them through a variable or link to agents.
