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

Function main

examples/qcp.cpp:280–308  ·  view source on GitHub ↗

\brief Main-function * \relates QCP */

Source from the content-addressed store, hash-verified

278 * \relates QCP
279 */
280int
281main(int argc, char* argv[]) {
282 QCPOptions opt("QCP");
283
284 opt.branching(QCP::BRANCH_AFC_SIZE);
285 opt.branching(QCP::BRANCH_SIZE, "size");
286 opt.branching(QCP::BRANCH_AFC_SIZE, "afc");
287#ifdef GECODE_HAS_CBS
288 opt.branching(QCP::BRANCH_CBS_MAX_SD, "maxSD");
289#endif
290
291 opt.ipl(IPL_DOM);
292
293 opt.propagation(QCP::PROP_DISTINCT);
294 opt.propagation(QCP::PROP_BINARY, "binary",
295 "only binary disequality constraints");
296 opt.propagation(QCP::PROP_DISTINCT, "distinct",
297 "distinct constraints");
298
299 opt.instance(name[0]);
300
301 opt.parse(argc,argv);
302 if (!Spec(opt.instance()).valid()) {
303 std::cerr << "Error: unknown instance" << std::endl;
304 return 1;
305 }
306 Script::run<QCP,DFS,QCPOptions>(opt);
307 return 0;
308}
309
310namespace {
311

Callers

nothing calls this directly

Calls 7

branchingMethod · 0.80
propagationMethod · 0.80
SpecClass · 0.70
instanceMethod · 0.60
iplMethod · 0.45
parseMethod · 0.45
validMethod · 0.45

Tested by

no test coverage detected