-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_script.m
More file actions
31 lines (27 loc) · 1.42 KB
/
Copy pathtest_script.m
File metadata and controls
31 lines (27 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
% for test purposes only
clearvars;
numberOfSources = 5;
queueLength = randi([500 700],numberOfSources,1); % variable queue length
queueLength = 5000; % same queue length for every source
inputPars = [];
activeModes = {'tul','sul','sdl','tdl'}; % a cell array with any of the following: 'tul', terrestrial uplink, 'sul', satellite UL, 'sdl', satellite downlink, 'tdl', terrestrial DL
% inputPars.retryLimit = 4;
% inputPars.activeModes = {'tul'};
% inputPars.sicMaxIter = 2;
% inputPars.tulAccMeth = 'csa-nc';
% inputPars.tulAccMeth = 'csa';
% inputPars.poissonThreshold = 0.0116;
% inputPars.poissonThreshold = 0.75;
% inputPars.rafLength = 500;
% inputPars.rafLength = 10;
% inputPars.timeConstraint = 1000;
% inputPars.timeConstraint = 10;
fprintf('Results are stored in the "results" variable.\n');
for modeIndex = 1:numel(activeModes)
[~,~,~,~,~,~,output] = randomAccess(numberOfSources,queueLength,char(activeModes(modeIndex)),inputPars);
results(modeIndex).load = sum(sum(output.firstTx > 0,2)) ./ (output.rafLength * output.duration);
results(modeIndex).throughput = sum(sum(output.queues,2)) ./ (output.rafLength * output.duration);
results(modeIndex).mode = char(activeModes(modeIndex));
fprintf('Mode %s - Load %f Throughput %f \n',results(modeIndex).mode,results(modeIndex).load,results(modeIndex).throughput);
validateResults(queueLength,output);
end