calculateWeights: calculateWeights

Description Usage Arguments Value Examples

Description

Implementation based on https://doi.org/10.1016/j.omega.2015.12.001. Calculates weights of the criteria using a linear model. Steps: 1. Build model (consists of validating model and constructing necessary constraints for LP problem). 2. Solve LP problem. 3. Calculate consistency ratio.

Usage

1
calculateWeights(criteriaNames, bestToOthers, othersToWorst)

Arguments

criteriaNames

Names of the criteria

bestToOthers

Vector of pairwise comparisons. Best criterion should be 1, others <2, 9>.

othersToWorst

Vector of pairwise comparisons. Worst criterion should be 1, others <2, 9>.

Value

Result that consist of criteriaNames, criteriaWeights, consistencyRatio and a model that was used to calculate weights.

Examples

1
2
3
4
criteriaNames <- c("quality", "price", "comfort", "safety", "style")
bestToOthers <- c(2, 1, 4, 2, 8)
othersToWorst <- c(4, 8, 2, 4, 1)
calculateWeights(criteriaNames, bestToOthers, othersToWorst)

jakub-tomczak/BWM documentation built on May 29, 2019, 8:01 a.m.