compas icon indicating copy to clipboard operation
compas copied to clipboard

[Question]: Usage of Graph Algorithms and Any Slowdowns?

Open nv-rliu opened this issue 1 year ago • 1 comments

Hi there,

I'm interested in understanding if compas depends on any graph algorithms from its usage of NetworkX? If so,

  • What algorithms are used for what purpose?
  • What graph sizes are they being used with?
  • Have users experienced any slowdowns or issues with algorithms provided by NetworkX? (Speed, algorithm availability, etc)

Furthermore, would users be interested in accelerated nx algorithms via a GPU backend? This would involve zero code change.

Any insight into this topic would be greatly appreciated! Thank you.

nv-rliu avatar Feb 20 '25 17:02 nv-rliu

hi,

until now, we tried to rely on networkx as little as possible in the core package (compas), because we were still trying to maintain backward compatibility with (Iron)Python 2.7 (because of Rhino).

the only functionality we used from networkx was its planarity check (networkx.is_planar) and the generation of embeddings of planar graphs using networkx.spring_layout. the availability of this functionality was made conditional upon the environment in which compas was being used (Rhino / not Rhino).

however, recently Rhino (since version 8) started supporting CPython, which allows us to finally dump the need for compatibility with IronPython 2.7 and completely move on to Python 3.

because of this i can imagine more of the functionality of packages such as networkx being integrated directly into the core infrastructure, but i have no specific roadmap for this...

tomvanmele avatar Feb 20 '25 18:02 tomvanmele