R: Set Right-Hand-Side

set.rhs {lpSolveAPI} | R Documentation

## Set Right-Hand-Side

### Description

Set elements on the right-hand-side of an lpSolve linear program model object.

### Usage

    set.rhs(lprec, b, constraints = 1:m)

### Arguments

`lprec` | an lpSolve linear program model object.
`b` | a numeric vector of length `m` (where m is the number of constraints in `lprec`)
`constraints` | a numeric vector containing unique elements from the set {1, ..., m} (where m is the number of constraints in `lprec`) identifying the constraints for which to set the right-hand-side value.

### 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

    lps.model <- make.lp(4, 2)
    x <- c(6,2,4,9)
    set.column(lps.model, 2, x)
    y <- c(3,1,5)
    ind <- c(1,2,4)
    set.column(lps.model, 1, y, ind)

    set.rhs(lps.model, c(10, 20, 40, 80))

[Package lpSolveAPI version 5.5.2.0-17 Index]