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.

parameter for the getQuality methods, though some measures are not available for alloptimizer option choices. A list of solution qualities appears in the <strong>ILOG</strong> <strong>CPLEX</strong> Reference<strong>Manual</strong>, Callable Library and C++ API, as the group optim.cplex.solutionquality.Modifying a ModelIn some applications you may want to solve the modification of another model, in order, forexample, to analyze a scenario or to make adaptations based on the solution of the firstmodel. To do this, you do not have to start a new model from scratch, but instead you cantake an existing model and change it to your needs. To do so, call the modification methodsof the individual modeling objects.When an extracted model is modified, the modification is tracked in the cplex objectthrough notification. Whenever a modification method is called, cplex objects that haveextracted the model are notified about it. The cplex objects then track the modification intheir internal data structures.Not only does <strong>ILOG</strong> <strong>CPLEX</strong> track all modifications of the model it has extracted, but also ittries to maintain as much solution information from a previous invocation of solve as ispossible and reasonable.You have already encountered what is perhaps the most important modification method, thatis, the method IloModel::add for adding modeling objects to a model. Conversely, youmay 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 individualmodeling objects in the reference manual.Deleting and Removing Modeling ObjectsA special type of modification is that of deleting a modeling object by calling its endmethod. Consider, for example, the deletion of a variable. What happens if the variable youdelete has been used in constraints or in the objective function, or has been extracted to<strong>ILOG</strong> <strong>CPLEX</strong>? If you call its end method, Concert Technology carefully removes thedeleted variable from all other modeling objects and algorithms that may keep a reference tothe variable in question. This applies to any modeling object to be removed. However,user-defined handles to the removed variable are not managed by Concert Technology.Instead, it is up to the user to make sure that these handles are not used after the deletion ofthe modeling object. The only operation allowed then is the assignment operator.<strong>ILOG</strong> <strong>CPLEX</strong> <strong>11.0</strong> — USER’ S MANUAL 61

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

Saved successfully!

Ooh no, something went wrong!