MCPcopy Create free account
hub / github.com/Gecode/gecode / run

Method run

test/search.cpp:495–516  ·  view source on GitHub ↗

Run test

Source from the content-addressed store, hash-verified

493 HTB_BINARY,HTB_BINARY,HTB_BINARY), t(t0) {}
494 /// Run test
495 virtual bool run(void) {
496 Model* m = new Model(htb1,htb2,htb3);
497 Gecode::Search::FailStop f(2);
498 Gecode::Search::Options o;
499 o.threads = t;
500 o.stop = &f;
501 o.d_l = 100;
502 o.cutoff = Gecode::Search::Cutoff::geometric(1,2);
503 Gecode::RBS<Model,Engine> rbs(m,o);
504 int n = m->solutions();
505 delete m;
506 while (true) {
507 Model* s = rbs.next();
508 if (s != nullptr) {
509 n--; delete s;
510 }
511 if ((s == nullptr) && !rbs.stopped())
512 break;
513 f.limit(f.limit()+2);
514 }
515 return n == 0;
516 }
517 };
518
519 /// %Test for portfolio-based search

Callers

nothing calls this directly

Calls 4

solutionsMethod · 0.45
nextMethod · 0.45
stoppedMethod · 0.45
limitMethod · 0.45

Tested by

no test coverage detected