Overview | Group | Tree | Graph | Index | Concepts |
The routine CPXnewrows
adds empty constraints to a
specified CPLEX problem object. This routine may be called any time after a
call to CPXcreateprob
.
For each row, the user can specify the sense, right-hand side value,
range value and name of the constraint. The added rows are indexed to put
them at the end of the problem. Thus, if rcnt
rows are added to
a problem object already having k
rows, the new rows have
indices k
, k+1
, ... k+rcnt-1
. The
constraint coefficients in the new rows are zero; the constraint
coefficients can be changed with calls to CPXchgcoef
,
CPXchgcoeflist
or CPXaddcols
.
sense[i] | = 'L' | ≤ constraint |
sense[i] | = 'E' | = constraint |
sense[i] | = 'G' | ≥ constraint |
sense[i] | = 'R' | ranged constraint |
Example
status = CPXnewrows (env, lp, rcnt, rhs, sense, NULL, newrowname);
See also the example lpex1.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 |
rcnt | An integer that indicates the number of new rows to be added to the problem object. |
rhs | An array of length |
sense | An array of length |
rngval | An array of length |
rowname | An array of length |