[PPL-devel] [GIT] ppl/ppl(pip): Improved display in noisy mode.

François Galea francois.galea at uvsq.fr
Tue Oct 6 11:34:16 CEST 2009


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

Author: François Galea <francois.galea at uvsq.fr>
Date:   Tue Oct  6 10:54:18 2009 +0200

Improved display in noisy mode.

---

 src/PIP_Tree.cc      |   21 +++++++++++++++++++++
 src/PIP_Tree.defs.hh |    1 +
 2 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/src/PIP_Tree.cc b/src/PIP_Tree.cc
index f2866e7..31a0120 100644
--- a/src/PIP_Tree.cc
+++ b/src/PIP_Tree.cc
@@ -824,6 +824,12 @@ PIP_Solution_Node::solve(PIP_Tree_Node*& parent_ref, const Matrix& ctx,
     dimension_type num_params = tableau.t.num_columns();
     Row_Sign s;
 
+#ifdef NOISY_PIP
+    tableau.ascii_dump(std::cout);
+    std::cout << "context ";
+    context.ascii_dump(std::cout);
+#endif
+
     for (i=0; i<num_rows; ++i) {
       Row_Sign s = sign[i];
       if (s == UNKNOWN) {
@@ -1322,6 +1328,21 @@ PIP_Solution_Node::solve(PIP_Tree_Node*& parent_ref, const Matrix& ctx,
             cut_t[j] = 0;
         }
         cut_t[num_params] = d*d;
+#ifdef NOISY_PIP
+        {
+          Linear_Expression e;
+          dimension_type ti = 1;
+          dimension_type si = 0;
+          for (j=0; j<space_dimension; ++j) {
+            if (parameters.count(j) == 1)
+              e += cut_t[ti++] * Variable(j);
+            else
+              e += cut_s[si++] * Variable(j);
+          }
+          std::cout << "Adding cut: " << Constraint(e + cut_t[0] >= 0)
+                    << std::endl;
+        }
+#endif
         sign.push_back(NEGATIVE);
       }
     }
diff --git a/src/PIP_Tree.defs.hh b/src/PIP_Tree.defs.hh
index 6db48e9..65f3a47 100644
--- a/src/PIP_Tree.defs.hh
+++ b/src/PIP_Tree.defs.hh
@@ -136,6 +136,7 @@ protected:
   friend class PIP_Decision_Node;
   friend class PIP_Solution_Node;
 
+  //FIXME - remove problem pointer
   //! A pointer to the master problem object.
   PIP_Problem* problem;
 




More information about the PPL-devel mailing list