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
.
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 * obj=0) |
Method Summary | |
---|---|
public IloConstraint | asConstraint() const |
public IloIntExprArg | asIntExpr() const |
public IloModel | asModel() const |
public IloNumExprArg | asNumExpr() const |
public IloObjective | asObjective() const |
public IloNumVar | asVariable() const |
public void | end() |
public IloEnv | getEnv() const |
public IloInt | getId() const |
public IloExtractableI * | getImpl() const |
public const char * | getName() const |
public IloAny | getObject() const |
public IloBool | isConstraint() const |
public IloBool | isIntExpr() const |
public IloBool | isModel() const |
public IloBool | isNumExpr() const |
public IloBool | isObjective() const |
public IloBool | isVariable() const |
public void | setName(const char * name) const |
public void | setObject(IloAny obj) const |
Constructor Detail |
---|
This constructor creates a handle to the implementation object
.
Method Detail |
---|
This method returns the given extractable as a constraint or a null pointer
See IloExtractableVisitor if you want to introspect an expression
See Also:
This method returns the given extractable as an integer expression or a null pointer
See IloExtractableVisitor if you want to introspect an expression
See Also:
This method returns the given extractable as a model or a null pointer
See IloExtractableVisitor if you want to introspect an expression
See Also:
This method returns the given extractable as a floating expression or a null pointer
See IloExtractableVisitor if you want to introspect an expression
See Also:
This method returns the given extractable as an objective or a null pointer
See IloExtractableVisitor if you want to introspect an expression
See Also:
This method returns the given extractable as a variable or a null pointer
See IloExtractableVisitor if you want to introspect an expression
See Also:
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 specifying 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 method tells you whether or not the given extractable is a constraint or not
See IloExtractableVisitor if you want to introspect an expression
See Also:
This method tells you whether or not the given extractable is an integer expression or not
See IloExtractableVisitor if you want to introspect an expression
See Also:
This method tells you whether ot not the given extractable is a model or not
See IloExtractableVisitor if you want to introspect an expression
See Also:
This method tells you whether or not the given extractable is a floating expression or not
See IloExtractableVisitor if you want to introspect an expression
See Also:
This method tells you whether or not the given extractable is an objective or not
See IloExtractableVisitor if you want to introspect an expression
See Also:
This method tells you whether or not the given extractable is a variable or not
See IloExtractableVisitor if you want to introspect an expression
See Also:
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 afterward. Normally, obj
contains
user data pertinent to the invoking object.