Overview | Group | Tree | Graph | Deprecated | Index | Concepts |
This macro can be used as a drop-in replacement for the template function
IloAdd
. That is, this macro adds the provided
extractable into the provided model and returns the extractable. But
additionally, unless ILONOLOCATIONS is defined, this the macro also calls:
extractable.setLocation(__FILE__, __LINE__);
The result is that the current source location is stored in the provided extractable. CP Optimizer can use the stored location in error messages and in model dumps.
When ILONOLOCATIONS is defined then the extractable is still added into the
model, however extractable.setLocation
is not called. Storing
source file locations in an object has some minor memory and time cost. By
defining ILONOLOCATIONS it is possible to easily turn off location
storing and eliminate this cost, e.g. for release mode complication. Note
that in order to be effective, ILONOLOCATIONS must be defined before any
Concert or CP Optimizer header file is included into your source file.
See Also: