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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

A similar Java program using Concert might express it this way:IloNumExpr x00 = model.prod(100, x[0], x[0]);IloNumExpr x11 = model.prod(100, x[1], x[1]);IloNumExpr x01 = model.prod(-200, x[0], x[1]);IloNumExpr Q = model.prod(0.5, model.sum(x00, x11, x01));model.add(model.minimize(Q));Again, the user could choose to simplify the above expression algebraically if that suits thepurposes of the application better.Finally, a Callable Library application in C might construct the quadratic objective functionin a way similar to the following:zqmatind[0] = 0; zqmatind[2] = 0;zqmatval[0] = 100.0; zqmatval[2] = -100.0;zqmatind[1] = 1; zqmatind[3] = 1;zqmatval[1] =-100.0; zqmatval[3] = 100.0;To re-emphasize the point about the factor of 1/2 in any of these methods: if that objectivefunction is evaluated with a solution of x1 = 1.000000 and x2 = 3.000000, the result tobe expected is 200, not 400.Reformulating QPs to Save MemoryWhen the Q matrix is very dense or extremely large in dimension, excessive memory may beneeded to solve the problem as conventionally formulated. However, you may be able to usean alternative formulation to avoid such bottlenecks. Specifically, if you can express Q asFF’, (where F is another matrix, not necessarily square, having fewer nonzeros than Q, andF’ is its transpose) then you can reformulate the QP like this:min c'x + y'yAx ~by - Fx = 0l

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

Saved successfully!

Ooh no, something went wrong!