question

Unmesh T avatar image
0 Likes"
Unmesh T asked Raja Sekaran commented

Batch transfer and individual processing

I am trying to simulate the following system.

Source -> Queue1 -> Queue2 -> Processor -> Queue3, there is also an operator in this system.

The source creates a flowitem every 5 seconds which is released to Queue1. The operator is supposed to transfer a batch 20 flowitems from Queue1 to Queue2. After the batch is unloaded at Queue2, the operator is supposed to process 1 item at a time on the Processor. The process time is 5 seconds avg. with a std. dev. of 0.5 seconds. Once the operator finishes working on the 20th flowitem, he is supposed to check if Queue1 has 20 items. If yes, the process continues, if no, he waits untill there are 20 items in Queue1.

What is the best way to accomplish this? I have tried a few things but I dont seem to get the priorities right.

Thanks in advance.

FlexSim 18.1.1
process flowbatch transfertask preemption
· 4
5 |100000

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

tannerp avatar image tannerp commented ·

All of this can be modeled in Process Flow. If you'd like, I can make a demonstration model for you. Have you tried using Process Flow before?

1 Like 1 ·
Unmesh T avatar image Unmesh T tannerp commented ·

Hey Tanner,

Thanks for your response. I have used process flows for basic tasks. I am having trouble translating my requirements into the process flow logic/terminology, but if I see a process flow, i'll be able to understand it.

Thanks

0 Likes 0 ·
Emily Hardy avatar image Emily Hardy ♦ commented ·

Hi, @Unmesh T, did either of these answers help you?

1 Like 1 ·
Unmesh T avatar image Unmesh T Emily Hardy ♦ commented ·

Hi, @Emily Hardy, these answers were indeed very helpful. Thank You.

1 Like 1 ·
tannerp avatar image
2 Likes"
tannerp answered Raja Sekaran commented

Here is an example of how to do it in Process Flow. We recommend becoming familiar with Process Flow as this is the direction the software is heading in the future. This logic actually ended up challenging me a bit, so I understand your confusion.

Here's a few notes on what is going on in the logic:

1) The "Acquire Resource" is used to claim the Operator so that he cannot be acquired by another resource until after the entire process for the batch is finished. This simulates his availability.

2) As items arrive in the queues, they are pushed to a list. The token then pulls them from the list to be loaded and then unloaded to the next destination.

3) The "Assign Label" activity basically marks the token every time it goes through the load/unload process. This is like keeping a tally.

4) Finally, the "Decide" activity reads the label of the token to see if the batch (or tally) of 20 has been completed.

Hopefully it works. I've attached the model to this comment. Let me know if you have additional questions and I'd be happy to try and answer them.

batch-transfer-process.fsm


· 6
5 |100000

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

Unmesh T avatar image Unmesh T commented ·

Hey @Tanner Poulton,

Thanks for this answer. I tried to learn more about the process flows and how they can be used to control the simulation. The model you attached in your response makes the operator transfer 1 item at a time until 20 items are transferred, and then the operator processes one item at a time until the batch is finished. My requirement is that I need the operator to transfer 20 (or any preset absolute value) objects at a time and then process them one at a time. During this time, if there are more than 20 objects collected at the upstream queue (from which the operator picks up his batch of 20), I need the operator to transfer 20 objects only. Please see the attached model. I have used some of the concepts you used in your models and some other I found online / in the manual. I this that my solution is a workaround at best. for following reasons.

1) If i increase the capacity of 'queue1' to more than 40, the logic fails in the decide stage in the process loop

2) I need the operator to be able to transfer the batch to 'queue 2', and start picking up items from the same queue. I had to use 'queue 3' so that I could push the items to 'list2', and subsequently use the process loop as intended.

Is there way to correct this model and to potentially optimize it? and I may be asking for a lot here, but if you change/optimize/modify certain parts of the model, batch-transfer-trial-2.fsm ,can you also explain why you chose to make those specific changes.

Thanks,

Unmesh

0 Likes 0 ·
tannerp avatar image tannerp Unmesh T commented ·

@Unmesh T Is your attached model working as you want it to as long as there are less than 40 items in Queue1? I don't want to mess too much up if possible.

0 Likes 0 ·
Unmesh T avatar image Unmesh T commented ·

@Tanner Poulton, Yes. If the queue1 capacity is set at 40, the model works exactly as I want it to.

0 Likes 0 ·
Raja Sekaran avatar image Raja Sekaran Unmesh T commented ·

@Unmesh T

In the attached model, I have updated the logic in decide activity to send the token based on the current content in "Queue3", also added zone activity in transfer loop to control the task assignment. I hope this is what you are looking for. unmesh-support.fsm

1 Like 1 ·
unmesh-support.fsm (39.2 KiB)
Unmesh T avatar image Unmesh T commented ·

@Raja Sekaran Yes this is certainly a more refined version of what I was trying to accomplish. Is there a list of definitions of the various properties, e.g. the length of subnodes. I'd really appreciate it. Thanks

0 Likes 0 ·
Raja Sekaran avatar image Raja Sekaran Unmesh T commented ·

@Unmesh T Yes, you will get the definitions of the properties in the user manual under the following section. In version 18.1.2

Reference >> Coding in Flexsim >> Flexcript Class Reference

0 Likes 0 ·
Joerg Vogel avatar image
2 Likes"
Joerg Vogel answered
  • Queue releases 20 items in a batch of 20.
  • The operator loads 20 items.
  • The operator travels to the Queue2.
  • The operator unloads 20 items into the Queue2.
  • The Queue closes its input until the 20th item is processed.
  • The operator loads one item. It can be the last or first in the Queue2.
  • The operator travels to the Processor.
  • The operator unloads the item into the Processor.
  • The operator stays at the Processor while processing time lasts by a delay task or an utilize task.
  • The operator transport the next item and so on.
  • The processor finish processing the last item, the Queue2 is empty.
  • The input of the Queue2 opens.
  • The sequence starts again

This sequence is also possible in 3D only.

Edit: Hint: set the capacity of the Queue2 to 20. If you want to control strictly the Queue2, you can open and close the output of the Queue2 until the queue is full.

5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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