The mathematical model of the planting system of Sanshui City was established with the help of analytic hierarchy process and model simulation metnod. The planting structure was optimized aided with the computer. The economical,ecological and social benefits of the optimized system increased by 15%,5.45%,and 3% respectively,and the comprehensive benefit increased by 11%. The result showed that the target of coordinating the environment and economy was reached.