Documentation

GRBgetvarbyname


GRBgetvarbyname

int GRBgetvarbyname ( GRBmodel *model,
    const char *name,
    int *varnumP )

Retrieves a variable from its name. If multiple variables have the same name, this routine chooses one arbitrarily.

Return value:

A non-zero return value indicates that a problem occurred while retrieving the variable. 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 variable should be retrieved.

name: The name of the desired variable.

varnumP: Variable number for a variable with the indicated name. Returns -1 if no matching name is found.