Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0
unary.hh
Go to the documentation of this file.
1/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2/*
3 * Main authors:
4 * Christian Schulte <schulte@gecode.org>
5 * Guido Tack <tack@gecode.org>
6 *
7 * Copyright:
8 * Christian Schulte, 2009
9 * Guido Tack, 2010
10 *
11 * This file is part of Gecode, the generic constraint
12 * development environment:
13 * http://www.gecode.org
14 *
15 * Permission is hereby granted, free of charge, to any person obtaining
16 * a copy of this software and associated documentation files (the
17 * "Software"), to deal in the Software without restriction, including
18 * without limitation the rights to use, copy, modify, merge, publish,
19 * distribute, sublicense, and/or sell copies of the Software, and to
20 * permit persons to whom the Software is furnished to do so, subject to
21 * the following conditions:
22 *
23 * The above copyright notice and this permission notice shall be
24 * included in all copies or substantial portions of the Software.
25 *
26 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
29 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
30 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
31 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
32 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 *
34 */
35
36#ifndef __GECODE_INT_UNARY_HH__
37#define __GECODE_INT_UNARY_HH__
38
39#include <gecode/int/task.hh>
40
51namespace Gecode { namespace Int { namespace Unary {
52
55 protected:
59 int _p;
60 public:
62
63
64 ManFixPTask(void);
66 ManFixPTask(IntVar s, int p);
68 void init(IntVar s, int p);
70 void init(const ManFixPTask& t);
72
74
75
76 int est(void) const;
78 int ect(void) const;
80 int lst(void) const;
82 int lct(void) const;
84 int pmin(void) const;
86 int pmax(void) const;
88 IntVar st(void) const;
90 bool mandatory(void) const;
92 bool excluded(void) const;
94 bool optional(void) const;
96
98
99
100 bool assigned(void) const;
102
104
105
106 ModEvent est(Space& home, int n);
108 ModEvent ect(Space& home, int n);
110 ModEvent lst(Space& home, int n);
112 ModEvent lct(Space& home, int n);
114 ModEvent norun(Space& home, int e, int l);
116 ModEvent mandatory(Space& home);
118 ModEvent excluded(Space& home);
120
122
123
124 void update(Space& home, ManFixPTask& t);
126
128
129
130 void subscribe(Space& home, Propagator& p, PropCond pc);
132 void cancel(Space& home, Propagator& p, PropCond pc);
134 void reschedule(Space& home, Propagator& p, PropCond pc);
136
137 };
138
143 template<class Char, class Traits>
144 std::basic_ostream<Char,Traits>&
145 operator <<(std::basic_ostream<Char,Traits>& os, const ManFixPTask& t);
146
148 class ManFixPSETask : public ManFixPTask {
149 protected:
152 public:
154
155
156 ManFixPSETask(void);
170 void init(TaskType t, IntVar s, int p);
172 void init(const ManFixPSETask& t);
174
176
177
178 int est(void) const;
180 int ect(void) const;
182 int lst(void) const;
184 int lct(void) const;
186 int pmin(void) const;
188 int pmax(void) const;
190
192
193
194 ModEvent est(Space& home, int n);
196 ModEvent ect(Space& home, int n);
198 ModEvent lst(Space& home, int n);
200 ModEvent lct(Space& home, int n);
202 ModEvent norun(Space& home, int e, int l);
204
206
207
208 void update(Space& home, ManFixPSETask& t);
210
211 };
212
217 template<class Char, class Traits>
218 std::basic_ostream<Char,Traits>&
219 operator <<(std::basic_ostream<Char,Traits>& os, const ManFixPSETask& t);
220
222 class OptFixPTask : public ManToOptTask<ManFixPTask> {
223 protected:
225 public:
227
228
229 OptFixPTask(void);
231 OptFixPTask(IntVar s, int p, BoolVar m);
233 void init(IntVar s, int p, BoolVar m);
235 };
236
241 template<class Char, class Traits>
242 std::basic_ostream<Char,Traits>&
243 operator <<(std::basic_ostream<Char,Traits>& os, const OptFixPTask& t);
244
246 class OptFixPSETask : public ManToOptTask<ManFixPSETask> {
247 protected:
249 public:
251
252
253 OptFixPSETask(void);
257 void init(TaskType t, IntVar s, int p, BoolVar m);
259 };
260
265 template<class Char, class Traits>
266 std::basic_ostream<Char,Traits>&
267 operator <<(std::basic_ostream<Char,Traits>& os, const OptFixPSETask& t);
268
271 protected:
278 public:
280
281
282 ManFlexTask(void);
286 void init(IntVar s, IntVar p, IntVar e);
288 void init(const ManFlexTask& t);
290
292
293
294 int est(void) const;
296 int ect(void) const;
298 int lst(void) const;
300 int lct(void) const;
302 int pmin(void) const;
304 int pmax(void) const;
306 IntVar st(void) const;
308 IntVar p(void) const;
310 IntVar e(void) const;
312 bool mandatory(void) const;
314 bool excluded(void) const;
316 bool optional(void) const;
318
320
321
322 bool assigned(void) const;
324
326
327
328 ModEvent est(Space& home, int n);
330 ModEvent ect(Space& home, int n);
332 ModEvent lst(Space& home, int n);
334 ModEvent lct(Space& home, int n);
336 ModEvent norun(Space& home, int e, int l);
338 ModEvent mandatory(Space& home);
340 ModEvent excluded(Space& home);
342
344
345
346 void update(Space& home, ManFlexTask& t);
348
350
351
352 void subscribe(Space& home, Propagator& p, PropCond pc);
354 void cancel(Space& home, Propagator& p, PropCond pc);
356 void reschedule(Space& home, Propagator& p, PropCond pc);
358
359 };
360
365 template<class Char, class Traits>
366 std::basic_ostream<Char,Traits>&
367 operator <<(std::basic_ostream<Char,Traits>& os, const ManFlexTask& t);
368
370 class OptFlexTask : public ManToOptTask<ManFlexTask> {
371 protected:
373 public:
375
376
377 OptFlexTask(void);
381 void init(IntVar s, IntVar p, IntVar e, BoolVar m);
383 };
384
389 template<class Char, class Traits>
390 std::basic_ostream<Char,Traits>&
391 operator <<(std::basic_ostream<Char,Traits>& os, const OptFlexTask& t);
392
393}}}
394
396
397namespace Gecode { namespace Int { namespace Unary {
398
400 typedef ManFixPTask ManFixPTaskFwd;
401
404
406 typedef ManFixPSETask ManFixPSETaskFwd;
407
410
412 typedef OptFixPTask OptFixPTaskFwd;
413
416
418 typedef OptFixPSETask OptFixPSETaskFwd;
419
422
424 typedef ManFlexTask ManFlexTaskFwd;
425
428
430 typedef OptFlexTask OptFlexTaskFwd;
431
434
435
440 template<class Char, class Traits>
441 std::basic_ostream<Char,Traits>&
442 operator <<(std::basic_ostream<Char,Traits>& os, const ManFixPTaskBwd& t);
443
448 template<class Char, class Traits>
449 std::basic_ostream<Char,Traits>&
450 operator <<(std::basic_ostream<Char,Traits>& os, const ManFixPSETaskBwd& t);
451
456 template<class Char, class Traits>
457 std::basic_ostream<Char,Traits>&
458 operator <<(std::basic_ostream<Char,Traits>& os, const OptFixPTaskBwd& t);
459
464 template<class Char, class Traits>
465 std::basic_ostream<Char,Traits>&
466 operator <<(std::basic_ostream<Char,Traits>& os, const OptFixPSETaskBwd& t);
467
472 template<class Char, class Traits>
473 std::basic_ostream<Char,Traits>&
474 operator <<(std::basic_ostream<Char,Traits>& os, const ManFlexTaskBwd& t);
475
482 template<class Char, class Traits>
483 std::basic_ostream<Char,Traits>&
484 operator <<(std::basic_ostream<Char,Traits>& os, const OptFlexTaskBwd& t);
485
486}}}
487
489
490namespace Gecode { namespace Int {
491
493 template<>
494 class TaskViewTraits<Unary::ManFixPTaskFwd> {
495 public:
498 };
499
501 template<>
502 class TaskViewTraits<Unary::ManFixPTaskBwd> {
503 public:
506 };
507
509 template<>
510 class TaskViewTraits<Unary::ManFixPSETaskFwd> {
511 public:
514 };
515
517 template<>
518 class TaskViewTraits<Unary::ManFixPSETaskBwd> {
519 public:
522 };
523
525 template<>
526 class TaskViewTraits<Unary::OptFixPTaskFwd> {
527 public:
530 };
531
533 template<>
534 class TaskViewTraits<Unary::OptFixPTaskBwd> {
535 public:
538 };
539
541 template<>
542 class TaskViewTraits<Unary::OptFixPSETaskFwd> {
543 public:
546 };
547
549 template<>
550 class TaskViewTraits<Unary::OptFixPSETaskBwd> {
551 public:
554 };
555
557 template<>
558 class TaskViewTraits<Unary::ManFlexTaskFwd> {
559 public:
562 };
563
565 template<>
566 class TaskViewTraits<Unary::ManFlexTaskBwd> {
567 public:
570 };
571
573 template<>
574 class TaskViewTraits<Unary::OptFlexTaskFwd> {
575 public:
578 };
579
581 template<>
582 class TaskViewTraits<Unary::OptFlexTaskBwd> {
583 public:
586 };
587
588
590 template<>
591 class TaskTraits<Unary::ManFixPTask> {
592 public:
594 typedef Unary::ManFixPTaskFwd TaskViewFwd;
597 };
598
600 template<>
601 class TaskTraits<Unary::ManFixPSETask> {
602 public:
604 typedef Unary::ManFixPSETaskFwd TaskViewFwd;
607 };
608
610 template<>
611 class TaskTraits<Unary::OptFixPTask> {
612 public:
614 typedef Unary::OptFixPTaskFwd TaskViewFwd;
619 };
620
622 template<>
623 class TaskTraits<Unary::OptFixPSETask> {
624 public:
626 typedef Unary::OptFixPSETaskFwd TaskViewFwd;
631 };
632
634 template<>
635 class TaskTraits<Unary::ManFlexTask> {
636 public:
638 typedef Unary::ManFlexTaskFwd TaskViewFwd;
641 };
642
644 template<>
645 class TaskTraits<Unary::OptFlexTask> {
646 public:
648 typedef Unary::OptFlexTaskFwd TaskViewFwd;
653 };
654
655}}
656
657namespace Gecode { namespace Int { namespace Unary {
658
660 class OmegaNode {
661 public:
663 int p;
665 int ect;
667 void init(const OmegaNode& l, const OmegaNode& r);
669 void update(const OmegaNode& l, const OmegaNode& r);
670 };
671
673 template<class TaskView>
674 class OmegaTree : public TaskTree<TaskView,OmegaNode> {
675 protected:
676 using TaskTree<TaskView,OmegaNode>::tasks;
677 using TaskTree<TaskView,OmegaNode>::leaf;
678 using TaskTree<TaskView,OmegaNode>::root;
679 using TaskTree<TaskView,OmegaNode>::init;
680 using TaskTree<TaskView,OmegaNode>::update;
681 public:
685 void insert(int i);
687 void remove(int i);
689 int ect(void) const;
691 int ect(int i) const;
692 };
693
695 class OmegaLambdaNode : public OmegaNode {
696 public:
698 static const int undef = -1;
700 int lp;
702 int lect;
706 int resLp;
708 void init(const OmegaLambdaNode& l, const OmegaLambdaNode& r);
710 void update(const OmegaLambdaNode& l, const OmegaLambdaNode& r);
711 };
712
714 template<class TaskView>
715 class OmegaLambdaTree : public TaskTree<TaskView,OmegaLambdaNode> {
716 protected:
717 using TaskTree<TaskView,OmegaLambdaNode>::tasks;
718 using TaskTree<TaskView,OmegaLambdaNode>::leaf;
719 using TaskTree<TaskView,OmegaLambdaNode>::root;
720 using TaskTree<TaskView,OmegaLambdaNode>::init;
721 using TaskTree<TaskView,OmegaLambdaNode>::update;
722 public:
725 bool inc=true);
727 void shift(int i);
729 void oinsert(int i);
731 void linsert(int i);
733 void lremove(int i);
735 bool lempty(void) const;
737 int responsible(void) const;
739 int ect(void) const;
741 int lect(void) const;
742 };
743
744}}}
745
747
748namespace Gecode { namespace Int { namespace Unary {
749
751 template<class ManTask>
752 ExecStatus overload(TaskArray<ManTask>& t);
754 template<class OptTask, class PL>
755 ExecStatus overload(Space& home, Propagator& p, TaskArray<OptTask>& t);
756
758 template<class Task>
759 ExecStatus timetabling(Space& home, Propagator& p, TaskArray<Task>& t);
760
762 template<class Task>
763 ExecStatus subsumed(Space& home, Propagator& p, TaskArray<Task>& t);
764
766 template<class ManTask>
767 ExecStatus detectable(Space& home, TaskArray<ManTask>& t);
769 template<class OptTask, class PL>
770 ExecStatus detectable(Space& home, Propagator& p, TaskArray<OptTask>& t);
771
773 template<class ManTask>
774 ExecStatus notfirstnotlast(Space& home, TaskArray<ManTask>& t);
776 template<class OptTask, class PL>
777 ExecStatus notfirstnotlast(Space& home, Propagator& p, TaskArray<OptTask>& t);
778
780 template<class Task>
781 ExecStatus edgefinding(Space& home, TaskArray<Task>& t);
782
783
790 template<class ManTask, class PL>
791 class ManProp : public TaskProp<ManTask,PL> {
792 protected:
793 using TaskProp<ManTask,PL>::t;
797 ManProp(Space& home, ManProp& p);
798 public:
800 virtual Actor* copy(Space& home);
802 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
804 static ExecStatus post(Home home, TaskArray<ManTask>& t);
805 };
806
813 template<class OptTask, class PL>
814 class OptProp : public TaskProp<OptTask,PL> {
815 protected:
816 using TaskProp<OptTask,PL>::t;
820 OptProp(Space& home, OptProp& p);
821 public:
823 virtual Actor* copy(Space& home);
825 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
827 static ExecStatus post(Home home, TaskArray<OptTask>& t);
828 };
829
831 template<class ManTask>
834
836 template<class OptTask>
839
840}}}
841
848
852
853#endif
854
855// STATISTICS: int-prop
NNF * l
Left subtree.
NodeType t
Type of node.
int p
Number of positive literals for node type.
int n
Number of negative literals for node type.
Base-class for both propagators and branchers.
Definition core.hpp:628
Boolean integer variables.
Definition int.hh:512
Home class for posting propagators
Definition core.hpp:856
Integer variables.
Definition int.hh:371
Task mapper: turns a task view into its dual.
Definition task.hh:102
Integer view for integer variables.
Definition view.hpp:129
Class to define an optional from a mandatory task.
Definition task.hh:43
Task array.
Definition task.hh:165
Propagator for tasks
Definition task.hh:424
Unary::ManFixPSETaskFwd TaskViewFwd
The forward task view type.
Definition unary.hh:604
Unary::ManFixPSETaskBwd TaskViewBwd
The backward task view type.
Definition unary.hh:606
Unary::ManFixPTaskFwd TaskViewFwd
The forward task view type.
Definition unary.hh:594
Unary::ManFixPTaskBwd TaskViewBwd
The backward task view type.
Definition unary.hh:596
Unary::ManFlexTaskFwd TaskViewFwd
The forward task view type.
Definition unary.hh:638
Unary::ManFlexTaskBwd TaskViewBwd
The backward task view type.
Definition unary.hh:640
Unary::ManFixPTask ManTask
The corresponding mandatory task.
Definition unary.hh:630
Unary::OptFixPSETaskBwd TaskViewBwd
The backward task view type.
Definition unary.hh:628
Unary::OptFixPSETaskFwd TaskViewFwd
The forward task view type.
Definition unary.hh:626
Unary::OptFixPTaskBwd TaskViewBwd
The backward task view type.
Definition unary.hh:616
Unary::OptFixPTaskFwd TaskViewFwd
The forward task view type.
Definition unary.hh:614
Unary::ManFixPTask ManTask
The corresponding mandatory task.
Definition unary.hh:618
Unary::ManFlexTask ManTask
The corresponding mandatory task.
Definition unary.hh:652
Unary::OptFlexTaskBwd TaskViewBwd
The backward task view type.
Definition unary.hh:650
Unary::OptFlexTaskFwd TaskViewFwd
The forward task view type.
Definition unary.hh:648
Traits class for mapping tasks to task views.
Definition task.hh:157
Task trees for task views with node type Node.
Definition task.hh:365
const TaskViewArray< TaskView > & tasks
Definition task.hh:369
const OmegaNode & root(void) const
Definition tree.hpp:109
Task view array.
Definition task.hh:233
Unary::ManFixPSETask Task
The task type.
Definition unary.hh:521
Unary::ManFixPSETask Task
The task type.
Definition unary.hh:513
Unary::ManFixPTask Task
The task type.
Definition unary.hh:505
Unary::ManFixPTask Task
The task type.
Definition unary.hh:497
Unary::ManFlexTask Task
The task type.
Definition unary.hh:569
Unary::ManFlexTask Task
The task type.
Definition unary.hh:561
Unary::OptFixPSETask Task
The task type.
Definition unary.hh:553
Unary::OptFixPSETask Task
The task type.
Definition unary.hh:545
Unary::OptFixPTask Task
The task type.
Definition unary.hh:537
Unary::OptFixPTask Task
The task type.
Definition unary.hh:529
Unary::OptFlexTask Task
The task type.
Definition unary.hh:585
Unary::OptFlexTask Task
The task type.
Definition unary.hh:577
Traits class for mapping task views to tasks.
Definition task.hh:148
Unary (mandatory) task with fixed processing, start or end time
Definition unary.hh:148
int ect(void) const
Return earliest completion time.
Definition task.hpp:188
ModEvent norun(Space &home, int e, int l)
Update such that task cannot run from e to l.
Definition task.hpp:273
int pmax(void) const
Return maximum processing time.
Definition task.hpp:222
int pmin(void) const
Return minimum processing time.
Definition task.hpp:212
ManFixPSETask(void)
Default constructor.
Definition task.hpp:170
void init(TaskType t, IntVar s, int p)
Initialize task.
Definition task.hpp:175
int est(void) const
Return earliest start time.
Definition task.hpp:184
int lct(void) const
Return latest completion time.
Definition task.hpp:202
int lst(void) const
Return latest start time.
Definition task.hpp:198
void update(Space &home, ManFixPSETask &t)
Update this task to be a clone of task t.
Definition task.hpp:299
Unary (mandatory) task with fixed processing time
Definition unary.hh:54
int pmax(void) const
Return maximum processing time.
Definition task.hpp:76
bool optional(void) const
Whether task can still be optional.
Definition task.hpp:93
ModEvent norun(Space &home, int e, int l)
Update such that task cannot run from e to l.
Definition task.hpp:119
ManFixPTask(void)
Default constructor.
Definition task.hpp:43
int est(void) const
Return earliest start time.
Definition task.hpp:56
int pmin(void) const
Return minimum processing time.
Definition task.hpp:72
void init(IntVar s, int p)
Initialize with start time s and processing time p.
Definition task.hpp:47
int ect(void) const
Return earliest completion time.
Definition task.hpp:60
Int::IntView _s
Start time.
Definition unary.hh:57
int _p
Processing time.
Definition unary.hh:59
bool assigned(void) const
Test whether task is assigned.
Definition task.hpp:98
void reschedule(Space &home, Propagator &p, PropCond pc)
Schedule propagator p.
Definition task.hpp:152
int lct(void) const
Return latest completion time.
Definition task.hpp:68
IntVar st(void) const
Return start time.
Definition task.hpp:80
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p for task.
Definition task.hpp:148
int lst(void) const
Return latest start time.
Definition task.hpp:64
void update(Space &home, ManFixPTask &t)
Update this task to be a clone of task t.
Definition task.hpp:139
bool mandatory(void) const
Whether task is mandatory.
Definition task.hpp:85
bool excluded(void) const
Whether task is excluded.
Definition task.hpp:89
void subscribe(Space &home, Propagator &p, PropCond pc)
Subscribe propagator p to task.
Definition task.hpp:144
Unary (mandatory) task with flexible processing time
Definition unary.hh:270
int lst(void) const
Return latest start time.
Definition task.hpp:339
int est(void) const
Return earliest start time.
Definition task.hpp:331
IntVar p(void) const
Return processing time.
Definition task.hpp:359
int pmin(void) const
Return minimum processing time.
Definition task.hpp:347
Int::IntView _s
Start time.
Definition unary.hh:273
IntVar st(void) const
Return start time.
Definition task.hpp:355
ModEvent norun(Space &home, int e, int l)
Update such that task cannot run from e to l.
Definition task.hpp:402
void reschedule(Space &home, Propagator &p, PropCond pc)
Schedule propagator p.
Definition task.hpp:444
bool mandatory(void) const
Whether task is mandatory.
Definition task.hpp:368
void subscribe(Space &home, Propagator &p, PropCond pc)
Subscribe propagator p to task.
Definition task.hpp:432
int ect(void) const
Return earliest completion time.
Definition task.hpp:335
Int::IntView _e
End time.
Definition unary.hh:277
int pmax(void) const
Return maximum processing time.
Definition task.hpp:351
IntVar e(void) const
Return end time.
Definition task.hpp:363
void update(Space &home, ManFlexTask &t)
Update this task to be a clone of task t.
Definition task.hpp:425
Int::IntView _p
Processing time.
Definition unary.hh:275
bool excluded(void) const
Whether task is excluded.
Definition task.hpp:372
int lct(void) const
Return latest completion time.
Definition task.hpp:343
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p for task.
Definition task.hpp:438
ManFlexTask(void)
Default constructor.
Definition task.hpp:317
bool optional(void) const
Whether task can still be optional.
Definition task.hpp:376
bool assigned(void) const
Test whether task is assigned.
Definition task.hpp:381
void init(IntVar s, IntVar p, IntVar e)
Initialize with start time s, processing time p, end time e.
Definition task.hpp:322
Scheduling propagator for unary resource with mandatory tasks
Definition unary.hh:791
static ExecStatus post(Home home, TaskArray< ManTask > &t)
Post propagator that schedules tasks on unary resource.
Definition man-prop.hpp:48
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition man-prop.hpp:62
virtual Actor * copy(Space &home)
Perform copying during cloning.
Definition man-prop.hpp:56
ManProp(Home home, TaskArray< ManTask > &t)
Constructor for creation.
Definition man-prop.hpp:38
Node for an omega lambda tree.
Definition unary.hh:695
void update(const OmegaLambdaNode &l, const OmegaLambdaNode &r)
Update node from left child l and right child r.
Definition tree.hpp:112
void init(const OmegaLambdaNode &l, const OmegaLambdaNode &r)
Initialize node from left child l and right child r.
Definition tree.hpp:106
int lp
Processing times for subtree.
Definition unary.hh:700
static const int undef
Undefined task.
Definition unary.hh:698
int resEct
Node which is responsible for lect.
Definition unary.hh:704
int resLp
Node which is responsible for lp.
Definition unary.hh:706
int lect
Earliest completion times for subtree.
Definition unary.hh:702
Omega-lambda trees for computing ect of task sets.
Definition unary.hh:715
int responsible(void) const
Return responsible task.
Definition tree.hpp:209
OmegaLambdaTree(Region &r, const TaskViewArray< TaskView > &t, bool inc=true)
Initialize tree for tasks t with all tasks included, if inc is true.
Definition tree.hpp:136
void shift(int i)
Shift task with index i from omega to lambda.
Definition tree.hpp:163
void lremove(int i)
Remove task with index i from lambda.
Definition tree.hpp:193
bool lempty(void) const
Whether has responsible task.
Definition tree.hpp:203
void oinsert(int i)
Insert task with index i to omega.
Definition tree.hpp:175
int lect(void) const
Return earliest completion time of all tasks excluding lambda tasks.
Definition tree.hpp:221
void linsert(int i)
Insert task with index i to lambda.
Definition tree.hpp:183
int ect(void) const
Return earliest completion time of all tasks.
Definition tree.hpp:215
Node for an omega tree.
Definition unary.hh:660
int ect
Earliest completion time for subtree.
Definition unary.hh:665
void init(const OmegaNode &l, const OmegaNode &r)
Initialize node from left child l and right child r.
Definition tree.hpp:43
int p
Processing time for subtree.
Definition unary.hh:663
void update(const OmegaNode &l, const OmegaNode &r)
Update node from left child l and right child r.
Definition tree.hpp:48
Omega trees for computing ect of task sets.
Definition unary.hh:674
void insert(int i)
Insert task with index i.
Definition tree.hpp:65
int ect(void) const
Return earliest completion time of all tasks.
Definition tree.hpp:80
void remove(int i)
Remove task with index i.
Definition tree.hpp:73
OmegaTree(Region &r, const TaskViewArray< TaskView > &t)
Initialize tree for tasks t.
Definition tree.hpp:55
Unary optional task with fixed processing, start or end time.
Definition unary.hh:246
OptFixPSETask(void)
Default constructor.
Definition task.hpp:490
void init(TaskType t, IntVar s, int p, BoolVar m)
Initialize with start time s, processing time p, and mandatory flag m.
Definition task.hpp:496
Unary optional task with fixed processing time
Definition unary.hh:222
void init(IntVar s, int p, BoolVar m)
Initialize with start time s, processing time p, and mandatory flag m.
Definition task.hpp:471
OptFixPTask(void)
Default constructor.
Definition task.hpp:465
Unary optional task with flexible processing time
Definition unary.hh:370
OptFlexTask(void)
Default constructor.
Definition task.hpp:515
void init(IntVar s, IntVar p, IntVar e, BoolVar m)
Initialize with start time s, processing time p, end time e, and mandatory flag m.
Definition task.hpp:521
Scheduling propagator for unary resource with optional tasks
Definition unary.hh:814
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition opt-prop.hpp:77
static ExecStatus post(Home home, TaskArray< OptTask > &t)
Post propagator that schedules tasks on unary resource.
Definition opt-prop.hpp:50
OptProp(Home home, TaskArray< OptTask > &t)
Constructor for creation.
Definition opt-prop.hpp:40
virtual Actor * copy(Space &home)
Perform copying during cloning.
Definition opt-prop.hpp:71
Base-class for propagators.
Definition core.hpp:1064
ModEventDelta med
A set of modification events (used during propagation)
Definition core.hpp:1075
Handle to region.
Definition region.hpp:55
Computation spaces.
Definition core.hpp:1742
int ModEventDelta
Modification event deltas.
Definition core.hpp:89
TaskType
Type of task for scheduling constraints.
Definition int.hh:1004
IntPropLevel
Propagation levels for integer propagators.
Definition int.hh:974
ExecStatus optpost(Home home, TaskArray< OptTask > &t, IntPropLevel ipl)
Post optional task propagator according to propagation level.
Definition post.hpp:53
FwdToBwd< OptFixPSETaskFwd > OptFixPSETaskBwd
Backward (dual) optional fixed task view.
Definition unary.hh:421
FwdToBwd< ManFlexTaskFwd > ManFlexTaskBwd
Backward (dual) mandatory flexible task view.
Definition unary.hh:427
FwdToBwd< OptFlexTaskFwd > OptFlexTaskBwd
Backward (dual) optional flexible task view.
Definition unary.hh:433
ExecStatus manpost(Home home, TaskArray< ManTask > &t, IntPropLevel ipl)
Post mandatory task propagator according to propagation level.
Definition post.hpp:38
FwdToBwd< ManFixPSETaskFwd > ManFixPSETaskBwd
Backward (dual) mandatory fixed task view.
Definition unary.hh:409
FwdToBwd< OptFixPTaskFwd > OptFixPTaskBwd
Backward (dual) optional fixed task view.
Definition unary.hh:415
ExecStatus timetabling(Space &home, Propagator &p, TaskArray< Task > &t)
Perform time-tabling propagation.
ExecStatus overload(TaskArray< ManTask > &t)
Check mandatory tasks t for overload.
Definition overload.hpp:39
ExecStatus subsumed(Space &home, Propagator &p, TaskArray< Task > &t)
Check tasks t for subsumption.
ExecStatus detectable(Space &home, TaskArray< ManTask > &t)
Propagate detectable precedences.
FwdToBwd< ManFixPTaskFwd > ManFixPTaskBwd
Backward (dual) mandatory fixed task view.
Definition unary.hh:403
ExecStatus notfirstnotlast(Space &home, TaskArray< ManTask > &t)
Propagate not-first and not-last.
ExecStatus edgefinding(Space &home, TaskArray< Task > &t)
Propagate by edge-finding.
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const ManFixPTaskBwd &t)
Definition task-view.hpp:40
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar SetRelType r
Definition set.hh:767
ExecStatus
Definition core.hpp:472
int PropCond
Type for propagation conditions.
Definition core.hpp:72
int ModEvent
Type for modification events.
Definition core.hpp:62