[PPL-devel] [GIT] ppl/ppl(pip): Added a test case illustrating an instability in the PIP solver.

François Galea francois.galea at uvsq.fr
Wed Oct 14 12:30:18 CEST 2009


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

Author: François Galea <francois.galea at uvsq.fr>
Date:   Wed Oct 14 12:28:29 2009 +0200

Added a test case illustrating an instability in the PIP solver.

---

 tests/PIP_Problem/pipproblem1.cc |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/tests/PIP_Problem/pipproblem1.cc b/tests/PIP_Problem/pipproblem1.cc
index 191727c..be6f68f 100644
--- a/tests/PIP_Problem/pipproblem1.cc
+++ b/tests/PIP_Problem/pipproblem1.cc
@@ -202,6 +202,33 @@ test04() {
   return ok;
 }
 
+bool
+test05() {
+  Variable i(0);
+  Variable j(1);
+  Variable m(2);
+  Variable n(3);
+  Variables_Set params(m, n);
+
+  Constraint_System cs;
+  cs.insert(3*j >= -2*i+8);
+  cs.insert(j <= 4*i - 4);
+  cs.insert(i <= n);
+  cs.insert(j <= m);
+  cs.insert(n >= 3);
+
+  PIP_Problem pip(cs.space_dimension(), cs.begin(), cs.end(), params);
+
+  bool ok = (pip.solve() == OPTIMIZED_PIP_PROBLEM);
+  if (ok) {
+    const PIP_Tree solution = pip.solution();
+    display_solution(solution, params, Variables_Set(i, j),
+                     cs.space_dimension());
+  }
+
+  return ok;
+}
+
 } // namespace
 
 BEGIN_MAIN
@@ -209,4 +236,5 @@ BEGIN_MAIN
   DO_TEST(test02);
   DO_TEST(test03);
   DO_TEST(test04);
+  //DO_TEST(test05);
 END_MAIN




More information about the PPL-devel mailing list