Learn R Programming

RMCriteria (version 0.2.0)

RPrometheeV: RPrometheeV

Description

PROMETHEE V deals with a subset of alternatives considerating a set of restrictions. First, the PROMETHEE II is calculated to get a complete pre-order. Then, binary linear programming is used to select a subset that maximizes the net outranking flow, according to restrictions. The first step can be calculated using PROMETHEE II or PROMETHEE IV, this is defined by the user through the argument method. The second step is done using the package lp.

Usage

RPrometheeV(RPrometheeArguments, method = "PrometheeII")

Arguments

RPrometheeArguments

An object with all RPromethee arguments. In PROMETHEE V, the object must have the arguments constraintDir and bounds, in order to create the subset of alternatives. See RPrometheeConstructor for more information.

method

a character object used to choose how the RPrometheeV is going to be calculated. The method can be "PrometheeII" or "PrometheeIV". The standard is "RPrometheeII".

Value

  • Phi The resulting net Phi from the alternatives for all criterias.

  • Solution The solution resulting from linear programming problem.

  • alternatives The alternatives names.

  • criterias The criterias names.

  • datMat The data used corresponding to criterias and alternatives.

References

See Also

Other RPromethee methods: PrometheeIIIPlot, PrometheeIIPlot, PrometheeIPlot, PrometheeIVPlot, RPrometheeConstructor, RPrometheeIII, RPrometheeII, RPrometheeIVKernel, RPrometheeIV, RPrometheeI, SensitivityAnalysis, UpdateRPrometheeAlternatives, UpdateRPrometheeArguments, WalkingWeightsPlot, plot,RPrometheeI-method

Examples

Run this code
# NOT RUN {
## Create objects for each argument
data <- matrix(c(5.2, -3.5,
                 4.3, -1.2,
                 6.7, -2.0,
                 5.4, -5.0,
                 4.8,  0.0,
                 2.8, -3.4), byrow = TRUE, ncol = 2)

parms <- matrix(c(1.0, 5.0), byrow = TRUE, ncol = 1, nrow = 2)
vecWeights <- c(0.3, 0.7)
vecMaximiz <- c(FALSE, TRUE)
prefFunction <- c(0, 0)
constraintDir <- rep("<=", ncol(data))
bounds <- c(7,-1)
normalize <- FALSE
alternatives <- c("Alt 1", "Alt 2", "Alt 3")

## Create RPrometheeArguments object
PromObj <- RPrometheeConstructor(datMat = data, vecWeights = vecWeights,
vecMaximiz = vecMaximiz, prefFunction = prefFunction, parms = parms,
normalize = normalize, alternatives = alternatives, bounds = bounds,
constraintDir = constraintDir)

## Run RPrometheeV using standard method ("RPrometheeII")
result <- RPrometheeV(PromObj)

## Run RPrometheeV using "RPrometheeIV
result <- RPrometheeV(PromObj, method = "RPrometheeIV")

## Updating alternatives name using UpdateRPrometheeAlternatives
newAlternatives <- c("A", "B", "C", "D", "E", "F")
result <- UpdateRPrometheeAlternatives(result, newAlternatives)

## Updating any argument using UpdateRPrometheeArguments
newBounds <- c(5, -2)
PromObj <- UpdateRPrometheeArguments(PromObj, "bounds", newBounds)
(result <- RPrometheeV(PromObj))
# }

Run the code above in your browser using DataLab