function [R] = multi_class_example()

%--- Sample model of M/M/1 with two equal-priority classes
%--- Demonstrates solving systems of equations using \ operator

% Parameters
lambda_1 = 2;
lambda_2 = 3;
s_1 = .25;
s_2 = .1;

% Calculate per-class utilizations
U_1 = lambda_1 * s_1;
U_2 = lambda_2 * s_2;

% Form linear system
A = [1-U_1, -U_2 ; -U_1, 1-U_2];

b = [s_1; s_2];

% Solve
R = A \ b
R_1 = R(1);
R_2 = R(2);

% Verify that the solution satisfies our original equations
Q_1 = lambda_1 * R_1;
Q_2 = lambda_2 * R_2;

R_1 == Q_1 * s_1 + Q_2 * s_2 + s_1
R_2 == Q_1 * s_1 + Q_2 * s_2 + s_2


