36 namespace Gecode {
namespace Int {
namespace Unary {
38 template<
class ManTaskView>
41 sort<ManTaskView,STO_LCT,true>(
t);
47 int* lct = r.alloc<
int>(t.
size());
52 for (
int i=0;
i<t.
size();
i++) {
54 while (q() && (t[
i].lct() > t[q.
task()].lst())) {
55 if ((j >= 0) && (o.
ect() > t[q.
task()].lst()))
60 if ((j >= 0) && (o.
ect(
i) > t[
i].lst()))
70 template<
class ManTask>
79 template<
class OptTaskView,
class PL>
82 sort<OptTaskView,STO_LCT,true>(
t);
88 int* lct = r.alloc<
int>(t.
size());
93 for (
int i=0;
i<t.
size();
i++) {
95 while (q() && (t[
i].lct() > t[q.
task()].lst())) {
96 if ((j >= 0) && (o.
ect() > t[q.
task()].lst()))
101 if ((j >= 0) && (o.
ect(
i) > t[
i].lst()))
108 if (t[
i].mandatory()) {
110 }
else if (lct[
i] < t[
i].ect()) {
112 t[
i].cancel(home,p,PL::pc); t[
i]=t[--
n];
120 template<
class OptTask,
class PL>
127 return notlast<typename TaskTraits<OptTask>::TaskViewBwd,PL>(home,
p,
b);
ExecStatus ES_SUBSUMED(Propagator &p)
int size(void) const
Return size of array (number of elements)
Base-class for propagators.
ExecStatus notfirstnotlast(Space &home, TaskArray< ManTask > &t)
Propagate not-first and not-last.
void insert(int i)
Insert task with index i.
Traits class for mapping tasks to task views.
#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.
Omega trees for computing ect of task sets.
const FloatNum min
Smallest allowed float value.
int n
Number of negative literals for node type.
Gecode::IntArgs i({1, 2, 3, 4})
int task(void) const
Return current task position.
ExecStatus notlast(Space &home, TaskViewArray< ManTaskView > &t)
Allows to iterate over task views according to a specified order.
struct Gecode::@593::NNF::@62::@63 b
For binary nodes (and, or, eqv)
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
Post propagator for SetVar SetOpType SetVar SetRelType r
int ect(void) const
Return earliest completion time of all tasks.
Post propagator for f(x \diamond_{\mathit{op}} y) \sim_r z \f$ void rel(Home home
Allows to iterate over mandatory task views according to a specified order.
Gecode toplevel namespace