question

Patrick Cloutier avatar image
1 Like"
Patrick Cloutier asked Matthew Gillespie commented

A Star best practice to speed model run

I am building a model in which material handling employees carry parts from one department to another. For now, I only have one such handler. I added a few Barriers and Dividers to make the walls of the building.

When I run the model at max speed for one day of operations, the runtime is unbelievably different whether I use AStar or not:

  • Runtime without AStar: 1 second
  • Runtime with AStar: 72 seconds

The only difference between the 2 runs is whether the handler is connected to AStar or not.

All the AStar parameters are the defaults.

I'm afraid that when my model is complete and I'll want to run months of operations instead of single day, it will take hours to run. And I have a very powerful computer.

So, here is my question: Are there any AStar best practices for building the model while minimizing the impact on model run speed?

Examples:

  • Is it better to make the wall with Barriers or Dividers or it doesn't matter?
  • Is it better to add all processors and queues as members or just to draw a barrier around them?
  • Which AStar parameters have the greatest impact on performance?

Thanks a lot for any advice you have on this,

FlexSim 21.2.2
astar
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 Answer

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered Matthew Gillespie commented

The easiest things you can do to improve A* performance are:

If you really want to optimize you can make different A* grids and only turn down the node spacing on the grids in the part of the models that really matter and leave the node spacing high on places it doesn't matter. Then use bridges to connect the grids together. Or if there are long hallways just use bridges to represent those.

Is it better to make the wall with Barriers or Dividers or it doesn't matter? Is it better to add all processors and queues as members or just to draw a barrier around them?

I don't think either of these will have much effect on performance.

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

Patrick Cloutier avatar image Patrick Cloutier commented ·

I checked Node Spacing and I noticed a problem. Since my model is in inches, the node spacing was at 1 inch automatically. I changed it to 1 m and now my model runs as fast with or without AStar. 1 inch is 40 times smaller than 1 meter.

I suggest that the Node spacing always be 1 m by default and not 1 model units.

I'm pretty sure I'm not the only one who ran into this "slowness" issue.

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Patrick Cloutier commented ·

@Patrick Cloutier

Yes, it looks like this wasn't updated when the node spacing was split into X and Y spacing. Thanks for pointing this out!
0 Likes 0 ·