Learn R Programming

rorutadis (version 0.4.2)

findInconsistencies: Find inconsistencies in preference information

Description

This function finds sets of pieces of preference information that make problem inconsistent.

Usage

findInconsistencies(problem)

Arguments

problem
Problem to investigate.

Value

List of ordered by cardinality sets of indices of preference information that makes problem inconsistent. Use getRestrictions on sets to find out related preference information.

Examples

Run this code
perf <- matrix(c(1, 2, 2, 1), ncol = 2)
problem <- buildProblem(perf, 3, TRUE, c('g', 'g'), c(0, 0))
problem <- addAssignmentsUB(problem, c(1, 1))
problem <- addAssignmentsLB(problem, c(2, 2))

checkConsistency(problem) # TRUE

problem <- addAssignmentsLB(problem, c(1, 3)) # added inconsistency

checkConsistency(problem) # FALSE

inconsistencies <- findInconsistencies(problem)

setsOfprefInfo <- lapply(inconsistencies,
                         function(x) { getRestrictions(problem, x) })

Run the code above in your browser using DataLab