gawdzilla
gawdzilla

Reputation: 45

how to solve quadratic objective in CPLEX optimization studio?

I've implemented my problem in IBM ILOG CPLEX Optimization Studio.

Now i would like to modify the objective function to be quadratic and solve the problem. However, it shows an Error 5002:objective is not convex.->problem can be solved to global optimality with solution target 3->.

I have read the user guide and manual and the different topics in stackoverflow, and I beleive version 12.8 can solve mixed-integer quadratic problems.

    modify my objective from this 

        dexpr float overallcost[f in cars] = holdingTime[f];

    to this

    dexpr float overallcost[f in cars] = holdTime[f]*holdTime[f];

Error 5002:objective is not convex.->problem can be solved to global optimality with solution target 3->.

Upvotes: 0

Views: 908

Answers (2)

Alex Fleischer
Alex Fleischer

Reputation: 10062

See

https://www.ibm.com/support/knowledgecenter/SSSA5P_12.9.0/ilog.odms.cplex.help/CPLEX/Parameters/topics/OptimalityTarget.html

In order to set that parameter in order to solve quadratic objectives.

In your model, you may add:

execute
{
cplex.optimalitytarget=3;
}

Upvotes: 1

Daniel Junglas
Daniel Junglas

Reputation: 5940

As suggested by the error message you should try setting the solution target parameter to 3 to force CPLEX to solve your model.

More details about this can be found in this chapter of the user manual and here is the documentation of the respective parameter.

To set this parameter in the IDE create/add a settings file to your project and then go to Mathematical Programming -> General -> Type of solution to compute and choose "Global optimal solution".

Upvotes: 3

Related Questions