networkx-metis icon indicating copy to clipboard operation
networkx-metis copied to clipboard

How to add constraints when graphs partition?

Open Tiatiaoooo opened this issue 3 years ago • 0 comments

Hi, I want use nxmetis.partition(G, nparts, node_weight='weight', node_size='size', edge_weight='weight', tpwgts=None, ubvec=None, options=None, recursive=False) to do graph patition, but I don't know how to add constraints, the constrains are like '1. the number of persons in every partition must smaller than B2, and bigger than B1', '2. the diameter of every partition must smaller than D2, and bigger than D1', can I set tpwgts to fulfill my needs?

Tiatiaoooo avatar Oct 11 '21 10:10 Tiatiaoooo