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

Retrieves a quadratic constraint from its name. If multiple quadratic 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 quadratic constraint. Refer to the Error Code table for a list of possible return values. Details on the error can be obtained by calling GRBgeterrormsg.


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

name: The name of the desired quadratic constraint.

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