[PPL-devel] [GIT] ppl/ppl(pip): Updated the deepest cut strategy; now only selects rows associated to initial variables.
François Galea
francois.galea at uvsq.fr
Mon Nov 16 18:49:57 CET 2009
Module: ppl/ppl
Branch: pip
Commit: 5968086496c32916aeaafe8faadb471be547e2ec
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=5968086496c32916aeaafe8faadb471be547e2ec
Author: François Galea <francois.galea at uvsq.fr>
Date: Mon Nov 16 15:00:45 2009 +0100
Updated the deepest cut strategy; now only selects rows associated to initial variables.
This results in performance increase in most problems.
---
src/PIP_Tree.cc | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/PIP_Tree.cc b/src/PIP_Tree.cc
index 8dddf82..2058c45 100644
--- a/src/PIP_Tree.cc
+++ b/src/PIP_Tree.cc
@@ -1549,9 +1549,12 @@ PIP_Solution_Node::solve(PIP_Tree_Node*& parent_ref,
PPL_DIRTY_TEMP_COEFFICIENT(score2);
Coefficient best = 0;
dimension_type best_i = 0;
- for (i_ = 0; i_ < num_rows; ++i_) {
- const Row& row_t = tableau.t[i_];
- const Row& row_s = tableau.s[i_];
+ for (i_ = 0; i_ < num_vars; ++i_) {
+ if (basis[i_])
+ continue;
+ i = mapping[i_];
+ const Row& row_t = tableau.t[i];
+ const Row& row_s = tableau.s[i];
score1 = 0;
for (j = 0; j < num_params; ++j) {
mod_assign(mod, row_t[j], d);
@@ -1567,7 +1570,7 @@ PIP_Solution_Node::solve(PIP_Tree_Node*& parent_ref,
score = score1*score2;
if (score > best) {
best = score;
- best_i = i_;
+ best_i = i;
}
}
i = best_i;
More information about the PPL-devel
mailing list