Direct-Driving Automated Mechanical Transmission (DAMT) gearshift actuator is a kind of electromagnetic linear actuator. In practical application, the actual gearshift force in each steady states is significantly different from the electromagnetic force model. For the optimization of gear shifting actuator with undetermined volume constraint, this paper presents a variable weight coefficient optimization method of electromagnetic linear actuator which equates the output forces under different steady states in the fitness function. These are intended to adjust the relationships among the optimized objects by using the fitness function to improve the overall optimization effect. In order to obtain the fitness value of each combination parameter accurately, finite element analysis (FEA) is adopted in this paper, to improve the efficiency of the algorithm, and a more efficient simulated annealing-particle swarm optimization algorithm (SA-PSO) is used by the proposed optimization method. Finally, experiment is carried out based on prototype of gearshift actuator to verify the optimization results. The results show that the maximum electromagnetic force and terminal electromagnetic force are both increased by more than 20%, and the volatility of gearshift force is reduced 26.4%, which ensures the structure compactness and fast response. The proposed method decreases the volatility by 27.5% compared with the constant weight coefficients and improves the gearshift force in each stage. INDEX TERMS DAMT, gearshift actuator, variable weight coefficient optimization, experiment.