[PPL-devel] [GIT] ppl/ppl(pip): Improved best pivot row selection heuristic.

François Galea francois.galea at uvsq.fr
Fri Oct 9 17:57:58 CEST 2009


Module: ppl/ppl
Branch: pip
Commit: 9a9a350ade225d3d28b848da2caa4ccb63a8e0d0
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=9a9a350ade225d3d28b848da2caa4ccb63a8e0d0

Author: François Galea <francois.galea at uvsq.fr>
Date:   Fri Oct  9 17:57:18 2009 +0200

Improved best pivot row selection heuristic.

---

 src/PIP_Tree.cc |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/src/PIP_Tree.cc b/src/PIP_Tree.cc
index f52221b..7a470dd 100644
--- a/src/PIP_Tree.cc
+++ b/src/PIP_Tree.cc
@@ -1150,6 +1150,24 @@ PIP_Solution_Node::solve(PIP_Tree_Node*& parent_ref, const Matrix& ctx,
         std::cout << "Adding tautology: " << *c << std::endl;
 #endif
       } else {
+        /* Heuristically choose "best" pivoting row. */
+        Coefficient score;
+        Coefficient best = 0;
+        dimension_type best_i = n_a_d;
+        for (i = i__; i < num_rows; ++i) {
+          if (sign[i] != MIXED)
+            continue;
+          const Row& row = tableau.t[i];
+          score = 0;
+          for (j = 0; j < num_params; ++j)
+            score += row[j];
+          if (best_i == n_a_d || score < best) {
+            best = score;
+            best_i = i;
+          }
+        }
+        i__ = best_i;
+
 #ifdef NOISY_PIP
         {
           using namespace IO_Operators;




More information about the PPL-devel mailing list