update min cost flow