Generated on Sat Feb 7 2015 02:01:21 for Gecode by doxygen 1.8.9.1
cumulative.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: 2013-03-11 06:26:07 +0100 (Mon, 11 Mar 2013) $ by $Author: tack $
13  * $Revision: 13487 $
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_CUMULATIVE_HH__
41 #define __GECODE_INT_CUMULATIVE_HH__
42 
43 #include <gecode/int/task.hh>
44 #include <gecode/int/unary.hh>
45 
59 namespace Gecode { namespace Int { namespace Cumulative {
60 
62  void mul_check(long long int x, long long int y);
63 
65  void mul_check(long long int x, long long int y, long long int z);
66 
67 }}}
68 
70 
71 namespace Gecode { namespace Int { namespace Cumulative {
72 
75  protected:
77  int _c;
78  public:
80 
81  ManFixPTask(void);
84  ManFixPTask(IntVar s, int p, int c);
86  void init(IntVar s, int p, int c);
88  void init(const ManFixPTask& t);
90 
92 
93  int c(void) const;
96  long long int e(void) const;
98 
100 
101  void update(Space& home, bool share, ManFixPTask& t);
104 
105  };
106 
111  template<class Char, class Traits>
112  std::basic_ostream<Char,Traits>&
113  operator <<(std::basic_ostream<Char,Traits>& os, const ManFixPTask& t);
114 
117  protected:
119  int _c;
120  public:
122 
123  ManFixPSETask(void);
132  ManFixPSETask(TaskType t, IntVar s, int p, int c);
140  void init(TaskType t, IntVar s, int p, int c);
142  void init(const ManFixPSETask& t);
144 
146 
147  int c(void) const;
150  long long int e(void) const;
152 
154 
155  void update(Space& home, bool share, ManFixPSETask& t);
158 
159  };
160 
165  template<class Char, class Traits>
166  std::basic_ostream<Char,Traits>&
167  operator <<(std::basic_ostream<Char,Traits>& os, const ManFixPSETask& t);
168 
171  protected:
173  int _c;
174  public:
176 
177  ManFlexTask(void);
180  ManFlexTask(IntVar s, IntVar p, IntVar e, int c);
182  void init(IntVar s, IntVar p, IntVar e, int c);
184  void init(const ManFlexTask& t);
186 
188 
189  int c(void) const;
192  long long int e(void) const;
194 
196 
197  void update(Space& home, bool share, ManFlexTask& t);
200 
201  };
202 
207  template<class Char, class Traits>
208  std::basic_ostream<Char,Traits>&
209  operator <<(std::basic_ostream<Char,Traits>& os, const ManFlexTask& t);
210 
211 
213  class OptFixPTask : public ManToOptTask<ManFixPTask> {
214  protected:
216  public:
218 
219  OptFixPTask(void);
222  OptFixPTask(IntVar s, int p, int c, BoolVar m);
224  void init(IntVar s, int p, int c, BoolVar m);
226  operator Unary::OptFixPTask (void);
228  };
229 
234  template<class Char, class Traits>
235  std::basic_ostream<Char,Traits>&
236  operator <<(std::basic_ostream<Char,Traits>& os, const OptFixPTask& t);
237 
239  class OptFixPSETask : public ManToOptTask<ManFixPSETask> {
240  protected:
242  public:
244 
245  OptFixPSETask(void);
248  OptFixPSETask(TaskType t, IntVar s, int p, int c, BoolVar m);
250  void init(TaskType t, IntVar s, int p, int c, BoolVar m);
252  operator Unary::OptFixPSETask (void);
254  };
255 
260  template<class Char, class Traits>
261  std::basic_ostream<Char,Traits>&
262  operator <<(std::basic_ostream<Char,Traits>& os, const OptFixPSETask& t);
263 
265  class OptFlexTask : public ManToOptTask<ManFlexTask> {
266  protected:
268  public:
270 
271  OptFlexTask(void);
274  OptFlexTask(IntVar s, IntVar p, IntVar e, int c, BoolVar m);
276  void init(IntVar s, IntVar p, IntVar e, int c, BoolVar m);
278  operator Unary::OptFlexTask (void);
280  };
281 
286  template<class Char, class Traits>
287  std::basic_ostream<Char,Traits>&
288  operator <<(std::basic_ostream<Char,Traits>& os, const OptFlexTask& t);
289 
290 }}}
291 
293 
294 namespace Gecode { namespace Int { namespace Cumulative {
295 
298 
301 
304 
307 
310 
313 
316 
319 
322 
325 
328 
331 
332 
337  template<class Char, class Traits>
338  std::basic_ostream<Char,Traits>&
339  operator <<(std::basic_ostream<Char,Traits>& os, const ManFixPTaskBwd& t);
340 
345  template<class Char, class Traits>
346  std::basic_ostream<Char,Traits>&
347  operator <<(std::basic_ostream<Char,Traits>& os, const ManFixPSETaskBwd& t);
348 
353  template<class Char, class Traits>
354  std::basic_ostream<Char,Traits>&
355  operator <<(std::basic_ostream<Char,Traits>& os, const OptFixPTaskBwd& t);
356 
361  template<class Char, class Traits>
362  std::basic_ostream<Char,Traits>&
363  operator <<(std::basic_ostream<Char,Traits>& os, const OptFixPSETaskBwd& t);
364 
365 }}}
366 
368 
369 namespace Gecode { namespace Int {
370 
372  template<>
373  class TaskViewTraits<Cumulative::ManFixPTaskFwd> {
374  public:
377  };
378 
380  template<>
381  class TaskViewTraits<Cumulative::ManFixPTaskBwd> {
382  public:
385  };
386 
388  template<>
389  class TaskViewTraits<Cumulative::ManFixPSETaskFwd> {
390  public:
393  };
394 
396  template<>
397  class TaskViewTraits<Cumulative::ManFixPSETaskBwd> {
398  public:
401  };
402 
404  template<>
405  class TaskViewTraits<Cumulative::OptFixPTaskFwd> {
406  public:
409  };
410 
412  template<>
413  class TaskViewTraits<Cumulative::OptFixPTaskBwd> {
414  public:
417  };
418 
420  template<>
421  class TaskViewTraits<Cumulative::OptFixPSETaskFwd> {
422  public:
425  };
426 
428  template<>
429  class TaskViewTraits<Cumulative::OptFixPSETaskBwd> {
430  public:
433  };
434 
436  template<>
437  class TaskViewTraits<Cumulative::ManFlexTaskFwd> {
438  public:
441  };
442 
444  template<>
445  class TaskViewTraits<Cumulative::ManFlexTaskBwd> {
446  public:
449  };
450 
452  template<>
453  class TaskViewTraits<Cumulative::OptFlexTaskFwd> {
454  public:
457  };
458 
460  template<>
461  class TaskViewTraits<Cumulative::OptFlexTaskBwd> {
462  public:
465  };
466 
467 
469  template<>
470  class TaskTraits<Cumulative::ManFixPTask> {
471  public:
478  };
479 
481  template<>
482  class TaskTraits<Cumulative::ManFixPSETask> {
483  public:
490  };
491 
493  template<>
494  class TaskTraits<Cumulative::OptFixPTask> {
495  public:
504  };
505 
507  template<>
508  class TaskTraits<Cumulative::OptFixPSETask> {
509  public:
518  };
519 
521  template<>
522  class TaskTraits<Cumulative::ManFlexTask> {
523  public:
530  };
531 
533  template<>
534  class TaskTraits<Cumulative::OptFlexTask> {
535  public:
544  };
545 
546 }}
547 
548 namespace Gecode { namespace Int { namespace Cumulative {
549 
551  class OmegaNode {
552  public:
554  long long int e;
556  long long int env;
558  void init(const OmegaNode& l, const OmegaNode& r);
560  void update(const OmegaNode& l, const OmegaNode& r);
561  };
562 
564  template<class TaskView>
565  class OmegaTree : public TaskTree<TaskView,OmegaNode> {
566  protected:
573  int c;
574  public:
576  OmegaTree(Region& r, int c, const TaskViewArray<TaskView>& t);
578  void insert(int i);
580  void remove(int i);
582  long long int env(void) const;
583  };
584 
586  class ExtOmegaNode : public OmegaNode {
587  public:
589  long long int cenv;
591  void init(const ExtOmegaNode& l, const ExtOmegaNode& r);
593  void update(const ExtOmegaNode& l, const ExtOmegaNode& r);
594  };
595 
597  template<class TaskView>
598  class ExtOmegaTree : public TaskTree<TaskView,ExtOmegaNode> {
599  protected:
616  int c, ci;
617  public:
619  template<class Node>
620  ExtOmegaTree(Region& r, int c, const TaskTree<TaskView,Node>& t);
622  void init(int ci);
624  long long int env(int i);
625  };
626 
627 
629  class OmegaLambdaNode : public OmegaNode {
630  public:
632  static const int undef = -1;
634  long long int le;
636  long long int lenv;
638  int resLe;
640  int resLenv;
642  void init(const OmegaLambdaNode& l, const OmegaLambdaNode& r);
644  void update(const OmegaLambdaNode& l, const OmegaLambdaNode& r);
645  };
646 
648  template<class TaskView>
649  class OmegaLambdaTree : public TaskTree<TaskView,OmegaLambdaNode> {
650  protected:
657  int c;
658  public:
662  void shift(int i);
664  void lremove(int i);
666  bool lempty(void) const;
668  int responsible(void) const;
670  long long int env(void) const;
672  long long int lenv(void) const;
673  };
674 
675 }}}
676 
678 
679 namespace Gecode { namespace Int { namespace Cumulative {
680 
682  template<class Task, class Cap>
683  ExecStatus basic(Space& home, bool& subsumed, Cap c, TaskArray<Task>& t);
684 
686  template<class ManTask>
687  ExecStatus overload(Space& home, int c, TaskArray<ManTask>& t);
688 
690  template<class Task>
691  ExecStatus edgefinding(Space& home, int c, TaskArray<Task>& t);
692 
699  template<class ManTask, class Cap>
700  class ManProp : public TaskProp<ManTask,Int::PC_INT_DOM> {
701  protected:
704  Cap c;
706  ManProp(Home home, Cap c, TaskArray<ManTask>& t);
708  ManProp(Space& home, bool shared, ManProp& p);
709  public:
711  virtual Actor* copy(Space& home, bool share);
713  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
715  static ExecStatus post(Home home, Cap c, TaskArray<ManTask>& t);
717  virtual size_t dispose(Space& home);
718  };
719 
726  template<class OptTask, class Cap>
727  class OptProp : public TaskProp<OptTask,Int::PC_INT_DOM> {
728  protected:
731  Cap c;
733  OptProp(Home home, Cap c, TaskArray<OptTask>& t);
735  OptProp(Space& home, bool shared, OptProp& p);
736  public:
738  virtual Actor* copy(Space& home, bool share);
740  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
742  static ExecStatus post(Home home, Cap c, TaskArray<OptTask>& t);
744  virtual size_t dispose(Space& home);
745  };
746 
747 }}}
748 
754 
755 #endif
756 
757 // STATISTICS: int-prop
int c(void) const
Return required capacity.
Definition: task.hpp:102
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: opt-prop.hpp:113
Unary (mandatory) task with fixed processing, start or end time
Definition: unary.hh:150
long long int env(void) const
Return energy envelope of all tasks.
Definition: tree.hpp:87
long long int env(void) const
Return energy envelope of all tasks.
Definition: tree.hpp:264
Cumulative (mandatory) task with flexible processing time.
Definition: cumulative.hh:170
long long int cenv
Energy envelope for subtree.
Definition: cumulative.hh:589
long long int env(int i)
Compute update for task with index i.
Definition: tree.hpp:124
NodeType t
Type of node.
Definition: bool-expr.cpp:234
Cumulative::OptFixPSETaskBwd TaskViewBwd
The backward task view type.
Definition: cumulative.hh:513
Cumulative::ManFixPTaskFwd TaskViewFwd
The forward task view type.
Definition: cumulative.hh:473
Cumulative (mandatory) task with fixed processing, start or end time.
Definition: cumulative.hh:116
Task view array.
Definition: task.hh:233
ManFlexTask(void)
Default constructor.
Definition: task.hpp:129
Omega-lambda trees for computing ect of task sets.
Definition: cumulative.hh:649
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
Cumulative::OptFixPTask Task
The task type.
Definition: cumulative.hh:416
FwdToBwd< OptFlexTaskFwd > OptFlexTaskBwd
Backward (dual) optional flexible task view.
Definition: cumulative.hh:330
virtual Actor * copy(Space &home, bool share)
Perform copying during cloning.
Definition: man-prop.hpp:84
Cumulative::OptFixPSETaskFwd TaskViewFwd
The forward task view type.
Definition: cumulative.hh:511
Cumulative::OptFixPTaskFwd TaskViewFwd
The forward task view type.
Definition: cumulative.hh:497
int c(void) const
Return required capacity.
Definition: task.hpp:143
void shift(int i)
Shift task with index i from omega to lambda.
Definition: tree.hpp:225
Cumulative::ManFlexTaskFwd TaskViewFwd
The forward task view type.
Definition: cumulative.hh:525
static ExecStatus post(Home home, Cap c, TaskArray< OptTask > &t)
Post propagator that schedules tasks on cumulative resource.
Definition: opt-prop.hpp:61
Node for an omega lambda tree.
Definition: cumulative.hh:629
Cumulative::ManFlexTask Task
The task type.
Definition: cumulative.hh:448
Unary::ManFixPSETask UnaryTask
The corresponding unary task type.
Definition: cumulative.hh:489
Omega trees for computing ect of task sets.
Definition: cumulative.hh:565
Unary (mandatory) task with fixed processing time
Definition: unary.hh:58
long long int env
Energy envelope for subtree.
Definition: cumulative.hh:556
void update(Space &home, bool share, ManFixPSETask &t)
Update this task to be a clone of task t.
Definition: task.hpp:111
ManProp(Home home, Cap c, TaskArray< ManTask > &t)
Constructor for creation.
Definition: man-prop.hpp:44
Omega trees for computing ect of task sets.
Definition: cumulative.hh:598
ExecStatus basic(Space &home, bool &subsumed, Cap c, TaskArray< Task > &t)
Perform basic propagation.
Definition: basic.hpp:93
FwdToBwd< ManFlexTaskFwd > ManFlexTaskBwd
Backward (dual) mandatory flexible task view.
Definition: cumulative.hh:324
ManFixPSETask(void)
Default constructor.
Definition: task.hpp:88
ExecStatus overload(Space &home, int c, TaskArray< ManTask > &t)
Check mandatory tasks t for overload.
Definition: overload.hpp:45
FwdToBwd< ManFixPTaskFwd > ManFixPTaskBwd
Backward (dual) mandatory fixed task view.
Definition: cumulative.hh:300
Propagator for tasks
Definition: task.hh:424
Cumulative optional task with flexible processing time
Definition: cumulative.hh:265
FwdToBwd< OptFixPTaskFwd > OptFixPTaskBwd
Backward (dual) optional fixed task view.
Definition: cumulative.hh:312
int responsible(void) const
Return responsible task.
Definition: tree.hpp:258
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: man-prop.hpp:90
Cumulative::ManFixPSETaskBwd TaskViewBwd
The backward task view type.
Definition: cumulative.hh:487
Handle to region.
Definition: region.hpp:61
Scheduling propagator for cumulative resource with optional tasks.
Definition: cumulative.hh:727
static ExecStatus post(Home home, Cap c, TaskArray< ManTask > &t)
Post propagator that schedules tasks on cumulative resource.
Definition: man-prop.hpp:59
virtual Actor * copy(Space &home, bool share)
Perform copying during cloning.
Definition: opt-prop.hpp:107
Computation spaces.
Definition: core.hpp:1362
void init(IntVar s, int p, int c, BoolVar m)
Initialize with start time s, processing time p, required capacity c, and mandatory flag m...
Definition: task.hpp:177
OptFixPSETask(void)
Default constructor.
Definition: task.hpp:200
Traits class for mapping tasks to task views.
Definition: task.hh:159
Base-class for both propagators and branchers.
Definition: core.hpp:666
Cumulative::ManFixPSETask ManTask
The corresponding mandatory task.
Definition: cumulative.hh:515
Cumulative::ManFlexTask Task
The task type.
Definition: cumulative.hh:440
Cumulative::OptFixPSETask Task
The task type.
Definition: cumulative.hh:432
Gecode::FloatVal c(-8, 8)
Unary optional task with fixed processing time
Definition: unary.hh:224
int p
Number of positive literals for node type.
Definition: bool-expr.cpp:236
void init(const OmegaNode &l, const OmegaNode &r)
Initialize node from left child l and right child r.
Definition: tree.hpp:50
Gecode::IntArgs i(4, 1, 2, 3, 4)
Cumulative::OptFlexTask Task
The task type.
Definition: cumulative.hh:464
Cumulative::OptFixPTask Task
The task type.
Definition: cumulative.hh:408
OmegaTree(Region &r, int c, const TaskViewArray< TaskView > &t)
Initialize tree for tasks t and capacity c.
Definition: tree.hpp:60
Cumulative::OptFixPTaskBwd TaskViewBwd
The backward task view type.
Definition: cumulative.hh:499
void update(const OmegaNode &l, const OmegaNode &r)
Update node from left child l and right child r.
Definition: tree.hpp:55
Cumulative (mandatory) task with fixed processing time.
Definition: cumulative.hh:74
NNF * r
Right subtree.
Definition: bool-expr.cpp:246
int resLe
Node which is responsible for le.
Definition: cumulative.hh:638
Cumulative::ManFixPSETask Task
The task type.
Definition: cumulative.hh:392
void init(void)
Initialize tree after leaves have been initialized.
bool lempty(void) const
Whether has responsible task.
Definition: tree.hpp:252
Cumulative::ManFixPTask Task
The task type.
Definition: cumulative.hh:376
ModEventDelta med
A set of modification events (used during propagation)
Definition: core.hpp:764
int resLenv
Node which is responsible for lenv.
Definition: cumulative.hh:640
void update(Space &home, bool share, ManFlexTask &t)
Update this task to be a clone of task t.
Definition: task.hpp:152
Unary::OptFixPSETask UnaryTask
The corresponding unary task type.
Definition: cumulative.hh:517
long long int lenv(void) const
Return energy envelope of all tasks excluding lambda tasks.
Definition: tree.hpp:270
void init(IntVar s, IntVar p, IntVar e, int c, BoolVar m)
Initialize with start time s, processing time p, end time e, and mandatory flag m.
Definition: task.hpp:235
ManFixPSETask ManFixPSETaskFwd
Forward mandatory fixed task view.
Definition: cumulative.hh:303
Class to define an optional from a mandatory task.
Definition: task.hh:47
Unary::OptFlexTask UnaryTask
The corresponding unary task type.
Definition: cumulative.hh:543
long long int e(void) const
Return required energy.
Definition: task.hpp:106
ExtOmegaTree(Region &r, int c, const TaskTree< TaskView, Node > &t)
Initialize tree for tasks t and capacity c.
Definition: tree.hpp:118
Cumulative::ManFixPSETask Task
The task type.
Definition: cumulative.hh:400
Cap c
Resource capacity.
Definition: cumulative.hh:731
void init(TaskType t, IntVar s, int p, int c)
Initialize task.
Definition: task.hpp:93
Cumulative::OptFlexTaskBwd TaskViewBwd
The backward task view type.
Definition: cumulative.hh:539
FwdToBwd< OptFixPSETaskFwd > OptFixPSETaskBwd
Backward (dual) optional fixed task view.
Definition: cumulative.hh:318
OptFixPTask OptFixPTaskFwd
Forward optional fixed task view.
Definition: cumulative.hh:309
OptFixPSETask OptFixPSETaskFwd
Forward optional fixed task view.
Definition: cumulative.hh:315
void init(IntVar s, IntVar p, IntVar e, int c)
Initialize with start time s, processing time p, end time e.
Definition: task.hpp:134
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: opt-prop.hpp:121
Cap c
Resource capacity.
Definition: cumulative.hh:704
long long int e(void) const
Return required energy.
Definition: task.hpp:65
OptFlexTask(void)
Default constructor.
Definition: task.hpp:229
Boolean integer variables.
Definition: int.hh:491
Task mapper: turns a task view into its dual.
Definition: task.hh:104
void init(TaskType t, IntVar s, int p, int c, BoolVar m)
Initialize with start time s, processing time p, required capacity c, and mandatory flag m...
Definition: task.hpp:206
Cumulative optional task with fixed processing time.
Definition: cumulative.hh:213
Cumulative::ManFixPTaskBwd TaskViewBwd
The backward task view type.
Definition: cumulative.hh:475
Unary::ManFixPTask UnaryTask
The corresponding unary task type.
Definition: cumulative.hh:477
OptFixPTask(void)
Default constructor.
Definition: task.hpp:171
Unary::OptFixPTask UnaryTask
The corresponding unary task type.
Definition: cumulative.hh:503
Cumulative::OptFlexTaskFwd TaskViewFwd
The forward task view type.
Definition: cumulative.hh:537
Cumulative::ManFixPSETaskFwd TaskViewFwd
The forward task view type.
Definition: cumulative.hh:485
ExecStatus subsumed(Space &home, Propagator &p, TaskArray< Task > &t)
Check tasks t for subsumption.
Definition: subsumption.hpp:42
long long int le
Energy for subtree.
Definition: cumulative.hh:634
void init(const ExtOmegaNode &l, const ExtOmegaNode &r)
Initialize node from left child l and right child r.
Definition: tree.hpp:96
OptProp(Home home, Cap c, TaskArray< OptTask > &t)
Constructor for creation.
Definition: opt-prop.hpp:46
OptFlexTask OptFlexTaskFwd
Forward optional flexible task view.
Definition: cumulative.hh:327
Node * x
Pointer to corresponding Boolean expression node.
Definition: bool-expr.cpp:253
void insert(int i)
Insert task with index i.
Definition: tree.hpp:71
void update(Space &home, bool share, ManFixPTask &t)
Update this task to be a clone of task t.
Definition: task.hpp:70
ExecStatus
Definition: core.hpp:523
Integer variables.
Definition: int.hh:350
ManFixPTask ManFixPTaskFwd
Forward mandatory fixed task view.
Definition: cumulative.hh:297
static const int undef
Undefined task.
Definition: cumulative.hh:632
Node for an extended omega tree.
Definition: cumulative.hh:586
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: man-prop.hpp:98
void mul_check(long long int x, long long int y)
Throw exception if multiplication of x and y overflows.
Definition: limits.hpp:41
Unary optional task with fixed processing, start or end time.
Definition: unary.hh:248
Cumulative::OptFlexTask Task
The task type.
Definition: cumulative.hh:456
OmegaLambdaTree(Region &r, int c, const TaskViewArray< TaskView > &t)
Initialize tree for tasks t and capcity c with all tasks included in omega.
Definition: tree.hpp:208
ManFlexTask ManFlexTaskFwd
Forward mandatory flexible task view.
Definition: cumulative.hh:321
Traits class for mapping task views to tasks.
Definition: task.hh:150
void init(IntVar s, int p, int c)
Initialize task with start time s, processing time p, and required resource c.
Definition: task.hpp:52
Scheduling propagator for cumulative resource with mandatory tasks.
Definition: cumulative.hh:700
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
Definition: view.hpp:662
FwdToBwd< ManFixPSETaskFwd > ManFixPSETaskBwd
Backward (dual) mandatory fixed task view.
Definition: cumulative.hh:306
Gecode toplevel namespace
Cumulative::ManFixPTask ManTask
The corresponding mandatory task.
Definition: cumulative.hh:501
Unary (mandatory) task with flexible processing time
Definition: unary.hh:272
long long int e(void) const
Return required energy.
Definition: task.hpp:147
Cumulative optional task with fixed processing, start or end time.
Definition: cumulative.hh:239
Node for an omega tree.
Definition: cumulative.hh:551
IntVar p(void) const
Return processing time.
Definition: task.hpp:359
int c(void) const
Return required capacity.
Definition: task.hpp:61
int ModEventDelta
Modification event deltas.
Definition: core.hpp:173
Cumulative::ManFlexTask ManTask
The corresponding mandatory task.
Definition: cumulative.hh:541
Home class for posting propagators
Definition: core.hpp:717
void update(const ExtOmegaNode &l, const ExtOmegaNode &r)
Update node from left child l and right child r.
Definition: tree.hpp:102
Task trees for task views with node type Node.
Definition: task.hh:365
Cumulative::ManFlexTaskBwd TaskViewBwd
The backward task view type.
Definition: cumulative.hh:527
Unary::ManFlexTask UnaryTask
The corresponding unary task type.
Definition: cumulative.hh:529
long long int e
Energy for subtree.
Definition: cumulative.hh:554
Cumulative::OptFixPSETask Task
The task type.
Definition: cumulative.hh:424
long long int lenv
Energy envelope for subtree.
Definition: cumulative.hh:636
Cumulative::ManFixPTask Task
The task type.
Definition: cumulative.hh:384
void init(const OmegaLambdaNode &l, const OmegaLambdaNode &r)
Initialize node from left child l and right child r.
Definition: tree.hpp:178
void update(const OmegaLambdaNode &l, const OmegaLambdaNode &r)
Update node from left child l and right child r.
Definition: tree.hpp:185
ExecStatus edgefinding(Space &home, int c, TaskViewArray< TaskView > &t)
ManFixPTask(void)
Default constructor.
Definition: task.hpp:47
void lremove(int i)
Remove task with index i from lambda.
Definition: tree.hpp:239