Learn R Programming

sybil (version 1.1.2)

addRowsToProb-methods: Add New Rows (Constraints) to an Optimization Problem

Description

Add new rows (constraints) to an optimization problem.

Usage

## S3 method for class 'optObj_clpAPI':
addRowsToProb(lp, i, type, lb, ub, cind, nzval)

## S3 method for class 'optObj_cplexAPI': addRowsToProb(lp, i, type, lb, ub, cind, nzval)

## S3 method for class 'optObj_glpkAPI': addRowsToProb(lp, i, type, lb, ub, cind, nzval)

## S3 method for class 'optObj_lpSolveAPI': addRowsToProb(lp, i, type, lb, ub, cind, nzval)

Arguments

lp
An object extending class optObj.
i
A numeric vector containing the new row indices.
type
A character vector giving the constraint type: "L": >= (lower bound), "U": <=< code=""> (upper bound) or "E": = (equality). If type[k] is not "L"
lb
A numeric vector containing the right-hand side of the new rows.
ub
Currently unused.
cind
A list containing the column indices of the new non-zero elements.
nzval
A list containing the new non-zero elements.

encoding

utf8

See Also

Superclass optObj and constructor function optObj.