networkx / networkx-metis

NetworkX Addon to allow graph partitioning with METIS
Other
79 stars 21 forks source link

Is it possible to supply a constraint function during partitioning #73

Open jeetendragan opened 3 years ago

jeetendragan commented 3 years ago

Let's say the algorithm comes up with 2 partitions- p1, and p2 I want to run a constraint function on each partition (the output of which depends on what's inside the partition) If the constraint is satisfied, then we run the objective function(edge-cuts) as is, else we don't consider these partition options(p1, and p2)

Is something like this possible? I have been looking at tpwgts, and ubvec but not sure if they will help.

Tiatiaoooo commented 2 years ago

Hi, I have the same problem as you, have you solved it? Can I add constraints while partitioning?