I'm simulating a production line in Anylogic. At the moment I have three equal parallel lines that produces my products, they are not necessarily producing the same model at the same time.
.
The last process, called "MFT" is supposed to have dynamic resource behaviour, in case of necessity. Each MFT has a resource pool (Machines_MFT_L1, _L2 and _L3) and its default value is 4 (I can only have 12 machines in total, summing up the machines in all resource pools). In case, for example, a machine in the MFT of line one breaks, and the priority of production of line 1 is greater than the other lines, one of the other lines should send a machine to the resource pool of line 1. So, line 1 will have 4 machines + 1 repairing and the other line will have only 3 resources. When the machine that was repairing is repaired, it should be sent to the line that lent the extra machine to line 1 (the aim is always to reach the default value = 4 machines per resource pool).
How can this be done? the " machine" (agent) of my resource pools is called "jigs" and it's the same for the three pools.