Hi,
I found a bug when I sort variables iv of FlatZincSpace.
<code>
template<class Var, bool Less=true>
class VarCompare {
public:
bool operator ()(const Var& lhs, const Var& rhs) {
return Less ? lhs.size() < rhs.size() : lhs.size() > rhs.size();
}
};
IntVarArgs iva(iv.size());
for(int i = 0; i < iv.size(); i++) {
iva[i] = iv[i];
}
std::stable_sort(iva.begin(), iva.end(), VarCompare<Gecode::IntVar>());
//Update index optVar
....
iv = IntVarArray(*this, iva);
</code>
I get this assertion when I resolve the problem in parallel :
Assertion failed: (i>=0) && (i<n), file
C:\Users\REZGUI\gecode\gecode/kernel/shared-array.hpp, line 202
--
Best Regards,
Mohamed REZGUI
_______________________________________________
Gecode users mailing list
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users