Overview | Group | Tree | Graph | Index | Concepts |
This class is the base class of all extractable objects (that is, instances of such
classes as IloConstraint
,
IloNumVar
, and so forth).
Instances of subclasses of this class represent objects (such as constraints, constrained variables, objectives, and so forth) that can be extracted by Concert Technology from your model for use by your application in Concert Technology algorithms.
Not every algorithm can extract every extractable object of a model. For example, a
model may include more than one objective, but you can extract only one objective for
an instance of IloCplex
, documented in the ILOG CPLEX Reference Manual.
Most member functions in this class contain assert
statements. For an
explanation of the macro NDEBUG
(a way to turn on or turn off these
assert
statements), see the concept
Assert and NDEBUG.
Adding Extractable Objects
Generally, for an extractable object to be taken into account by one of the
algorithms in Concert Technology, you must add the extractable object to a model with
the member function IloModel::add
and extract the model
for the algorithm with the member function
IloAlgorithm::extract
.
Environment and Extractable Objects
Every extractable object in your model must belong to one instance of
IloEnv
. An extractable object (that is, an instance of
IloExtractable
or one of its derived subclasses) is tied throughout its
lifetime to the environment where it is created. It can be used only with extractable
objects belonging to the same environment. It can be extracted only for an algorithm
attached to the same environment.
Notification
When you change an extractable object, for example by removing it from a model, Concert Technology notifies algorithms that have extracted the model containing this extractable object about the change. Member functions that carry out such notification are noted in this documentation.
See Also:
Constructor Summary | |
---|---|
public | IloExtractable(IloExtractableI *) |
Method Summary | |
---|---|
public void | end() |
public IloEnv | getEnv() |
public IloInt | getId() |
public IloExtractableI * | getImpl() |
public const char * | getName() |
public IloAny | getObject() |
public void | setName(const char *) |
public void | setObject(IloAny) |
Constructor Detail |
---|
This constructor creates a handle to the implementation object
.
Method Detail |
---|
This member function first removes the invoking extractable object from all other extractable objects where it is used (such as a model, ranges, etc.) and then deletes the invoking extractable object. That is, it frees all the resources used by the invoking object. After a call to this member function, you can not use the invoking extractable object again.
end
notifies Concert Technology algorithms about the
destruction of this invoking object.
This member function returns the environment to which the invoking extractable object belongs. An extractable object belongs to exactly one environment; different environments can not share the same extractable object.
This member function returns the ID of the invoking extractable object.
This member function returns a pointer to the implementation object of the invoking extractable object. This member function is useful when you need to be sure that you are using the same copy of the invoking extractable object in more than one situation.
This member function returns a character string indicating the name of the invoking object (if there is one).
This member function returns the object associated with the invoking object (if there is one). Normally, an associated object contains user data pertinent to the invoking object.
This member function assigns name
to the invoking object.
This member function associates obj
with the
invoking object. The member function getObject
accesses
this associated object afterwards. Normally, obj
contains
user data pertinent to the invoking object.