question

David.Y avatar image
0 Likes"
David.Y asked Jeanette F commented

How to call the flowitems in the desired order in List

example_2303112.fsm

Hello,

After ranking the hangers by push time in LIst, I want to call and use the hangers of each rank. can i know how?

I pushed flowitems in List (DR_LH_CONV) and wanted to use "ORDER Pushtime By", but I don't know how to call the hangers in the order I want.

I would appreciate it if you could tell me how to rank and call the hangers that came in sequentially.


For example, when 7 hangers are in the list in order, you want to place the first and last hangers at the Decision Point and place the rest of the hangers in the buffer.



1678603534145.png

FlexSim 23.0.0
listrankcall flowitem in listpushtimerank in list
1678603534145.png (198.2 KiB)
example-2303112.fsm (11.6 MiB)
· 1
5 |100000

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

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @David.Y, was Jason Lightfoot's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered

When you pull from the list with a request/require number of 1 the hanger that is pulled will be the first on the list - which will cycle as long as you are pull the item from the list and not leaving it on the list (it's an option - see below). So each pull will get the next hanger. Another question is when you should pull (I changed the source to do this at 85 seconds once there are 7 - but that's just for demonstration)

You can get the array of all hangers when you use the PullFromList activity with a request number that is great than the number on the list OR is zero. With a zero it will get all the items and leave them on the list. I've added the label 'allHangers' to your pull here in the attached model:

1678625400751.png

Once you have the array you can handle it how you wish.

You may want to consider having a token with the array of hangers that you push() to and shift() from which will take items off the front of the list and add them at the back - which will maintain the order.

example-2303112_jl.fsm

I get the feeling the feeling that the decision to route is not handled as a chunk for all the hangers though, and will be made individually as each need routing at some event - eg. when they get pushed to the list.

Note you can also set the pull to add each hanger that is pulled to the token's label array so if your token is looping around to pull each time, the array will be built up with each loop.


5 |100000

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