Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Somewhat different license problem

    Posted 01/10/12 06:07 PM

    Originally posted by: SerenSoner


    Dear all,

    I've been using CPLEX for a while, both from the IDE itself and using the callable library. However, I recently wanted to import it to a plugin to a program, and have written the code for it.

    I compile the plugin with the necessary includes and stuff, but when the main program calls my plugin, I get the message

    Could not open CPLEX environment.
    CPLEX Error 32201: ILM Error 16: CPLEX: license file not found or unreadable.

    from my errorstring. While running the program, echo $ILOG_LICENSE_FILE points to the correct path. Any idea where to look ?

    Thanks
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Somewhat different license problem

    Posted 01/11/12 12:42 AM

    Originally posted by: SystemAdmin


    Ok. What is the output of 'echo $ILOG_LICENSE_FILE'. Please note that the ILOG_LICENSE_FILE environment variable should point towards the full absolute path of the license file along with the license file name. So, if you license file name is access.ilm and it is placed under the usr/license folder, then the value of the ILOG_LICENSE_FILE environment variable should be "/usr/license/access.ilm".
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Somewhat different license problem

    Posted 01/12/12 05:19 AM

    Originally posted by: SerenSoner


    Thanks for the reply. But echo $ILOG_LICENSE_FILE returns the correct output, and I can run cplex directly too. I think the problem is that, the software that I'm trying to use somehow neglects the environment variables. Is there any way to put the ILOG_LICENSE_FILE address not in the environment variable but in the code itself ?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Somewhat different license problem

    Posted 01/12/12 03:42 PM

    Originally posted by: SystemAdmin


    Yes, it is possible that the environment variable is not recognized by a particular application in which case you could set the variable in the code directly. Depending on the API being used (C/C++/Java/.NET etc), you will need to appropriately set the ILOG_LICENSE_FILE variable. For example, in C, you could use the setenv method to achieve this. I would suggest you to do a websearch for methods to set environment variables via code for your API and use that appropriately in your code before the instantiation of the IloCplex (or Cplex) object to resolve this.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer