Description Usage Arguments Details Methods Author(s) See Also
Load data to the problem object (extending class
optObj
). Use this method to generate problem
objects.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## S4 method for signature 'optObj_clpAPI'
loadLPprob(lp,
nCols, nRows, mat, ub, lb, obj, rlb, rtype,
lpdir = "max", rub = NULL, ctype = NULL,
cnames = NULL, rnames = NULL, pname = NULL,
defLowerBnd = SYBIL_SETTINGS("MAXIMUM") * -1,
defUpperBnd = SYBIL_SETTINGS("MAXIMUM")
)
## S4 method for signature 'optObj_cplexAPI'
loadLPprob(lp,
nCols, nRows, mat, ub, lb, obj, rlb, rtype,
lpdir = "max", rub = NULL, ctype = NULL,
cnames = NULL, rnames = NULL, pname = NULL)
## S4 method for signature 'optObj_glpkAPI'
loadLPprob(lp,
nCols, nRows, mat, ub, lb, obj, rlb, rtype,
lpdir = "max", rub = NULL, ctype = NULL,
cnames = NULL, rnames = NULL, pname = NULL)
## S4 method for signature 'optObj_lpSolveAPI'
loadLPprob(lp,
nCols, nRows, mat, ub, lb, obj, rlb, rtype,
lpdir = "max", rub = NULL, ctype = NULL,
cnames = NULL, rnames = NULL, pname = NULL)
|
lp |
An object of class
| ||||||||||||||||
nCols |
Number of columns (variables) of the constraint matrix. | ||||||||||||||||
nRows |
Number of rows (constraints) of the constraint matrix. | ||||||||||||||||
mat |
An object of class | ||||||||||||||||
ub |
A numeric vector of length | ||||||||||||||||
lb |
A numeric vector of length | ||||||||||||||||
obj |
A numeric vector of length | ||||||||||||||||
rlb |
A numeric vector of length | ||||||||||||||||
rtype |
A character vector of length
If | ||||||||||||||||
lpdir |
Single character string containing the direction of optimization.
Can be set to | ||||||||||||||||
rub |
A numeric vector of length | ||||||||||||||||
ctype |
A character vector of length
Values | ||||||||||||||||
cnames |
A character vector of length | ||||||||||||||||
rnames |
A character vector of length | ||||||||||||||||
pname |
A single character string containing a name for the problem object. | ||||||||||||||||
defLowerBnd |
For the | ||||||||||||||||
defUpperBnd |
For the |
Method loadLPprob
can be used any time after a problem object is
initialized by initProb
.
In order so set constraints, usually only parameter rlb
is required
and parameter rub
can be left at NULL
(which is the default).
If rub
is not NULL
, rlb
and rub
must have the same
length. Parameter rub
is required, if a particular constraint is a
ranged or double bounded constraint. The general idea is, for any constraint
i
, the value in rlb[i]
gives the lower bound and the value in
rub[i]
gives the upper bound. If the constraints of the optimization
problem do only have one bound (type "L"
, "U"
and "E"
),
all bounds can be set via rlb
and rub
is not required. If any
constraint is of type "D"
(a double-bounded or ranged constraint)
additionally rub
is required. It is of course also possible to use
rlb
strictly for all lower bounds and rub
for all upper bounds.
Again, if both rlb
and rub
are given (not NULL
), they
must have the same length. For equality constraints (type "E"
), allways
the value in rlb
is used.
For the optObj_cplexAPI
method: CPLEX uses so called
ranged constraints for double bounded constraints. The values in rlb
and rub
will be transformed into range values for ranged constraints.
The range for a ranged constraint i is given as
abs(rub[i] - rlb[i])
, so that the valid interval is denoted as
[rlb[i], rlb[i] + range]
.
For the optObj_glpkAPI
method: if cnames
or
rnames
is not NULL
, an index will be created.
For the optObj_clpAPI
method: if cnames
is
not NULL
, rnames
must be also not NULL
and vice versa.
For the optObj_lpSolveAPI
method: if cnames
is
not NULL
, rnames
must be also not NULL
and vice versa.
Round brackets ("("
and ")"
) will be replaced by underscores
"_"
.
signature(lp = "optObj_clpAPI")
method to use with package clpAPI.
signature(lp = "optObj_cplexAPI")
method to use with package cplexAPI.
signature(lp = "optObj_glpkAPI")
method to use with package glpkAPI.
signature(lp = "optObj_lpSolveAPI")
method to use with package lpSolveAPI.
Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de>
Maintainer: Mayo Roettger <mayo.roettger@hhu.de>
Superclass optObj
and constructor function
optObj
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.