38 namespace Gecode {
namespace Int {
namespace NoOverlap {
43 :
Base<Box>(home,b,n), m(m0) {
72 :
Base<Box>(home, shared, p, p.
n + p.m), m(p.m) {}
88 if (
b[
n+
i].excluded()) {
89 b[
n+
i].cancel(home,*
this);
100 int* db = r.
alloc<
int>(
n);
106 for (
int i=
n;
i--; ) {
107 assert(
b[
i].mandatory());
110 assert(db[
i] > 0); assert(db[j] > 0);
111 if (--db[
i] == 0) e++;
112 if (--db[j] == 0) e++;
127 b[
i].cancel(home, *
this);
136 for (
int i=m;
i--; ) {
141 b[
n+
i].cancel(home,*
this);
148 assert(
b[
n+
i].excluded());
149 b[
n+
i].cancel(home,*
this);
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
ExecStatus ES_SUBSUMED(Propagator &p)
void cancel(Space &home, Propagator &p, IntSet &y)
T * alloc(long unsigned int n)
Allocate block of n objects of type T from region.
bool overlap(const FloatVal &x, const FloatVal &y)
virtual size_t dispose(Space &home)
Destructor.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Base-class for both propagators and branchers.
int m
Number of optional boxes: b[n] ... b[n+m-1].
ModEvent exclude(Space &home, View &x, int s)
Prune view x to exclude all values from s.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
void subscribe(Space &home, Propagator &p, IntSet &y)
OptProp(Home home, Box *b, int n, int m)
Constructor for posting.
No-overlap propagator for optional boxes.
static ExecStatus post(Home home, Box *b, int n)
Post propagator for boxes b.
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
Base class for no-overlap propagator.
Propagation has not computed fixpoint.
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
static int partition(Box *b, int i, int n)
Partition n boxes b starting at position i.
void nooverlap(Home home, const IntVarArgs &x, const IntArgs &w, const IntVarArgs &y, const IntArgs &h, IntConLevel)
Post propagator for rectangle packing.
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
Gecode toplevel namespace
bool optional(const BoolVarArgs &m)
int ModEventDelta
Modification event deltas.
Home class for posting propagators
const Gecode::ModEvent ME_BOOL_VAL
Domain operation has resulted in a value (assigned variable)