TST: test network flow with edges that have costs and limited capacities