Added formular for discrete pso.