Commit fb8d02bc authored by ehebrard's avatar ehebrard
Browse files

valgrind

parent a2f208f9
...@@ -431,7 +431,7 @@ const DistanceVariable<T> *Schedule<T>::getVariable(event x, event y) const { ...@@ -431,7 +431,7 @@ const DistanceVariable<T> *Schedule<T>::getVariable(event x, event y) const {
pair<event, event> key{x, y}; pair<event, event> key{x, y};
auto v{varmap.find(key)}; auto v{varmap.find(key)};
if (v == varmap.end()) { if (v == varmap.end()) {
if(representant[x] == representant[y]) if(representant[x] == representant[y] and representant[x] != 0)
return variables[2]; return variables[2];
key = {representant[x], representant[y]}; key = {representant[x], representant[y]};
...@@ -449,7 +449,11 @@ DistanceVariable<T> *Schedule<T>::getVariable(event x, event y) { ...@@ -449,7 +449,11 @@ DistanceVariable<T> *Schedule<T>::getVariable(event x, event y) {
auto v{varmap.find(key)}; auto v{varmap.find(key)};
// int k = *v; // int k = *v;
if (v == varmap.end()) { if (v == varmap.end()) {
if(representant[x] == representant[y])
// cout << label(x) << " <> " << label(y) << " (" << label(representant[x]) << " <> " << label(representant[y]) << ")\n";
if(representant[x] == representant[y] and representant[x] != 0)
return variables[2]; return variables[2];
key = {representant[x], representant[y]}; key = {representant[x], representant[y]};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment