Overview | Group | Tree | Graph | Index | Concepts |
The routine CPXaddrows
adds constraints to a specified
CPLEX problem object. This routine may be called any time after a call to
CPXcreateprob
.
When you add a ranged row, CPXaddrows
sets the
corresponding range value to 0 (zero).
Use the routine CPXchgrngval
to change the range value.
sense[i] | = 'L' | ≤ constraint |
sense[i] | = 'E' | = constraint |
sense[i] | = 'G' | ≥ constraint |
sense[i] | = 'R' | ranged constraint |
CPXaddrows
as a way to add new columns is discouraged in favor of a direct call to
CPXnewcols
before calling CPXaddrows
.Example
status = CPXaddrows (env, lp, ccnt, rcnt, nzcnt, rhs, sense, rmatbeg, rmatind, rmatval, newcolname, newrowname);
See also the example lpex3.c
in the
ILOG CPLEX User's Manual and in the standard distribution.
env | A pointer to the CPLEX environment as returned by |
lp | A pointer to a CPLEX problem object as returned by |
ccnt | An integer that indicates the number of new columns in the constraints being added to the constraint matrix. When new columns are added, they are given an objective coefficient of zero, a lower bound of zero, and an upper bound of |
rcnt | An integer that indicates the number of new rows to be added to the constraint matrix. |
nzcnt | An integer that indicates the number of nonzero constraint coefficients to be added to the constraint matrix. This specifies the length of the arrays |
rhs | An array of length |
sense | An array of length |
rmatbeg | An array used with |
rmatind | An array used with |
rmatval | An array used with |
colname | An array of length |
rowname | An array containing pointers to character strings that represent the names of the new rows, or equivalently, the constraint names. May be NULL, in which case the new rows are assigned default names if the rows already resident in the CPLEX problem object have names; otherwise, no names are associated with the constraints. If row names are passed to |