delete.constraint: Delete Constraint

Description Usage Arguments Value Author(s) References Examples

View source: R/delete.constraint.q

Description

Delete a constraint from an lpSolve linear program model object.

Usage

1
delete.constraint(lprec, constraints)

Arguments

lprec

an lpSolve linear program model object.

constraints

a numeric vector of unique values from the set {1, ..., m} (where m is the number of constraints in lprec) specifying which constraints should be deleted.

Value

a NULL value is invisibly returned.

Author(s)

Kjell Konis kje[email protected]

References

http://lpsolve.sourceforge.net/5.5/index.htm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
lps.model <- make.lp(0, 4)
set.objfn(lps.model, rep(1, 4))

xt <- c(6,2,4,9)
add.constraint(lps.model, xt, "<=", 50)

yt <- c(3,1,5)
ind <- c(1,2,4)
add.constraint(lps.model, yt, 2, 75, ind)

delete.constraint(lps.model, 1)

Example output



lpSolveAPI documentation built on May 30, 2017, 7:12 a.m.