《优化设计》这门课程中的优化方法的作业,代码思路清晰,运行后没问题。包括,powell法,共轭梯度法,牛顿法,阻尼牛顿法,单纯形法,变尺度法等等。梯度法在第二个目标函数优化时并没有达到理想的点,陷入局部最优,阻尼牛顿法在第二个目标
函数处也精度不高。 用共轭梯度法配合牛顿法一维搜索来第二个目标函数时出现了 NaN 的情况, 是因为牛顿法的代码中运行时出现了分母为0的情况, 但是我在分母加了一个很小的数0.000001之后还会出
现,而已开始用变尺度法和牛顿法优化的时候也出现的 NaN 问题就消失了
SHOW FULL COLUMNS FROM `jrk_downrecords` [ RunTime:0.001031s ]
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.094527s ]
SHOW FULL COLUMNS FROM `jrk_tagrecords` [ RunTime:0.001223s ]
SELECT * FROM `jrk_tagrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 20 [ RunTime:0.001433s ]
SHOW FULL COLUMNS FROM `jrk_member` [ RunTime:0.001258s ]
SELECT `id`,`username`,`userhead`,`usertime` FROM `jrk_member` WHERE `status` = 1 ORDER BY `usertime` DESC LIMIT 10 [ RunTime:0.003719s ]
SHOW FULL COLUMNS FROM `jrk_searchrecords` [ RunTime:0.001200s ]
SELECT * FROM `jrk_searchrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 5 [ RunTime:0.004364s ]
SELECT aid,title,count(aid) as c FROM `jrk_downrecords` GROUP BY `aid` ORDER BY `c` DESC LIMIT 10 [ RunTime:0.016584s ]
SHOW FULL COLUMNS FROM `jrk_articles` [ RunTime:0.001206s ]
UPDATE `jrk_articles` SET `hits` = 2 WHERE `id` = 34081 [ RunTime:0.030207s ]