ILOG CPLEX 11.0 User's Manual > Continuous Optimization > Solving Problems with a Quadratic Objective (QP) > Examples: Creating a QP, Optimizing, Finding a Solution > Example: QPex1.java |
Example: QPex1.java |
INDEX PREVIOUS NEXT |
This example is almost identical to LPex1.java
using only the function populatebyrow
to create the model. Also, this function differs only in the creation of the objective from its LPex1.java
counterpart. Here the objective function is created and added to the model like this:
A quadratic objective may be built with square
, prod
or sum
methods. Note that inclusion of IloPiecewiseLinear
will change the model from a QP to a MIQP.
Copyright © 1987-2007 ILOG S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |