40 namespace Gecode {
namespace Int {
namespace Cumulative {
42 template<
class ManTask,
class Cap>
49 template<
class ManTask,
class Cap>
54 c.update(home,shared,p.
c);
57 template<
class ManTask,
class Cap>
63 for (
int i=t.
size();
i--; )
64 if (t[
i].
c() > c.
max())
69 if (c.assigned() && c.val()==1) {
71 for (
int i=t.
size();
i--; )
82 template<
class ManTask,
class Cap>
88 template<
class ManTask,
class Cap>
96 template<
class ManTask,
class Cap>
108 if (Cap::varderived() &&
c.assigned() &&
c.val()==1) {
110 for (
int i=
t.size();
i--; )
115 for (
int i=
t.size();
i--;)
119 ::
post(home(*
this),ut)));
#define GECODE_REWRITE(prop, post)
Rewrite propagator by executing post function.
void post(Home home, Term *t, int n, FloatRelType frt, FloatVal c)
Post propagator for linear constraint over floats.
virtual Actor * copy(Space &home, bool share)
Perform copying during cloning.
ExecStatus ES_SUBSUMED(Propagator &p)
Scheduling propagator for unary resource with mandatory tasks
ManProp(Home home, Cap c, TaskArray< ManTask > &t)
Constructor for creation.
ExecStatus basic(Space &home, bool &subsumed, Cap c, TaskArray< Task > &t)
Perform basic propagation.
ExecStatus overload(Space &home, int c, TaskArray< ManTask > &t)
Check mandatory tasks t for overload.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
static ExecStatus post(Home home, Cap c, TaskArray< ManTask > &t)
Post propagator that schedules tasks on cumulative resource.
Traits class for mapping tasks to task views.
Base-class for both propagators and branchers.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
Gecode::FloatVal c(-8, 8)
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
Execution has resulted in failure.
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
ExecStatus subsumed(Space &home, Propagator &p, TaskArray< Task > &t)
Check tasks t for subsumption.
const Gecode::ModEvent ME_INT_DOM
Domain operation has changed the domain.
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
int size(void) const
Return size of array (number of elements)
Scheduling propagator for cumulative resource with mandatory tasks.
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
Gecode toplevel namespace
friend FloatVal max(const FloatVal &x, const FloatVal &y)
int ModEventDelta
Modification event deltas.
Home class for posting propagators
ExecStatus edgefinding(Space &home, int c, TaskViewArray< TaskView > &t)