question

Shinya O avatar image
0 Likes"
Shinya O asked Shinya O commented

What is Flowitem Recycling?

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.

FlexSim 23.0.8
flowitem recycling
5 |100000

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

Phil BoBo avatar image
0 Likes"
Phil BoBo answered Phil BoBo edited

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.

5 |100000

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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Shinya O commented

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.


1693209556882.png (3.8 KiB)
· 4
5 |100000

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

Shinya O avatar image Shinya O commented ·

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 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Shinya O commented ·
That is correct. I can send a case into the dev team to consider having the Create object activity use recycled items.
0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ Jason Lightfoot ♦♦ commented ·

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.

0 Likes 0 ·
Show more comments