The resource optimization of ship erection procedure is a classic NP-hard problem. Through analyzing the character about this problem, an algorithm model of Particle Swarm Optimization (PSO) is proposed. Particle’s coordinate in the particle swarm is used for the activity’s actual start time and methods for resource leveling based on dynamic time variance are designed. Evolution equations based on integer compute rule is introduced to improve the converging speed and accuracy of traditional PSO algorithm. The last simulation experiment with the practical data demonstrates the feasibility and the effectiveness of the improved PSO algorithm by comparisons and analyses.