% congctrl.m - congestion control plots
% RMM, 29 Jun 07

aminit;					% initialize macros

alpha = logspace(-2, 4);

% Plot the equilibrium buffer length (eqn from Mma)
bratio = (-2*3^(1/3)*alpha + 2^(1/3) * ...
  (9*alpha.^2 + sqrt(3)*sqrt(alpha.^3.*(4 + 27*alpha))).^(2/3)) ./ ...
  (6^(2/3)*alpha.*(9*alpha.^2 + sqrt(3).*sqrt(alpha.^3.*(4 + 27*alpha))).^(1/3));

figure(1); clf; axes('position', [0.13 0.58 0.25 0.3]);
pl = semilogx(alpha, bratio);

set(pl,'Linewidth', AM_data_linewidth);
amaxis([10^-2 10^4 0 1]);
set(gca, 'XTick', [10^-2 1 10^2 10^4]);
xlabel('bratio');
ylabel('alpha');
grid off; box on;

amprint('congctrl-eqplot');
