Learn R Programming

rorutadis (version 0.4.2)

addMaximalClassCardinalities: Add maximal class cardinality restrictions

Description

This function allows to define maximal cardinality of particular classes.

Usage

addMaximalClassCardinalities(problem, ...)

Arguments

problem
Problem to which preference information will be added.
...
Minimal cardinalities as two-element vectors c(i, j), where j is a maximal cardinality of class C_i.

Value

Problem with added preference information.

See Also

buildProblem removeMaximalClassCardinalities

Examples

Run this code
# 4 alternatives, 2 gain criteria, 3 classes, monotonously increasing
# and general marginal value functions
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))

# set maximal class cardinalities:
# at most two alternatives could be assigned to class 2
# and at most one alternative could be assigned to class 3
problem <- addMaximalClassCardinalities(problem, c(2, 2), c(3, 1))

Run the code above in your browser using DataLab