question

Maston avatar image
1 Like"
Maston asked Maston commented

Separated Flowitems not destroyed on reset

I created a pre-packed pallet in the flowitem bin. When the pallet runs through a separator, the boxes that were unpacked from the pallet do not destroy on model reset. I have to set switch_destroyonreset to 1 on the items on exit from the separator.

Am I doing something wrong when I am setting up the nested flowitems? Or is there a way to set the destroyonreset flag on the items in the flowitem when I am setting up the custom flowitem?

Attaching an example model in 24.2.2

separator problem24.2.fsm

FlexSim 24.2.2
flowitemflowitem binflowitems inside flowitems
5 |100000

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

Jordan Johnson avatar image
2 Likes"
Jordan Johnson answered Maston commented

I'm not sure the flowitem bin was designed with making pre-packed objects that can be unpacked later.

Instead of building a pre-packed flowitem in the flowitem bin, I would create a packed item using Process Flow. See this model: separator-problem242-pfsource.fsm

I made an Object process flow. I attached that flow to a Queue. I changed the shape of the Queue to match the Source.

The main idea of the flow is to mimic the logic of a 3D source:

  1. Wait for the next arrival time
  2. Make an item
  3. Wait for the item to be released

By default, a Queue releases items instantly. So the flow closes the queue's output ports until an item arrives. Then it opens them long enough to release the item. Note that it opens in them in the On Listener Initialized trigger in the event triggered source.

The main advantage of this approach is that it avoids your original issue. In addition, it is highly flexible. You could easily change the number or type of cases in a layer. The downside is that it is a bit more work.


· 3
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 Joerg Vogel commented ·
@Maston , you may not need to create every packed pallet anew. You can create on model start a packed pallet in your model, then you duplcate it every time you need a new one.
1 Like 1 ·
Maston avatar image Maston Joerg Vogel commented ·
This works really well.
0 Likes 0 ·
Maston avatar image Maston commented ·

Thank you! I usually use a variation of this and is probably why I've never run into the behavior I was seeing. In this specific case there were about 40 fixed layer configurations, and they wanted case orientations on each layer in the model to reflect this. I figured it was easiest to arrange the cases on the "Layer" by rotating and dragging in 3D space, creating 40 different "Layer" Flowitems. The thought of using PF arrange the cases on all those different layers didn't seem like a good time to me. Apologies for not mentioning that.

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

I saved a packed pallet from an combiner output as a user library object:

packedPallet.fsl

You can use it in a create object activity directly by its main path to get a packed pallet item into your model.

MAIN:/project/userlibrary/UserLibrary 1/Product_my

Copy the above path into the Object field of create object activity. Or you copy the path by exploring the user library object in the tree view

BUT you must open the user library in attached model previously from main menu file menu.

userLib_item_model_example.fsm

Activating the user library by selecting the user library entry, did not make the packed pallet available in a new opened model.


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

Maston avatar image Maston commented ·

@Joerg Vogel Thanks a bunch for this suggestion! If I ever have this kind of use case again, I am going to go this route. For future me, and anyone else wanting to try this method, I think the workflow might be something like this:

In my use case I had approx. 40 different fixed layer configurations and it was easiest to arrange the cases on the "Layer" by rotating and dragging in 3D space, creating 40 different layer Flowitems.


1. Using PF create a "Layer" Object in a standalone Queue

2. Using PF create a number of "Cases" on the "Layer" that is in the Queue

3. Stop the Model

4. Name the "Layer" object accordingly

5. Arrange the "Cases" in 3D space accordingly

6. Right click the "Layer" object and save to a user library

--Do I need to create another "Layer" configuration with the same number of cases?

IF YES:

7. Rename the "Layer" object accordingly

8. Arrange the "Cases" in 3D space accordingly

9. Right click the "Layer" object and save to a/the user library

IF NO:

7. From the Main Tree set each "Layer" objects visibility off (optional)

8. From the Drag-Drop Library "Save Library"

9. Reset and Save the model


Note:

Every time I would have to reload the user library, I would lose reference to the user library objects used by the Create Object activity. To avoid losing the reference to the user library objects I used maintree().find("project/userlibrary/.......") in the object field in the Create Object Activity. You still have to open the user library.


I use loaduserlibrary("somefilepathhere"); in an "on model open" trigger to automagically load a specific user library.

0 Likes 0 ·