Description Usage Arguments Details Value Examples

Use a mathematical programming solver to solve a list for constrains.

1 2 3 4 5 6 7 |

`allConstraints` |
List of constraints. |

`solver` |
A character string indicating the solver to use. |

`timeLimit` |
The maximal runtime in seconds. |

`formNames` |
A character vector with names to give to the forms. |

`...` |
Additional arguments for the solver. |

Wrapper around the functions of different solvers (```
gurobi::gurobi(),
lpSolve::lp(), ...
```

for a list of constraints set up via `eatATA`

.
`Rglpk`

is used per default.

Additional arguments can be passed through
`...`

and vary from solver to solver (see their respective help pages,
`lp`

or `Rglpk_solve_LP`

); for example
time limits can not be set for `lpSolve`

.

A list with the following elements:

`solution_found`

Was a solution found?

`solution`

Numeric vector containing the found solution.

`solution_status`

Was the solution optimal?

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
nForms <- 2
nItems <- 4
# create constraits
target <- minimaxObjective(nForms = nForms, c(1, 0.5, 1.5, 2),
targetValue = 2, itemIDs = 1:nItems)
noItemOverlap <- itemUsageConstraint(nForms, operator = "=", itemIDs = 1:nItems)
testLength <- itemsPerFormConstraint(nForms = nForms,
operator = "<=", targetValue = 2, itemIDs = 1:nItems)
# use a solver
result <- useSolver(list(target, noItemOverlap, testLength),
itemIDs = paste0("Item_", 1:4),
solver = "GLPK")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.