Generated on Wed Jan 1 2020 10:37:59 for Gecode by doxygen 1.8.16
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 
51 namespace Gecode { namespace Int { namespace Unary {
52 
54  class ManFixPTask {
55  protected:
59  int _p;
60  public:
62 
63  ManFixPTask(void);
66  ManFixPTask(IntVar s, int p);
68  void init(IntVar s, int p);
70  void init(const ManFixPTask& t);
72 
74 
75  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  bool assigned(void) const;
102 
104 
105  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  void update(Space& home, ManFixPTask& t);
126 
128 
129  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  ManFixPSETask(void);
163  ManFixPSETask(TaskType t, IntVar s, int p);
170  void init(TaskType t, IntVar s, int p);
172  void init(const ManFixPSETask& t);
174 
176 
177  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  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  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  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  OptFixPSETask(void);
255  OptFixPSETask(TaskType t, IntVar s, int p, BoolVar m);
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 
270  class ManFlexTask {
271  protected:
278  public:
280 
281  ManFlexTask(void);
286  void init(IntVar s, IntVar p, IntVar e);
288  void init(const ManFlexTask& t);
290 
292 
293  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  bool assigned(void) const;
324 
326 
327  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  void update(Space& home, ManFlexTask& t);
348 
350 
351  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  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 
395 #include <gecode/int/unary/task.hpp>
396 
397 namespace Gecode { namespace Int { namespace Unary {
398 
401 
404 
407 
410 
413 
416 
419 
422 
425 
428 
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 
490 namespace Gecode { namespace Int {
491 
493  template<>
495  public:
498  };
499 
501  template<>
503  public:
506  };
507 
509  template<>
511  public:
514  };
515 
517  template<>
519  public:
522  };
523 
525  template<>
527  public:
530  };
531 
533  template<>
535  public:
538  };
539 
541  template<>
543  public:
546  };
547 
549  template<>
551  public:
554  };
555 
557  template<>
559  public:
562  };
563 
565  template<>
567  public:
570  };
571 
573  template<>
575  public:
578  };
579 
581  template<>
583  public:
586  };
587 
588 
590  template<>
591  class TaskTraits<Unary::ManFixPTask> {
592  public:
597  };
598 
600  template<>
601  class TaskTraits<Unary::ManFixPSETask> {
602  public:
607  };
608 
610  template<>
611  class TaskTraits<Unary::OptFixPTask> {
612  public:
619  };
620 
622  template<>
623  class TaskTraits<Unary::OptFixPSETask> {
624  public:
631  };
632 
634  template<>
635  class TaskTraits<Unary::ManFlexTask> {
636  public:
641  };
642 
644  template<>
645  class TaskTraits<Unary::OptFlexTask> {
646  public:
653  };
654 
655 }}
656 
657 namespace 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:
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;
704  int resEct;
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:
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 
746 #include <gecode/int/unary/tree.hpp>
747 
748 namespace 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:
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:
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>
832  ExecStatus
834 
836  template<class OptTask>
837  ExecStatus
839 
840 }}}
841 
848 
851 #include <gecode/int/unary/post.hpp>
852 
853 #endif
854 
855 // STATISTICS: int-prop
Class to define an optional from a mandatory task.
Definition: task.hh:43
void init(TaskType t, IntVar s, int p)
Initialize task.
Definition: task.hpp:175
OmegaTree(Region &r, const TaskViewArray< TaskView > &t)
Initialize tree for tasks t.
Definition: tree.hpp:55
ModEvent norun(Space &home, int e, int l)
Update such that task cannot run from e to l.
Definition: task.hpp:119
void shift(int i)
Shift task with index i from omega to lambda.
Definition: tree.hpp:163
static const int undef
Undefined task.
Definition: unary.hh:698
int lect(void) const
Return earliest completion time of all tasks excluding lambda tasks.
Definition: tree.hpp:221
Unary::OptFlexTask Task
The task type.
Definition: unary.hh:577
OptFixPSETask OptFixPSETaskFwd
Forward optional fixed task view.
Definition: unary.hh:418
FwdToBwd< ManFixPTaskFwd > ManFixPTaskBwd
Backward (dual) mandatory fixed task view.
Definition: unary.hh:403
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p for task.
Definition: task.hpp:148
int est(void) const
Return earliest start time.
Definition: task.hpp:56
Unary::OptFlexTask Task
The task type.
Definition: unary.hh:585
int pmax(void) const
Return maximum processing time.
Definition: task.hpp:222
void update(Space &home, ManFixPTask &t)
Update this task to be a clone of task t.
Definition: task.hpp:139
ManFlexTask(void)
Default constructor.
Definition: task.hpp:317
IntVar p(void) const
Return processing time.
Definition: task.hpp:359
Omega-lambda trees for computing ect of task sets.
Definition: unary.hh:715
int pmax(void) const
Return maximum processing time.
Definition: task.hpp:76
ExecStatus edgefinding(Space &home, TaskViewArray< TaskView > &t)
Node for an omega tree.
Definition: unary.hh:660
ExecStatus timetabling(Space &home, Propagator &p, TaskArray< Task > &t)
Perform time-tabling propagation.
Scheduling propagator for unary resource with optional tasks
Definition: unary.hh:814
Unary (mandatory) task with fixed processing, start or end time
Definition: unary.hh:148
int lst(void) const
Return latest start time.
Definition: task.hpp:64
OptFixPTask(void)
Default constructor.
Definition: task.hpp:465
Unary (mandatory) task with flexible processing time
Definition: unary.hh:270
void init(IntVar s, IntVar p, IntVar e)
Initialize with start time s, processing time p, end time e.
Definition: task.hpp:322
NodeType t
Type of node.
Definition: bool-expr.cpp:230
Unary::ManFixPTask Task
The task type.
Definition: unary.hh:497
bool assigned(void) const
Test whether task is assigned.
Definition: task.hpp:381
int lct(void) const
Return latest completion time.
Definition: task.hpp:68
void init(IntVar s, int p)
Initialize with start time s and processing time p.
Definition: task.hpp:47
OptFixPSETask(void)
Default constructor.
Definition: task.hpp:490
ManFixPTask ManFixPTaskFwd
Forward mandatory fixed task view.
Definition: unary.hh:400
void subscribe(Space &home, Propagator &p, PropCond pc)
Subscribe propagator p to task.
Definition: task.hpp:432
int p
Processing time for subtree.
Definition: unary.hh:663
ManFixPTask(void)
Default constructor.
Definition: task.hpp:43
Int::IntView _s
Start time.
Definition: unary.hh:273
IntPropLevel
Propagation levels for integer propagators.
Definition: int.hh:974
Computation spaces.
Definition: core.hpp:1742
OptFlexTask(void)
Default constructor.
Definition: task.hpp:515
Base-class for both propagators and branchers.
Definition: core.hpp:628
void insert(int i)
Insert task with index i.
Definition: tree.hpp:65
int lect
Earliest completion times for subtree.
Definition: unary.hh:702
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
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
int lp
Processing times for subtree.
Definition: unary.hh:700
Task mapper: turns a task view into its dual.
Definition: task.hh:102
TaskType _t
Task type.
Definition: unary.hh:151
void init(const OmegaLambdaNode &l, const OmegaLambdaNode &r)
Initialize node from left child l and right child r.
Definition: tree.hpp:106
void update(const OmegaLambdaNode &l, const OmegaLambdaNode &r)
Update node from left child l and right child r.
Definition: tree.hpp:112
Unary::OptFixPTaskFwd TaskViewFwd
The forward task view type.
Definition: unary.hh:614
virtual Actor * copy(Space &home)
Perform copying during cloning.
Definition: man-prop.hpp:56
Unary (mandatory) task with fixed processing time
Definition: unary.hh:54
Int::IntView _e
End time.
Definition: unary.hh:277
int ect
Earliest completion time for subtree.
Definition: unary.hh:665
void update(Space &home, ManFixPSETask &t)
Update this task to be a clone of task t.
Definition: task.hpp:299
Traits class for mapping tasks to task views.
Definition: task.hh:157
Gecode toplevel namespace
Unary::OptFixPTask Task
The task type.
Definition: unary.hh:529
Unary::OptFixPSETaskFwd TaskViewFwd
The forward task view type.
Definition: unary.hh:626
Base-class for propagators.
Definition: core.hpp:1064
Unary optional task with flexible processing time
Definition: unary.hh:370
Unary::ManFixPTaskBwd TaskViewBwd
The backward task view type.
Definition: unary.hh:596
Unary::ManFlexTask Task
The task type.
Definition: unary.hh:561
Unary::ManFlexTaskBwd TaskViewBwd
The backward task view type.
Definition: unary.hh:640
ModEvent norun(Space &home, int e, int l)
Update such that task cannot run from e to l.
Definition: task.hpp:402
int ect(void) const
Return earliest completion time.
Definition: task.hpp:335
Unary::OptFixPSETask Task
The task type.
Definition: unary.hh:545
Unary::ManFixPSETask Task
The task type.
Definition: unary.hh:513
OptFixPTask OptFixPTaskFwd
Forward optional fixed task view.
Definition: unary.hh:412
Unary::OptFixPTask Task
The task type.
Definition: unary.hh:537
bool optional(void) const
Whether task can still be optional.
Definition: task.hpp:93
Home class for posting propagators
Definition: core.hpp:856
ExecStatus overload(TaskArray< ManTask > &t)
Check mandatory tasks t for overload.
Definition: overload.hpp:39
int responsible(void) const
Return responsible task.
Definition: tree.hpp:209
bool excluded(void) const
Whether task is excluded.
Definition: task.hpp:89
Handle to region.
Definition: region.hpp:55
Task trees for task views with node type Node.
Definition: task.hh:365
ManProp(Home home, TaskArray< ManTask > &t)
Constructor for creation.
Definition: man-prop.hpp:38
int lst(void) const
Return latest start time.
Definition: task.hpp:339
static ExecStatus post(Home home, TaskArray< ManTask > &t)
Post propagator that schedules tasks on unary resource.
Definition: man-prop.hpp:48
int pmin(void) const
Return minimum processing time.
Definition: task.hpp:212
bool mandatory(void) const
Whether task is mandatory.
Definition: task.hpp:368
Propagator for tasks
Definition: task.hh:424
Traits class for mapping task views to tasks.
Definition: task.hh:148
Post propagator for SetVar SetOpType SetVar SetRelType r
Definition: set.hh:767
FwdToBwd< ManFlexTaskFwd > ManFlexTaskBwd
Backward (dual) mandatory flexible task view.
Definition: unary.hh:427
Boolean integer variables.
Definition: int.hh:512
bool assigned(void) const
Test whether task is assigned.
Definition: task.hpp:98
Unary::OptFlexTaskFwd TaskViewFwd
The forward task view type.
Definition: unary.hh:648
Unary::ManFlexTask Task
The task type.
Definition: unary.hh:569
ModEventDelta med
A set of modification events (used during propagation)
Definition: core.hpp:1075
Unary optional task with fixed processing time
Definition: unary.hh:222
Unary::ManFixPSETaskBwd TaskViewBwd
The backward task view type.
Definition: unary.hh:606
int lct(void) const
Return latest completion time.
Definition: task.hpp:202
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: man-prop.hpp:62
ManFixPSETask ManFixPSETaskFwd
Forward mandatory fixed task view.
Definition: unary.hh:406
int resLp
Node which is responsible for lp.
Definition: unary.hh:706
int lct(void) const
Return latest completion time.
Definition: task.hpp:343
int ect(void) const
Return earliest completion time.
Definition: task.hpp:188
Integer variables.
Definition: int.hh:371
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: opt-prop.hpp:77
void remove(int i)
Remove task with index i.
Definition: tree.hpp:73
void oinsert(int i)
Insert task with index i to omega.
Definition: tree.hpp:175
Unary::ManFixPSETaskFwd TaskViewFwd
The forward task view type.
Definition: unary.hh:604
bool optional(void) const
Whether task can still be optional.
Definition: task.hpp:376
FwdToBwd< OptFlexTaskFwd > OptFlexTaskBwd
Backward (dual) optional flexible task view.
Definition: unary.hh:433
Unary::ManFixPTask ManTask
The corresponding mandatory task.
Definition: unary.hh:618
FwdToBwd< OptFixPTaskFwd > OptFixPTaskBwd
Backward (dual) optional fixed task view.
Definition: unary.hh:415
Scheduling propagator for unary resource with mandatory tasks
Definition: unary.hh:791
void linsert(int i)
Insert task with index i to lambda.
Definition: tree.hpp:183
void init(const OmegaNode &l, const OmegaNode &r)
Initialize node from left child l and right child r.
Definition: tree.hpp:43
Unary::ManFlexTaskFwd TaskViewFwd
The forward task view type.
Definition: unary.hh:638
FwdToBwd< OptFixPSETaskFwd > OptFixPSETaskBwd
Backward (dual) optional fixed task view.
Definition: unary.hh:421
ExecStatus subsumed(Space &home, Propagator &p, TaskArray< Task > &t)
Check tasks t for subsumption.
Definition: subsumption.hpp:38
void subscribe(Space &home, Propagator &p, PropCond pc)
Subscribe propagator p to task.
Definition: task.hpp:144
Unary::OptFixPSETaskBwd TaskViewBwd
The backward task view type.
Definition: unary.hh:628
IntVar st(void) const
Return start time.
Definition: task.hpp:80
int ModEvent
Type for modification events.
Definition: core.hpp:62
Int::IntView _s
Start time.
Definition: unary.hh:57
IntVar st(void) const
Return start time.
Definition: task.hpp:355
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
bool mandatory(void) const
Whether task is mandatory.
Definition: task.hpp:85
Omega trees for computing ect of task sets.
Definition: unary.hh:674
ModEvent norun(Space &home, int e, int l)
Update such that task cannot run from e to l.
Definition: task.hpp:273
void init(IntVar s, int p, BoolVar m)
Initialize with start time s, processing time p, and mandatory flag m.
Definition: task.hpp:471
int pmin(void) const
Return minimum processing time.
Definition: task.hpp:347
int PropCond
Type for propagation conditions.
Definition: core.hpp:72
TaskType
Type of task for scheduling constraints.
Definition: int.hh:1004
FwdToBwd< ManFixPSETaskFwd > ManFixPSETaskBwd
Backward (dual) mandatory fixed task view.
Definition: unary.hh:409
Unary::ManFlexTask ManTask
The corresponding mandatory task.
Definition: unary.hh:652
Unary::ManFixPTask ManTask
The corresponding mandatory task.
Definition: unary.hh:630
NNF * l
Left subtree.
Definition: bool-expr.cpp:240
ExecStatus optpost(Home home, TaskArray< OptTask > &t, IntPropLevel ipl)
Post optional task propagator according to propagation level.
Definition: post.hpp:53
Unary::OptFlexTaskBwd TaskViewBwd
The backward task view type.
Definition: unary.hh:650
int ect(void) const
Return earliest completion time of all tasks.
Definition: tree.hpp:215
int _p
Processing time.
Definition: unary.hh:59
bool lempty(void) const
Whether has responsible task.
Definition: tree.hpp:203
TaskArray< ManTask > t
Tasks.
Definition: task.hh:427
Integer view for integer variables.
Definition: view.hpp:129
ManFixPSETask(void)
Default constructor.
Definition: task.hpp:170
Node for an omega lambda tree.
Definition: unary.hh:695
Unary::ManFixPTaskFwd TaskViewFwd
The forward task view type.
Definition: unary.hh:594
int pmax(void) const
Return maximum processing time.
Definition: task.hpp:351
int lst(void) const
Return latest start time.
Definition: task.hpp:198
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
int ect(void) const
Return earliest completion time of all tasks.
Definition: tree.hpp:80
int resEct
Node which is responsible for lect.
Definition: unary.hh:704
OptFlexTask OptFlexTaskFwd
Forward optional flexible task view.
Definition: unary.hh:430
ExecStatus notfirstnotlast(Space &home, TaskArray< ManTask > &t)
Propagate not-first and not-last.
ExecStatus manpost(Home home, TaskArray< ManTask > &t, IntPropLevel ipl)
Post mandatory task propagator according to propagation level.
Definition: post.hpp:38
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const ManFixPTaskBwd &t)
Definition: task-view.hpp:40
Unary::OptFixPTaskBwd TaskViewBwd
The backward task view type.
Definition: unary.hh:616
Task view array.
Definition: task.hh:233
bool excluded(void) const
Whether task is excluded.
Definition: task.hpp:372
ManFlexTask ManFlexTaskFwd
Forward mandatory flexible task view.
Definition: unary.hh:424
Unary::ManFixPTask Task
The task type.
Definition: unary.hh:505
void reschedule(Space &home, Propagator &p, PropCond pc)
Schedule propagator p.
Definition: task.hpp:444
ExecStatus detectable(Space &home, TaskViewArray< ManTaskView > &t)
Definition: detectable.hpp:38
Unary::OptFixPSETask Task
The task type.
Definition: unary.hh:553
int n
Number of negative literals for node type.
Definition: bool-expr.cpp:234
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p for task.
Definition: task.hpp:438
int est(void) const
Return earliest start time.
Definition: task.hpp:184
void lremove(int i)
Remove task with index i from lambda.
Definition: tree.hpp:193
int ModEventDelta
Modification event deltas.
Definition: core.hpp:89
void update(const OmegaNode &l, const OmegaNode &r)
Update node from left child l and right child r.
Definition: tree.hpp:48
Gecode::IntArgs i({1, 2, 3, 4})
Unary optional task with fixed processing, start or end time.
Definition: unary.hh:246
int ect(void) const
Return earliest completion time.
Definition: task.hpp:60
int est(void) const
Return earliest start time.
Definition: task.hpp:331
virtual Actor * copy(Space &home)
Perform copying during cloning.
Definition: opt-prop.hpp:71
int p
Number of positive literals for node type.
Definition: bool-expr.cpp:232
Int::IntView _p
Processing time.
Definition: unary.hh:275
IntVar e(void) const
Return end time.
Definition: task.hpp:363
Unary::ManFixPSETask Task
The task type.
Definition: unary.hh:521
void reschedule(Space &home, Propagator &p, PropCond pc)
Schedule propagator p.
Definition: task.hpp:152
int pmin(void) const
Return minimum processing time.
Definition: task.hpp:72
ExecStatus
Definition: core.hpp:472
void update(Space &home, ManFlexTask &t)
Update this task to be a clone of task t.
Definition: task.hpp:425