From 8253e957e54d31699b4bd827300bc1fa794c4660 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Tue, 23 Oct 2012 18:03:33 +1100 Subject: Another fix, with a test for what the problem was. --- impl/VariableAssignment.hpp | 13 ++----------- impl/test/11.eqns | 2 ++ impl/test/11.soln | 2 ++ 3 files changed, 6 insertions(+), 11 deletions(-) create mode 100644 impl/test/11.eqns create mode 100644 impl/test/11.soln (limited to 'impl') diff --git a/impl/VariableAssignment.hpp b/impl/VariableAssignment.hpp index 3f4ff70..21226ac 100644 --- a/impl/VariableAssignment.hpp +++ b/impl/VariableAssignment.hpp @@ -62,17 +62,8 @@ struct DynamicVariableAssignment : public VariableAssignment { _values[x] = unknown(infinity()); solve(x); - /* - IdSet > infl = _influence[x]; - _influence[x].clear(); - for (typename IdSet >::iterator - it = infl.begin(), - ei = infl.end(); - it != ei; - ++it) { - invalidate(_system.variable(*it)); - } - */ + if (_values[x] == infinity()) + _values[x] = _values[x].asKnown(); } } diff --git a/impl/test/11.eqns b/impl/test/11.eqns new file mode 100644 index 0000000..4edc114 --- /dev/null +++ b/impl/test/11.eqns @@ -0,0 +1,2 @@ +x = y +y = max(-100000, y+1) diff --git a/impl/test/11.soln b/impl/test/11.soln new file mode 100644 index 0000000..cdfcb1f --- /dev/null +++ b/impl/test/11.soln @@ -0,0 +1,2 @@ +x = inf +y = inf -- cgit v1.2.3