12.07.2015 Views

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

If a node has multiple evaluators attached, they are consulted in the order the evaluators havebeen applied. Here is the application order:●If the first evaluator prefers one node over the other, the preferred node is used ascandidate and the next node is considered.● If the first evaluator does not give preference to one node over the other, the secondevaluator is considered, and so on.Thus, by adding multiple evaluators, you can build composite node selection strategieswhere later evaluators are used for breaking ties in previous evaluations.In the C++ API, node evaluators are implemented as subclasses of classIloCplex::NodeEvaluatorI. The class IloCplex::NodeEvaluator is the handleclass for node evaluators.In Java, node evaluators are implemented in objects of type IloCplex.NodeEvaluator(and there are no handle classes).Like goals, node evaluators use reference counting for memory management. As a result,you should always use the handle objects when dealing with node evaluators, and there is nomethod end to be called.Node evaluators use a two-step process to decide whether one node should take precedenceover another. First, the evaluator computes a value for every node to which it is attached.This is done by the method evaluate in C++:IloNum IloCplex::NodeEvaluatorI::evaluate();and in Java, by the method:double IloCplex.NodeEvaluator.evaluate();and in C#.NET:double Cplex.NodeEvaluator.Evaluate();This method must be implemented by users who write their own node evaluators. In themethod evaluate, the protected methods of the class IloCplex::NodeEvaluatorI(IloCplex.NodeEvaluator or Cplex.NodeEvaluator) can be called to queryinformation about the node being evaluated. The method evaluate must compute andreturn an evaluation (that is, a value) that is used later on, in the second step, to compare twonodes and select one of them. The evaluate method is called only once for every node, andthe result is cached and reused whenever the node is compared against another node with theevaluator.The second step consists of comparing the current candidate to another node. Thiscomparison happens only for evaluators that are shared by the current candidate and the<strong>ILOG</strong> <strong>CPLEX</strong> <strong>11.0</strong> — USER’ S MANUAL 441

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!