
  g = [ g; sum( f(end,:) ) ]; 

  % STEP 2.3
  if g(end) < K
    lambda_l = [ lambda_l; lambda(end) ];
    lambda_u = [ lambda_u; lambda_u(end) ];
  elseif g(end) > K
    lambda_u = [ lambda_u; lambda(end) ];
    lambda_l = [ lambda_l; lambda_l(end) ];
  end

end
meanK = f;
meanT = f ./ lambdas;

% OUTPUT
fprintf( '==========================================\n' );
fprintf( '=== Results for network of Problem 7.4 ===\n' );
fprintf( '==========================================\n' );
fprintf( '=== Mean response times: meanT_i ===\n' );
fprintf( ' rows = iteration / columns = nodes (1 - 3)\n ' );
meanT
fprintf( '=== Mean number of jobs: meanK_i ===\n' );
fprintf( ' rows = iteration / columns = nodes (1 - 3), column 4: g(lambda) \n ' );
[ meanK, g(2:end,:) ]
fprintf( '=== Utilizations: rho_i ===\n' );
fprintf( ' rows = iteration / columns = nodes (1 - 3)\n ' );
rho
fprintf( '=== Throughputs: lambda and lambda_i ===\n' );
fprintf( ' columns = column one: overall throughput / columns 2-4: nodes 1-3\n ' );
[ lambda, lambdas ]
fprintf( '=== lambda_l and lambda_u ===\n' );
fprintf( ' columns 1: lambda_l, column 2: lambda_u / columns 2-4: nodes 1-3\n ' );
[ lambda_l, lambda_u ]

