summary.solveLP: Summary Results for Objects of Class solveLP

View source: R/summary.solveLP.R

summary.solveLPR Documentation

Summary Results for Objects of Class solveLP

Description

These methods prepare and print summary results of the Linear Programming algorithm.

Usage

   ## S3 method for class 'solveLP'
summary(object,...)
   ## S3 method for class 'summary.solveLP'
print(x,...)

Arguments

object

an object returned by solveLP.

x

an object returned by summary.solveLP.

...

currently ignored.

Value

summary.solveLP returns an object of class summary.solveLP. print.summary.solveLP invisibly returns the object given in argument x.

Author(s)

Arne Henningsen

See Also

solveLP, print.solveLP, readMps, writeMps

Examples


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

## prepare and print the summary results
summary( res )

linprog documentation built on March 19, 2022, 3:01 a.m.