n_c=4;m_c=4;capacity_c=100*ones(1,4);buffer_c=2*capacity_c; nextHop_c=ones(4)-eye(4); for i=1:4 edge_c(i).in=[mod(i-1,4)];edge_c(i).out=i; endfor edge_c(1).in=4; n_f=6;m_f=10;capacity_f=100*ones(1,10);capacity_f(5)=150;capacity_f(6)=150; buffer_f=2*capacity_f; edge_f(1).in=[1]; edge_f(1).out=[2]; edge_f(2).in=[3]; edge_f(2).out=[4]; edge_f(3).in=[7]; edge_f(3).out=[8]; edge_f(4).in=[9]; edge_f(4).out=[10]; edge_f(5).in=[2,4,6]; edge_f(5).out=[1,3,5]; edge_f(6).in=[5,8,10]; edge_f(6).out=[6,7,9]; nextHop_f(1,:)=[1,0,0,0,0,0]; nextHop_f(2,:)=ones(1,6)-nextHop_f(1,:); nextHop_f(3,:)=[0,1,0,0,0,0]; nextHop_f(4,:)=ones(1,6)-nextHop_f(3,:); nextHop_f(5,:)=[0,0,1,1,0,1]; nextHop_f(6,:)=ones(1,6)-nextHop_f(5,:); nextHop_f(7,:)=[0,0,1,0,0,0]; nextHop_f(8,:)=ones(1,6)-nextHop_f(7,:); nextHop_f(9,:)=[0,0,0,1,0,0]; nextHop_f(10,:)=ones(1,6)-nextHop_f(9,:); elist1=[0,1,3,5000;0,2,4,5000;0,3,1,5000;0,4,1,5000]; t=0; for i=1:32 t+=randi(30); s=randi(4); d=randi(3); if(s==d) d=4; endif elist1(end+1,:)=[t,s,d,5000]; endfor pT_c=trafficFlowSim(1,n_c,m_c,edge_c,capacity_c,buffer_c,nextHop_c,elist1); pT_f=trafficFlowSim(1,n_f,m_f,edge_f,capacity_f,buffer_f,nextHop_f,elist1);