Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

objective function value???

  • 1.  objective function value???

    Posted Tue December 30, 2008 03:51 AM

    Originally posted by: SystemAdmin


    [ekimg said:]

    Dear all,

    I am a beginner in Cplex under C++. I am trying to do the following.

    When I give initial values (not optimal and feasible) for some variables in my problem and try to get the objective values according to these values, an error code appears telling that "no solution exists". I can not understand why.
    Is it possible to obtain the objective value in this case if the values are not optimal and feasible?

    Thanks
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: objective function value???

    Posted Wed December 31, 2008 07:19 PM

    Originally posted by: SystemAdmin


    [MaryFenelon said:]

    What you have given CPLEX is a set of values that it will use as hints for solution values the next time the solve() method is called. Only solve() can produce a CPLEX solution, so you can only query a solution after a solve() call and only if the solve() call returns IloTrue.  A solution is a set of values that is feasible for the problem, that is, satisfies all constraints, bounds and integrality conditions.

    If your objective is linear, you can use IloExpr::LinearIterator to query each variable and its associated coefficient and evaluate the objective using your initial variable values.
    #CPLEXOptimizers
    #DecisionOptimization