An implementation of maxflowmincost problem solution