GRBModel::get()


GRBModel::get()

Query the value(s) of a parameter or attribute. Use this method for parameters, for scalar model attributes, or for arrays of constraint or variable attributes.

double get ( GRB_DoubleParam param )

Query the value of a double-valued parameter.

Arguments:

param: The parameter being queried.

Return value:

The current value of the requested parameter.

int get ( GRB_IntParam param )

Query the value of an int-valued parameter.

Arguments:

param: The parameter being queried.

Return value:

The current value of the requested parameter.

string get ( GRB_StringParam param )

Query the value of a string-valued parameter.

Arguments:

param: The parameter being queried.

Return value:

The current value of the requested parameter.

char* get ( GRB_CharAttr attr,
    const GRBVar* vars,
    int count )

Query a char-valued variable attribute for an array of variables.

Arguments:

attr: The attribute being queried.

vars: An array of variables whose attribute values are being queried.

count: The number of variable attributes to retrieve.

Return value:

The current values of the requested attribute for each input variable. Note that the result is heap-allocated, and must be returned to the heap by the user.

char* get ( GRB_CharAttr attr,
    const GRBConstr* constrs,
    int count )

Query a char-valued constraint attribute for an array of constraints.

Arguments:

attr: The attribute being queried.

constrs: An array of constraints whose attribute values are being queried.

count: The number of constraint attributes to retrieve.

Return value:

The current values of the requested attribute for each input constraint. Note that the result is heap-allocated, and must be returned to the heap by the user.

char* get ( GRB_CharAttr attr,
    const GRBQConstr* qconstrs,
    int count )

Query a char-valued quadratic constraint attribute for an array of quadratic constraints.

Arguments:

attr: The attribute being queried.

constrs: An array of quadratic constraints whose attribute values are being queried.

count: The number of quadratic constraint attributes to retrieve.

Return value:

The current values of the requested attribute for each input quadratic constraint. Note that the result is heap-allocated, and must be returned to the heap by the user.

double get ( GRB_DoubleAttr attr )

Query the value of a double-valued model attribute.

Arguments:

attr: The attribute being queried.

Return value:

The current value of the requested attribute.

double* get ( GRB_DoubleAttr attr,
    const GRBVar* vars,
    int count )

Query a double-valued variable attribute for an array of variables.

Arguments:

attr: The attribute being queried.

vars: An array of variables whose attribute values are being queried.

count: The number of variable attributes to retrieve.

Return value:

The current values of the requested attribute for each input variable. Note that the result is heap-allocated, and must be returned to the heap by the user.

double* get ( GRB_DoubleAttr attr,
    const GRBConstr* constrs,
    int count )

Query a double-valued constraint attribute for an array of constraints.

Arguments:

attr: The attribute being queried.

constrs: An array of constraints whose attribute values are being queried.

count: The number of constraint attributes to retrieve.

Return value:

The current values of the requested attribute for each input constraint. Note that the result is heap-allocated, and must be returned to the heap by the user.

double* get ( GRB_DoubleAttr attr,
    const GRBQConstr* qconstrs,
    int count )

Query a double-valued quadratic constraint attribute for an array of quadratic constraints.

Arguments:

attr: The attribute being queried.

constrs: An array of quadratic constraints whose attribute values are being queried.

count: The number of quadratic constraint attributes to retrieve.

Return value:

The current values of the requested attribute for each input quadratic constraint. Note that the result is heap-allocated, and must be returned to the heap by the user.

int get ( GRB_IntAttr attr )

Query the value of an int-valued model attribute.

Arguments:

attr: The attribute being queried.

Return value:

The current value of the requested attribute.

int* get ( GRB_IntAttr attr,
    const GRBVar* vars,
    int count )

Query an int-valued variable attribute for an array of variables.

Arguments:

attr: The attribute being queried.

vars: An array of variables whose attribute values are being queried.

count: The number of variable attributes to retrieve.

Return value:

The current values of the requested attribute for each input variable. Note that the result is heap-allocated, and must be returned to the heap by the user.

int* get ( GRB_IntAttr attr,
    const GRBConstr* constrs,
    int count )

Query an int-valued constraint attribute for an array of constraints.

Arguments:

attr: The attribute being queried.

constrs: An array of constraints whose attribute values are being queried.

count: The number of constraint attributes to retrieve.

Return value:

The current values of the requested attribute for each input constraint. Note that the result is heap-allocated, and must be returned to the heap by the user.

string get ( GRB_StringAttr attr )

Query the value of a string-valued model attribute.

Arguments:

attr: The attribute being queried.

Return value:

The current value of the requested attribute.

string* get ( GRB_StringAttr attr,
    const GRBVar* vars,
    int count )

Query a string-valued variable attribute for an array of variables.

Arguments:

attr: The attribute being queried.

vars: An array of variables whose attribute values are being queried.

count: The number of variable attributes to retrieve.

Return value:

The current values of the requested attribute for each input variable. Note that the result is heap-allocated, and must be returned to the heap by the user.

string* get ( GRB_StringAttr attr,
    const GRBConstr* constrs,
    int count )

Query a string-valued constraint attribute for an array of constraints.

Arguments:

attr: The attribute being queried.

constrs: An array of constraints whose attribute values are being queried.

count: The number of constraint attributes to retrieve.

Return value:

The current values of the requested attribute for each input constraint. Note that the result is heap-allocated, and must be returned to the heap by the user.

string* get ( GRB_StringAttr attr,
    const GRBQConstr* qconstrs,
    int count )

Query a string-valued quadratic constraint attribute for an array of quadratic constraints.

Arguments:

attr: The attribute being queried.

constrs: An array of quadratic constraints whose attribute values are being queried.

count: The number of quadratic constraint attributes to retrieve.

Return value:

The current values of the requested attribute for each input quadratic constraint. Note that the result is heap-allocated, and must be returned to the heap by the user.