AIMD algorithm charging value becoming signification
Show older comments
I am trying to this AIMD algorithm
for t=[1:1440]
%generate uniform random number, p=rand
if p < pi then
ci(t+1) = b(1)ci(t)
else
ci(t+1) = b(2)ci(t)
endif
end else
ci(t+1) = min(cimax,ci(t)+a detat)
endif
endfor
endwhile
as
p=rand(1440,1);
for t=[1:1440];
Cimax(t)=7;
b1=p(1:1);
b2=p(2:2);
a=p(3:3);
% generate uniform random number,
if p(t) > p(t+1)
ci(t+1) = b1*ci(t);
%elseif ci(t+1) = b2*Ci(t)
else
ci(t+1) = min(Cimax(t),ci(t)+a);
end
% if V(t)<Vevent
% ci(t+1)=0
%end
end
end
but I can't seem to get a value of ci to increase towards 7 in the additive section or to decrease
Answers (0)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!