% Network of Problem 7.3
% Parameters of the network
K = 4;
N = 3;
mu = 1./[ 2 5 5 ];
m = [ 1 1 1 ];
e = [ 1 0.5 0.2 ];

x = [ e ./ mu ];
x_max = max( x );
x_sum = sum( x );

% ABA-Bounds:
lambda_ub = min( K/x_sum, 1/x_max  );
meanT_lb = max( x_sum, K * x_max );

printf( '=== ABA-Results ===\n' );
printf( ' lambda(4) <= %f\n', lambda_ub );
printf( ' meanT(4) >= %f\n', meanT_lb );

x_avg = x_sum/N;
lambda_lb = K/( x_sum + (K-1) * x_max );
lambda_ub = K/( x_sum + (K-1) * x_avg );

meanT_lb = x_sum + (K-1) * x_avg;
meanT_ub = x_sum + (K-1) * x_max;

printf( '=== BJB-Results ===\n' );
printf( ' %f <= lambda(4) <= %f\n', lambda_lb, lambda_ub );
printf( ' %f <= meanT(4) >= %f\n', meanT_lb, meanT_ub );
