ILOG CPLEX 11.0 User's Manual > Continuous Optimization > Solving Problems with Quadratic Constraints (QCP) > Changing Quadratic Constraints |
Changing Quadratic Constraints |
INDEX PREVIOUS NEXT |
To modify a quadratic constraint in your model, you must first delete the old quadratic constraint and then add the new one.
In Concert Technology, you add constraints (whether or not they are quadratic) by means of the method add
of the class IloModel
, as explained about C++ applications in Adding Constraints: IloConstraint and IloRange and about Java applications in The Active Model. To add constraints to a model in the .NET framework, see ILOG Concert Technology for .NET Users.
Also in Concert Technology, you can remove constraints (again, whether or not they are quadratic) by means of the method remove
of the class IloModel
, as explained about C++ applications in Deleting and Removing Modeling Objects and about Java applications in Modifying the Model.
The Callable Library has a separate set of routines for creating and modifying quadratic constraints; do not use the routines that create or modify linear constraints.
In the Callable Library, you add a quadratic constraint by means of the routine CPXaddqconstr
. You remove and delete quadratic constraints by means of the routine CPXdelqconstr
. Don't forget to change the problem type, as explained in Changing Problem Type. If you want to change a quadratic constraint, first delete it by calling CPXdelqconstrs
and then add the new constraint using CPXaddqconstr
.
In the Interactive Optimizer, if you want to change a quadratic constraint, you must delete the constraint (change delete qconstraints
) and add the new constraint. Again, you must change the problem type, as explained in Changing Problem Type.
Copyright © 1987-2007 ILOG S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |