A 3T actively shielded MRI superconducting magnet is designed in the paper. In order to get an optimal design with rapid speed, it's simplified to a linear programming problem. Volume of coils is taken as optimization objective. Uniformity in DSV, safety limit on stray field and magnet dimensions are taken as constraints. Conversion method of nonzero current areas obtained from calculation of linear programming to sizes and locations of coils is given. Calculations are taken iteratively after shaping nonzero current areas to cross sections of coils and adjusting their positions to obtain the final design.