IMQ and min_cost_max_flow