public void updateEdgeFlow(String src, String dest, int newFlow) {
        boolean found = false;
        Vertex v = vertexMap.get(src);
        for (Edge e : v.adj) {
            if (e.dest.name.equals(dest)) {
                e.flow += newFlow;
                found = true;
                break;
            }
        }
        if (!found) {
            for (Edge e : v.adjEntering) {
                if (e.src.name.equals(dest)) {
                    e.flow -= newFlow;
                    break;
                }
            }
        }
    }