Initialize the ILOG CPLEX Environment
ILOG CPLEX needs certain internal data structures to operate. In your own application, you use a routine from the Callable Library to initialize these data structures. You must initialize these data structures before your application calls any other routine in the ILOG CPLEX Callable Library.
To initialize a ILOG CPLEX environment, you must use the routine CPXopenCPLEX()
.
This routine checks for a valid ILOG CPLEX license and then returns a C pointer to the ILOG CPLEX environment that is creates. Your application then passes this C pointer to other ILOG CPLEX routines (except CPXmsg()
). As a developer, you decide for yourself whether the variable containing this pointer should be global or local in your application
A multithreaded application needs multiple ILOG CPLEX environments. Consequently, ILOG CPLEX allows more than one environment to exist at a time; each one consumes a licensed process.