Overview | Group | Tree | Graph | Index | Concepts |
This C++ template helps when you want to add elements to a model. In those synopses,
X
represents a class, x
is an instance of the class
X
. The class X
must be IloExtractable
,
IloExtractableArray
, or one of their subclasses.
If model
is an instance of IloModel
,
derived from IloExtractable
, then x
will
be added to the top level of that model.
As an alternative to this way of adding extractable objects to a model, you may
also use IloModel::add
.
This template preserves the original type of its argument x
when it
returns x
. This feature of the template may be useful, for example, in
cases like this:
IloRange rng = IloAdd(model, 3 * x + y == 17);
For a comparison of these two ways of adding extractable objects to a model, see
Adding Extractable Objects in the documentation of IloExtractable
.
See Also:
IloAnd, IloExtractable, IloExtractableArray, IloModel, IloOr