print.solveLP: Print Objects of Class solveLP

Description Usage Arguments Value Author(s) See Also Examples

View source: R/print.solveLP.R

Description

This method prints the results of the Linear Programming algorithm.

Usage

1
2
   ## S3 method for class 'solveLP'
print( x, digits=6, ...)

Arguments

x

an object returned by solveLP.

digits

number of digits to print.

...

currently ignored.

Value

print.solveLP invisibly returns the object given in argument x.

Author(s)

Arne Henningsen

See Also

solveLP, summary.solveLP, readMps, writeMps

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## example of Steinhauser, Langbehn and Peters (1992)
## Not run: library( linprog )

## Production activities
cvec <- c(1800, 600, 600)  # gross margins
names(cvec) <- c("Milk","Bulls","Pigs")

## Constraints (quasi-fix factors)
bvec <- c(40, 90, 2500)  # endowment
names(bvec) <- c("Land","Stable","Labor")

## Needs of Production activities
Amat <- rbind( c(  0.7,   0.35,   0 ),
               c(  1.5,   1,      3 ),
               c( 50,    12.5,   20 ) )

## Maximize the gross margin
res <- solveLP( cvec, bvec, Amat, TRUE )

## print the results
print( res )

linprog documentation built on May 29, 2017, 9:28 a.m.

Search within the linprog package
Search all R packages, documentation and source code