question

Sung Kim avatar image
2 Likes"
Sung Kim asked christoph gruber commented

Elevator loading unloading sequence

It seems the elevator travels to load and unload flowitems based on FIFO.

I would like to pick multiple flowitems and unload them in ascending order of level. For example, three flowitems 1, 2, 3, whose destination are level 4, 2, 10, respectively, are loaded onto elevator at level 1 in order of 1, 2, 3. The default sequence of unloading the flowitems is same as loading order, 1, 2, 3. Therefore, the elevator travels level 4 first, and 2, and going up again to 10.

I would like to sort the unloading order by level in ascending order so that the elevator travels to level 2 first, and level 4, and finally level 10 to unload each flowitem.

I tried to sort the rank of flowitem in OnLoad trigger, but doesn't work even though the flowitems are sorted by level (checked in tree node).

I tried to use the queue strategy by closet distance, but seems not applicable.

Anybody can help me to find out how?

FlexSim 16.0.1
racktask sequenceelevator
· 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.

Sung Kim avatar image Sung Kim commented ·

WOW.. you guys rock!

THANK YOU SO MUCH for all great ideas and solution approaches. I didn't have a chance to fully apply to my logic yet, but all seem very promising. I will let you know if there is any update from my model after apply it.

Thanks!!

2 Likes 2 ·
Matthew Gillespie avatar image
7 Likes"
Matthew Gillespie answered christoph gruber commented

Process Flow and Lists let you easily create custom logic for task executors like you want in this situation.

Attached is a model that demonstrates one way of doing this.


elevator.gif (767.3 KiB)
· 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.

Sung Kim avatar image Sung Kim commented ·

@Matthew Gillespie

Hi, Matthew,

Thank you very much for the example model! It is quite impressed how it is easily built. Unfortunately, I am not quite familiar with Process Flow. However, the diagram itself gives me a clue. For now, I might need to convert your conceptual logic to my own script until I learn more about the Process Flow. Meantime, if you know how to do it without using Process Flow, could you please advise me?

BTW, one quick question about your model. What if the elevator requires fair amount of loading time? Because of this delay, the sort/order TS, I think, should be done after all available flowitems get on the elevator (including newly arriving flowitem during loading time of the preceding flowitem if the elevator capacity can still accommodate it). Your diagram seems it does ("get closest delivery") after "Load Items". Not quite sure where I can get the actual code(??) of the step? I know it might be a question from my ignorance of the process flow, but kind explanation would be appreciated until I learn more about PF.

THANKS!!

1 Like 1 ·
Phil BoBo avatar image Phil BoBo ♦♦ Sung Kim commented ·

If you click on the icon for the step, it will open its Properties panel.

That step is a Pull From List. The logic is in the Query field: ORDER BY itemType ASC. That sorts it so that the lowest itemtypes are dropped off first. This sample model is sending based on itemtype.

3 Likes 3 ·
pull-from-list.png (46.8 KiB)
jing.c avatar image jing.c Sung Kim commented ·

I also want to know how to do it without using Process Flow, So I voted Sung.

And hope someone can help us~

0 Likes 0 ·
christoph gruber avatar image christoph gruber commented ·

I take the same model above and I tried to elevate the produced items to the groundfloor, but I´m not able to do this in the right way. I need help please. Thanks a lot ! see the model 653-processflowelevator-3.fsm

0 Likes 0 ·
Phil BoBo avatar image
5 Likes"
Phil BoBo answered Phil BoBo edited

Attached is a sample model that shows how you can model the described situation without using ProcessFlow.

How it works

First, the Queue Strategy is set to "Prioritize by distance" so that the task sequences are sorted in order from the bottom floor to the top.

This doesn't change the first flowitem dropped off though. After it loads the last item, it will finish that task to unload that item first. To get around that, we can modify the Break To logic:

The sending Queue's task sequence is slightly modified to pass 1 as var1 for the break task. This makes it so that the break task is called even when the TE is at max capacity.

Then, in the Break To field of the elevator, it first manages breaking to load tasks if it still has capacity, otherwise it looks for the closest item to unload. This makes it so that after it finishes loading all the items, it then unloads the closest item first. Then it unloads the rest of the items (already sorted by the queue strategy).

Note

This logic was written to address the situation defined in the original question. If your situation is more complicated (multiple elevators, different load floors, etc.), then your best bet is to use ProcessFlow so that you can define the logic of the entire system in a single, easy-to-understand location.


elevator-logic.gif (13.1 MiB)
elevator-logic.fsm (18.5 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.

Jeff Nordgren avatar image
4 Likes"
Jeff Nordgren answered

Attached is another model that you can use for consideration.

It uses manually created task sequences created in the OnMessage trigger of each of the "floor" queues.

To start the model moving, there is send message code in the UserEvent1. All that does is send a message to the ground queue to get the model started.

It sends a message with the first parameter of the message being a 1. This tells the code in the OnMessage trigger of the QueueGround to create a new task sequence. A message is also sent from Queue5 to start a new task sequence as well.

All the other queues, in the OnMessage trigger, just check to see if anything should be dropped off at that queue. After dropping off any flowitems, it moves to the next floor.

Here is the model: elevatorsample-jn1.fsm


elevator.gif (477.5 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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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