plotlm: Plot method for linear production programming problems

Description Usage Arguments Value Author(s) See Also Examples

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

1
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.

Author(s)

D. Prieto

See Also

makeLP.

Examples

1
2
3
4
5
6
7
8
9
# 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)

coopProductGame documentation built on May 1, 2019, 10:32 p.m.