Taking the Shanghai Coal Company as an example, the author treats of the dispatch algorithm for coal-carrying trucks. After studying the business of the company thoroughly,she presents an integer programming model. Since this problem belongs to the so-called "NP-hard problms" and the operation facilities are not sufficient, an effective approximate algorithm is designed to meet the needs. In the design of this algorithm, some advanced data structures are employed to increase the speed and storage capacity of the algorithm considerably. Test resutls demonstrate that the economic efficiency obtained by this method has been increased significantly.