A double particle swarm optimization (DPSO), in which MPSO proposed by Sun et al.  is used as a global search algorithm and PSO with feasibility-based rules is used to do local searching, is proposed in this paper to solve mixed-variable optimization problems. MPSO can solve the non-continuous variables very well. However, the imprecise values of continuous variables brought the inconsistent results of each run. A particle swarm optimization with feasibility-based rules is proposed to find optimal values of continuous variables after the MPSO algorithm finishes each independent run, in order to obtain the consistent optimal results for mixed-variable optimization problems. The performance of DPSO is evaluated against two real-world mixed-variable optimization problems, and it is found to be highly competitive compared with other existing algorithms.