question

Paúl Alejandro R avatar image
0 Likes"
Paúl Alejandro R asked Paúl Alejandro R commented

Close and open ports problems

Hello, I need help with the following.

In the attached model I have 5 items which are combined with some complements. The combination items+complements have an item type and a label (WIP): 0111, 0112, 0113, 0114, 0115, respectively. These products could be processed in 5 processors (1-5). Processor 1 processes products with the following itemtypes 0111 and 0115, and the other four processors can process all items (0111 - 0115). Processor 1, Processor 4 and Processor 5 work in batches, with a minimun capacity of 20 items and a maximun capacity of 30 items. Processor 2 and Processor 3 have a minimun capacity of 5 items and a maximun capacity of 10 items. For this reason I sent messages in queues 1, 2 and 3 to closeoutput and openoutput.

1.- I need processor only process a batch of the same items at a time. It means no other batch of items can enter to the processor until the previous batch finish to be process, so in Processors 4 and 5 I sent messages to stopinput and openinput, but once the input close it does not open again. How I can resolve this problem?

2.- I am using a operator to move items from Queues 2, 3 and 4 to Processors. The operator have a capacity of 30 units. Is it possible that the operator load an specif type of items each time?; because in the model it load different itemtypes until complety his maximun capacity. If there are 3o units of the same type the operator should load all of them, but if there are less than 30 it only should take that quantity.

3.- Items which enter to Queues 3 and 4 can be process in Processors 2, 3, 4 or 5. However, there is an issue in the way Flexsim in processing a bunch of items. For instance, if there are 45 items with an itemtype 0111, Flexsim is taken 30 units to process in Processor 2 and the 15 remaining items are waiting to complete a new batch of at least 20 item; however, I would want that Flexsim to divide 25 to be processor in Processor 2 and 20 in Processor 3 to avoid to have death time in processors. Is there any way to achieve this behavior?

model-example-pf.fsm

FlexSim 18.1.1
operatorclose and open ports
· 8
5 |100000

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

Joshua S avatar image Joshua S ♦ commented ·

1- when the messages are sent, looks like they are processed right before the item is fully recognized as leaving the processor, so it doesn't meet the requirement for content=0 for the port to open up again.

Only ways I can think to control the batching of both the operator and the queues to a specific amount based on availability of certain items are through process flow and through change=ing the capacity size of the operator dynamically so it doesn't go pick up more. You can change the operators capacity using the following code.

getvarnode(so,"maxcontent").value
0 Likes 0 ·
Paúl Alejandro R avatar image Paúl Alejandro R Joshua S ♦ commented ·

Thank you @Joshua S for your answer.

Could you tell me if there is another way to write the messages to open the input again?. Question No. 2 is the less important, but I really need to resolve problems from questions 1 and 3.

0 Likes 0 ·
Joshua S avatar image Joshua S ♦ Paúl Alejandro R commented ·

If you set the statement to content=1, it should open the input port right after the last item leaves. For the 3rd question, this would require some custom coding because it would need to check if the queue contains a certain amount, then change the batch size based on that number, especially if you want to start splitting up batches almost in half. One way in which you could solve both question 2 and 3 is by using pushing everything in queues 2-4 to a list and having process flow take control. In process flow you could have a code right before the pull from list activity that determines if it takes a full 30 batch, or splits it into 2 chunks. Using process flow would also give you control of the batches the operator would pick up because it would only move those items it just pulled from the list based on a specific label.

0 Likes 0 ·
Jeff Nordgren avatar image Jeff Nordgren commented ·
@Paúl Alejandro R

I've modified your model to do a lot of the things that you mention. Not sure if it will do all of them though because I'm not sure I understand all of what you are wanting. Take a look at the attached model and see if it is doing what you want it to do and what else needs to be done.

Thanks.

model-example-pf-jn2.fsm

0 Likes 0 ·
Jeff Nordgren avatar image Jeff Nordgren Jeff Nordgren commented ·
@Paúl Alejandro R

Did this help with the problem you were having?

0 Likes 0 ·
Paúl Alejandro R avatar image Paúl Alejandro R Jeff Nordgren commented ·

@Jeff Nordgren

Hello Jeff, thank you for your time. I was probing the solution sent by you. It had captured pretty well what I need. However, there are some issues that I am going to explain you with the attached PDF file.

The machines I am trying to modeling with Flexsim only work when a quantity of items have been loaded between the minimun and maximum capacity. Otherwise, the machines could suffer damage. Once the machines have been loaded with a quantity of items between the min and max capacity, they are closed and only are opened again to unload the items after the processing time has been concluded. The load and unload actions are represented by the Setup times I configured in each processor, so it is no possible that a setup time occures when the process starts.

The solution sent by you, works well allowing that only a same-type-of-items batch enters to the processors, and it achieves that the operator takes only one type of item.

However, I could see that not always the processors are loaded with a quantity of items higher than the minimun capacity. Also, I am not sure if processors are processind only a batch of items at a time.

Please review the attached file because there I have attached some explanations and screen captures of what I saw when I probed the model.

This new Flexsim file, use the solution sent by you, I only made some changes in the minimun and maximun capacities of the batches:

Procesors 1, 4,5: minimun capacity = 450 units and maximun capacity = 900 units.

Processors 2 and 3: minimun capacity = 85 units and maximun capacity = 170 units.

Finally I do not undestand why some items are stuck and the model stops.

explanation-and-screncaptures.pdf

model-example-pf-2.fsm

0 Likes 0 ·
Show more comments
Show more comments

1 Answer

·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Paúl Alejandro R commented

I don't think this should be an accepted answer. Here are some remarks.

The different batch conditions should you solve inside of queues. Queues can batch items better than a processor, because a processor is going to work when there is something to do. It gets difficult to stop a processor and allow entering products. (1)

You can control the capacity of the processor directly or you close their input, if you don't expect any more items entering the processor.

The item distribution conditions matches with a combination of Send To Port first available and Pull Requirement in the processors. The two processors which are allowed to process only 0111 and 0115 using the Pull option on the Flow tab in their properties. You set a logical expression that compares the item type to be equal to 0111 or 0115 in the Pull Requirement.

The standard sending and receiving procedure has got a priority mechanism. The standard is set to push items. But if a next object is set to pull items the standard push procedure is set to a lower priority. The outgoing item is tested to be pulled first. After that the item is pushed to the output ports still available to receive items, if the item is still available to be sent.

· 2
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·

(1) you can control the processing start with ProcessFlow. A different approach is the use of an operator for setup and/or processing. If you want to start the processing of all items simultaneously in a processor even if the items gets there at different times you use an operator. You must give the operator some task to do until the last item of your batch has entered the processor. Then you can allow the operator to assist the processor by the setup and/or process.

I think there are two possible tasks an operator can be hold in an activity until you need him.

  1. You put the operator to execute a utilize task and if you need him you free the operator.
  2. The other approach gives the operator a very long delay task that you preempt if you need the operator.
0 Likes 0 ·
Paúl Alejandro R avatar image Paúl Alejandro R commented ·

@Jörg Vogel

Thank you for your answer. I tried to use queues to control de batch function on processors, but I was not able to make that works because a unique queue is feeding 5 processors with diferent min and max capacities.

On the other hand,considering the first model sent in this post (model-example-pf.fsm) I was using "send messages" to open and close the output but when it closed never opened again. Also, Flexsim divided the bunch of items with the same label between queues (2,3 and 4), so sometimes there were no enough items to complete the min capacity. When I used "match item types" in the output of queue 1, despite another processor was idle the items always entered to the same queue so it had to wait a long time to be processed.

If you could explain to me a little more how to use queues to achieve my goal, I really want to learn.

0 Likes 0 ·

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.