A discrete particle swarm optimization algorithm with immune function is given for the assignment problem. In particle swarm optimization the cross strategy and local search technology are adopted when updating the particle positions
which can ensure the solution feasible. In the iterative process the particle diversity reduction can induce premature convergence. The dynamic affinity evaluation of population and antibody concentration inhibition mechanism based on information entropy are used
which can keep the particle diversity validly and enhance the ability of global optimization. The actual calculations show that the algorithm can achieve better solution
and it also can solve the assignment problem which the Hungary method can not do.