question

Óscar Manuel CMN avatar image
0 Likes"
Óscar Manuel CMN asked Benjamin W2 commented

Pull from list the same type of work


I want to extract from the list an order that is of the same type as the previous one that was processed on that machine. In other words, it has the same value as the "TipoTrabajo" label. If there is not one in the queue, the one with the shortest processing time will be chosen. How can I indicate this in the pull from list? I have tried using the "PreviousWork" table but I have not succeeded.

19.0.0 Version

JSPT-WHN1-SQ-K2.fsm

FlexSim 19.0.9
pull from listflexsim 19.0.9
· 11
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 ·

@Óscar Manuel CMN,

I recommend creating one Pull from List activity that tries to pull the same "TipoTrabajo" label and then create another Pull from List activity that pulls according to processing time ascending. Which Pull from List are you referring to in your model? Can you indicate that somehow?

0 Likes 0 ·
Óscar Manuel CMN avatar image Óscar Manuel CMN tannerp commented ·

In the second "Pull from list", under assign labels: Destination. In query box I had written "WHERE TipoTrabajo==Table("PreviousWork")[1][token.Destination.ColNum] so that a job with the same label would be selected and then i would put ORDER BY TP ASC. This I suppose is misspelled.

How should I write it?

0 Likes 0 ·
Braydn T avatar image Braydn T Óscar Manuel CMN commented ·

@Óscar Manuel CMN my guess is the sql query cant support the table query. Maybe do the table query in an assign label task right before the pull from list, and then you can check against the label instead of the table query.

1 Like 1 ·
Show more comments
Benjamin W2 avatar image Benjamin W2 commented ·

Hi @oscar_manuel.cmn, was tanner.p's answer helpful? If so, please click the red "Accept" button on their answer. Or if you still have questions, add a comment and we'll continue the conversation.

0 Likes 0 ·

1 Answer

tannerp avatar image
0 Likes"
tannerp answered tannerp commented

@Óscar Manuel CMN,

I created an example for a different user in this post. It may be helpful because it demonstrates how to pull an item from a list based on the last item to have been pulled. I believe you can review it and implement these principles to solve the question with your model.

Here's the example model: two machines one operator.fsm


· 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.

Óscar Manuel CMN avatar image Óscar Manuel CMN commented ·

I made some modifications based on the model you tell me but I should not have done them well because it does not work correctly. As you can see in the following image, an orange boz has just come out of processor1, and instead of choosing another orange box, it has chosen a red box.

I attach the model:

JSPT-WHN1-SQ-K2.fsm

0 Likes 0 ·
1591263564346.png (62.9 KiB)
Óscar Manuel CMN avatar image Óscar Manuel CMN Óscar Manuel CMN commented ·


I have realized that in the way the above is modeled, the operator would stay in the same queue while he had orders and that is not necessary at this point. I have made some modification to the model I had prior to the previous question so that it does not give problems with the destination issue, but the operator still does not choose the product of the same type.


Although they are called the same, they are not the same program.

JSPT-WHN1-SQ-K2.fsm

0 Likes 0 ·
tannerp avatar image tannerp Óscar Manuel CMN commented ·

@Óscar Manuel CMN,

The idea I posted here wasn't meant to be a band-aid to fix your model. I think because you've changed the layout and processes in your model from the original Process Flow I built for you, you need to change the Process Flow. Everything at this point is just making this worse. I recommend re-thinking your process and doing a thorough re-vamp of your model since so many things are changed.

0 Likes 0 ·
Show more comments