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

Method branch

examples/job-shop.cpp:370–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368 nooverload();
369 }
370 void branch(unsigned int p, Rnd r) {
371 switch (p) {
372 case 0U:
373 Gecode::branch(*this, start, INT_VAR_MIN_MIN(), INT_VAL_MIN());
374 break;
375 case 1U:
376 Gecode::branch(*this, start, INT_VAR_MAX_MIN(), INT_VAL_MIN());
377 break;
378 case 2U:
379 Gecode::branch(*this, start, INT_VAR_SIZE_MIN(), INT_VAL_MIN());
380 break;
381 case 3U:
382 Gecode::branch(*this, start, tiebreak(INT_VAR_MIN_MIN(),
383 INT_VAR_RND(r)), INT_VAL_MIN());
384 break;
385 case 4U:
386 Gecode::branch(*this, start, tiebreak(INT_VAR_MAX_MIN(),
387 INT_VAR_RND(r)), INT_VAL_MIN());
388 break;
389 default:
390 if (p & 1U)
391 Gecode::branch(*this, start, INT_VAR_RND(r), INT_VAL_MIN());
392 else
393 Gecode::branch(*this, start, INT_VAR_RND(r), INT_VAL_SPLIT_MIN());
394 break;
395 }
396 assign(*this, makespan, INT_ASSIGN_MIN());
397 }
398 /// Constructor for cloning \a s
399 JobShopProbe(JobShopProbe& s)
400 : JobShopBase(s) {}

Callers 1

solveFunction · 0.45

Calls 10

INT_VAR_MIN_MINFunction · 0.85
INT_VAL_MINFunction · 0.85
INT_VAR_MAX_MINFunction · 0.85
INT_VAR_SIZE_MINFunction · 0.85
tiebreakFunction · 0.85
INT_VAR_RNDFunction · 0.85
INT_VAL_SPLIT_MINFunction · 0.85
INT_ASSIGN_MINFunction · 0.85
branchFunction · 0.50
assignFunction · 0.50

Tested by

no test coverage detected