38 ei=
static_cast<unsigned int>(e0 | (i0 << 3));
t=t0;
43 return static_cast<Type>(
ei & 7);
51 return static_cast<int>(
ei >> 3);;
62 template<
class Char,
class Traits>
63 inline std::basic_ostream<Char,Traits>&
65 std::basic_ostringstream<Char,Traits> s;
66 s.copyfmt(os); s.width(0);
76 s <<
',' << e.
time() <<
',' << e.
idx() <<
']';
91 for (
int i=0; i<
t.size(); i++)
92 if (
t[i].assigned()) {
94 if (
t[i].pmin() > 0) {
98 }
else if (
t[i].pmax() == 0) {
107 if (
t[i].lst() <
t[i].ect()) {
133 for (
int i=0; i<
t.size(); i++)
134 if (
t[i].assigned() &&
t[i].mandatory()) {
135 if (
t[i].pmin() > 0) {
138 }
else if (
t[i].pmax() == 0) {
142 assert(!
t[i].excluded());
Time-tabling event for task.
int idx(void) const
Return event index.
static Event * events(Region &r, const TaskArray< Task > &t, bool &assigned)
Allocate from r and initialize event array with tasks t.
unsigned int ei
Combines type and number of task.
void init(Type e, int t, int i)
Initialize event.
Type
Event type for task with order in which they are processed.
@ ZRO
Zero-length task start time.
@ ERT
Earliest required time of task.
@ LRT
Latest required time of task.
@ EST
Earliest start time of task.
@ LCT
Latest completion time of task.
int time(void) const
Return event time.
Type type(void) const
Return event type.
bool operator<(const Event &e) const
Order among events.
const int infinity
Infinity for integers.
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const IdxViewArray< View > &x)
void quicksort(Type *l, Type *r, Less &less)
Standard quick sort.
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar SetRelType r
#define GECODE_NEVER
Assert that this command is never executed.