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.

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.

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

  1. /**Custom Code - PF activity*/
  2. Object current = param(1);
  3. treenode activity = param(2);
  4. Token token = param(3);
  5. treenode processFlow = ownerobject(activity);
  6. Object queue = model().find("Queue1");
  7. Object trailer = token.trailer;
  8. Array item = queue.subnodes.toArray();
  9. Array itemloc = Array(item.length);
  10. int idx = 1;
  11. for (idx = 1; idx <= item.length; idx++)
  12. { Vec3 transform = item[idx].as(Object).location.project(queue,trailer);
  13. itemloc[idx] = transform;}
  14. for (idx = 1; idx <= item.length; idx++)
  15. { moveobject(item[idx],trailer,1);
  16. item[idx].location = itemloc[idx];}

following the code for 17.0.12

  1. /**Custom Code - V170*/
  2. Object current = param(1);
  3. treenode activity = param(2);
  4. Token token = param(3);
  5. treenode processFlow = ownerobject(activity);
  6. Object queue = model().find("Queue1");
  7. Object trailer = token.trailer;
  8. int loadItemNo = queue.subnodes.length;
  9. Array item = Array(loadItemNo);
  10. Array itemloc = Array(loadItemNo);
  11. int idx = 1;
  12. for (idx = 1; idx <= loadItemNo; idx++)
  13. { item[idx] = queue.subnodes[idx].as(treenode);
  14. Vec3 transform = item[idx].as(Object).location.project(queue,trailer);
  15. itemloc[idx] = transform;}
  16. for (idx = 1; idx <= loadItemNo; idx++)
  17. { moveobject(item[idx],trailer,1);
  18. 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.