为了扩大粒子群优化算法的应用范围和增强它的影响力,从软件重用的角度出发,考虑到算法流程的共性和个性,设计了一种基于策略模式的粒子群优化算法平台,此平台包含了基本的粒子群优化算法和经典的改进算法,可以解决连续优化和二进制组合优化问题.一系列的粒子群优化算法和优化问题被分别封装到相应的算法策略类和问题策略类中,这些类继承自一个具有统一接口的抽象基类.因此,该平台非常适合于粒子群优化算法的理论和应用研究,且易于维护和扩充.
In order to extend PSO's application area and increase influence of PSO,it is necessary to develop an algorithm platform for particle swarm optimization(PSO).From the angle of software reuse,we consider universality and individuality of the process of PSOs and design the algorithm platform based on strategy pattern for PSO.The algorithm platform contains basic PSO and many classic improved variants of PSO and solves continuous optimization and binary combination optimization problems.A series of algorithms and optimization problems are encapsulated by algorithm strategy class and problem strategy class respectively.These classes inherit from an abstract base class with a unified interface.So,the platform is very suitable for theoretical and application study;and it is easy to maintain and extend.