makeLP: Make a linear production programming problem

Description Usage Arguments Value Author(s) Examples

View source: R/makeLP.R

Description

Given a linear production problem A %*% x <= b, the makeLP function creates a new lpSolve linear program model object.

Usage

1
makeLP(c, A, b)

Arguments

c

vector of benefits.

A

production matrix.

b

vector of resources.

Value

makeLP returns a lpSolve linear program model object. Specifically an R external pointer with class lpExtPtr.

Author(s)

D. Prieto

Examples

1
2
3
4
5
6
7
8
9
# Vector of benefits
c <- c(68,52)
# Production matrix
A <- matrix(c(4, 5, 6, 2), ncol = 2, byrow = TRUE)
# Vector of resources
b <- c(4,33)
# Make the associated linear production problem 
prod <- makeLP(c, A, b)
  

coopProductGame documentation built on Aug. 25, 2018, 5:04 p.m.