50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


rorutadis (version 0.4.2)

mergeAssignments: Merge different assignments

Description

This function allows to merge different assignments, e.g. from various decision makers (group result, group assignment). There are four types of group assignments:
  • Possible Possible - alternative a_i is possibly in class C_h for at least one decision maker,
  • Possible Necessary - alternative a_i is possibly in class C_h for all decision makers,
  • Necessary Possible - alternative a_i is necessarily in class C_h for at least one decision maker,
  • Necessary Necessary - alternative a_i is necessarily in class C_h for all decision makers.

The first possible-necessary parameter depends on decision makers assignments computed earlier, and the second is define as function parameter.

Usage

mergeAssignments(assignmentList, necessary)

Arguments

assignmentList
List of assignment matrices (results of calling calculateAssignments function).
necessary
Whether necessary or possible merging.

Value

n x p logical matrix, where each row represents one of n alternatives and each column represents one of p classes. Element [i, h] is TRUE if alternative a_i can be assigned to class C_h.

See Also

calculateAssignments

Examples

Run this code
perf <- matrix(c(5, 2, 1, 7, 0.5, 0.9, 0.4, 0.4), ncol = 2)
problem <- buildProblem(perf, 3, FALSE, c('g', 'g'), c(0, 0))
DM1Problem <- addAssignmentsLB(problem, c(1, 2), c(2, 3))
DM2Problem <- addAssignmentsLB(problem, c(2, 2), c(4, 2))

necessary <- FALSE
assignmentList <- list()
assignmentList[[1]] <- calculateAssignments(DM1Problem, necessary)
assignmentList[[2]] <- calculateAssignments(DM2Problem, necessary)

# generate possible - necessary assignments
PNAssignments <- mergeAssignments(assignmentList, TRUE)

Run the code above in your browser using DataLab