資源簡(jiǎn)介
針對(duì)認(rèn)知無線電中空閑頻譜資源的最優(yōu)分配問題,分別采用了遺傳算法和粒子群算法進(jìn)行求解。該代碼是利用遺傳算法和粒子群算法求解該問題的matlab仿真代碼。

代碼片段和文件信息
function?result=checkcheck(solutionL1C)
????L=length(solution);
????result=0;
????for?i=1:L-1
???????if(solution(i)==1)
??????????for?j=(i+1):L
??????????????if(solution(j)==1)
?????????????????temp1=L1(::i);
?????????????????temp2=L1(::j);
?????????????????if(temp1(2)==temp2(2)?&&?C(temp1(1)temp2(1)temp1(2))==1)%不同用戶使用相同信道而且相互干擾
?????????????????????result=1;
?????????????????????break;
?????????????????end
??????????????end
??????????end
??????????if(result==1)
?????????????break;?
??????????end
???????end
????end
end
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????????570??2013-05-25?23:40??code\checkcheck.m
?????文件????????694??2013-05-25?23:10??code\check_modify.m
?????文件????????547??2013-05-25?08:36??code\crossover.m
?????文件????????987??2013-05-28?16:06??code\exaustic_search.m
?????文件???????1964??2013-05-26?00:13??code\genetic_algorithm.m
?????文件????????594??2013-05-26?09:37??code\opt_solution_ES.m
?????文件???????2095??2013-05-28?16:37??code\PSO_algorithm.m
?????文件????????205??2013-05-26?00:07??code\reward.m
?????文件???????2457??2013-05-28?20:39??code\spectrum_allocation.m
?????文件????????607??2013-05-24?23:10??code\wheel_select.m
?????目錄??????????0??2013-05-28?20:50??code
-----------?---------??----------?-----??----
????????????????10720????????????????????11
評(píng)論
共有 條評(píng)論