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. Because the operation of checking the license can be relatively time consuming, it is strongly recommended that you call the CPXopenCPLEX()
routine only once, or as infrequently as possible, in a program that solves a sequence of problems.