question

joey avatar image
0 Likes"
joey asked Ben Wilson commented

How do I send items to every queue?

Hello everyone. I have a model that I want to fix. But i can't fix it So i need help. I have 3 types of item.I want to send items from (Source1) to (Queue) in the manner shown in the picture.

I have set the "Send to port" of Source1 to be. By Expression " which results in queue 4,5 No item entry. How do I get items to be sent to every queue? The condition is that each type of item will not mix.

And would it be possible to use only 3D simulations?

This is the model I am building.joey00.fsm

Thank you for your help in advance.

FlexSim 17.0.13
queuesourcesend to portflexsim 17.0.13
1.png (88.9 KiB)
joey00.fsm (18.6 KiB)
joey00.fsm (18.6 KiB)
· 5
5 |100000

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

Mischa Spelt avatar image Mischa Spelt commented ·

@Dev, I was writing an answer suggesting the use of "Matching Item Labels", but it turns out that doesn't take transports underway into account. (I tried to upload the model, and got "denied", but it was just Joey's model with the Send To Port changed).

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Mischa Spelt commented ·

@mischa.spelt, that is a typical runtime problem. Label data is available after an item has entered its destination. A designer has to implement a strategy to control future events. There are circumstances which can delay items on transport like a crash, a down time or a blocked object. Then a special strategy might consider this and choose a different destination. I don’t think it is a development issue, instead it is an issue of individual design in a model. I would look at the destination queues as resources in a model. And I have to manage those resources.

0 Likes 0 ·
joey avatar image joey Mischa Spelt commented ·

Hi @mischa.spelt I don't understand what you are describing. Please explain more or attach a picture for me to understand. Thank you for answering my question. Thank you very much

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Mischa Spelt commented ·

@mischa.spelt, if you get the error "denied" when you upload some file, then try it instantly again. I got those errors sometimes, too.

0 Likes 0 ·
Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @joey.s, was joerg.vogel's or leungch's answer helpful? If so, please click the red "Accept" button on one of their answers. Or if you still have questions, add a comment and we'll continue the conversation.

0 Likes 0 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel edited

picklist option "matching item type" is the base of an adjusted source code in the Send to Port Function of the queue.

You must take also into account the items already in transit to the queues or from them away. The classic option "matching item types" checks the last items' type in a receiving object. But you need to store this type already for the items in transit. Thus you change a label value in the receiving object and you compare the label value of the object instead of the item.

Very important is the variable "nroftransportsin", because this value tells you if a queue is already receiving an item, but it hasn't arrived yet.

My model controls the sending of items in function "Send to Port". But there are some additional triggers involved to empty the queues if the last queue receives an item.

The model is of version 17.0. This means there is still the attribute itemtype available. In later versions this attribute is replaced by a simple label called "Type". Then you must replace the function getitemtype(item) by item.Type

matching_item_type_in_transit.fsm


5 |100000

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

CH L avatar image
0 Likes"
CH L answered CH L commented

If you really want to send only 3 types of item to 5 output ports and the items would not be mixed, the most easy way is adding 2 more sources. Source 1 ~ 3 create item type 1 ~ 3 respectively and they are connected to different queues.

For example:

Source 1 are connected to queue 1 & 2.

Source 2 are connected to queue 3 & 4

Source 5 is only connected to queue 5.

Select "round robin" for "send to port"



1598344960385.png (97.5 KiB)
1598345019115.png (10.1 KiB)
· 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.

joey avatar image joey commented ·

Hi @leungch I thank you for answering questions. If I add a Source and make a queue connection as instructed. It will define the item position of the queue. Which I want the item to be able to swap the position of the queue. What I want to know is whether I can create these logic within 3D? Thanks.

0 Likes 0 ·
CH L avatar image CH L joey commented ·

If source code or process flow is not used, I can only build a model similar to what you want (but not exactly).

1. Add a global table (Output_Port) in which the rows and columns are item type and output port number of source respectively.

2. Add a label (item.Output_Port) to item to define the output port for items according to the values in global table.

3. Change the expression in "send to port" to item.Output_Port.

mod2_joey00.fsm


0 Likes 0 ·
1598507067185.png (140.8 KiB)
1598507090552.png (24.7 KiB)
mod2-joey00.fsm (18.0 KiB)

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.