本实验是遗传算法和鱼群算法求解无线传感覆盖问题(组合优化类)的实验。代码可供参考,只需更改目标函数就可以做别的实验。
代码主要包括三个功能: 1.绘图,绘制横纵坐标轴和各点坐标以及各点覆盖范围。 2.遗传算法。CGA类中包括二进制遗传算法。
3.鱼群算法。CFA类中包括二进制离散组合鱼群算法。-The WSN coverage control by GA and AFSA。
SHOW FULL COLUMNS FROM `jrk_downrecords` [ RunTime:0.000957s ]
SELECT `a`.`aid`,`a`.`title`,`a`.`create_time`,`m`.`username` FROM `jrk_downrecords` `a` INNER JOIN `jrk_member` `m` ON `a`.`uid`=`m`.`id` WHERE `a`.`status` = 1 GROUP BY `a`.`aid` ORDER BY `a`.`create_time` DESC LIMIT 10 [ RunTime:0.091726s ]
SHOW FULL COLUMNS FROM `jrk_tagrecords` [ RunTime:0.001016s ]
SELECT * FROM `jrk_tagrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 20 [ RunTime:0.001170s ]
SHOW FULL COLUMNS FROM `jrk_member` [ RunTime:0.000962s ]
SELECT `id`,`username`,`userhead`,`usertime` FROM `jrk_member` WHERE `status` = 1 ORDER BY `usertime` DESC LIMIT 10 [ RunTime:0.003582s ]
SHOW FULL COLUMNS FROM `jrk_searchrecords` [ RunTime:0.000982s ]
SELECT * FROM `jrk_searchrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 5 [ RunTime:0.006462s ]
SELECT aid,title,count(aid) as c FROM `jrk_downrecords` GROUP BY `aid` ORDER BY `c` DESC LIMIT 10 [ RunTime:0.015683s ]
SHOW FULL COLUMNS FROM `jrk_articles` [ RunTime:0.001242s ]
UPDATE `jrk_articles` SET `hits` = 2 WHERE `id` = 56706 [ RunTime:0.031033s ]