亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dcamain.m

?? 一個關于仿真的程序
?? M
字號:
% Program 7-1
%
% dcamain.m
%
% Simulation program to realize DCA algorithm
%
% Programmed by F. Kojima
%

%%%%%%%%%%%%%%%% preparation part %%%%%%%%%%%%%%%%%%%%%%%%%%%%

cnedge = 20.0; % CNR on cell edge (dB)
cnirth = 15.0; % CNIR threshold (dB)
lambda = 6.0; % average call arrival rate (times/hour)
ht = 120.0; % average call holding time (second)
timestep = 10; % time step of condition check (second)
timeend = 5000; % time length of simulation (second)
chnum = 5; % number of channels per each base station

alpha = 3.5;          % pass loss factor
sigma = 6.5;          % standard deviation of shadowing

usernum = [5,10,15,20,25]; % number of users per cell

output = zeros(4,5); % output matrix

check = zeros(5,floor(timeend/timestep)); % matrix for transient statu

for parameter = 1:5
   
   rand('state',5);
   randn('state',1);
   
   user = usernum(parameter); %number of users per cell
   
   baseinfo = zeros(19, 2);
   %baseinfo(cell #, informations)
   %%%%%baseinfo(:, 1): x coordinates
   %%%%%baseinfo(:, 2): y coordinates
   
   userinfo = zeros(19, user, 15);
   %userinfo(cell #, user #, informations)
   %%%%%userinfo(:, :, 1): x axis
   %%%%%userinfo(:, :, 2): y axis
   %%%%%userinfo(:, :, 3): attenuation
   %%%%%userinfo(:, :, 4): usage 0->non-connected 1->connected
   %%%%%userinfo(:, :, 5): call termination time
   %%%%%userinfo(:, :, 6): allocated channel # 
   
   [baseinfo] = basest;
   [wrapinfo] = wrap;
   
   [meshnum, meshposition] = cellmesh;
   
   timenow = 0;
   blocknum = 0;
   forcenum = 0;
   callnum = 0;
   users = 0; % number of connected users
   
   %%%%%%%%%%%%%%%% main loop part %%%%%%%%%%%%%%%%%%%%%%%%%%%%
   
   while timenow < timeend
      
      callnumold = callnum;
      blocknumold = blocknum;
      forcenumold = forcenum;
      
      %finished calls
      for numcell = 1:19
         for numuser = 1:user
            if userinfo(numcell, numuser, 4) == 1 & userinfo(numcell, numuser, 5) < timenow
               userinfo(numcell, numuser, 4) = 0;
               users = users -1;
            end
         end
      end
      
      %reallocation check
      for numcell = 1:19
         for numuser = 1:user
            if userinfo(numcell, numuser,4) == 1
               reallo = 0; % flag
               cnirdb1 = 0.0;
               dwave = userinfo(numcell, numuser, 3);
               cn = power(10.0, cnedge/10.0) * dwave;
               uwave = 0.0;
               ch = userinfo(numcell, numuser, 6);
               for around = 2:7
                  othercell = wrapinfo(numcell, around);
                  for other = 1:user
                     if userinfo(othercell, other, 4) == 1 & userinfo(othercell, other, 6) == ch
                        userposi(1,1:2) = userinfo(othercell, other, 1:2);
                        here = baseinfo(numcell, :);
                        there = userposi - baseinfo(othercell, :) + baseinfo(around, :) + baseinfo(numcell, :);
                        uwave = uwave + dist(here, there, alpha)*shadow(sigma);
                     end
                  end
               end % around loop
               if uwave == 0
                  cnirdb = 10.0*log10(cn);
               else
                  cnirdb = 10.0*log10(1/(uwave/dwave+1/cn));
               end
               if cnirdb < cnirth
                  reallo = 1;
               end
               
               if reallo == 1 
                  userinfo(numcell, numuser, 4) = 0;
                  users = users -1;
                  succeed = 0;
                  cnirdb = 0.0;
                  for ch = 1:chnum
                     available = 1;
                     for other = 1:user
                        if userinfo(numcell, other, 4) == 1 & userinfo(numcell, other, 6) == ch
                           available = 0;
                        end
                     end
                     if available == 1
                        uwave = 0.0;
                        for around = 2:7
                           othercell = wrapinfo(numcell, around);
                           for other = 1:user
                              if userinfo(othercell, other, 4) == 1 & userinfo(othercell, other, 6) == ch
                                 userposi(1,1:2) = userinfo(othercell, other, 1:2);
                                 here = baseinfo(numcell, :);
                                 there = userposi - baseinfo(othercell, :) + baseinfo(around, :) + baseinfo(numcell, :);
                                 uwave = uwave + dist(here, there, alpha)*shadow(sigma);
                              end
                           end
                        end % around loop
                        if uwave == 0
                           cnirdb = 10.0*log10(cn);
                        else
                           cnirdb = 10.0*log10(1/(uwave/dwave+1/cn));
                        end
                     else
                        cnirdb = 0.0;
                     end
                     if cnirdb >= cnirth
                        succeed = 1;
                        users = users + 1;
                        userinfo(numcell, numuser, 4) = 1;
                        userinfo(numcell, numuser, 6) = ch;
                        break
                     end
                  end % ch loop
                  if succeed == 0
                     forcenum = forcenum + 1;
                  end
               end % reallo == 1
            end % connected (need to be checked)
         end % user loop
      end % cell loop
      
      %new call arrival
      for numcell = 1:19
         for numuser = 1:user
            if userinfo(numcell, numuser, 4) == 0 & rand <= lambda*timestep/3600
               callnum = callnum + 1;
               mesh = floor(meshnum.*rand) +1;
               while mesh > meshnum
                  mesh = floor(meshnum.*rand) +1;
               end
               userinfo(numcell, numuser, 1:2) = baseinfo(numcell, :) + meshposition(mesh, :);
               succeed = 0; % flag
               cnirdb = 0.0;
               userposi(1,1:2) = userinfo(numcell, numuser, 1:2);
               here = baseinfo(numcell,:);
               there = userposi;
               dwave = dist(here, there, alpha) * shadow(sigma);
               cn = power(10.0, cnedge/10.0) * dwave;
               for ch = 1:chnum
                  available = 1;
                  for other = 1:user
                     if userinfo(numcell, other, 4) == 1 & userinfo(numcell, other, 6) == ch
                        available = 0;
                     end
                  end
                  if available == 1
                     
                     uwave = 0.0;
                     for around = 2:7
                        othercell = wrapinfo(numcell, around);
                        for other = 1:user
                           if userinfo(othercell, other, 4) == 1 & userinfo(othercell, other, 6) == ch
                              userposi(1,1:2) = userinfo(othercell, other, 1:2);
                              here = baseinfo(numcell, :);
                              there = userposi - baseinfo(othercell, :) + baseinfo(around, :) + baseinfo(numcell, :);
                              uwave = uwave + dist(here, there, alpha)*shadow(sigma);
                           end
                        end
                     end % around loop
                     if uwave == 0
                        cnirdb = 10.0*log10(cn);
                     else
                        cnirdb = 10.0*log10(1/(uwave/dwave+1/cn));
                     end
                  else
                     cnirdb = 0.0;
                  end
                  if cnirdb >= cnirth
                     succeed = 1;
                     users = users + 1;
                     userinfo(numcell, numuser, 3) = dwave;
                     userinfo(numcell, numuser, 4) = 1;
                     userinfo(numcell, numuser, 5) = timenow + holdtime(ht);
                     userinfo(numcell, numuser, 6) = ch;
                     break
                  end
               end % ch loop
               if succeed == 0
                  blocknum = blocknum + 1;
               end
            end % new call
         end % user loop
      end % cell loop
      
      fprintf('%d\t%d\t%d\t%d\t%e\n',parameter,timenow,callnum-callnumold,blocknum-blocknumold,blocknum/callnum);
      check(parameter,timenow/timestep+1) = blocknum/callnum;
      check2(parameter,timenow/timestep+1) = forcenum/(callnum-blocknum);
      
      timenow = timenow + timestep;
   end %while loop
   
   %%%%%%%%%%%%%%%% output part %%%%%%%%%%%%%%%%%%%%%%%%%%%%
   
   output(1,parameter) = callnum;
   output(2,parameter) = blocknum;
   output(3,parameter) = blocknum/callnum;
   output(4,parameter) = forcenum/(callnum-blocknum);
end %parameter loop

fid = fopen('data.txt','w');
fprintf(fid,'UserNumber\t');
fprintf(fid,'%g\t%g\t%g\n', usernum(1,:));
fprintf(fid,'CallNumber\t');
fprintf(fid,'%g\t%g\t%g\n', output(1,:));
fprintf(fid,'BlockNumber\t');
fprintf(fid,'%g\t%g\t%g\n', output(2,:));
fprintf(fid,'BlockingProb. \t');
fprintf(fid,'%g\t%g\t%g\n', output(3,:));
fprintf(fid,'ForcedTerminationProb. \t');
fprintf(fid,'%g\t%g\t%g\n', output(4,:));
fclose(fid);

%******* end of file *********

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产精品成人| 国产激情一区二区三区四区 | 国产视频一区二区三区在线观看| proumb性欧美在线观看| 免费不卡在线视频| 久久精品日产第一区二区三区高清版| 亚洲国产美国国产综合一区二区| 乱一区二区av| 欧美日韩国产精品自在自线| 中文字幕精品三区| 亚洲精品高清视频在线观看| 国产99久久久国产精品免费看 | 欧美色图免费看| www.久久精品| 国产91精品在线观看| 久久成人av少妇免费| 亚洲国产中文字幕在线视频综合| 中文字幕视频一区| 久久久国产一区二区三区四区小说| 欧美一区二区在线免费观看| 欧美在线看片a免费观看| 99久久精品国产精品久久| 国产乱一区二区| 久久 天天综合| 日韩—二三区免费观看av| 亚洲一二三四久久| 亚洲卡通欧美制服中文| 国产精品第一页第二页第三页| 久久久三级国产网站| 日韩欧美国产午夜精品| 日韩一级二级三级精品视频| 欧美高清视频一二三区| 欧美日韩精品福利| 欧美日韩另类一区| 欧美久久一二区| 欧美妇女性影城| 欧美疯狂性受xxxxx喷水图片| 欧美另类高清zo欧美| 欧美日韩视频在线观看一区二区三区| 99久久伊人久久99| 成人av午夜影院| 91麻豆精品在线观看| 91麻豆福利精品推荐| 欧美性猛片aaaaaaa做受| 欧美性极品少妇| 欧美高清激情brazzers| 日韩欧美另类在线| 国产亚洲欧洲997久久综合| 国产女人水真多18毛片18精品视频| 中国色在线观看另类| 国产精品久久久久aaaa樱花| 亚洲欧洲成人精品av97| 亚洲免费在线视频| 午夜精品福利久久久| 日本aⅴ亚洲精品中文乱码| 麻豆国产精品视频| 成人网在线播放| 26uuu成人网一区二区三区| 欧美卡1卡2卡| 久久女同互慰一区二区三区| 国产精品视频九色porn| 亚洲老妇xxxxxx| 蜜桃一区二区三区在线| 国产成人精品在线看| 91在线观看成人| 欧美一区二区在线免费播放| 精品久久久久久久久久久久久久久久久| www欧美成人18+| 亚洲日本在线天堂| 日本美女一区二区| 国产99一区视频免费| 欧美色电影在线| 久久久五月婷婷| 一区二区三区产品免费精品久久75| 日本不卡123| 成人小视频在线观看| 欧美视频在线观看一区二区| 久久亚洲一区二区三区明星换脸 | 在线视频你懂得一区二区三区| 7878成人国产在线观看| 国产精品毛片久久久久久| 亚洲国产成人av好男人在线观看| 国产在线观看一区二区| 在线观看一区二区视频| 久久综合九色综合97_久久久| 亚洲精品免费播放| 国产在线播精品第三| 欧美亚洲综合在线| 日本一区二区免费在线观看视频| 一区2区3区在线看| 粉嫩aⅴ一区二区三区四区五区 | 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 欧美性做爰猛烈叫床潮| 久久美女艺术照精彩视频福利播放 | 日韩欧美中文字幕精品| 亚洲手机成人高清视频| 国产综合久久久久久久久久久久| 欧美怡红院视频| 亚洲国产精品99久久久久久久久 | 日韩一区二区三区视频在线 | ...av二区三区久久精品| 午夜伊人狠狠久久| av在线一区二区三区| xnxx国产精品| 久久精品国产成人一区二区三区| 色系网站成人免费| 久久精品一区蜜桃臀影院| 日产精品久久久久久久性色 | 26uuu精品一区二区 | av中文字幕一区| 国产高清精品网站| 中文字幕视频一区| 日韩av网站免费在线| 3751色影院一区二区三区| 看电影不卡的网站| 欧美中文字幕一区| 亚洲成人第一页| 色婷婷亚洲综合| 亚洲精品免费看| 欧美一级片免费看| 成人免费视频视频| 国产精品久久久久久久岛一牛影视| 91福利精品视频| 日韩在线卡一卡二| 中文字幕欧美国产| 欧洲精品中文字幕| 成人av集中营| 久久99在线观看| 亚洲精品免费在线播放| 国产精品亚洲一区二区三区妖精| 中文字幕在线播放不卡一区| 91麻豆国产精品久久| 亚洲精品欧美专区| 欧美xxx久久| 成人午夜精品在线| 亚洲第一激情av| 国产精品视频麻豆| 91精品国产色综合久久不卡电影| 国产乱一区二区| 石原莉奈在线亚洲二区| 久久精品夜色噜噜亚洲aⅴ| eeuss鲁片一区二区三区在线看| 欧美激情在线一区二区三区| jiyouzz国产精品久久| 亚洲制服丝袜在线| 亚洲综合视频在线观看| 亚洲成年人影院| 国产亚洲人成网站| 欧美大片拔萝卜| 欧美视频日韩视频在线观看| 97精品视频在线观看自产线路二| 黄色小说综合网站| 亚洲欧洲精品一区二区三区| 精品国产百合女同互慰| 国产盗摄一区二区| 欧美精品国产精品| 国产欧美一区二区精品久导航| 欧美日韩亚洲综合在线| 亚洲一区视频在线| 欧美日韩中文国产| 美女网站色91| 国产色婷婷亚洲99精品小说| 成人av电影观看| 亚洲一区二区四区蜜桃| 日韩欧美在线不卡| 成人午夜视频免费看| 亚洲图片欧美综合| 久久久久久日产精品| 一本久道中文字幕精品亚洲嫩| 午夜亚洲国产au精品一区二区| 日韩女优毛片在线| av在线这里只有精品| 日韩国产在线观看一区| 久久久久久久综合色一本| 99re成人精品视频| 奇米色一区二区三区四区| 国产精品乱码一区二区三区软件| 欧美日韩一区二区三区不卡| 激情文学综合丁香| 一区二区三区高清| 久久理论电影网| 欧美色网站导航| 成人国产精品免费观看| 喷水一区二区三区| 亚洲日本一区二区| 久久久综合九色合综国产精品| 在线视频观看一区| 国产成人精品www牛牛影视| 亚洲超碰97人人做人人爱| 国产女同性恋一区二区| 7777精品伊人久久久大香线蕉的 | 蜜桃一区二区三区四区| 欧美亚洲日本一区| 国产乱一区二区| 亚洲3atv精品一区二区三区| 国产精品丝袜91| 日韩欧美一级在线播放| 色噜噜狠狠色综合中国| 国产精品资源网站| 日韩高清不卡一区二区三区|