Rule out that solution is found more than once during restarts
| 287 | } |
| 288 | /// Rule out that solution is found more than once during restarts |
| 289 | virtual bool master(const MetaInfo& mi) { |
| 290 | switch (mi.type()) { |
| 291 | case MetaInfo::RESTART: |
| 292 | if (mi.last() != nullptr) { |
| 293 | const HasSolutions* s |
| 294 | = static_cast<const HasSolutions*>(mi.last()); |
| 295 | BoolVarArgs b; |
| 296 | for (int i=0; i<x.size(); i++) |
| 297 | b << expr(*this, x[i] == s->x[i]); |
| 298 | rel(*this, BOT_AND, b, 0); |
| 299 | } |
| 300 | break; |
| 301 | case MetaInfo::PORTFOLIO: |
| 302 | // Do not kill the brancher! |
| 303 | break; |
| 304 | default: |
| 305 | break; |
| 306 | } |
| 307 | return false; |
| 308 | } |
| 309 | }; |
| 310 | |
| 311 | /// %Base class for search tests |