在Visual C++环境下,用C语言实现了一种改进的遗传算法,该算法通过实数编码、改进的遗传操作算子,并引入精英保留策略,可克服常规算法中收敛速度慢、早熟及局部收敛等缺陷。经GA测试函数验证该算法是有效的。与MATLAB遗传算法优化工具箱和SGA的系统仿真结果进行了比较,结果显示该算法不仅显著提高了全局搜索能力,加快了收敛速度,而且也改善了求解的质量及其优化结果的可靠性,是求解复杂函数优化问题的一种有潜力的算法,结合自行研发的微波管CAD软件,可望用于微波管性能优化,提高微波管设计能力。
Based on Visual C+ +, an improved genetic algorithm (IGA) using C language is proposed in this paper. In this improved algorithm, real--valued codihg and some improved genetic mechanisms are adopted, also the elitist strategy is introduced. Through testing GA functions with large dimensionality, the experimental results show that this new algorithm not only improves the global optimization performance and quickens the convergence speed, but also obtains robust results with good quality, which indicates it is a promising approach for solving global optimization problems. Applying this code to MWT CAD software developed by ourselves, it is possible optimize the MWTs performance and to improve MWTs design ability.