Adding framework for particle swarm optimizer