Learn R Programming

coopProductGame (version 2.0)

plotlm: Plot method for linear production programming problems

Description

This function plots the graphical solution of simple linear production programming problems with two decision variables. The decision variables must be real, nonnegative and cannot have a finite upper bound. Only inequality constraints are supported.

Usage

plotlm(prod, A, b, c, title = NULL)

Arguments

prod

a linear production programming problem of class lpExtPtr.

A

production matrix.

b

vector of resources.

c

vector of benefits.

title

title of the plot. By default is NULL, so it returns a plot without title.

Value

Returns and plot a ggplot object with graphical solution of the problem.

See Also

makeLP.

Examples

Run this code
# NOT RUN {
# Vector of benefits
c <- c(68,52)
# Matrix of coefficients
A <- matrix(c(4,5,6,2), ncol = 2, byrow = TRUE)
# Vector of resources
b <- c(4,33)
# Make the associated linear program 
prod <- makeLP(c, A, b)
plotlm(prod, A, b, c)

# }

Run the code above in your browser using DataLab