XPRSinit


Purpose
Initializes the Optimizer library. This must be called before any other library routines.
Synopsis
int XPRS_CC XPRSinit(const char *xpress);
Argument
xpress 
The directory where the Xpress‑MP password file is located. Users should employ a value of NULL unless otherwise advised, allowing the standard initialization directories to be checked.
Example
The following is the usual way of calling XPRSinit :
if(XPRSinit(NULL)) printf("Problem with XPRSinit\n");
Further information
1. Whilst error checking should always be used on all library function calls, it is especially important to do so with the initialization functions, since a majority of errors encountered by users are caused at the initialization stage. Any nonzero return code indicates that no license could be found. In such circumstances the application should be made to exit. A return code of 32, however, indicates that a student license has been found and the software will work, but with restricted functionality and problem capacity.
2. In multi-threaded applications where all threads are equal, XPRSinit may be called by each thread prior to using the library. Whilst the process of initialization will be carried out only once, this guarantees that the library functions will be available to each thread as necessary. In applications with a clear master thread, spawning other Optimizer threads, initialization need only be called by the master thread.
Related topics
XPRScreateprob, XPRSfree.


If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.