Learn R Programming

sybil (version 2.0.0)

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

Description

Add new rows (constraints) to an optimization problem.

Usage

# S4 method for optObj_clpAPI
addRowsToProb(lp, i, type, lb, ub, cind, nzval, rnames = NULL)

# S4 method for optObj_cplexAPI addRowsToProb(lp, i, type, lb, ub, cind, nzval, rnames = NULL)

# S4 method for optObj_glpkAPI addRowsToProb(lp, i, type, lb, ub, cind, nzval, rnames = NULL)

# S4 method for optObj_lpSolveAPI addRowsToProb(lp, i, type, lb, ub, cind, nzval, rnames = NULL)

Arguments

lp

An object extending class '>optObj.

i

A numeric vector containing the new row indices.

type

A character vector giving the constraint type: "F": free constraint (optObj_glpkAPI only), "L": >= (lower bound), "U": <= (upper bound) or "D": lb <= r <= ub (double bound) or "E": = (equality). If type[k] is not F, "L", "U", "D" or "E", the value of type[k] will be set to "E".

lb

A numeric vector containing the lower bound of the new constraints.

ub

A numeric vector containing the upper bound of the new constraints.

cind

A list containing the column indices of the new non-zero elements.

nzval

A list containing the new non-zero elements.

rnames

A character vector containing names for the new rows/constraints. Default: NULL.

Methods

signature(lp = "optObj_clpAPI")

method to use with package optObj_clpAPI. Parameter rnames is currently unused.

signature(lp = "optObj_cplexAPI")

method to use with package optObj_cplexAPI.

signature(lp = "optObj_glpkAPI")

method to use with package optObj_glpkAPI.

signature(lp = "optObj_lpSolveAPI")

method to use with package optObj_lpSolveAPI.

See Also

Superclass '>optObj and constructor function optObj.