Question & Answer
Question
What does the error message "The referenced IloExtractable has not been extracted by the IloAlgorithm" mean?
Answer
An IloExtractable is the base class for all of the modeling objects used to build and solve models. Examples include the IloNumVar
, IloNumRange
, IloConstraint
, and IloStateFunction
classes (the latter, as of this writing, used by CP-Optimizer but not CPLEX), This error message indicates that you are trying to access an extractable that has not been extracted by the instance of IloAlgorithm
mentioned in the error message. This condition can occur in many different situations, including:
- an attempt to access the value of a variable that was not extracted;
- the use of an unextracted extractable in a goal.
An extractable that has been created may not be extracted in these conditions:
- The extractable has not been added to the model, either explicitly via the IloModel::add() function, or implicitly because it is referenced by another extractable (e.g. an
IloNumVar
referenced by anIloRange
orIloConstraint
). - The extractable is not incident to any other extractable. For example, an instance of
IloNumVar
is incident to an instance ofIloRange
if the instance ofIloNumVar
is part of the instance ofIloExpr
that defines the instance ofIloRange
. - This extractable is incident to an extractable, but with no effect on it. For example, the unaffected extractable is used as a variable with a coefficient of zero in a constraint.
Regarding debugging an error of this type, the following tactics may help
- Systematically comment out code that builds the model, thus reducing the number of extractables in the model. When the error disappears after commenting out a particular model building section of code, one or more extractables associated with that code segment are probably involved in the error.
- Make good use of the methods of the IloExtractable class that identify the particular subclass for the individual extractable, such as
isVariable()
andisConstraint()
. - Use the
getID()
andgetName()/setName()
methods of theIloExtractable
class to more precisely identify the problematic extractable. Or, use the address listed in the error message to identify the extractable. - Use the << operator provided in the Concert API to display the model and relevant individual extractables.
In addition, http://www.ibm.com/support/docview.wss?uid=swg21400038 contains a discussion of general debugging strategies for IBM/ILOG Concert technology applications.
[{"Product":{"code":"SSSA5P","label":"IBM ILOG CPLEX Optimization Studio"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.2;9.1.3;9.1.2;9.1;9.0;8.1;8.0;7.5;7.1;7.0;6.6;12.5.0.1;12.5;12.4;12.3;12.2;12.1;12.0;11.2.1;11.2;11.1.1;11.1;11.0.1;11.0;10.3;10.2.1;10.2;10.1.1;10.1;10.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Product":{"code":"SSSA5P","label":"IBM ILOG CPLEX Optimization Studio"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF017","label":"Mac OS"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"12.5.1;12.5.0.1;12.5;12.4;12.3;12.2.0.1;12.2","Edition":"All Editions","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Historical Number
cplex/FAQ/111
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21400028