Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Error : Using empty IloNumVar handle.

  • 1.  Error : Using empty IloNumVar handle.

    Posted Wed October 28, 2009 07:09 PM

    Originally posted by: SystemAdmin


    [rajtvm said:]

    Hello all,

    My model in C++/CPLEX is giving me the following error -

    Error : Using empty IloNumVar handle.

    All the declared variables are being used in the model constraints, so I assume they are all extracted. I am not able to figure out the source for this error. Any leads would be appreciated. Thanks!

    Raj

    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Error : Using empty IloNumVar handle.

    Posted Wed October 28, 2009 07:20 PM

    Originally posted by: SystemAdmin


    [johncui said:]

    The exception IloEmptyHandleException is thrown if an empty handle is passed as an argument to a method, function, or class constructor.

    So please check your passed argument

    And how about paste your part code here?

    John Cui
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Error : Using empty IloNumVar handle.

    Posted Thu October 29, 2009 05:58 PM

    Originally posted by: SystemAdmin


    [rajtvm said:]

    Thanks for your reply. I figured out the source of my problem last night. I was using cplex.getValue() to output the values of a set of 3-D variables, including variables whose indices were beyond the allowed bound. So getValue() was asked to provide values to variables which were never declared!!!

    Thank you again for your input!

    Raj
    #CPLEXOptimizers
    #DecisionOptimization