Method for adding variables to a linear program

Share:

Description

Additional arguments to the addVar-method pertinent to the defined S4-classes in this package are detailed below.

Usage

1
2
## S4 method for signature 'CLPD'
addVar(object, add2obj, newAcol, varNames = NULL, newBound = NULL, rhs = NULL)  

Arguments

object

CLPD: an object of class "CLPD", ordinarily returned by a call to LPD().

add2obj

vector: The coefficients to be added to the objective function.

newAcol

matrix: The columns to be added to the constraint matrix A.

varNames

NULL or vector: The character vector of variable names; if left NULL and add2obj has no names, then generic names will be created.

newBound

NULL or list: If left NULL, the default bounds in Rglpk will be used, otherwise a list-object as expected in Rglpk_solve_LP().

rhs

NULL or vector: The changed values for the rhs-constraints, if applicable.

Value

"CLPD": The LP definition with the newly included variables.

Author(s)

Bernhard Pfaff

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.