Learn R Programming

cplexAPI (version 1.4.0)

chgCoefCPLEX: Change a Single Coefficient in the Constraint Matrix, Linear Objective Coefficients, Righthand Side, or Ranges of a CPLEX Problem Object

Description

Low level interface function to the IBM ILOG CPLEX function CPXchgcoef. Consult the IBM ILOG CPLEX documentation for more detailed information.

Usage

chgCoefCPLEX(env, lp, i, j, val)

Arguments

env

An object of class "'>cplexPtr" as returned by openEnvCPLEX. This is basically a pointer to an IBM ILOG CPLEX environment.

lp

An object of class "'>cplexPtr" as returned by initProbCPLEX. This is basically a pointer to an IBM ILOG CPLEX problem object.

i

An integer that specifies the numeric index of the row in which the coefficient is located. The linear objective row is referenced with i = -1.

j

An integer that specifies the numeric index of the column in which the coefficient is located. The RHS column is referenced with j = -1. The range value column is referenced with j = -2. If j = -2 is specified and row i is not a ranged row, an error status is returned.

val

The new value for the coefficient being changed.

Value

Zero if successful, otherwise nonzero.

Details

Interface to the C function chgCoef which calls the CPLEX function CPXchgcoef.

References

The IBM ILOG CPLEX home page at https://www.ibm.com/support/knowledgecenter/SSSA5P.

See Also

getNumRowsCPLEX, getNumColsCPLEX, chgObjCPLEX, chgRhsCPLEX, chgRngValCPLEX