Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Concert Error: ilog.cplex.IloCplex$UnknownObjectException

    Posted 09/09/10 11:19 PM

    Originally posted by: waldstein


    Dear everyone,
    I tried to implement a linear model by Eclipse using API.
    Although the solution status is optimal, there is an error "Concert Error: ilog.cplex.IloCplex$UnknownObjectException: CPLEX Error: object is unknown to IloCplex" when output the decision variable. Besides, the value of decision variables does not satisfy the constraint. (It's weird....)
    Would you please tell me what this error indicate? And why can I obtain a result which can not satisfy the constraint of the model?
    Thanks!
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Concert Error: ilog.cplex.IloCplex$UnknownObjectException

    Posted 09/10/10 05:08 AM

    Originally posted by: SystemAdmin


    The exception is thrown when you attempt to get the value of a variable or a constraint that is not part of the model.
    Each variable for which you invoke getValue() must appear in at least one constraint or in the objective function.
    Double check your model and make sure that the variables for which you want to obtain the value are indeed part of the model.
    If, for some reason, the variable does not occur in the objective function nor in any constraint but you still want to be able to get its value (although this value will be useless) then do cplex.extract(variable) before you do cplex.solve(). After this cplex.getValue(variable) should work without throwing an exception.
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Concert Error: ilog.cplex.IloCplex$UnknownObjectException

    Posted 09/11/10 11:05 AM

    Originally posted by: SystemAdmin


    > waldstein wrote:
    > I tried to implement a linear model by Eclipse using API.

    Which API?

    > Although the solution status is optimal, there is an error "Concert Error: ilog.cplex.IloCplex$UnknownObjectException: CPLEX Error: object is unknown to IloCplex" when output the decision variable. Besides, the value of decision variables does not satisfy the constraint. (It's weird....)

    I don't know that this applies to other APIs, but in the Java API you need to be careful to distinguish between IloCplexModeler.le() and IloCplexModeler.addLe() (and similarly for ge/addGe and eq/addEq). The first method in each pair creates and returns a constraint but does not add it to the model; the second method in each pair also adds it to the model.

    /Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #CPLEXOptimizers
    #DecisionOptimization