IBM ILOG Solver Debugger User's Manual > Debugging and Performance Tuning for Solver-based Applications > Improving your Application > Tutorial: Tuning the Propagation in the debuggolomb Example |
Tutorial: Tuning the Propagation in the debuggolomb Example |
INDEX
![]() |
This section is based on the debuggolomb example. It shows you how Solver Debugger can be used to tune the propagation of a Solver application.
In order to tune the propagation in the debuggolomb example, we will use the alldiff
global constraint of Solver with two different levels of propagation.
Visualize the Search Trees corresponding to the basic and extended filter levels. The following figure represents the Search Trees corresponding to the two filter levels.
In the Search Tree, the extended level enforces a stronger pruning than the basic one, while the basic filter level produces a bigger tree with additional right subtrees.
These right subtrees have only failure leaves, which is a sign of lack of propagation. By setting the filter level to the extended level these right subtrees are pruned.
The Christmas Tree provides a picture of the cost and the efficiency of the extended propagation.
Compare the number of propagation events in the first right subtree located in the frame in Figure 1.6 with the number of propagation events occurring at the corresponding big failure node in Figure 1.7.
The big node requires two times fewer propagation events to detect the failure than the subtree. So the extended propagation saved time.
Now compare the Initial Propagation statistics by looking at the root node. The efficiency of domain reduction is the same (63.25%).
Inspect the Initial Propagation. Solver adds a hidden constraint when posting the alldiff
constraint. When tracing the propagation at the first big failure node of the extended filter level, the Propagation Spy displays the extra propagation, as shown in the figure below.
difference[11]
to the interval [7..11]
.
alldiff
constraint strongly reduces the domains by means of Set Min
events. This additional propagation leads to a failure, avoiding a subtree exploration.
Notice that four Set Min
events are triggered on the difference[11]
variable where one should be enough. These Set
Min
events are Remove
Value
orders that have been translated by Solver into Set
Min
because the value to remove was a bound.
So, reasoning on bounds instead of on domains is sufficient in this case. Tune the alldiff
constraint to the intermediate filter level, which reasons on bounds instead of on domains.
You obtain the same Search Tree as with the extended filter level. The Propagation Spy shows that, at the same choice point, the variable difference[11]
is bound more quickly.
You can paste the matrix from the Constraint Profiler to Microsoft Excel and make your own statistics. For instance, summing the propagation events gives the results shown below. The table contains the statistics on the number of events for the debuggolomb problem.
Filter Level |
Total Number of Events |
---|---|
Basic |
3534 |
Intermediate |
2726 |
Extended |
2790 |
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |