12.07.2015 Views

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

provide as input (Q + Q')/2 instead of Q. This latter approach relies on the identityQ =(Q+Q')/2 + (Q -Q')/2 combined with the fact that (Q - Q')/2 contributes 0 (zero) tothe quadratic objective.Algebraic ViewIn the algebraic view, a quadratic objective function is specified as an expressions of theform:c1*x1 + ... + cn*xn + q11*x1*x1 + q12*x1*x2 + ... + qnn*xn*xn.This view is supported by the LP format, when entering quadratic objective functions in theInteractive Optimizer, and by Concert Technology. Again, a quadratic objective functionmust be convex in the case of a minimization problem, or concave in the case of amaximization problem. When entering a quadratic objective with the algebraic view, neithersymmetry considerations nor any implicit factors need to be considered, and indeedattempting to specify both of the off-diagonal elements for one of the quadratic terms mayresult in double the intended value of the coefficient.Examples for Entering QPs<strong>ILOG</strong> <strong>CPLEX</strong> LP format requires the factor of 1/2 to be explicitly specified in the file.Minimizeobj: [ 100 x1 ^2 - 200 x1 * x2 + 100 x2 ^2 ] / 2MPS format for this same objective function would contain the following.QMATRIXx1 x1 100x1 x2 -100x2 x1 -100x2 x2 100A C++ Concert program having such an objective function might include the following.model.add(IloMinimize(env, 0.5 * (100*x[0]*x[0] +100*x[1]*x[1] -200*x[0]*x[1])));Or since the algebraic view is supported, the factor of one-half could be simplified as in thefollowing equivalent expression:model.add(IloMinimize(env, (50*x[0]*x[0] +50*x[1]*x[1] -100*x[0]*x[1])));230 <strong>ILOG</strong> <strong>CPLEX</strong> <strong>11.0</strong> — USER’ S MANUAL

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!