Run test
| 412 | htb1,htb2,htb3), t(t0) {} |
| 413 | /// Run test |
| 414 | virtual bool run(void) { |
| 415 | Model* m = new Model(htb1,htb2,htb3); |
| 416 | Gecode::Search::FailStop f(2); |
| 417 | Gecode::Search::Options o; |
| 418 | o.threads = t; |
| 419 | o.d_l = 50; |
| 420 | o.stop = &f; |
| 421 | Gecode::LDS<Model> lds(m,o); |
| 422 | int n = m->solutions(); |
| 423 | delete m; |
| 424 | while (true) { |
| 425 | Model* s = lds.next(); |
| 426 | if (s != nullptr) { |
| 427 | n--; delete s; |
| 428 | } |
| 429 | if ((s == nullptr) && !lds.stopped()) |
| 430 | break; |
| 431 | f.limit(f.limit()+2); |
| 432 | } |
| 433 | return n == 0; |
| 434 | } |
| 435 | }; |
| 436 | |
| 437 | /// %Test for best solution search |