network flow with gain