Run test
| 455 | htb1,htb2,htb3,htc), c_d(c_d0), a_d(a_d0), t(t0) {} |
| 456 | /// Run test |
| 457 | virtual bool run(void) { |
| 458 | Model* m = new Model(htb1,htb2,htb3,htc); |
| 459 | Gecode::Search::FailStop f(2); |
| 460 | Gecode::Search::Options o; |
| 461 | o.c_d = c_d; |
| 462 | o.a_d = a_d; |
| 463 | o.threads = t; |
| 464 | o.stop = &f; |
| 465 | Gecode::BAB<Model> bab(m,o); |
| 466 | delete m; |
| 467 | Model* b = nullptr; |
| 468 | while (true) { |
| 469 | Model* s = bab.next(); |
| 470 | if (s != nullptr) { |
| 471 | delete b; b=s; |
| 472 | } |
| 473 | if ((s == nullptr) && !bab.stopped()) |
| 474 | break; |
| 475 | f.limit(f.limit()+2); |
| 476 | } |
| 477 | bool ok = (b == nullptr) || b->best(); |
| 478 | delete b; |
| 479 | return ok; |
| 480 | } |
| 481 | }; |
| 482 | |
| 483 | /// %Test for restart-based search |