GRBoptimize


GRBoptimize

int GRBoptimize( GRBmodel *model )

Optimize a model. The algorithm used for the optimization depends on the model type (simplex or barrier for a continuous model; branch-and-cut for a MIP model). Upon successful completion, this method will populate the solution related attributes of the model. See theAttributessection for more information on attributes.

Please consultthis sectionfor a discussion of some of the practical issues associated with solving a precisely defined mathematical model using finite-precision floating-point arithmetic.

Note that this routine will process all pending model modifications.

Return value:

A non-zero return value indicates that a problem occurred while optimizing the model. Refer to theError Codetable for a list of possible return values. Details on the error can be obtained by callingGRBgeterrormsg.

Arguments:

model: The model to optimize. Note that this routine only reports whether the optimization ran into an error. Query theStatusattribute to determine the result of the optimization (see theAttributessection for more information on querying attributes).

Example usage:

error = GRBoptimize(model);