According to current condition of railway coal transport , the paper constructs mathematical model with coal types inter - replaceable and another model with coal types non - inter - replaceable , designs genetic algorithm for the models based on c programming language of genetic algorithm , and finally uses case to verify feasibility of models and algorithm 摘要根據(jù)鐵路運輸中現(xiàn)有煤炭的運輸狀況,構(gòu)造出煤炭調(diào)運時,煤種間不能相互代用和可以相互代用的數(shù)學(xué)模型,并基于遺傳算法的c語言程序,對該模型進行了遺傳算法設(shè)計,最后通過算例,驗證了模型和算法的可行性。