www.pudn.com > model1-3.0.rar > data.m, change:2014-02-09,size:959b


% [ flux,biand,acc,distant ] = model1( 120, 0.5, 0.4, 3, 1 ,50, 4, 6, 0.1, 1, 2, 1, 1) 
%function [ flux,biand,acc,distant ] = model1( time, density1, density2, length_car1, length_car2, length_road , maxspeed1, maxspeed2, possibility, acc1,acc2,min_dis1,min_dis2 ) 
% [ flux,biand,acc,distant ] = model2( 120, 0.5, 0.4, 3, 1,30 ,5, 0.1, 1, 2, 1, 1) 
%function [ flux,biand,acc,distant ] = model2( time, density1, density2, length_car1, length_car2, length_road , maxspeed, possibility, acc1,acc2,min_dis1,min_dis2 ) 
 
clear all; 
 
for c=1:20 
    [ flux,biand,acc,distant ] = model1( 60, 0.05*c, 0.05*c, 3, 1 ,100, 4, 6, 0.1, 1, 2, 1, 1); 
    x1(c)=0.05*c 
    y1(c)=flux(1)+flux(2); 
end 
 
for c=1:20 
    [ flux,biand,acc,distant ] = model2( 60, 0.05*c, 0.05*c, 3, 1,100 ,5, 0.1, 1, 2, 1, 1); 
    x2(c)=0.05*c 
    y2(c)=flux(1)+flux(2); 
end 
 
plot(x1,y1,'r'); 
hold on; 
plot(x2,y2); 
xlabel('density'); 
ylabel('flux'); 
legend('model1','model2');