int posDegree = positivesDegree.get(maxPosV);
int negDegree = negativesDegree.get(maxNegV);
if (posDegree + negDegree == 0) {
try {
solvedGraph.addEdge(maxPosV.getId(), maxNegV.getId(), posDegree);
positives.remove(maxPosV);
positivesDegree.remove(maxPosV);
negatives.remove(maxNegV);
negativesDegree.remove(maxNegV);