Go to the documentation of this file.
42 namespace Gecode {
namespace Int {
namespace Cumulative {
44 template<
class OptTask,
class Cap,
class PL>
51 template<
class OptTask,
class Cap,
class PL>
59 template<
class OptTask,
class Cap,
class PL>
66 for (
int i=
n;
i--; ) {
71 else if (
t[
i].mandatory())
77 if (
t[0].mandatory()) {
80 }
else if (
c.
min() >=
t[0].c()) {
87 if (
c.assigned() && (
c.val() == 1)) {
89 for (
int i=
t.size();
i--; )
105 template<
class OptTask,
class Cap,
class PL>
111 template<
class OptTask,
class Cap,
class PL>
116 return sizeof(*this);
119 template<
class OptTask,
class Cap,
class PL>
138 while ((
i <
n) &&
t[
i].mandatory())
i++;
139 while ((j >= 0) && !
t[j].mandatory()) j--;
153 if (Cap::varderived() &&
c.assigned() &&
c.val()==1) {
155 for (
int i=
t.size();
i--; )
160 for (
int i=
t.size();
i--;)
164 ::
post(home(*
this),ut)));
167 if (!PL::basic &&
c.assigned())
friend FloatVal max(const FloatVal &x, const FloatVal &y)
virtual size_t dispose(Space &home)
Delete propagator and return its size.
friend FloatVal min(const FloatVal &x, const FloatVal &y)
Scheduling propagator for unary resource with optional tasks
Scheduling propagator for cumulative resource with mandatory tasks.
Gecode::IntArgs i(4, 1, 2, 3, 4)
ExecStatus subsumed(Space &home, Propagator &p, int c, TaskArray< Task > &t)
Check for subsumption (all tasks must be assigned)
Base-class for both propagators and branchers.
ExecStatus timetabling(Space &home, Propagator &p, Cap c, TaskArray< Task > &t)
Perform time-tabling propagation.
const Gecode::ModEvent ME_BOOL_VAL
Domain operation has resulted in a value (assigned variable)
virtual Actor * copy(Space &home, bool share)
Perform copying during cloning.
OptProp(Home home, Cap c, TaskArray< OptTask > &t)
Constructor for creation.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Traits class for mapping tasks to task views.
Gecode toplevel namespace
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
Home class for posting propagators
ExecStatus edgefinding(Space &home, int c, TaskViewArray< TaskView > &t)
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
static ExecStatus post(Home home, Cap c, TaskArray< OptTask > &t)
Post propagator that schedules tasks on cumulative resource.
TFE post(PropagatorGroup g)
Only post functions (but not propagators) from g are considered.
IntRelType swap(IntRelType irt)
Return swapped relation type of irt.
ExecStatus overload(Space &home, int c, TaskArray< ManTask > &t)
Check mandatory tasks t for overload.
Scheduling propagator for cumulative resource with optional tasks.
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
bool shared(const IntSet &, VX)
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
Gecode::FloatVal c(-8, 8)
int n
Number of negative literals for node type.
int ModEventDelta
Modification event deltas.
@ ES_NOFIX
Propagation has not computed fixpoint.
const Gecode::ModEvent ME_INT_DOM
Domain operation has changed the domain.
#define GECODE_REWRITE(prop, post)
Rewrite propagator by executing post function.
@ ES_OK
Execution is okay.
int p
Number of positive literals for node type.