Appendix A
criterionNames = {'GHI', 'elevation', 'slope', 'aspect', 'temperature', 'land use land cover', ...
'distance to main roads', 'distance to cities', 'distance to airports', ...
'distance to rivers and streams', 'distance to coastlines', ...
'distance to archeological sites'};
AHP_matrix = [1, 7, 3, 4, 2, 6, 4, 6, 8, 7, 8, 9;
1/7, 1, 3/7, 4/7, 2/7, 6/7, 4/7, 6/7, 8/7, 7/7, 8/7, 9/7;
1/3, 7/3, 1, 4/3, 2/3, 2, 4/3, 6/3, 8/3, 7/3, 8/3, 9/3;
1/4, 7/4, 3/4, 1, 1/2, 3/2, 1, 3/2, 2, 7/4, 2, 9/4;
1/2, 7/2, 3/2, 2, 1, 3, 2, 3, 4, 7/2, 4, 9/2;
1/6, 7/6, 1/2, 3/2, 1/3, 1, 2/3, 1, 4/3, 7/6, 4/3, 3/2;
1/4, 7/4, 3/4, 1, 1/2, 3/2, 1, 3/2, 2, 7/4, 2, 9/4;
1/6, 7/6, 1/2, 3/2, 1/3, 1, 2/3, 1, 4/3, 7/6, 4/3, 3/2;
1/8, 7/8, 3/8, 1/2, 1/4, 3/4, 1/2, 3/4, 1, 7/8, 1, 9/8;
1/7, 1, 3/7, 4/7, 2/7, 6/7, 4/7, 6/7, 8/7, 7/7, 8/7, 9/7;
1/8, 7/8, 3/8, 1/2, 1/4, 3/4, 1/2, 3/4, 1, 7/8, 1, 9/8;
1/9, 7/9, 1/3, 1/4, 1/6, 2/3, 1/4, 2/3, 1/2, 7/9, 1/2, 1];
% Calculate the geometric mean of each row
geometric_means = prod(AHP_matrix, 2) .^ (1 / size(AHP_matrix, 2));
% Normalize the geometric means to obtain weights
weights = geometric_means / sum(geometric_means);
% Calculate the eigenvalues and principal eigenvalue
eigenvalues = eig(AHP_matrix);
principal_eigenvalue = max(eigenvalues);
% Consistency Index (CI) and Random Index (RI)
n = size(AHP_matrix, 1);
RI = [0, 0, 0.58, 0.9, 1.12, 1.24, 1.32, 1.41, 1.45, 1.49, 1.51, 1.48];
CI = (principal_eigenvalue - n) / (n - 1);
% Calculate the consistency ratio
CR = CI / RI(n);
% Display the results
disp('Consistency Ratio:');
disp(CR);
% Display the weights with criterion names
disp('Criterion Weights:');
% Display the weights with criterion names
for i = 1:numel(weights)
fprintf('%s: %f\n', criterionNames{i}, weights(i));
end
Appendix B
criterionNames = {'GHI', 'elevation', 'slope', 'aspect', 'temperature', 'land use land cover', ...
'distance to main roads', 'distance to cities', 'distance to airports', ...
'distance to rivers and streams', 'distance to coastlines', ...
'distance to archeological sites'};
% Preferences given as Best to Others (BTO) scores
BTO_scores = [1, 7, 3, 4, 2, 6, 4, 6, 8, 7, 8, 9];
% Number of criteria
n = numel(BTO_scores);
% Transform BTO scores into inverses for a sort-of optimization
BTO_inverses = 1 ./ BTO_scores;
% The sum of inverses (sum of weights will be 1 after normalization)
sum_inverses = sum(BTO_inverses);
% Normalized weights for input BTO scores
normalized_weights = BTO_inverses / sum_inverses;
% Setting up the linear programming problem
% We will minimize the sum of weights, which is a dummy objective just for the sake
% of having an LP problem, subject to the weights summing to 1
% Objective function: a dummy one (sum of weights)
f = ones(n, 1);
% Equality constraints for the weights summing to 1
Aeq = ones(1, n);
beq = 1;
% Lower and upper bounds: Weights cannot be negative and should not exceed the normalized weights
lb = zeros(n, 1);
ub = normalized_weights;
% Run the linear program
options = optimoptions('linprog', 'Algorithm', 'dual-simplex', 'Display', 'off');
[x, fval, exitflag, output] = linprog(f, [], [], Aeq, beq, lb, ub, options);
% Displaying the results
disp('Optimal weights:');
% Display the weights with criterion names
for i = 1:numel(x)
fprintf('%s: %f\n', criterionNames{i}, x(i));
end
```
Appendix C
% Data for BWm
bwm_data = [0.301796, 0.043114, 0.100599, 0.075449, 0.150898, 0.050299, 0.075449, 0.050299, 0.037725, 0.043114, 0.037725, 0.033533];
% Data for AHP
ahp_data = [0.301638, 0.043091, 0.100546, 0.075409, 0.150819, 0.053788, 0.075409, 0.053788, 0.037705, 0.043091, 0.037705, 0.027011];
% Create the figure
figure;
% Plot the bar chart for BWm
subplot(1, 2, 1);
bar(bwm_data);
title('BWm');
xlabel('Criteria');
ylabel('Weight');
xticks(1:length(bwm_data));
xticklabels({'GHI', 'elevation', 'slope', 'aspect', 'temperature', 'land use land cover', 'distance to main roads', 'distance to cities', 'distance to airports', 'distance to rivers and streams', 'distance to coastlines', 'distance to archeological sites'});
xtickangle(45);
% Plot the bar chart for AHP
subplot(1, 2, 2);
bar(ahp_data);
title('AHP');
xlabel('Criteria');
ylabel('Weight');
xticks(1:length(ahp_data));
xticklabels({'GHI', 'elevation', 'slope', 'aspect', 'temperature', 'land use land cover', 'distance to main roads', 'distance to cities', 'distance to airports', 'distance to rivers and streams', 'distance to coastlines', 'distance to archeological sites'});
xtickangle(45);
% Adjust the spacing between subplots
sgtitle('Comparison of Weights');
subplot(1, 2, 1);
subplot(1, 2, 2);
```