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

Method Schur

examples/schurs-lemma.cpp:89–102  ·  view source on GitHub ↗

Actual model

Source from the content-addressed store, hash-verified

87public:
88 /// Actual model
89 Schur(const SchurOptions& opt)
90 : Script(opt), box(*this,opt.n,1,opt.c) {
91 int n = opt.n;
92
93 // Iterate over balls and find triples
94 for (int i=1; i<=n; i++)
95 for (int j=1; i+j<=n; j++)
96 rel(*this, {box[i-1],box[j-1],box[i+j-1]}, IRT_NQ);
97
98 // Break value symmetries
99 precede(*this, box, IntArgs::create(opt.c, 1));
100
101 branch(*this, box, INT_VAR_AFC_SIZE_MAX(opt.decay()), INT_VAL_MIN());
102 }
103 /// Print solution
104 virtual void
105 print(std::ostream& os) const {

Callers

nothing calls this directly

Calls 7

INT_VAR_AFC_SIZE_MAXFunction · 0.85
INT_VAL_MINFunction · 0.85
relFunction · 0.50
precedeFunction · 0.50
branchFunction · 0.50
decayMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected