I have a networkx graph and want to partition using metis based on constraints on the edges.
As can be seen the edge weights is represented as a dictionary with happiness and stress as the keys. The objective function I want to pass is that each partition should be below a particular stress threshold(calculated by summing all the edge weights present in a partition) as well as the overall happiness is maximized. I currently don't know how to pass the objective/constraint to the partition function. Any leads/ examples as to how to do it would be helpful. Also if there are any other libraries which are useful in solving the problem please do let me know.