question

Chema Vecino avatar image
0 Likes"
Chema Vecino asked Chema Vecino commented

Query for "pull from list" block where there are more objects than cases

Very new to FlexSim so sorry in advance for my ignorance.

I'm trying to pull a resource from a list in a Process Flow.
The condition for the query is that whenever token.item.material (label added at source on creation) is 1 the resource that is picked from the list must have a value of 1 on label "C", and if token.item.material is 2 the value on C must be 2.

I know how to workaround the issue by adding more blocks, but I can't figure out how to code this since I'm completely new to SQL-like language.

I've tried to do the query as an "Object by Case" type but I not sure if it can be done at all since there are more objects to be picked than cases.

Case2.fsm

Thanks!!

FlexSim 23.0.10
process flowquerypull from listresource
case2.fsm (49.3 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

Kavika F avatar image
1 Like"
Kavika F answered Chema Vecino commented

Hey @Chema Vecino, you were pretty close to getting what you wanted. If you wanted to pull a transporter with a certain label, you can add that label to the List.

1699037456477.png

If you click on a List > Advanced, you can add a label that's on that object. In this case, it was C. So now when you look at the List Entries, the transporter C label will be listed with them.

1699037496124.png

I changed two things in your Pull from List.

1699037529258.png

First, the puller will be the token.item. The item has the "material" label on it (which you want to match to your "C" label on the transporter). So you can then query "WHERE C" (the column in the list) "= puller.material" (puller gets substituted for the value of token.item, which has a material label).

case2_1.fsm

Hope this helps!


1699037456477.png (58.0 KiB)
1699037496124.png (5.3 KiB)
1699037529258.png (38.0 KiB)
case2-1.fsm (49.6 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.

Chema Vecino avatar image Chema Vecino commented ·
Thanks!! That totally makes sense, I didn’t really know how the puller parameter worked.


I’ll check it out tomorrow but seems like that’s exactly what I was trying to do.

0 Likes 0 ·
Chema Vecino avatar image Chema Vecino Chema Vecino commented ·

It does work as expected!!


Thanks so much

1 Like 1 ·