Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  problem: Microsoft C++ exception: IloCplex::Exception at memory location

    Posted 09/04/10 01:58 AM

    Originally posted by: rourou


    Once I write "IloCplex cplex(model);" in my code, it throws the following:

    Unhandled exception at 0x7c812a6b in increasing.exe: Microsoft C++ exception: IloCplex::Exception at memory location 0x001230ec.

    and stop at stack frame: kernel32.dll!7c812a6b()

    once delete "IloCplex cplex(model);" ,it goes well.
    How to solve this problem?
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: problem: Microsoft C++ exception: IloCplex::Exception at memory location

    Posted 09/06/10 03:42 AM

    Originally posted by: SystemAdmin


    How do you instantiate IloModel? You have to use the constructor that takes an IloEnv argument:
    IloEnv env;
    IloModel model(env);
    IloCplex cplex(model);
    

    Could you post a little more code? Or send it to me at daniel(dot)junglas(at)de(dot)ibm(dot)com so that I can check?
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: problem: Microsoft C++ exception: IloCplex::Exception at memory location

    Posted 09/07/10 03:23 AM

    Originally posted by: SystemAdmin


    In the code you sent me I got an exception when you called IloCplex::getValue() because you did not call IloCplex::solve() before.
    Can you please post the complete call trace as given by Visual Studio?
    Also, you should wrap your code into this
    #include <iostream>
     
    try {
       // Your code here
       ...
    } catch (IloException& e) {
       std::cerr << "IloException: " << e << std::endl;
    } catch (std::exception& e) {
       std::cerr << "Standard exception: " << e.what() << std::endl;
    } catch (...) {
       std::cerr << "Some other exception!" << std:.endl;
    }
    

    This should give you more information about what went wrong.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: problem: Microsoft C++ exception: IloCplex::Exception at memory location

    Posted 09/07/10 04:35 AM

    Originally posted by: rourou


    I added the "try...catch" in my code, and it told me the license file couldn't be found.
    So i installed the license file according to the support file again, and it worked finally.

    Thank you very much
    #CPLEXOptimizers
    #DecisionOptimization