with(linalg); # load linear algebra package lambda := 0.01; # set values of parameters mu := 0.1; omega := 1.0; Q := array(sparse,1..768,1..768); # declare the generator matrix b := array(sparse,1..768); # declare the solution vector read `PC-LAN6.trans`; # read in the entries for Q Qt := transpose(Q): # transpose the generator matrix for i to 768 do Qt[768,i] := 1.0 od: # replace the last equation by # the normalisation constant in b[768] := 1.0; # both Qt and b p := linsolve(Qt,b); # solve to find the unknowns, the # steady state distribution read `NumberPC-LAN6`; # derive the mean number of # data packets at PC1 read `ThroughputPC-LAN6`; # derive the mean throughput # of data packets at PC1 w = N/X - 1/mu; # calculate waiting time as the # residence time (N/X) minus the # transmission time (1/mu)