40 namespace Gecode {
namespace Int {
namespace Cumulative {
68 bool operator ()(
const Task& t1,
const Task& t2)
const;
86 return t1.c() > t2.c();
91 template<
class Task,
class Cap>
111 for (
int i=t.
size();
i--; )
114 if (t[
i].pmin() > 0) {
118 }
else if (t[
i].pmax() == 0) {
127 if (t[
i].lst() < t[
i].ect()) {
157 if (t[e->
i].mandatory()) {
158 tasks.
set(static_cast<unsigned int>(e->
i)); ccur += t[e->
i].c();
162 tasks.
clear(static_cast<unsigned int>(e->
i));
165 tasks.
set(static_cast<unsigned int>(e->
i));
169 if (ccur < cmin) cmin=ccur;
179 if (t[e->
i].mandatory()) {
180 tasks.
clear(static_cast<unsigned int>(e->
i));
182 if (ccur < cmin) cmin=ccur;
186 }
else if (t[e->
i].optional() && (t[e->
i].c() > ccur)) {
192 j() && (t[j.val()].c() > ccur); ++j)
194 if (t[j.val()].mandatory()) {
195 if (t[j.val()].pmin() > 0) {
int i
Number of task Initialize event.
void clear(unsigned int i)
Clear bit i.
ExecStatus basic(Space &home, bool &subsumed, Cap c, TaskArray< Task > &t)
Perform basic propagation.
bool operator<(const Event &e) const
Order among events.
void init(Type e, int t, int i)
Propagation has computed fixpoint.
Value iterator for values in a bitset.
Gecode::FloatVal c(-8, 8)
Gecode::IntArgs i(4, 1, 2, 3, 4)
void quicksort(Type *l, Type *r, Less &less)
Standard quick sort.
int n
Number of negative literals for node type.
Execution has resulted in failure.
Type
Event type for task with order in which they are processed.
Zero-length task start time.
void set(unsigned int i)
Set bit i.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
Earliest required time of task.
Sort order for tasks by decreasing capacity.
const int infinity
Infinity for integers.
ExecStatus subsumed(Space &home, Propagator &p, TaskArray< Task > &t)
Check tasks t for subsumption.
bool operator()(const Task &t1, const Task &t2) const
Sort order.
bool assigned(View x, int v)
Whether x is assigned to value v.
int size(void) const
Return size of array (number of elements)
Propagation has not computed fixpoint.
Latest required time of task.
Latest completion time of task.
Gecode toplevel namespace
Earliest start time of task.