How to send an item to different elevators based on type?

How to send an item to different elevators based on type?

sean_b
Not applicable
211 Views
5 Replies
Message 1 of 6

How to send an item to different elevators based on type?

sean_b
Not applicable

[ FlexSim 21.1.4 ]

I have pallets coming into the system every 10 seconds in a particular order and getting randomly distributed to the top or bottom conveyor. They then reach a decision point based on their type and rotate 90 degrees before being transported to their designated outbound conveyor by the elevator. One problem I am running into is I can't get both elevators to be selected on the ExitTransfer of the conveyors. Because of this, half of the items on the top or bottom can't be transferred to their correct lanes. Is there something I am overlooking on how to get two separate elevators to operate through one ExitTransfer? 20C25M06R02.fsm

0 Likes
Accepted solutions (1)
212 Views
5 Replies
Replies (5)
Message 2 of 6

moehlmann_fe
Advocate
Advocate
Accepted solution

The "Send Item" option of the decition points only works for directly connected conveyors. If port connections are involved, "Send Item" should specify which exit transfer the item uses. In the exit transfer itself you set the port an item should be send to from there. "Port by Case" works well for that in your case.

Similarly to the "Port by Case" option of "Send to Port", you can choose which elevator should be used. Either connect them as center objects to the exit transfer and choose "Center Port by Case" or return the correct elevator directly in code.

Example:

if(item.Type == 4)
{
    return Model.find("Elevator6");
}
else
{
    return Model.find("Elevator2");
}

I applied these changes to the lower conveyor in your model and disconnected the upper one for the time being.

20c25m06r02_1.fsm

0 Likes
Message 3 of 6

sean_b
Not applicable

Ah thank you Felix! That is very helpful.

0 Likes
Message 4 of 6

niphon_jeepjua
Explorer
Explorer

Hello @Felix Möhlmann,

I had a very similar question: in my case, I already have chosen to return a specific object. But it seems like that the exittransfer does not accept an object as a return value but integers, only (i.e. outputport[number])?Might you please have a look at my file? Custom Code is in the exit transfer. Thanks a lot.

sendbycase_dummy.fsm.

0 Likes
Message 5 of 6

moehlmann_fe
Advocate
Advocate

You are correct, the "Send to Port" option expects an integer as return value (whereas the "Send Item" and "Use Transport" options require an object to be returned).

If you want to use an object reference to send the item, you could loop through all output connections until you find the correct rank and return that.

for(int rank = 1; rank <= current.outObjects.length; rank++)
{
    if(current.outObjects[rank] == destobj)
    {
        return rank;
    }
}

Or you instead assign the "destobj" to a label and have the processors pull the items with the requirement that the label has to be equal to themselves.

sendbycase-dummy_1.fsm

0 Likes
Message 6 of 6

niphon_jeepjua
Explorer
Explorer

Thanks for the quick respond: idea no.1 is a nice approach/ workaround that works flawlessly

0 Likes