Pull from list into a joining operation (combiner)

Pull from list into a joining operation (combiner)

adam_fm
Not applicable
1,658 Views
16 Replies
Message 1 of 17

Pull from list into a joining operation (combiner)

adam_fm
Not applicable

[ FlexSim 20.1.0 ]

NyFramtidaFlow_Edit2.fsm

Hello fellow members!

I´m trying to use a combiner to join 2 items into 1 with the help of process flow. My main problem right now seems to be that i´m currently pulling 2 objects from the the list, when only 1 will come out from the joining process.

I found some other threads that touched the topic, but not in way i looked for. In another thread i started about another subject a member sent a tip to use a token that pulls from the list, but thats one technique i couldnt get to work.

So, does anyone have a tip how i could overcome this problem?

If you look at the model it´s the group 3, and the processing part that appears to be the problem. The pull from list functions are created so that the operators will pull one type 3 item and one type 4. I´m attaching both my model and a screenshot of the situation.

Edit: I´ve forgotten to upload the image, if that could help.27689-flexsim-edit2.png

0 Likes
Accepted solutions (1)
1,659 Views
16 Replies
Replies (16)
Message 2 of 17

joerg_vogel_HsH
Mentor
Mentor

If you add a process flow for fixed resources to your model you got an additional 3D model library object. A Process Flow Processor object. You build upon one of the process flow templates your logic of a combiner yourself.

Tweaking a combiner object isn’t intended by process flow or source code, if you haven’t got physically two input ports. It is really hard to convince the engine behind a combiner object that items entered the combiner through different input ports, if the ports physically doesn’t exist. You must first let the first item enter through an the first input port as the container item. All other following items must enter the combiner through a port number larger than port number one.

@Adam FM, please upload your model file in a comment again. It got lost in the process of editing your question. Many thanks!

0 Likes
Message 3 of 17

adam_fm
Not applicable

Thank you very much for that explanation @Jörg Vogel. So is there a work around for that problem or should i do it in another way? The main focus is to join 2 items into one.

Oh i see. Atteched here is the model again! Thank you for your time, and help.

NyFramtidaFlow_Edit2.fsm

0 Likes
Message 4 of 17

braydn_t
Not applicable

@Adam FM

There are many ways you can do this. You can destroy one of the items and change the shape or labels of the other, you could do what Jorg suggests and create the logic for a custom task executor that would combine the two items. You could add 2 queues to the model and connect them to the combiner, and then have the operator load a box into each queue.

0 Likes
Message 5 of 17

adam_fm
Not applicable

Thank you @Braydn T.

When i´m going to fix the appreance of the model i think it´s easier for me to just have one queue, and i think that the custom task executor is a little bit above my paygrade so to speak.

So i tried the first idea you gave, to destroy one item. I get the idea, but i can´t make it work. After a few hours of testing and tweaking i´ve felt the need to return here. I´m not sure if i built a to complex task logic (Not complex like in advanced, but complex like in i could have done it in much fewer steps.) or if i don´t get the concept of destroying tokens. Im trying to destroy the item from inside a subprocess, and that might be a problem beacuse of it´s parents i guess.

So if anyone would like to give it a go, and try to edit my model i would deeply appreciate it!

0 Likes
Message 6 of 17

braydn_t
Not applicable

@Adam FM Here is a quick example with a delete. deleteExample.fsm

0 Likes
Message 7 of 17

adam_fm
Not applicable

Yes, thank you. I watched that, and i get that concept. But i´ts a couple of more steps in my model than that one. As for now i succeded in destroying one item, through a decision based on a label.

But after that, it looks like it clears all the label info from item, see the attached picture.27814-flexsim-troubledecisions.png

0 Likes
Message 8 of 17

adam_fm
Not applicable

Okay fellas, update on the model. So i tried to do what @Braydn T suggested, and a come a bit on the way. But i still havent sorted out my main problem to why i created this thread, unfortunately.

As for now, the operators pulls 2 objects from the lists, and in the processing part i´m destroying one of the tokens. And the operator will move the item to the next queue. Heres one of the problems, when the item is getting destroyed i think it´s clearing the labels on tokens that aren´t going through the destroy item activity. This causes the next operator to not truly understand what he is supposed to load from the queue, in some way.

So i´ve tried debugging the model, with the help of this thread, and the event log may suggest that it´s the "wait for activity" process thats messing around.

Also im stuck with a couple of extra tokens in the parent flow, this because i´m destroying one token inside the subflow i guess.

NyFramtidaFlow_Edit3.fsm

27864-flexsim-exceptioncaught.png

Also, thank you for reading this far.

0 Likes
Message 9 of 17

braydn_t
Not applicable

@Adam FM
The Label information is stored on the 3d object, so when its destroyed so is the label information. Personally, if I were doing this I would have two queues. Then you can leverage the code the developers have already written to do what you are trying to do. If you are really concerned about visuals, you could just move one queue on top of the other queue, or even move them to occupy the same physical space as the combiner, and then hide their 3d shape.

Message 10 of 17

adam_fm
Not applicable

27934-flexsim-type.pngOkay, thanks! I think i get it. And i will try to make my model to work like this.

I think i will need to acces the values thats assigned to 3dmodel, this in order to pick the right queue. So i was thinking of assigning a item label upon creation to the token,

Any idea of how i can reference to a 3d models value? Right now the Type value is hidden in the 3Dmodel, and i also want them in the token!

As you can see in the picture, my 3DItem has a Type 3, and i want to copy that value to a a token upon creation (entering a subflow).

Best regards!

0 Likes
Message 11 of 17

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

A 3D combiner needs at least 2 input ports to work at all! I realize this with a queue in attached model. Then I can use Lists and Process Flow logic.

workaround_3d_combiner_Process_flow.fsm

0 Likes
Message 12 of 17

joerg_vogel_HsH
Mentor
Mentor

As long as you have reference to the item, you have access to all attributes of this item. I assume the reference is stored in token.item then the label Type at the item is:

token.item.Type

If the reference is in a token label array like pulled, then

token.pulled[1].Type // for 1st item reference
token.pulled[2].Type // for 2nd item reference
If you haven’t access to your tokens, you add a wait for event activity to connect to your 3D objects and assign the item to token labels.
0 Likes
Message 13 of 17

adam_fm
Not applicable

Thank you @Jörg Vogel, i think that´ll do the trick.

One additional question. So when i´m creating childtokens, in this case 10pcs, they aren´t connected to the 3d model, thus they arent created from a event triggered source etc. My subflow creates 10 childs, and i´m pulling, and loading 10 pcs, can i be sure that these are connected? Because when im giving them the reference to the 3dModel they get the same Type.

0 Likes
Message 14 of 17

adam_fm
Not applicable

Wow. Thanks @Jörg Vogel, an elegant solution i think. But it may be a little bit above my knowledge level to implement on the model for this moment!

But it definately seems to solve the problem!

0 Likes
Message 15 of 17

joerg_vogel_HsH
Mentor
Mentor

I don’t think so, you are capable to do this. It looks a bit difficult by a Use Subflow block. You don’t need such subflow in your model. You can put the second pull activity into the main sequence. You are only responsible to keep a sequence of pulled items, which you move instantly to the right queue. First pulled item (container item) goes to the queue connected to the first input port of the combiner. Second pulled item (packing or joining item) goes to the queue connected to the second connected input port. Nothing more has to be accomplished. You have already the structure in your model.

A combiner will always receive its container item first. If it isn’t available at the input port number 1, then no other item enters the combiner. Besides you transport items directly to the combiner by a taskexecuter or you have a moveobject activity, which does this.

0 Likes
Message 16 of 17

adam_fm
Not applicable

Oh i see. Thanks for the explanation. So if i understand you correctly.

When i drop my items in the queue, i will push one item (the container item) in the container list, in my case say Type 3. And push the others, Type 4 to the recipe list. And then the joined item comes out in queue 2.

I´m a little bit unsure what the destination label are doing in this case. Is it just to bring the items to the queue? So in my case i could use a load sequence and let a operator do the work? And when i am using decide to send to different lists, it´s within a subflow where i have trouble to access the 3dItem Label Type. I was going to use your tip about wait for event, is there a wait for alla incoming token event i could use, and then assign the labels?

Sorry for my many questions, i deeply appreciate the help you given!

0 Likes
Message 17 of 17

braydn_t
Not applicable

@Adam FM As far as I can tell, it is to move the pulled item to the queue.

0 Likes