Initializing help system before first use

Initialization and termination

The Optimizer library is initialized at the same time as BCL and so there is no need to call the Optimizer library initialization function, XPRSinit, from a user program. In standard use of BCL the function XPRBnewprob calls the BCL initialization function XPRBinit that automatically initializes the Optimizer if this is the first call to XPRBinit. In very large applications or integration with other systems it may be preferrable to call XPRBinit explicitly to separate the initialization from the definition of the problem(s).

At the end of the program, the normal BCL termination routine should be applied, first releasing any memory associated to problems using XPRBdelprob and subsequently calling XPRBfree to tidy up. These routines also free memory associated with the Optimizer library and hence neither of the XPRSdestroyprob or XPRSfree functions must be used. However, if one wishes to continue working with the Optimizer after terminating BCL, the Optimizer needs to be initialized (possibly before initializing BCL) and terminated separately.

Thus, the standard use of BCL is as follows:

XPRBprob prob;
prob = XPRBnewprob("Example1");
   ...                       /* Define and solve the problem */

Integration of a BCL problem into some larger application:

XPRBprob prob;
XPRBinit("");
   ...                       /* Perform other initialization tasks */
prob = XPRBnewprob("Example1");
   ...                       /* Define and solve the problem */
XPRBdelprob(prob);
XPRBfree();