R/print.lp.R

Defines functions print.lp

Documented in print.lp

print.lp <- function(x, ...)
{
	if(x$status == 0) {
		cat("Success: the objective function is", x$objval, "\n")
            if (any (names(x) == "num.bin.solns") && x$num.bin.solns > 1)
            cat ("\t", x$num.bin.solns, "solutions returned\n")
      }
	else if(x$status == 2)
		cat("Error: no feasible solution found")
	else cat("Error: status", x$status, "\n")
}

Try the lpSolve package in your browser

Any scripts or data that you put into this service are public.

lpSolve documentation built on Sept. 13, 2024, 1:11 a.m.