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.

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.

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.