minObjective: Min Constraint.

Description Usage Arguments Value Examples

View source: R/objectives.R

Description

Create min-constraints related to an item parameter/value. That is, the created constraints can be used to minimize the sum of the item values (itemValues) of the test form. Note that this constraint can only be used when only one test form has to be assembled.

Usage

1
2
3
4
5
6
7
8
minObjective(
  nForms,
  itemValues,
  weight = 1,
  whichForms = seq_len(nForms),
  info_text = NULL,
  itemIDs = names(itemValues)
)

Arguments

nForms

Number of forms to be created.

itemValues

Item parameter/values for which the sum per test form should be constrained.

weight

a weight for the real-valued variable(s). Useful when multiple constraints are combined. Should only be used if the implications are well understood.

whichForms

An integer vector indicating which test forms should be constrained. Defaults to all the test forms.

info_text

a character string of length 1, to be used in the "info"-attribute of the resulting constraint-object.

itemIDs

a character vector of item IDs in correct ordering, or NULL.

Value

An object of class "constraint".

Examples

1
2
# constraint that maximizes the sum of the itemValues
maxObjective(nForms = 1, itemValues = rep(-2:2, 2))

eatATA documentation built on July 6, 2021, 5:07 p.m.