question

Sebastian Hemmann avatar image
1 Like"
Sebastian Hemmann asked Sebastian Hemmann commented

Performance question

Hi,


one of our customers approached us and asked if we could provide any tips on how to improve the performance/responsiveness when building a very large model.

There goal is to simulate a rail yard, including truck traffic. Both the trains and trucks run on AGV networks. The model currently clocks in at just below 10000 objects, mostly AGV paths and control points.

Adding and adjusting additional objects feels very sluggish at this point. Is there anything one can do to improve the responsiveness of such a large model?

One option we tested was moving most objects from the model node into a subnode of the main tree. This does work to improve the model responsiveness and in a quick test we didn't notice any adverse effects from doing this. But we still wanted to ask if we are likely to break something by moving objects out of and into the model like that?

And if you see any other things we could try?

FlexSim 23.1.3
agvnetworkagv pathperformance
· 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.

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Sebastian Hemmann commented

What hardware are they using? A better graphics card might improve things - maybe Phil can tell us if a Quadro class would help with drawing so many line segments.

I would recommend putting the paths and control points inside a number of planes/containers and then you can set those as the viewfocus and only see the objects inside the plane - allowing you have good draw speed and edit the layout easily. (right click the plane and select View->Down). You can store the container view in Model Views as you would any other viewpoint.


You could also maybe build a number of smaller models containing just sections at the correct locations (based on a large CAD layout that is in the same position in each model) and then merge or reconstruct it in the main model by transferring the definition either through xml model maps and files or using the Properties tables. This way you can disable the drawing of the AGV nework in the main model entirely (except maybe to check the merge/reconstruction worked).

Here's an example of using properties - this works in a small test model, but it should scale well.

To record the definition:

  1. Table.query("SELECT * FROM Objects()").cloneTo(Table("ModelDefinition"));
  2. Table("ModelDefinition").deleteCol(1); //Object
  3. Table.query("DELETE FROM ModelDefinition WHERE Name='AGVNetwork'");
  4. Table.query("DELETE FROM ModelDefinition WHERE Name='FlexsimModelFloor'");
  5. // maybe remove records of other 'system' objects like the ConveyorSystem etc.

Then after loading the definition table(s) into the main model, build it using:

  1. Table t=Table("ModelDefinition");
  2. string headerString="(";
  3. string comma="";
  4. for (int n=1;n<=t.numCols;n++){
  5.     headerString+=comma+t.getColHeader(n);
  6.     comma=",";
  7. }
  8. headerString+=") ";
  9. Table.query("INSERT INTO Objects() "+headerString+" SELECT * FROM ModelDefinition");

At the moment this doesn't seem to preserve the connection types between control points or to fixed resources, but they could be read into a different table, and reconstructed as part of the script.

Test model attached.

SQLstore_rebuild_model.fsm


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

Often, sluggishness comes from the draw speed. With lots of objects, the frame rate slows down. Even object selection is a draw operation, since we draw to determine what the mouse is clicking on.

In some cases, the solution is to add groups of objects. Then write scripts that toggle the switch_hideshape and switch_hidecontents values for all the objects in that group. Then you can limit the view to only the parts of the model you want to work on.

5 |100000

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