question

Qiu J avatar image
1 Like"
Qiu J asked Qiu J commented

Batch processing using process flow.

Hello everyone,

I have just started my journey on Flexsim so I'm still an amateur.

I want to built a model and use process flow to control batch processing, below it's a image of my model.

The sequence is the following:

  1. A batch of x number of boxes will arrive to Queue1
  2. Operator1 will load up those boxes at once
  3. Operator1 unloads all the boxes on Queue2
  4. Then Operator1 picks 1 box from Queue2 and process it in the Processor1
  5. When finished Operator will pick another box from Queue2 and process it in the Processor1
  6. When all boxes from the batch has been processed in the Processor1 Operator1 loads all the boxes from Queue3 and unloads them on Queue4
  7. Then repeat steps 4 and 5 for Queue4 and Processor2.
  8. After finishing Operator 1 goes back to Queue1 as does the sequence again with the second batch.


After browsing in the forum I could make the Operator1 Load multiple boxe at once, but I'm having difficulties in making the operator doing the tasks described in steps 4 to 7 in the process flow. Below I attach an image of my process flow.

I have created a sub flow to do the task but is not working as I wanted.

Hope someone can give me some insight on how to make this.

Attached is my model.

Thanks in advance.

Teste_batch_1.fsm

FlexSim 20.0.3
process flowbatch processingflexsim 20.0.3
capture.png (74.5 KiB)
capture.png (39.7 KiB)
teste-batch-1.fsm (63.6 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

tannerp avatar image
0 Likes"
tannerp answered Qiu J commented

@Qiu J,

I think you're on the right track with what you're doing. I did make a couple changes in your Process Flow that simplify it. I hope you don't mind. Basically, Queue1 and Queue3 are where the initial "batching" occurs. When 5 items arrive in either of these queues, there are 5 tokens that are aggregated into one and go on to acquire an operator. Then the token runs one sub-flow to move the items at the same time from Queue1 to Queue2 and then another sub-flow that moves items one at a time from Queue2 to Processor1 (or Queue3, Queue4, and Processor2). Hopefully this helps. Let me know if you have any questions or if the behavior wasn't correct.

Also, as a tip for working with this Process Flow, you can use a Global Table value to handle the batch number and the number of tokens that run in the sub flows. Then, when you change the Global Table value, the Process Flow will continue to work properly. It makes this type of model dynamic.

Here's the model: batch processing.fsm


· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Qiu J avatar image Qiu J commented ·

@tanner.p

Thanks for your help and the corrections you have made in the process flow, it's more compact and looks more appealing. This shows the difference on how a professional (your case) and a newbie (my case) tackles the same problem.

There is just a small detail in the sequence of tasks that is not what I want.

What I want is as follow:

  1. Operator1 Loads the 1st batch from Queue1
  2. Operator1 Unload the batch into Queue2
  3. Operator1 moves the boxes one-by-one into Processor1
  4. Operator1 goes to Queue3 and loads all the boxes
  5. Operator1 Unloads all the boxes into Queue4
  6. Operator1 moves the boxes one-by-one into Processor2
  7. Only when all boxes reach Queue5 Operator1 can go back to Queue1 and load the second batch.

Hope I was clear enough with the description.

Thanks in advance.

0 Likes 0 ·
tannerp avatar image tannerp Qiu J commented ·

Thanks for the detailed explanation. And as a side note, there were a lot of great things going on in your model, especially the Decide loops, that are innovative and useful tools. I don't want you to think that my version is better, because functionality issues may arise as the logic and process change. It's just more concise.

Because the acquired operator must take items all the way from Queue1 to Queue5 before he's released, I recommend listening only to Queue1 in the Event-Triggered Source and then looping the token created at the beginning through each of the sub flows twice. The "Assign Labels" and "Wait for Event" activities handle this. The token is sent back around if the Decide activity sees that the "token.Cabo" label is still referencing Queue1, which indicates it the items haven't been through Queue3 yet.

Again, this is only one way to do it, but I found this was the easiest modification. You could also add in two additional sub flows that move the items from Queue3 to Queue4 and Queue4 to Processor2, but I felt like that was redundant. Hope this helps.

Here's the model: batch-processing_1.fsm

0 Likes 0 ·
Qiu J avatar image Qiu J tannerp commented ·

Once again thank you for the help.

I am curious about the second alternative you have proposed (adding 2 additional sub flows) Could you also provide that solution?


0 Likes 0 ·