alts <- c("Corsa","Clio","Fiesta")
crit <- c("price","economy", "aesthetics","bootCapacity")
performanceTable <- matrix(c(5490, 51.4, 8.5, 285,
6500, 70.6, 7.0, 288,
6489, 54.3, 7.5, 290),
nrow=3, ncol=4, byrow=TRUE,
dimnames=list(alts, crit))
criteriaWeights <- setNames(c(0.35,0.25,0.25,0.15), crit)
criteriaMinMax <- setNames(c("min", "max", "max", "max"), crit)
positiveIdealSolutions <- setNames(c(4500, 80, 9, 300), crit)
negativeIdealSolutions <- setNames(c(7000, 52, 7, 150), crit)
# Overall
VIKOR(performanceTable, criteriaWeights, criteriaMinMax)
# Assuming different ideal and worst solutions
VIKOR(performanceTable, criteriaWeights, criteriaMinMax,
v=0.5, positiveIdealSolutions, negativeIdealSolutions)
# Using a subset of alternatives and criteria
VIKOR(performanceTable, criteriaWeights, criteriaMinMax,
v=0.5, positiveIdealSolutions, negativeIdealSolutions,
alternativesIDs = c("Clio","Fiesta"),
criteriaIDs = c("price","economy","aesthetics"))
Run the code above in your browser using DataLab