evo_spotis.additions

Module Contents

Functions

rank_preferences(pref[, reverse])

Rank alternatives according to MCDA preference function values. If more than one alternative

evo_spotis.additions.rank_preferences(pref, reverse=True)[source]

Rank alternatives according to MCDA preference function values. If more than one alternative have the same preference function value, they will be given the same rank value (tie).

Parameters
  • pref (ndarray) – Vector with MCDA preference function values for alternatives.

  • reverse (bool) – A boolean variable which is True for MCDA methods that rank alternatives in descending order (for example, the TOPSIS method, the CODAS method) and False for MCDA methods which rank options in ascending order (for example, the SPOTIS method, the VIKOR method).

Returns

Vector with alternatives ranking. Alternative with value 1 denoting the first place in ranking is the best.

Return type

ndarray

Examples

>>> rank = rank_preferences(pref, reverse = False)