diff options
| author | Carlo Zancanaro <carlo@carlo-laptop> | 2012-10-23 18:03:33 +1100 | 
|---|---|---|
| committer | Carlo Zancanaro <carlo@carlo-laptop> | 2012-10-23 18:03:33 +1100 | 
| commit | 8253e957e54d31699b4bd827300bc1fa794c4660 (patch) | |
| tree | d979b685deff45d47c48b530c0e5e291621b2c8f /impl | |
| parent | 0c62b0ba1b307ddc626a62127d835738775bb20d (diff) | |
Another fix, with a test for what the problem was.
Diffstat (limited to 'impl')
| -rw-r--r-- | impl/VariableAssignment.hpp | 13 | ||||
| -rw-r--r-- | impl/test/11.eqns | 2 | ||||
| -rw-r--r-- | impl/test/11.soln | 2 | 
3 files changed, 6 insertions, 11 deletions
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<Domain> {        _values[x] = unknown(infinity<Domain>());        solve(x); -      /* -      IdSet<Variable<Domain> > infl = _influence[x]; -      _influence[x].clear(); -      for (typename IdSet<Variable<Domain> >::iterator -             it = infl.begin(), -             ei = infl.end(); -           it != ei; -           ++it) { -        invalidate(_system.variable(*it)); -      } -      */ +      if (_values[x] == infinity<Domain>()) +        _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  | 
