51 using namespace Gecode::Int;
52 using namespace Gecode::Int::Cumulative;
57 for (
int i=p.
size();
i--; ) {
70 int minU = INT_MAX;
int minU2 = INT_MAX;
int maxU = INT_MIN;
71 for (
int i=u.
size();
i--;) {
74 else if (u[
i] < minU2)
80 (minU > c.max()/2) || (minU2 > c.max()/2 && minU+minU2>c.max());
83 unary(home,t,s,p,icl);
93 tasks[
i].init(s[
i],p[i],u[i]);
98 tasks[
i].init(t[
i],s[i],p[i],u[i]);
126 using namespace Gecode::Int;
127 using namespace Gecode::Int::Cumulative;
132 for (
int i=p.
size();
i--; ) {
143 if (home.
failed())
return;
145 bool allMandatory =
true;
146 for (
int i=m.
size();
i--;) {
148 allMandatory =
false;
156 for (
int i=t.
size();
i--;)
163 tasks[
i].init(s[
i],p[i],u[i],m[i]);
167 for (
int i=s.
size();
i--;)
168 tasks[
i].init(t[
i],s[i],p[i],u[i],m[i]);
195 using namespace Gecode::Int;
196 using namespace Gecode::Int::Cumulative;
200 for (
int i=p.
size();
i--; ) {
211 if (home.
failed())
return;
213 int minU = INT_MAX;
int minU2 = INT_MAX;
int maxU = INT_MIN;
214 for (
int i=u.
size();
i--;) {
217 else if (u[
i] < minU2)
223 (minU > c.max()/2) || (minU2 > c.max()/2 && minU+minU2>c.max());
229 for (
int i=0;
i<s.
size();
i++) {
230 t[
i].init(s[
i],p[i],u[i]);
255 using namespace Gecode::Int;
256 using namespace Gecode::Int::Cumulative;
261 for (
int i=p.
size();
i--; ) {
272 if (home.
failed())
return;
274 bool allMandatory =
true;
275 for (
int i=m.
size();
i--;) {
277 allMandatory =
false;
285 for (
int i=0;
i<s.
size();
i++) {
286 t[
i].init(s[
i],p[i],u[i],m[i]);
312 using namespace Gecode::Int;
313 using namespace Gecode::Int::Cumulative;
318 for (
int i=p.
size();
i--; ) {
321 for (
int i=p.
size();
i--; ) {
331 if (home.
failed())
return;
334 for (
int i=p.
size();
i--;) {
342 for (
int i=p.
size();
i--;)
347 for (
int i=s.
size();
i--; )
348 t[
i].init(s[
i],p[i],e[i],u[i]);
375 using namespace Gecode::Int;
376 using namespace Gecode::Int::Cumulative;
380 for (
int i=p.
size();
i--; ) {
384 for (
int i=p.
size();
i--; ) {
394 if (home.
failed())
return;
396 bool allMandatory =
true;
397 for (
int i=m.
size();
i--;) {
399 allMandatory =
false;
407 for (
int i=s.
size();
i--; )
408 t[
i].init(s[
i],p[i],e[i],u[i],m[i]);