I'm pretty sure my whole approach is flawed, but I don't see how else to do this.
The attached is a very simplified version of what I'm trying to do. In the real problem, I have empty containers that enter a detached queue based on when they are retrieved from customers. I also have workers that need to select (through a fairly complicated process) which of these containers to batch together to enter a filling station. This selection process is complicated because it depends on filling material, pressure, volume, and safety stock of the sku (multiple skus can be combined in same batch provided filling material, pressure, and volume of container match).
Anyway, what I'm aiming for is
Create a batch
When the worker is idle, he will go to a node and search among empty containers in the detached queue to assemble a complete batch. If there aren't enough containers, the worker will wait, idle.
As empty containers arrive at the detached queue, they should trigger, somehow, the worker to try to create a batch again. There are new containers now, so maybe a batch is possible. (Preferably, since hundreds of containers could arrive at a time, this trigger would be for all the containers arriving at this specific time, not each container doing a separate trigger.)
With the batch, the worker should move to a server, seize it and wait while the containers are filled. Then move to a separator to separate out the batch, moving the containers to full inventory and the worker should go back to try to create another batch.
I'm stuck in a couple of places, specifically (so far) . . .
I can't seem to get the worker, once batched, to move to the filling station. In fact, the Move block in PickingStation_Entered doesn't even fire.
I can't figure out how to get the entity to trigger the worker to reevaluate the batching process. However I try this, the batching process is executed by either the entity's token or a model token. I can't see how to get the worker to be the executing token.
Any help or guidance would be appreciated.
Model.spfx