Learn R Programming

sybil (version 1.1.2)

loadLPprob-methods: Load Data to Optimization Problem

Description

Load data to the problem object (extending class optObj). Use this method to generate problem objects.

Usage

## S3 method for class 'optObj_clpAPI':
loadLPprob(lp,
           nCols, nRows, mat, ub, lb, obj, rlb, rtype,
           lpdir = "max", rub = NULL, ctype = NULL)

## S3 method for class 'optObj_cplexAPI': loadLPprob(lp, nCols, nRows, mat, ub, lb, obj, rlb, rtype, lpdir = "max", rub = NULL, ctype = NULL)

## S3 method for class 'optObj_glpkAPI': loadLPprob(lp, nCols, nRows, mat, ub, lb, obj, rlb, rtype, lpdir = "max", rub = NULL, ctype = NULL)

## S3 method for class 'optObj_lpSolveAPI': loadLPprob(lp, nCols, nRows, mat, ub, lb, obj, rlb, rtype, lpdir = "max", rub = NULL, ctype = NULL)

Arguments

lp
An object of class optObj_clpAPI, optObj_cplexAPI,
nCols
Number of columns (variables) of the constraint matrix.
nRows
Number of rows (constraints) of the constraint matrix.
mat
An object of class Matrix. The constraint matrix of the problem object. The number of columns in mat must be nCols and the number of rows in mat must be n
ub
A numeric vector of length nCols giving the upper bounds of the variables of the problem object.
lb
A numeric vector of length nCols giving the lower bounds of the variables of the problem object.
obj
A numeric vector of length nCols giving the objective coefficients of the variables of the problem object.
rlb
A numeric vector of length nRows giving the right hand side of the problem object. If argument rub is not NULL, rlb contains the lower bounds of the constraints of the problem object.
rtype
A character vector of length nRows giving the constraint type: lll{ "F": free variable, no upper or lower bound $-\infty < x < \infty$ "L": variable with lower bound
lpdir
Single character string containing the direction of optimization. Can be set to "min" or "max". Default: "max".
rub
A numeric vector of length nRows giving the right hand side of the problem object. If not NULL, it contains the upper bounds of the constraints of the problem object. Default: NULL.
ctype
A character vector of length nCols giving the variable type. If set to NULL, no specific variable type is set, which usually means, all variables are treated as continous variables. Default: NULL.

encoding

utf8

Details

Method loadLPprob can be used any time after a problem object is initialized by initProb.

See Also

Superclass optObj and constructor function optObj.