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

Description Usage Arguments Methods Note Author(s) See Also

Description

Add new rows (constraints) to an optimization problem.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S4 method for signature 'optObj_clpAPI'
addRowsToProb(lp, i, type, lb, ub, cind, nzval, rnames = NULL)

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

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

## S4 method for signature '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.

Note

Arguments i, type, lb, cind, nzval and rnames (if not NULL) must have the same length.

Author(s)

Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de>

Maintainer: Mayo Roettger <mayo.roettger@hhu.de>

See Also

Superclass optObj and constructor function optObj.


sybil documentation built on May 31, 2021, 5:08 p.m.