question

Nicholas D avatar image
0 Likes"
Nicholas D asked Ryan Clark commented

Batch Item Into Subnode of Subnode Level

Batching Question.fsmI am looking to combine a flow item into another flow items subnode of a subnode. I am looking to accomplish this without separating the existing batch and without the use of ProcessFlow. Is this possible to do? I've included an example model attached. In the example, I want the box packed into the cylinder, the cylinder packed into the sphere, then another box added to the cylinder (which is already packed into the sphere).

FlexSim 21.1.5
combinersubnodes
· 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.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

When items enter into the combiner, they will always be put into the container object (except the container itself of course). You can move them into a different object with the "moveobject" command afterwards.

In the attached model I do this in the "On Setup Finish" trigger, but other triggers are of course also possible.

Code:

  1. /**Custom Code*/
  2. Object current = ownerobject(c); // The object the triggers happens on - combiner
  3. Object item = param(1); // This is the container item
  4.  
  5. // As long as there is more than one object directly inside the container...
  6. while(item.subnodes.length > 1)
  7. {
  8. // ... move the second object inside the container into the first
  9. moveobject(item.subnodes[2], item.first);
  10. }

batching-question_trigger.fsm


5 |100000

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