What is Flowitem Recycling?

What is Flowitem Recycling?

ozawa_shinya
Advocate Advocate
20 Views
6 Replies
Message 1 of 7

What is Flowitem Recycling?

ozawa_shinya
Advocate
Advocate

[ FlexSim 23.0.8 ]

Hi,

I found FlowItem recycling in ItemToFluid.

What is Flowitem Recycling? Are there any simple sample models to understand the concept of recycling? Is there any explanation in the official documentation other than the link below?https://docs.flexsim.com/en/23.0/Reference/3DObjects/Fluid/ItemToFluid/ItemToFluid.html

Thanks in advance.

0 Likes
Accepted solutions (1)
21 Views
6 Replies
Replies (6)
Message 2 of 7

jason_lightfootVL7B4
Autodesk
Autodesk

This used to be an option on the Sink, too whereby instead of destroying the item from memory it would be placed in the flowitem bin to be reused when it was next generated.

The command recycleitem() is also used to do this and will place items in a subfolder of the flowitem's folder:

1693209556882.png

You can try using it to see if it improves model speed - the impact (if any) will depend on item churn rate of you model.

0 Likes
Message 3 of 7

ozawa_shinya
Advocate
Advocate

Thank you for your information.

Let me confirm the details of the recycling behavior. Are the followings correct?

  • Recycled objects are reused when generated in the source of the 3D object.
  • Recycled objects are not reused when created in the process flow CreateObject.
0 Likes
Message 4 of 7

jason_lightfootVL7B4
Autodesk
Autodesk
That is correct. I can send a case into the dev team to consider having the Create object activity use recycled items.
0 Likes
Message 5 of 7

philboboADSK
Autodesk
Autodesk
Accepted solution

Recycling flowitems doesn't improve simulation speed anymore. It slows it down and causes it to use more RAM. There is no benefit to recycling flowitems so we removed it from the UI. (It was an oversight that it wasn't removed from the ItemToFluid properties.)

Recycling flowitems was added a long time ago when deleting and creating flowitems was really slow. After fixing the bug that was causing that slowdown, we removed the recycling feature from the UI. The code in the FixedResource classes that recycles flowitems was kept intact for backwards compatibility.

Recycling also doesn't work correctly unless all your flowitems are generated from a Source or Separator and destroyed in a Sink or Combiner. If you use custom code or process flow to generate or destroy items, then the recycling system doesn't work.



Phil BoBo
Sr. Manager, Software Development
0 Likes
Message 6 of 7

philboboADSK
Autodesk
Autodesk

We're not going to add code to the Create Object activity to support a deprecated system that adds performance and memory overhead to your model with no benefit.

We should remove Flowitem Recycling from the ItemToFluid's UI and documentation though.



Phil BoBo
Sr. Manager, Software Development
0 Likes
Message 7 of 7

ozawa_shinya
Advocate
Advocate

Thank you for your information. I would avoid using FlowItem Recycring.

0 Likes