40 namespace Gecode {
namespace Int {
namespace Cumulative {
47 bool operator ()(
const Task& t1,
const Task& t2)
const;
53 return t1.c() > t2.c();
57 template<
class Task,
class Cap>
81 for ( ; (e->type() ==
Event::LRT) && (e->time() == time); e++)
82 if (
t[e->idx()].mandatory()) {
83 tasks.
set(static_cast<unsigned int>(e->idx()));
84 ccur +=
t[e->idx()].c();
87 for ( ; (e->type() ==
Event::LCT) && (e->time() == time); e++)
88 tasks.
clear(static_cast<unsigned int>(e->idx()));
90 for ( ; (e->type() ==
Event::EST) && (e->time() == time); e++)
91 tasks.
set(static_cast<unsigned int>(e->idx()));
93 for ( ; (e->type() ==
Event::ZRO) && (e->time() == time); e++) {
94 ccur -=
t[e->idx()].c();
95 if (ccur < cmin) cmin=ccur;
98 ccur +=
t[e->idx()].c();
104 for ( ; (e->type() ==
Event::ERT) && (e->time() == time); e++)
105 if (
t[e->idx()].mandatory()) {
106 tasks.
clear(static_cast<unsigned int>(e->idx()));
107 ccur -=
t[e->idx()].c();
108 if (ccur < cmin) cmin=ccur;
112 }
else if (
t[e->idx()].optional() && (
t[e->idx()].c() > ccur)) {
118 j() && (
t[j.val()].c() > ccur); ++j)
120 if (
t[j.val()].mandatory())
Zero-length task start time.
ExecStatus ES_SUBSUMED(Propagator &p)
void clear(unsigned int i)
Clear bit i.
Base-class for propagators.
Earliest required time of task.
Value iterator for values in a bitset.
Gecode::FloatVal c(-8, 8)
int p
Number of positive literals for node type.
void quicksort(Type *l, Type *r, Less &less)
Standard quick sort.
bool operator()(const Task &t1, const Task &t2) const
Sort order.
Time-tabling event for task.
Execution has resulted in failure.
void set(unsigned int i)
Set bit i.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
Latest completion time of task.
Post propagator for SetVar SetOpType SetVar SetRelType r
Sort order for tasks by decreasing capacity.
ExecStatus timetabling(Space &home, Propagator &p, Cap c, TaskArray< Task > &t)
Perform time-tabling propagation.
bool assigned(View x, int v)
Whether x is assigned to value v.
Propagation has not computed fixpoint.
Latest required time of task.
static Event * events(Region &r, const TaskArray< Task > &t, bool &assigned)
Allocate from r and initialize event array with tasks t.
Gecode toplevel namespace
friend FloatVal max(const FloatVal &x, const FloatVal &y)
Earliest start time of task.