Add new rows (constraints) to an optimization problem.
# 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)
A numeric vector containing the new row indices.
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"
.
A numeric vector containing the lower bound of the new constraints.
A numeric vector containing the upper bound of the new constraints.
A list containing the column indices of the new non-zero elements.
A list containing the new non-zero elements.
A character vector containing names for the new rows/constraints.
Default: NULL
.
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.
Superclass '>optObj
and constructor function
optObj
.