Belief Propagation Min-Sum Algorithm for Generalized Min-Cost Network Flow