question

Ireneusz Kaczmar avatar image
0 Likes"
Ireneusz Kaczmar asked Sharanya P commented

Loading directly onto the truck ?

Is it possible to load the flowitems from the rack with a forklift directly onto the truck (TE) ?

FlexSim 17.0.12
loading onto the truck
· 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.

Sharanya P avatar image Sharanya P commented ·

Hello @Ireneusz Kaczmar,

Thank you for askign this question. I am very new to FlexSim. I am trying to develop a model for something very similar- where in pallets are loaded into a truck at a warehouse using a forklift --> truck travels to next warehouse --> forklift unloads the truck at second warehouse. I was able to find an answer for the loading part through @Axel Kohonen's answer, but I am failing to develop the logic for the unload portion. Would be very grateful if either of you can either explain or share a sample model (3D with process flow) for the unload portion. Thanks in advance!

load-truck.fsm

0 Likes 0 ·
load-truck.fsm (42.7 KiB)
Axel Kohonen avatar image
2 Likes"
Axel Kohonen answered Ireneusz Kaczmar commented

Hi @Ireneusz Kaczmar

You can do something like in this model where I have used process flow. You just need to add logic for when the truck is done. Here I drive the truck into the queue, but you can of course just drive it to some coordinate and then give the reference to the truck to the transporter somehow.

Hope this helps

Axel


· 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.

Axel Kohonen avatar image Axel Kohonen commented ·

Hi @Ireneusz Kaczmar

Please mark this as the answer if it worked for you.

0 Likes 0 ·
Ireneusz Kaczmar avatar image Ireneusz Kaczmar commented ·

Thx Axel for you answer. If we load a full truck for example 20 pallets, in next step the truck can transport these pallets to another queue and unload ?

0 Likes 0 ·
Axel Kohonen avatar image Axel Kohonen Ireneusz Kaczmar commented ·

Hi @Ireneusz Kaczmar

Yes, see the attached model where I have added another queue. In the first queue I have changed the flow so that it does not release the truck until I tell it. Then in process flow I check for the amount of pallets (now releasing after 3 pallets, but change it from the decide activity). If there is 3 or more pallets the decide goes to the "Yes" branch which releases the truck from the first queue and it drives to the second.

I will let you figure out for yourself how to do the unloading, but it will be similar to the loading.

loadintotruck-170-version2.fsm

Axel

0 Likes 0 ·
Ireneusz Kaczmar avatar image Ireneusz Kaczmar Axel Kohonen commented ·

Your model is good. I have to think how to do it more realistic simulation. I mean about one truck that will drive between two warehouses. Thank you again. I will work with this model further.

0 Likes 0 ·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Ireneusz Kaczmar commented

You can transfer the items from a queue directly to another object (e.g. a trailer), that fitts under the queue. Then you store the projected location of every item in the queue in relation to the trailer in an array. After that you move the items to the trailer and update their locations in the trailer from the stored location array.

load-trailer-like-truck.fsm

load-trailer-like-truck-v170.fsm

/**Custom Code - PF activity*/
Object current = param(1);
treenode activity = param(2);
Token token = param(3);
treenode processFlow = ownerobject(activity);
Object queue = model().find("Queue1");
Object trailer = token.trailer;
Array item =  queue.subnodes.toArray();
Array itemloc = Array(item.length);
int idx = 1;
for (idx = 1; idx <= item.length; idx++)
{   Vec3 transform = item[idx].as(Object).location.project(queue,trailer);   
    itemloc[idx] = transform;}
for (idx = 1; idx <= item.length; idx++)
{   moveobject(item[idx],trailer,1);  
    item[idx].location = itemloc[idx];}

following the code for 17.0.12

/**Custom Code - V170*/
Object current = param(1);
treenode activity = param(2);
Token token = param(3);
treenode processFlow = ownerobject(activity);
Object queue = model().find("Queue1");
Object trailer = token.trailer;
int loadItemNo = queue.subnodes.length;
Array item = Array(loadItemNo); 
Array itemloc = Array(loadItemNo);
int idx = 1;
for (idx = 1; idx <= loadItemNo; idx++)
{   item[idx] = queue.subnodes[idx].as(treenode);
    Vec3 transform = item[idx].as(Object).location.project(queue,trailer);
    itemloc[idx] = transform;}
for (idx = 1; idx <= loadItemNo; idx++)
{   moveobject(item[idx],trailer,1);
    item[idx].location = itemloc[idx];}


· 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.

Ireneusz Kaczmar avatar image Ireneusz Kaczmar commented ·

Thank you Jorg for sending your model. I will try to adapt it to my needs. I need to load the flowitems with a forklift truck on to a truck, then carry it to another queue and unload it from the truck with a forklift.

0 Likes 0 ·