Generated on Sat Feb 7 2015 02:01:26 for Gecode by doxygen 1.8.9.1
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  * Last modified:
12  * $Date: 2011-07-13 20:01:39 +0200 (Wed, 13 Jul 2011) $ by $Author: schulte $
13  * $Revision: 12197 $
14  *
15  * This file is part of Gecode, the generic constraint
16  * development environment:
17  * http://www.gecode.org
18  *
19  * Permission is hereby granted, free of charge, to any person obtaining
20  * a copy of this software and associated documentation files (the
21  * "Software"), to deal in the Software without restriction, including
22  * without limitation the rights to use, copy, modify, merge, publish,
23  * distribute, sublicense, and/or sell copies of the Software, and to
24  * permit persons to whom the Software is furnished to do so, subject to
25  * the following conditions:
26  *
27  * The above copyright notice and this permission notice shall be
28  * included in all copies or substantial portions of the Software.
29  *
30  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
31  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
32  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
33  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
34  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
35  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
36  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37  *
38  */
39 
40 #ifndef __GECODE_INT_UNARY_HH__
41 #define __GECODE_INT_UNARY_HH__
42 
43 #include <gecode/int/task.hh>
44 
55 namespace Gecode { namespace Int { namespace Unary {
56 
58  class ManFixPTask {
59  protected:
63  int _p;
64  public:
66 
67  ManFixPTask(void);
70  ManFixPTask(IntVar s, int p);
72  void init(IntVar s, int p);
74  void init(const ManFixPTask& t);
76 
78 
79  int est(void) const;
82  int ect(void) const;
84  int lst(void) const;
86  int lct(void) const;
88  int pmin(void) const;
90  int pmax(void) const;
92  IntVar st(void) const;
94  bool mandatory(void) const;
96  bool excluded(void) const;
98  bool optional(void) const;
100 
102 
103  bool assigned(void) const;
106 
108 
109  ModEvent est(Space& home, int n);
112  ModEvent ect(Space& home, int n);
114  ModEvent lst(Space& home, int n);
116  ModEvent lct(Space& home, int n);
118  ModEvent norun(Space& home, int e, int l);
120  ModEvent mandatory(Space& home);
122  ModEvent excluded(Space& home);
124 
126 
127  void update(Space& home, bool share, ManFixPTask& t);
130 
132 
136  void cancel(Space& home, Propagator& p, PropCond pc=Int::PC_INT_BND);
138 
139  };
140 
145  template<class Char, class Traits>
146  std::basic_ostream<Char,Traits>&
147  operator <<(std::basic_ostream<Char,Traits>& os, const ManFixPTask& t);
148 
150  class ManFixPSETask : public ManFixPTask {
151  protected:
154  public:
156 
157  ManFixPSETask(void);
165  ManFixPSETask(TaskType t, IntVar s, int p);
172  void init(TaskType t, IntVar s, int p);
174  void init(const ManFixPSETask& t);
176 
178 
179  int est(void) const;
182  int ect(void) const;
184  int lst(void) const;
186  int lct(void) const;
188  int pmin(void) const;
190  int pmax(void) const;
192 
194 
195  ModEvent est(Space& home, int n);
198  ModEvent ect(Space& home, int n);
200  ModEvent lst(Space& home, int n);
202  ModEvent lct(Space& home, int n);
204  ModEvent norun(Space& home, int e, int l);
206 
208 
209  void update(Space& home, bool share, ManFixPSETask& t);
212 
213  };
214 
219  template<class Char, class Traits>
220  std::basic_ostream<Char,Traits>&
221  operator <<(std::basic_ostream<Char,Traits>& os, const ManFixPSETask& t);
222 
224  class OptFixPTask : public ManToOptTask<ManFixPTask> {
225  protected:
227  public:
229 
230  OptFixPTask(void);
233  OptFixPTask(IntVar s, int p, BoolVar m);
235  void init(IntVar s, int p, BoolVar m);
237  };
238 
243  template<class Char, class Traits>
244  std::basic_ostream<Char,Traits>&
245  operator <<(std::basic_ostream<Char,Traits>& os, const OptFixPTask& t);
246 
248  class OptFixPSETask : public ManToOptTask<ManFixPSETask> {
249  protected:
251  public:
253 
254  OptFixPSETask(void);
257  OptFixPSETask(TaskType t, IntVar s, int p, BoolVar m);
259  void init(TaskType t, IntVar s, int p, BoolVar m);
261  };
262 
267  template<class Char, class Traits>
268  std::basic_ostream<Char,Traits>&
269  operator <<(std::basic_ostream<Char,Traits>& os, const OptFixPSETask& t);
270 
272  class ManFlexTask {
273  protected:
280  public:
282 
283  ManFlexTask(void);
288  void init(IntVar s, IntVar p, IntVar e);
290  void init(const ManFlexTask& t);
292 
294 
295  int est(void) const;
298  int ect(void) const;
300  int lst(void) const;
302  int lct(void) const;
304  int pmin(void) const;
306  int pmax(void) const;
308  IntVar st(void) const;
310  IntVar p(void) const;
312  IntVar e(void) const;
314  bool mandatory(void) const;
316  bool excluded(void) const;
318  bool optional(void) const;
320 
322 
323  bool assigned(void) const;
326 
328 
329  ModEvent est(Space& home, int n);
332  ModEvent ect(Space& home, int n);
334  ModEvent lst(Space& home, int n);
336  ModEvent lct(Space& home, int n);
338  ModEvent norun(Space& home, int e, int l);
340  ModEvent mandatory(Space& home);
342  ModEvent excluded(Space& home);
344 
346 
347  void update(Space& home, bool share, ManFlexTask& t);
350 
352 
356  void cancel(Space& home, Propagator& p, PropCond pc=Int::PC_INT_BND);
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(Space& home, TaskArray<ManTask>& t);
754  template<class OptTask>
755  ExecStatus overload(Space& home, Propagator& p, TaskArray<OptTask>& t);
756 
758  template<class Task>
759  ExecStatus subsumed(Space& home, Propagator& p, TaskArray<Task>& t);
760 
762  template<class ManTask>
763  ExecStatus detectable(Space& home, TaskArray<ManTask>& t);
765  template<class OptTask>
766  ExecStatus detectable(Space& home, Propagator& p, TaskArray<OptTask>& t);
767 
769  template<class ManTask>
770  ExecStatus notfirstnotlast(Space& home, TaskArray<ManTask>& t);
772  template<class OptTask>
773  ExecStatus notfirstnotlast(Space& home, Propagator& p, TaskArray<OptTask>& t);
774 
776  template<class Task>
777  ExecStatus edgefinding(Space& home, TaskArray<Task>& t);
778 
779 
786  template<class ManTask>
787  class ManProp : public TaskProp<ManTask,Int::PC_INT_BND> {
788  protected:
793  ManProp(Space& home, bool shared, ManProp& p);
794  public:
796  virtual Actor* copy(Space& home, bool share);
798  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
800  static ExecStatus post(Home home, TaskArray<ManTask>& t);
801  };
802 
809  template<class OptTask>
810  class OptProp : public TaskProp<OptTask,Int::PC_INT_BND> {
811  protected:
816  OptProp(Space& home, bool shared, OptProp& p);
817  public:
819  virtual Actor* copy(Space& home, bool share);
821  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
823  static ExecStatus post(Home home, TaskArray<OptTask>& t);
824  };
825 
826 }}}
827 
833 
836 
837 #endif
838 
839 // STATISTICS: int-prop
int lct(void) const
Return latest completion time.
Definition: task.hpp:343
Omega-lambda trees for computing ect of task sets.
Definition: unary.hh:715
int pmin(void) const
Return minimum processing time.
Definition: task.hpp:212
OptFixPTask OptFixPTaskFwd
Forward optional fixed task view.
Definition: unary.hh:412
Unary (mandatory) task with fixed processing, start or end time
Definition: unary.hh:150
void update(Space &home, bool share, ManFixPSETask &t)
Update this task to be a clone of task t.
Definition: task.hpp:299
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: man-prop.hpp:67
int resEct
Node which is responsible for lect.
Definition: unary.hh:704
Node for an omega tree.
Definition: unary.hh:660
NodeType t
Type of node.
Definition: bool-expr.cpp:234
FwdToBwd< ManFixPSETaskFwd > ManFixPSETaskBwd
Backward (dual) mandatory fixed task view.
Definition: unary.hh:409
Task view array.
Definition: task.hh:233
void init(const OmegaLambdaNode &l, const OmegaLambdaNode &r)
Initialize node from left child l and right child r.
Definition: tree.hpp:109
NNF * l
Left subtree.
Definition: bool-expr.cpp:244
TaskType
Type of task for scheduling constraints.
Definition: int.hh:949
Unary optional task with flexible processing time
Definition: unary.hh:370
bool lempty(void) const
Whether has responsible task.
Definition: tree.hpp:205
Unary::OptFixPTaskBwd TaskViewBwd
The backward task view type.
Definition: unary.hh:616
void init(IntVar s, int p)
Initialize with start time s and processing time p.
Definition: task.hpp:51
int _p
Processing time.
Definition: unary.hh:63
int lp
Processing times for subtree.
Definition: unary.hh:700
bool excluded(void) const
Whether task is excluded.
Definition: task.hpp:372
ManProp(Home home, TaskArray< ManTask > &t)
Constructor for creation.
Definition: man-prop.hpp:42
FwdToBwd< OptFixPTaskFwd > OptFixPTaskBwd
Backward (dual) optional fixed task view.
Definition: unary.hh:415
Unary::ManFixPTask Task
The task type.
Definition: unary.hh:505
Unary::ManFixPTask ManTask
The corresponding mandatory task.
Definition: unary.hh:618
OptFlexTask(void)
Default constructor.
Definition: task.hpp:509
Scheduling propagator for unary resource with mandatory tasks
Definition: unary.hh:787
void update(const OmegaNode &l, const OmegaNode &r)
Update node from left child l and right child r.
Definition: tree.hpp:52
Unary::ManFixPTaskFwd TaskViewFwd
The forward task view type.
Definition: unary.hh:594
int lct(void) const
Return latest completion time.
Definition: task.hpp:202
Unary (mandatory) task with fixed processing time
Definition: unary.hh:58
int est(void) const
Return earliest start time.
Definition: task.hpp:331
void cancel(Space &home, Propagator &p, PropCond pc=Int::PC_INT_BND)
Cancel subscription of propagator p for task.
Definition: task.hpp:152
Unary::OptFixPTask Task
The task type.
Definition: unary.hh:537
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:515
int pmax(void) const
Return maximum processing time.
Definition: task.hpp:222
ManFlexTask(void)
Default constructor.
Definition: task.hpp:317
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:490
int ModEvent
Type for modification events.
Definition: core.hpp:146
Base-class for propagators.
Definition: core.hpp:755
Propagator for tasks
Definition: task.hh:424
void linsert(int i)
Insert task with index i to lambda.
Definition: tree.hpp:185
virtual Actor * copy(Space &home, bool share)
Perform copying during cloning.
Definition: man-prop.hpp:61
Handle to region.
Definition: region.hpp:61
Unary::ManFlexTask Task
The task type.
Definition: unary.hh:569
int pmax(void) const
Return maximum processing time.
Definition: task.hpp:80
ExecStatus notfirstnotlast(Space &home, TaskArray< ManTask > &t)
Propagate not-first and not-last.
Unary::OptFixPSETaskFwd TaskViewFwd
The forward task view type.
Definition: unary.hh:626
Computation spaces.
Definition: core.hpp:1362
Unary::OptFixPSETaskBwd TaskViewBwd
The backward task view type.
Definition: unary.hh:628
bool assigned(void) const
Test whether task is assigned.
Definition: task.hpp:381
OptFixPSETask(void)
Default constructor.
Definition: task.hpp:484
int ect
Earliest completion time for subtree.
Definition: unary.hh:665
void insert(int i)
Insert task with index i.
Definition: tree.hpp:68
int lect
Earliest completion times for subtree.
Definition: unary.hh:702
Traits class for mapping tasks to task views.
Definition: task.hh:159
int pmax(void) const
Return maximum processing time.
Definition: task.hpp:351
ModEvent norun(Space &home, int e, int l)
Update such that task cannot run from e to l.
Definition: task.hpp:273
Base-class for both propagators and branchers.
Definition: core.hpp:666
IntVar e(void) const
Return end time.
Definition: task.hpp:363
Unary::OptFlexTask Task
The task type.
Definition: unary.hh:577
void oinsert(int i)
Insert task with index i to omega.
Definition: tree.hpp:177
Unary::OptFlexTaskFwd TaskViewFwd
The forward task view type.
Definition: unary.hh:648
Unary::OptFixPTaskFwd TaskViewFwd
The forward task view type.
Definition: unary.hh:614
int ect(void) const
Return earliest completion time.
Definition: task.hpp:64
virtual Actor * copy(Space &home, bool share)
Perform copying during cloning.
Definition: opt-prop.hpp:75
Unary optional task with fixed processing time
Definition: unary.hh:224
Int::IntView _s
Start time.
Definition: unary.hh:61
int p
Number of positive literals for node type.
Definition: bool-expr.cpp:236
Omega trees for computing ect of task sets.
Definition: unary.hh:674
Gecode::IntArgs i(4, 1, 2, 3, 4)
void update(const OmegaLambdaNode &l, const OmegaLambdaNode &r)
Update node from left child l and right child r.
Definition: tree.hpp:115
bool mandatory(void) const
Whether task is mandatory.
Definition: task.hpp:368
int n
Number of negative literals for node type.
Definition: bool-expr.cpp:238
Unary::ManFixPTaskBwd TaskViewBwd
The backward task view type.
Definition: unary.hh:596
Unary::ManFixPTask ManTask
The corresponding mandatory task.
Definition: unary.hh:630
ManFixPTask(void)
Default constructor.
Definition: task.hpp:47
Unary::ManFixPSETaskBwd TaskViewBwd
The backward task view type.
Definition: unary.hh:606
FwdToBwd< OptFixPSETaskFwd > OptFixPSETaskBwd
Backward (dual) optional fixed task view.
Definition: unary.hh:421
void update(Space &home, bool share, ManFixPTask &t)
Update this task to be a clone of task t.
Definition: task.hpp:143
int pmin(void) const
Return minimum processing time.
Definition: task.hpp:76
NNF * r
Right subtree.
Definition: bool-expr.cpp:246
Unary::ManFixPSETaskFwd TaskViewFwd
The forward task view type.
Definition: unary.hh:604
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
Definition: var-type.hpp:91
int PropCond
Type for propagation conditions.
Definition: core.hpp:156
Unary::OptFixPSETask Task
The task type.
Definition: unary.hh:545
ExecStatus overload(Space &home, TaskArray< ManTask > &t)
Check mandatory tasks t for overload.
Definition: overload.hpp:43
ModEventDelta med
A set of modification events (used during propagation)
Definition: core.hpp:764
Unary::ManFixPTask Task
The task type.
Definition: unary.hh:497
int est(void) const
Return earliest start time.
Definition: task.hpp:184
Node for an omega lambda tree.
Definition: unary.hh:695
ModEvent norun(Space &home, int e, int l)
Update such that task cannot run from e to l.
Definition: task.hpp:402
ModEvent norun(Space &home, int e, int l)
Update such that task cannot run from e to l.
Definition: task.hpp:123
void init(IntVar s, IntVar p, IntVar e)
Initialize with start time s, processing time p, end time e.
Definition: task.hpp:322
Class to define an optional from a mandatory task.
Definition: task.hh:47
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: opt-prop.hpp:81
ExecStatus detectable(Space &home, TaskViewArray< ManTaskView > &t)
Definition: detectable.hpp:42
FwdToBwd< ManFixPTaskFwd > ManFixPTaskBwd
Backward (dual) mandatory fixed task view.
Definition: unary.hh:403
int lect(void) const
Return earliest completion time of all tasks excluding lambda tasks.
Definition: tree.hpp:223
int responsible(void) const
Return responsible task.
Definition: tree.hpp:211
TaskType _t
Task type.
Definition: unary.hh:153
OptProp(Home home, TaskArray< OptTask > &t)
Constructor for creation.
Definition: opt-prop.hpp:44
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
int lst(void) const
Return latest start time.
Definition: task.hpp:68
Int::IntView _e
End time.
Definition: unary.hh:279
Boolean integer variables.
Definition: int.hh:491
bool optional(void) const
Whether task can still be optional.
Definition: task.hpp:97
Unary::OptFixPTask Task
The task type.
Definition: unary.hh:529
Task mapper: turns a task view into its dual.
Definition: task.hh:104
int resLp
Node which is responsible for lp.
Definition: unary.hh:706
void init(TaskType t, IntVar s, int p)
Initialize task.
Definition: task.hpp:175
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:138
int ect(void) const
Return earliest completion time.
Definition: task.hpp:335
Unary::ManFlexTaskFwd TaskViewFwd
The forward task view type.
Definition: unary.hh:638
Int::IntView _p
Processing time.
Definition: unary.hh:277
Integer view for integer variables.
Definition: view.hpp:129
bool mandatory(void) const
Whether task is mandatory.
Definition: task.hpp:89
ExecStatus subsumed(Space &home, Propagator &p, TaskArray< Task > &t)
Check tasks t for subsumption.
Definition: subsumption.hpp:42
OmegaTree(Region &r, const TaskViewArray< TaskView > &t)
Initialize tree for tasks t.
Definition: tree.hpp:58
Unary::ManFixPSETask Task
The task type.
Definition: unary.hh:513
IntVar st(void) const
Return start time.
Definition: task.hpp:84
void update(Space &home, bool share, ManFlexTask &t)
Update this task to be a clone of task t.
Definition: task.hpp:425
Unary::OptFlexTaskBwd TaskViewBwd
The backward task view type.
Definition: unary.hh:650
OptFixPTask(void)
Default constructor.
Definition: task.hpp:459
Scheduling propagator for unary resource with optional tasks
Definition: unary.hh:810
ManFlexTask ManFlexTaskFwd
Forward mandatory flexible task view.
Definition: unary.hh:424
ExecStatus
Definition: core.hpp:523
Integer variables.
Definition: int.hh:350
int ect(void) const
Return earliest completion time of all tasks.
Definition: tree.hpp:83
OptFixPSETask OptFixPSETaskFwd
Forward optional fixed task view.
Definition: unary.hh:418
static ExecStatus post(Home home, TaskArray< OptTask > &t)
Post propagator that schedules tasks on unary resource.
Definition: opt-prop.hpp:54
Unary::ManFlexTask Task
The task type.
Definition: unary.hh:561
void lremove(int i)
Remove task with index i from lambda.
Definition: tree.hpp:195
Unary optional task with fixed processing, start or end time.
Definition: unary.hh:248
void init(const OmegaNode &l, const OmegaNode &r)
Initialize node from left child l and right child r.
Definition: tree.hpp:47
bool assigned(void) const
Test whether task is assigned.
Definition: task.hpp:102
void subscribe(Space &home, Propagator &p, PropCond pc=Int::PC_INT_BND)
Subscribe propagator p to task.
Definition: task.hpp:148
void shift(int i)
Shift task with index i from omega to lambda.
Definition: tree.hpp:165
ExecStatus edgefinding(Space &home, TaskViewArray< TaskView > &t)
void cancel(Space &home, Propagator &p, PropCond pc=Int::PC_INT_BND)
Cancel subscription of propagator p for task.
Definition: task.hpp:438
Traits class for mapping task views to tasks.
Definition: task.hh:150
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
Definition: view.hpp:662
Unary::OptFlexTask Task
The task type.
Definition: unary.hh:585
OptFlexTask OptFlexTaskFwd
Forward optional flexible task view.
Definition: unary.hh:430
int pmin(void) const
Return minimum processing time.
Definition: task.hpp:347
ManFixPSETask(void)
Default constructor.
Definition: task.hpp:170
Gecode toplevel namespace
static ExecStatus post(Home home, TaskArray< ManTask > &t)
Post propagator that schedules tasks on unary resource.
Definition: man-prop.hpp:53
ManFixPSETask ManFixPSETaskFwd
Forward mandatory fixed task view.
Definition: unary.hh:406
int lct(void) const
Return latest completion time.
Definition: task.hpp:72
Unary::ManFlexTaskBwd TaskViewBwd
The backward task view type.
Definition: unary.hh:640
Unary (mandatory) task with flexible processing time
Definition: unary.hh:272
int ect(void) const
Return earliest completion time of all tasks.
Definition: tree.hpp:217
void init(IntVar s, int p, BoolVar m)
Initialize with start time s, processing time p, and mandatory flag m.
Definition: task.hpp:465
Unary::ManFixPSETask Task
The task type.
Definition: unary.hh:521
int ect(void) const
Return earliest completion time.
Definition: task.hpp:188
IntVar p(void) const
Return processing time.
Definition: task.hpp:359
int ModEventDelta
Modification event deltas.
Definition: core.hpp:173
Home class for posting propagators
Definition: core.hpp:717
IntVar st(void) const
Return start time.
Definition: task.hpp:355
static const int undef
Undefined task.
Definition: unary.hh:698
Task trees for task views with node type Node.
Definition: task.hh:365
Int::IntView _s
Start time.
Definition: unary.hh:275
ManFixPTask ManFixPTaskFwd
Forward mandatory fixed task view.
Definition: unary.hh:400
void subscribe(Space &home, Propagator &p, PropCond pc=Int::PC_INT_BND)
Subscribe propagator p to task.
Definition: task.hpp:432
FwdToBwd< ManFlexTaskFwd > ManFlexTaskBwd
Backward (dual) mandatory flexible task view.
Definition: unary.hh:427
Unary::OptFixPSETask Task
The task type.
Definition: unary.hh:553
bool excluded(void) const
Whether task is excluded.
Definition: task.hpp:93
Unary::ManFlexTask ManTask
The corresponding mandatory task.
Definition: unary.hh:652
int lst(void) const
Return latest start time.
Definition: task.hpp:339
int p
Processing time for subtree.
Definition: unary.hh:663
int est(void) const
Return earliest start time.
Definition: task.hpp:60
int lst(void) const
Return latest start time.
Definition: task.hpp:198