Cookie Settings

Try our new documentation site (beta).

Filter Content By
Version
Table of contents
Filter by Language
C API Details
C++ API Details
GRBModel +
Java API Details
GRBModel +
.NET API Details
GRBModel +
Python API Details
Model +
Attributes
Parameters
Parameter Descriptions +


GRBgetconstrbyname

int GRBgetconstrbyname ( GRBmodel *model,
    const char *name,
    int *constrnumP )

Retrieves a linear constraint from its name. If multiple linear constraints have the same name, this routine chooses one arbitrarily.

Return value:

A non-zero return value indicates that a problem occurred while retrieving the constraint. Refer to the Error Code table for a list of possible return values. Details on the error can be obtained by calling GRBgeterrormsg.

Arguments:

model: The model from which the linear constraint should be retrieved.

name: The name of the desired linear constraint.

constrnumP: Constraint number for a linear constraint with the indicated name. Returns -1 if no matching name is found.