I'm currently trying to build a dynamic process model. The model itself is going to look like this:

The agents get created by the source blocks for each point node and then move along the three paths until they meet on the center path. Example what I'm trying to do: Every path can be seen as a single production line. The finished products meet in the end, get checked and packed. It's not important what exactly happens with the agents. The visualization of the movement is important.
Problem: The model should be dynamic. The actual amount of needed sources, paths and conveyors is unknown until the simulation is started. There could be only one source needed or more than 25. The Agents of each source should take a different path.
I thought about creating (nearly) the complete process model in the "On startup:" window of the main class. I started by trying to "copy" an existing source block, but failed currently doing so.
com.anylogic.libraries.processmodeling.Source<Agent> source2 = new
com.anylogic.libraries.processmodeling.Source<Agent>( getEngine(), this, null);
source2 = instantiate_source_xjal();
setupParameters_source_xjal( source2 );
create_source_xjal( source2 );
Can someone point me to the right direction or is there maybe an easier way to do this?

