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.

Ryan Clark avatar image Ryan Clark commented ·

Hi @Nicholas D, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

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:

/**Custom Code*/
Object current = ownerobject(c); // The object the triggers happens on - combiner
Object item = param(1); // This is the container item

// As long as there is more than one object directly inside the container...
while(item.subnodes.length > 1)
{
    // ... move the second object inside the container into the first
    moveobject(item.subnodes[2], item.first);
}

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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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