Learn R Programming

MCDM (version 1.2)

TOPSISLinear: Implementation of TOPSIS Method for Multi-Criteria Decision Making Problems.

Description

The TOPSISLinear function implements the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) Method with the linear transformation of maximum as normalization prodecure.

Usage

TOPSISLinear(decision, weights, cb)

Arguments

decision
The decision matrix (m x n) with the values of the m alternatives, for the n criteria.
weights
A vector of length n, containing the weights for the criteria. The sum of the weights has to be 1.
cb
A vector of length n. Each component is either cb(i)='max' if the i-th criterion is benefit or cb(i)='min' if the i-th criterion is a cost.

Value

TOPSISLinear returns a data frame which contains the score of the R index and the ranking of the alternatives.

References

Garcia Cascales, M.S.; Lamata, M.T. On rank reversal and TOPSIS method. Mathematical and Computer Modelling, 56(5-6), 123-132, 2012.

Examples

Run this code

 d <- matrix(c(1,4,3,5,2,3),nrow = 3,ncol = 2)
 w <- c(0.5,0.5)
 cb <- c('max','max')
 TOPSISLinear(d,w,cb)

Run the code above in your browser using DataLab