set.bounds: Set Bounds

Description Usage Arguments Value Author(s) References Examples

Description

Set bounds on the decision variables in an lpSolve linear program model object.

Usage

1
set.bounds(lprec, lower = NULL, upper = NULL, columns = 1:n)

Arguments

lprec

an lpSolve linear program model object.

lower

a numeric vector of lower bounds to be set on the decision variables specified in columns. If NULL the lower bounds are not changed.

upper

a numeric vector of upper bounds to be set on the decision variables specified in columns. If NULL the upper bounds are not changed.

columns

a numeric vector of values from the set {1, ..., n} specifying the columns to have their bounds set. If NULL all columns are set.

Value

a NULL value is invisibly returned.

Author(s)

Kjell Konis kjell.konis@me.com

References

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

Examples

1
2
3
4
5
6
lps.model <- make.lp(0, 4)

set.bounds(lps.model, lower = rep(-1.0, 4))
set.bounds(lps.model, upper = 1:4)

set.bounds(lps.model, lower = rep(0.0, 4), upper = rep(1.0, 4))

Example output



lpSolveAPI documentation built on May 2, 2019, 6:50 p.m.