Jump to content

Entity triggering worker process


barbiers
 Share

Recommended Posts

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

  1. Create a batch
    1. 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.
    2. 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.)
  2. 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) . . .

  1. 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.
  2. 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

Link to comment
Share on other sites

It seems that you can employ the same logic by using combiner (named picking) and seperator (name it as filling, I have forgotten) objects from standard library. This simplifies your model development efforts. Since using a different version I can not save the model I developed. But, attached some screenshots as a guidline. 

model(1) facility view_processes.PNG

model(1) facility view_picking_outputNode.PNG

model(1) facility view_picking.PNG

Link to comment
Share on other sites

Note: set selection weight of the path's (from source to picking object's parent input node) selection weight property as modelentity.ParentTrue==True and the path's (from source to picking object's member input node) selection weight property as modelentity.ParentTrue==False.

Link to comment
Share on other sites

Thank you gocken. This is so helpful. It makes things much simpler.

I created an example with an entity which uses the worker as a transporter to go to the parent node at the combiner. the batch is created and they move on together. This seems to work well. But, I need to be able to perform the batch selection in a process. This is where things keep falling apart for me.

I made the combiner match on member and parent, giving the entities a state variable set to True if those items were to be batched. I want to set this in an add-on process.

Further, I need to be able to trigger this process when either a parent or a member entity enter their input buffers. I have an example attached that uses the add-on process. Once the parent enters the input buffer, the parent can choose what to batch. The batched items move on to server1 and the separator. Then, the worker (entity and transport) return to parent input of combiner, but it's empty. The unbatched entity goes to server2 (just to ensure it arrives after the parent). I thought it would leave server2 and trigger an add-on process on arriving at the member input node, but the add-on process is triggered when still at the server2 output node. So, in the add-on process, I transfer the parent to the parent input node (just to get the parent to kick off its own add-on process, but it doesn't know where to search for the member entity because it's still at server2.

 

How do I get a process to fire to determine what to batch whenever either a parent or a member arrives?

using combiner.spfx

Link to comment
Share on other sites

1) The model seems working as you intended. The animation seems the logic is not working but in fact the animation is delayed (in the animation the modelentity is at output node of server2 i.e., seems behind the scheule but if you examine trace window the modelentity is just at combiner memberinput buffer.) 

2) I think the process logics are not required if you will not use them for further modeling purposes. I mean If you set appropriate parent match expression and member match expression at combiner1 object, the object itself will combine them automatically (it will perform all the operations you performed in your processes). Try not to use them?

Edited by gocken
Link to comment
Share on other sites

I will try to use the match expressions to determine which containers to batch. It would make things simpler. In the meantime, I discovered I could insert an extra server with 0 processing time just to store the worker and trigger the processing. Then, if a member entity is ready to batch, the worker can perform the batch. If there is no member entity yet, the worker waits in the output buffer and then when the member entity arrives at his detached queue (I needed to add that back in for this to work) it transfers the worker back to the input of this server so the worker can execute the batching logic again.

Then, the parent and members arrive together at the combiner and they're ready to be combined.

Again, I'll try again to use the match expressions, but if I can't figure that out, this should suffice.

 

thank you very much for your help.

 

using combiner.spfx

Link to comment
Share on other sites

These are extra works. Note that in the last figure we seize the worker as the secondary resource before processing. This is enough for your purposes. Thus, the processes you defined are not necessary for now. Defining a worker as a secondary resource before processing means that whenever a batching process is to be done a worker is required for this to happen (The worker will be seized before the processing for executing the batching.), i.e., if the worker is not available the batching can not begin. 

Edited by gocken
Link to comment
Share on other sites

My main difficulty at the moment is the batching logic. How to simplify it to use the matching expressions instead of an add-on process. In real-life, the worker needs to decide

  1. which filling station to batch for - each one puts a different material in the containers. the worker stays at the filling station until the containers in the batch are full.
  2. which family of skus to create a batch for, based on pressure and volume
  3. which individual skus and how many of each to put in the batch. currently there are upwards of 30 different skus that can go in a batch. a batch is around 40 members. all the members can be from the same sku or it can be all mixed up (so long as volume and pressure of all members of the batch are the same). which skus and how many of each depends on full inventory for the sku, forecasted demand for each sku, and service level goals that can differ by sku class. This is pretty much a production scheduling problem. I'm not saying it can't be done with matching expressions, I just don't (yet) see how it could be done with single expressions.

Really, though, that's ok. I have a way to do this now, even with add-on processes. it may not be most efficient, but a few days ago, nothing was working. I can't tell you how much I appreciate your help.

Link to comment
Share on other sites

×
×
  • Create New...