ILOG CPLEX 11.0 User's Manual > Languages and APIs > ILOG Concert Technology for C++ Users > Modifying a Model |
Modifying a Model |
INDEX PREVIOUS NEXT |
In some applications you may want to solve the modification of another model, in order, for example, to analyze a scenario or to make adaptations based on the solution of the first model. To do this, you do not have to start a new model from scratch, but instead you can take an existing model and change it to your needs. To do so, call the modification methods of the individual modeling objects.
When an extracted model is modified, the modification is tracked in the cplex
object through notification. Whenever a modification method is called, cplex
objects that have extracted the model are notified about it. The cplex
objects then track the modification in their internal data structures.
Not only does ILOG CPLEX track all modifications of the model it has extracted, but also it tries to maintain as much solution information from a previous invocation of solve
as is possible and reasonable.
You have already encountered what is perhaps the most important modification method, that is, the method IloModel::add
for adding modeling objects to a model. Conversely, you may call IloModel::remove
to remove a modeling object from a model.
Objective functions can be modified by changing their sense and by editing their expression, or by changing their expression completely.
Similarly, the bounds of constraints and their expressions can be modified.
For a complete list of supported modifications, see the documentation of the individual modeling objects in the reference manual.
Copyright © 1987-2007 ILOG S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |