Learn R Programming

cplexAPI (version 1.4.0)

addIndConstrCPLEX: Adds an Indicator Constraint to the Specified CPLEX Problem Object

Description

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

Usage

addIndConstrCPLEX(env, lp, indvar, complemented,
                    nzcnt, rhs, sense, linind, linval, indname = NULL)

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.

indvar

The binary variable that acts as the indicator for this constraint.

complemented

A Boolean value that specifies whether the indicator variable is complemented.

nzcnt

An integer that specifies the number of nonzero coefficients in the linear portion of the indicator constraint.

rhs

The righthand side value for the linear portion of the indicator constraint.

sense

The sense of the linear portion of the indicator constraint.

linind

A vector that with linval defines the linear portion of the indicator constraint.

linval

A vector that with linind defines the linear portion of the indicator constraint.

indname

The name of the constraint to be added (optional).

Value

Zero if successful, otherwise nonzero.

Details

Interface to the C function addIndConstr which calls the CPLEX function CPXaddindconstr.

References

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