Lindo Systems

! BestWorst method for Multi-criteria problems.
We want to decide how much weight to give to each of several criteria.
We identify two reference criteria: Best and Worst.
We have pairwise comparisions of the importance of all other criteria
with these two references. ;

! Keywords: BestWorst method, MCDM, Multi-criteria;
! Ref:
 Rezaei, J.(2016) "Best-worst multi-criteria decision-making method: Some properties and a linear model"
 Omega,Vol 64, pp. 126-130;
sets:
 Criteria: aB, aW, W;
endsets
data:
   IBest = 2; ! index of Best;
   IWrst = 5; ! Index of Worst;
   aB =  2 1 4 2 8; ! Ranking relative to Best;
   aW =  4 8 2 4 1; ! Ranking relative to Worst;
enddata
 Min = Xi;

! Compare to Best;
 @for( Criteria( j):
! We want | W(IBest)/ W( j) - aB( j)| <= Xi, rewrite as;
    W( IBest) - aB( j)* W( j) <= Xi * W( j);
    aB( j)* W( j) - W( IBest) <= Xi * W( j);     
     );

! Compare to Worst;
 @for( Criteria( j):
! We want | W( j) / W( IWorst) - aW( j)| <= Xi, rewrite as;
    W( j) - aW( j)* W( IWrst) <= Xi * W( IWrst);
    W( j) - aW( j)* W( IWrst) <= Xi * W( IWrst);     
     );

! Weights must sum to 1;
  @sum( Criteria( j): W( j) ) = 1;