mergeAssignments: Merge different assignments

Description Usage Arguments Value See Also Examples

View source: R/main.R

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:

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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)

rorutadis documentation built on May 2, 2019, 8:51 a.m.