eliminateRedundant: Eliminate redundant linear constraints

View source: R/hitandrun.R

eliminateRedundantR 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

hitandrun documentation built on May 28, 2022, 1:09 a.m.