eliminateRedundant {hitandrun}R Documentation

Eliminate redundant linear constraints

Description

Given a set of linear constraints, gives a subset of these constraints that are non-redundant.

Usage

eliminateRedundant(constr)

Arguments

constr

Constraints

Details

If no constraints are redundant, returns the same set of constraints.

Value

A set of non-redundant constraints.

Author(s)

Gert van Valkenhoef, Tommi Tervonen

See Also

harConstraints

Examples

constr <- list(
  constr = rbind(
    c(-1  ,  0),
    c( 0  , -1),
    c( 1  ,  1),
    c( 0.5, -1)),
  dir = c('<=', '<=', '=', '<='),
  rhs = c(0, 0, 1, 0))

constr <- eliminateRedundant(constr)

stopifnot(nrow(constr$constr) == 3) # eliminates one constraint

[Package hitandrun version 0.5-6 Index]