pyrepo_mcda.additions
Functions
|
Rank alternatives according to MCDA preference function values. If more than one alternative |
Module Contents
- pyrepo_mcda.additions.rank_preferences(pref, reverse=True)
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
- prefndarray
Vector with MCDA preference function values for alternatives
- reversebool
The boolean variable is True for MCDA methods that rank alternatives in descending order (for example, TOPSIS, CODAS) and False for MCDA methods that rank alternatives in ascending order (for example, VIKOR, SPOTIS)
Returns
- ndarray
Vector with alternatives ranking. Alternative with 1 value is the best and has the first position in the ranking.
Examples
>>> rank = rank_preferences(pref, reverse = True)