to realize the algorithm of the raw-material-distribution