question

Rahul T5 avatar image
0 Likes"
Rahul T5 asked Kavika F commented

Pull from Item List

BodyColor.fsm

Hello,
I am trying to simulate optimum queue size between two shops: Shop 1 (batch size of 5) feeds Shop 2 (no batching requirement). There are 10 variants with different mix percentages. I created a pseudo-random sequences for both shops. For Shop 2: 100 entries with said mix percentages. For Shop 1: 500 entries with same variant sequrence as Shop 2. Queue between shops pushes items to ItemList and Shop2 pulls from itemlist. But this does not help with right sizing the queue.
What will be the best way to randomize the pull order for Shop2 and trigger the batch sequence in sync with the demand from Shop 2.

1667262632297.png


FlexSim 22.2.0
pullrequirementpulling item list
1667262632297.png (16.4 KiB)
bodycolor.fsm (233.0 KiB)
· 3
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
0 Likes"
Kavika F answered Kavika F commented

Hey @Rahul T5, in response to pulling a random entry off the list, you can try this approach. I removed the "meetsrequirement" expression and the "Type" label from the ItemList1 properties. Then I added the "BodyColor" label to the ItemList1 so we could pick items based on that. Then I added some code that generated a query based on a random duniform distribution:

  1. if (list.entries().length > 1) {
  2. Object queue = Model.find("QueueSizeToOptimize");
  3. treenode flowitem = queue.subnodes[duniform(1, queue.subnodes.length)];
  4. int bodyColor = flowitem.labels["BodyColor"].value;
  5. queryStr = "WHERE BodyColor = " + bodyColor;
  6. }

Basically, I'm pulling a random flowitem from the queue, grabbing its color, and pulling any item from the list with that color.

· 4
5 |100000

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