Idea

Fiona Kattenstroth avatar image
13 Likes"
Fiona Kattenstroth suggested Jason Lightfoot commented

Option to „deactivate“ 3D-objects and toolbox-elements

We are working on a very large model (> 35.000 object treenodes) and are facing the problem that it takes about 10-12 seconds to reset it. To work efficiently with the model in the long-term, we would like to reduce the model reset time.
One solution is to move the object nodes, that are currently not needed for a specific simulation scenario, into a “dummy”-node outside the model-node in the model tree. Thereby these objects get ignored on reset and the model reset takes less time. The big disadvantage of this solution is, that you have to move all objects back under the model-node before saving the model. Otherwise the objects are gone once you close FlexSim.
To resolve this issue, our idea is the following: Is it possible to create a special node/folder under (or outside) the model-node, which content is ignored on reset but the contained objects are still there after saving the model and can be moved back under the model-node if needed?

The same functionality would be great for toolbox-elements like Process Flows, Global Lists, etc.

proces flowtreenodeperformancetoolbox3d objetcs
5 |100000

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

1 Comment

·
Matthew Gillespie avatar image
2 Likes"
Matthew Gillespie commented

You could improve your current workflow by making a custom module that moves nodes before reset and then moves them back in after reset is done. For example, here's a simple module I made that does this. (I followed the steps in Module SDK Quick Start to create the module).

ResetHider.zip

Download this file and put it in the modules folder of your installed FlexSim so the path for ResetHider.t is something like "C:\Program Files\FlexSim 2022\modules\ResetHider\ResetHider.t"

Now open FlexSim and the module should be loaded. Here's a test model that shows it working:

ResetHiderTest.fsm

You'll notice that when you reset the model Processors 1 and 3 print their names to the console, but not Processor2 which is in "MODEL:/Tools/ResetHider".

This module just adds 2 nodes to the main tree:

1. MAIN:/project/events/OnResetModel/hideNodes - This script is fired at the start of resetting the model and moves the ResetHider node out of the model.

2. MAIN:/project/events/OnPostResetModel/restoreNodes - This script is fired once reset is done and moves the ResetHider back into the Tools folder.

· 2
5 |100000

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

Fiona Kattenstroth avatar image Fiona Kattenstroth commented ·

Thanks for your reply. It already solves half of the problem by making the reset much faster. But we are still facing the problem that if we afterwards need those nodes under the ResetHider again in the model, the corresponding 3D-objects aren't visible. Do you have any suggestion how to solve this?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Fiona Kattenstroth commented ·

I added two label functions to the resethide 'folder' which now move objects in the group "HideObjectsFromReset" to the resethide folder and restore them on postReset. You can customise these as needed. The map stored on the resethide object records where the objects came from in order to restore them.

resethidertest2.fsm

ResetHider2.zip

1 Like 1 ·
resethidertest2.fsm (26.9 KiB)
resethider2.zip (1.0 KiB)

Write a Comment

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

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.