Borrar filtros
Borrar filtros

[Urgent] Please I need : Measurement of alternatives and ranking according to COmpromise solution Code ?

1 visualización (últimos 30 días)
I need a code of Aggregation of rankings produced by different multi-criteria decision-making method.
I tried that code but no thing I dont have why it does not run:
% Variables
% CostperByte=1;
% Security=2;
% DataRate=3;
% PacketDelay=4;
% PacketJitter=5;
% PacketLoss=6;
%__________________
% UMTS1=1;
% UMTS2=2;
% WLAN1=3;
% WLAN2=4;
% WIMAX1=5;
% WIMAX2=6;
% LTE1=7;
% LTE2=8;
function Score = MARCOS(Networks,Weights)
global CostperByte;
global Security;
global DataRate;
global PacketDelay;
global PacketJitter;
global PacketLoss;
%NumberOfNetworks;
SIZE = size(Networks);
NumberOfNetworks = SIZE(1);
NumberOfCriteria = SIZE(2);
AAI=zeros(1,NumberOfCriteria);
AI= zeros(1,NumberOfCriteria);
for j=1:NumberOfCriteria
if ( (j==DataRate) || (j==Security) ) % benifit
AAI(1,j)= min (Networks(:,j));
AI(1,j)=max (Networks(:,j));
else
AAI(1,j)=max (Networks(:,j));
AI(1,j)=min(Networks(:,j));
end
end
Networks= [ AAI ; Networks ; AI];
SIZE = size(Networks);
NumberOfNetworks = SIZE(1);
NumberOfCriteria = SIZE(2);
Normalization=[];
for i=1:NumberOfNetworks
for j=1:NumberOfCriteria
if ( (j==DataRate) || (j==Security) ) %%%%%%% data rate, security, bandwidth
Normalization(i,j) = ( Networks (i,j)) / AI(1,j) ;
else %%%%%%% jitter, delay,st,
Normalization(i,j) = AI(1,j) / ( Networks (i,j));
end
end
end
for i=1: NumberOfNetworks
for j=1: NumberOfCriteria
W(i,j)=Normalization(i,j)*Weights(j);
end
end
SIZE = size(W);
NumberOfNetworks = SIZE(1);
NumberOfCriteria = SIZE(2);
SAAI = sum( W(1,:));
SAI = sum( W(NumberOfNetworks,:));
for i=2:NumberOfNetworks-1
S(i,1) =sum( W(i,:));
end
SAAI = sum( W(1,:));
SAI = sum( W(NumberOfNetworks,:));
SIZE = size(S);
NumberOfNetworks = SIZE(2);
NumberOfCriteria = SIZE(1);
for i = 1: NumberOfNetworks
Kp(1,i) = S(i) / SAI;
Km(1,i) = S(i)/ SAAI;
end
for i=1:NumberOfNetworks
FKm(i) = Kp(i)/( Kp(i)+Km(i));
FKp(i) = Km(i)/( Kp(i)+Km(i));
end
FKm
for i=1:NumberOfNetworks
FK(i)= ( FKm(i) + (FKp(i)) ) / ( 1+ ( (1-FKp (i))/FKp(i) ) + ( (1-FKm(i))/FKm(i) ) ) ;
end
%%summation%%
Saw=[];
for i=1:NumberOfNetworks
Saw= [Saw ; FK(i) ];
end
Score= Saw;
end
  1 comentario
Rik
Rik el 13 de Feb. de 2023
Your question is not urgent, the reason for that is explained here.
I also don't understand what your question is. Have a read here and here. It will greatly improve your chances of getting an answer.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by