Learn R Programming

coopProductGame (version 2.0)

makeLP: Make a linear production programming problem

Description

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

Usage

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.

Examples

Run this code
# NOT RUN {
# 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)
  
# }

Run the code above in your browser using DataLab