34namespace Gecode {
namespace Int {
namespace NoOverlap {
39 :
Base<Box>(home,
b,
n), m(m0) {
40 for (
int i=0; i<
m; i++)
41 b[
n+i].subscribe(home, *
this);
58 for (
int i=0; i<m; i++)
59 b[
n+i].cancel(home, *
this);
68 :
Base<Box>(home,
p,
p.
n +
p.m), m(
p.m) {}
84 if (
b[
n+i].excluded()) {
85 b[
n+i].cancel(home,*
this);
96 int* db =
r.alloc<
int>(
n);
97 for (
int i=0; i<
n; i++)
102 for (
int i=0; i<
n; i++) {
103 assert(
b[i].mandatory());
104 for (
int j=0; j<i; j++)
106 assert(db[i] > 0); assert(db[j] > 0);
107 if (--db[i] == 0) e++;
108 if (--db[j] == 0) e++;
123 b[i].cancel(home, *
this);
132 for (
int i=m; i--; ) {
137 b[
n+i].cancel(home,*
this);
144 assert(
b[
n+i].excluded());
145 b[
n+i].cancel(home,*
this);
struct Gecode::@603::NNF::@65::@66 b
For binary nodes (and, or, eqv)
int p
Number of positive literals for node type.
int n
Number of negative literals for node type.
Base-class for both propagators and branchers.
bool overlap(const FloatVal &x, const FloatVal &y)
Test whether x and y overlap.
Home class for posting propagators
Base class for no-overlap propagator.
int n
Number of mandatory boxes: b[0] ... b[n-1].
static int partition(Box *b, int i, int n)
Partition n boxes b starting at position i.
No-overlap propagator for optional boxes.
virtual size_t dispose(Space &home)
Destructor.
static ExecStatus post(Home home, Box *b, int n)
Post propagator for boxes b.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
OptProp(Home home, Box *b, int n, int m)
Constructor for posting.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
int m
Number of optional boxes: b[n] ... b[n+m-1].
static ModEvent me(const ModEventDelta &med)
ExecStatus ES_SUBSUMED(Propagator &p)
int ModEventDelta
Modification event deltas.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
void nooverlap(Home home, const IntVarArgs &x, const IntArgs &w, const IntVarArgs &y, const IntArgs &h, IntPropLevel ipl=IPL_DEF)
Post propagator for rectangle packing.
bool optional(const BoolVarArgs &m)
const Gecode::ModEvent ME_BOOL_VAL
Domain operation has resulted in a value (assigned variable)
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar SetRelType r
@ ES_OK
Execution is okay.
@ ES_NOFIX
Propagation has not computed fixpoint.