question

Cenk ZR avatar image
0 Likes"
Cenk ZR asked Gokulakrishnan Kandasamy answered

How to pull from list according to a condition ?

Hello,

I have a system starting with a source. Then, Queue1 comes, after that, Queue2 comes. After Queue2, there are three parallel processors, and after them, there is a sink. Items are getting labels of Type (duniform(1,3)), PT1, PT2, and PT3 on creation in the source. PT values are the processing time values of the corresponding processors according to the number at the end of the label. (PT1=processing time at processor 1). Type 1 will visit processor 1 and 3, type 2 visit processor 2 and 3, type 3 visit processor 1 and 2. I faced a problem at the beginning of my model creation: I have an operator who has the responsibiltiy of loading items from Queue1 and unloading them on Queue2. However, I want my operator to load the item with the lowest total processing time value from Queue1. Therefore, in the process flow, I assigned labels of Type, PT1, PT2, PT3 and PT (represents total processing time). Label PT gets values based on item types (ex: if token.Type = 1, PT= token.PT1 + token.PT3). Then, I thought of pushing these tokens to a list and pull them based on the query of "ORDER BY PT ASC". However, my operator does not load the item with the lowest PT, it loads according to the first in first out rule. If someone can help me with this problem, I would be appreciated. Thank you very much.

I am also attaching my flexsim file in case someone wants to check it.

examplefile.fsm

FlexSim 19.0.8
listquerypull from listprocess timepull items
examplefile.fsm (36.1 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

Gokulakrishnan Kandasamy avatar image
1 Like"
Gokulakrishnan Kandasamy answered

@Cenk ZR maybe u can use on exit trigger (push) option in queue1 to sort the item in terms of PT. or try to pull the item from the list (use list option directly) based on the label value of PT in queue 2.

Check use transporter option to utilize the operator for loading and unloading purpose

Note: Please use camelcase in flexsim. Ur source labels and assign labels(process flow) to the token are looked the same.

5 |100000

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