get.column: Get Column

Description Usage Arguments Value Author(s) References Examples

Description

Retrieve a column from an lpSolve linear program model object.

Usage

1
get.column(lprec, column)

Arguments

lprec

an lpSolve linear program model object.

column

a single numeric value from the set {1, ..., n} (where n is the number of decision variables in lprec) specifying which column to retrieve.

Value

a list with elements column and nzrow such that column[i] contains the constraint coefficient in row nzrow[i]. Rows not present in nzrow have coefficient zero in column.

Author(s)

Kjell Konis kjell.konis@me.com

References

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

Examples

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

x <- c(6,2,4,9)
add.column(lps.model, x)

y <- c(3,1,5)
ind <- c(1,2,4)
add.column(lps.model, y, ind)

get.column(lps.model, 2)

Example output

$column
[1] 3 1 5

$nzrow
[1] 1 2 4

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