Generated on Fri Jul 21 2023 00:00:00 for Gecode by doxygen 1.9.6
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 * 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_CUMULATIVE_HH__
37#define __GECODE_INT_CUMULATIVE_HH__
38
39#include <gecode/int/task.hh>
40#include <gecode/int/unary.hh>
41
55namespace Gecode { namespace Int { namespace Cumulative {
56
58 void mul_check(long long int x, long long int y);
59
61 void mul_check(long long int x, long long int y, long long int z);
62
63}}}
64
66
67namespace Gecode { namespace Int { namespace Cumulative {
68
71 protected:
73 int _c;
74 public:
76
77
78 ManFixPTask(void);
80 ManFixPTask(IntVar s, int p, int c);
82 void init(IntVar s, int p, int c);
84 void init(const ManFixPTask& t);
86
88
89
90 int c(void) const;
92 long long int e(void) const;
94
96
97
98 void update(Space& home, ManFixPTask& t);
100
101 };
102
107 template<class Char, class Traits>
108 std::basic_ostream<Char,Traits>&
109 operator <<(std::basic_ostream<Char,Traits>& os, const ManFixPTask& t);
110
113 protected:
115 int _c;
116 public:
118
119
120 ManFixPSETask(void);
128 ManFixPSETask(TaskType t, IntVar s, int p, int c);
136 void init(TaskType t, IntVar s, int p, int c);
138 void init(const ManFixPSETask& t);
140
142
143
144 int c(void) const;
146 long long int e(void) const;
148
150
151
152 void update(Space& home, ManFixPSETask& t);
154
155 };
156
161 template<class Char, class Traits>
162 std::basic_ostream<Char,Traits>&
163 operator <<(std::basic_ostream<Char,Traits>& os, const ManFixPSETask& t);
164
167 protected:
169 int _c;
170 public:
172
173
174 ManFlexTask(void);
176 ManFlexTask(IntVar s, IntVar p, IntVar e, int c);
178 void init(IntVar s, IntVar p, IntVar e, int c);
180 void init(const ManFlexTask& t);
182
184
185
186 int c(void) const;
188 long long int e(void) const;
190
192
193
194 void update(Space& home, ManFlexTask& t);
196
197 };
198
203 template<class Char, class Traits>
204 std::basic_ostream<Char,Traits>&
205 operator <<(std::basic_ostream<Char,Traits>& os, const ManFlexTask& t);
206
207
209 class OptFixPTask : public ManToOptTask<ManFixPTask> {
210 protected:
212 public:
214
215
216 OptFixPTask(void);
218 OptFixPTask(IntVar s, int p, int c, BoolVar m);
220 void init(IntVar s, int p, int c, BoolVar m);
222
223 operator Unary::OptFixPTask (void);
224 };
225
230 template<class Char, class Traits>
231 std::basic_ostream<Char,Traits>&
232 operator <<(std::basic_ostream<Char,Traits>& os, const OptFixPTask& t);
233
235 class OptFixPSETask : public ManToOptTask<ManFixPSETask> {
236 protected:
238 public:
240
241
242 OptFixPSETask(void);
244 OptFixPSETask(TaskType t, IntVar s, int p, int c, BoolVar m);
246 void init(TaskType t, IntVar s, int p, int c, BoolVar m);
248
249 operator Unary::OptFixPSETask (void);
250 };
251
256 template<class Char, class Traits>
257 std::basic_ostream<Char,Traits>&
258 operator <<(std::basic_ostream<Char,Traits>& os, const OptFixPSETask& t);
259
261 class OptFlexTask : public ManToOptTask<ManFlexTask> {
262 protected:
264 public:
266
267
268 OptFlexTask(void);
270 OptFlexTask(IntVar s, IntVar p, IntVar e, int c, BoolVar m);
272 void init(IntVar s, IntVar p, IntVar e, int c, BoolVar m);
274
275 operator Unary::OptFlexTask (void);
276 };
277
282 template<class Char, class Traits>
283 std::basic_ostream<Char,Traits>&
284 operator <<(std::basic_ostream<Char,Traits>& os, const OptFlexTask& t);
285
286}}}
287
289
290namespace Gecode { namespace Int { namespace Cumulative {
291
294
297
300
303
306
309
312
315
318
321
324
327
328
333 template<class Char, class Traits>
334 std::basic_ostream<Char,Traits>&
335 operator <<(std::basic_ostream<Char,Traits>& os, const ManFixPTaskBwd& t);
336
341 template<class Char, class Traits>
342 std::basic_ostream<Char,Traits>&
343 operator <<(std::basic_ostream<Char,Traits>& os, const ManFixPSETaskBwd& t);
344
349 template<class Char, class Traits>
350 std::basic_ostream<Char,Traits>&
351 operator <<(std::basic_ostream<Char,Traits>& os, const OptFixPTaskBwd& t);
352
357 template<class Char, class Traits>
358 std::basic_ostream<Char,Traits>&
359 operator <<(std::basic_ostream<Char,Traits>& os, const OptFixPSETaskBwd& t);
360
361}}}
362
364
365namespace Gecode { namespace Int {
366
368 template<>
369 class TaskViewTraits<Cumulative::ManFixPTaskFwd> {
370 public:
373 };
374
376 template<>
377 class TaskViewTraits<Cumulative::ManFixPTaskBwd> {
378 public:
381 };
382
384 template<>
385 class TaskViewTraits<Cumulative::ManFixPSETaskFwd> {
386 public:
389 };
390
392 template<>
393 class TaskViewTraits<Cumulative::ManFixPSETaskBwd> {
394 public:
397 };
398
400 template<>
401 class TaskViewTraits<Cumulative::OptFixPTaskFwd> {
402 public:
405 };
406
408 template<>
409 class TaskViewTraits<Cumulative::OptFixPTaskBwd> {
410 public:
413 };
414
416 template<>
417 class TaskViewTraits<Cumulative::OptFixPSETaskFwd> {
418 public:
421 };
422
424 template<>
425 class TaskViewTraits<Cumulative::OptFixPSETaskBwd> {
426 public:
429 };
430
432 template<>
433 class TaskViewTraits<Cumulative::ManFlexTaskFwd> {
434 public:
437 };
438
440 template<>
441 class TaskViewTraits<Cumulative::ManFlexTaskBwd> {
442 public:
445 };
446
448 template<>
449 class TaskViewTraits<Cumulative::OptFlexTaskFwd> {
450 public:
453 };
454
456 template<>
457 class TaskViewTraits<Cumulative::OptFlexTaskBwd> {
458 public:
461 };
462
463
465 template<>
466 class TaskTraits<Cumulative::ManFixPTask> {
467 public:
474 };
475
477 template<>
478 class TaskTraits<Cumulative::ManFixPSETask> {
479 public:
486 };
487
489 template<>
490 class TaskTraits<Cumulative::OptFixPTask> {
491 public:
500 };
501
503 template<>
504 class TaskTraits<Cumulative::OptFixPSETask> {
505 public:
514 };
515
517 template<>
518 class TaskTraits<Cumulative::ManFlexTask> {
519 public:
526 };
527
529 template<>
530 class TaskTraits<Cumulative::OptFlexTask> {
531 public:
540 };
541
542}}
543
544namespace Gecode { namespace Int { namespace Cumulative {
545
547 class OmegaNode {
548 public:
550 long long int e;
552 long long int env;
554 void init(const OmegaNode& l, const OmegaNode& r);
556 void update(const OmegaNode& l, const OmegaNode& r);
557 };
558
560 template<class TaskView>
561 class OmegaTree : public TaskTree<TaskView,OmegaNode> {
562 protected:
563 using TaskTree<TaskView,OmegaNode>::tasks;
564 using TaskTree<TaskView,OmegaNode>::leaf;
565 using TaskTree<TaskView,OmegaNode>::root;
566 using TaskTree<TaskView,OmegaNode>::init;
567 using TaskTree<TaskView,OmegaNode>::update;
569 int c;
570 public:
574 void insert(int i);
576 void remove(int i);
578 long long int env(void) const;
579 };
580
582 class ExtOmegaNode : public OmegaNode {
583 public:
585 long long int cenv;
587 void init(const ExtOmegaNode& l, const ExtOmegaNode& r);
589 void update(const ExtOmegaNode& l, const ExtOmegaNode& r);
590 };
591
593 template<class TaskView>
594 class ExtOmegaTree : public TaskTree<TaskView,ExtOmegaNode> {
595 protected:
596 using TaskTree<TaskView,ExtOmegaNode>::tasks;
597 using TaskTree<TaskView,ExtOmegaNode>::leaf;
598 using TaskTree<TaskView,ExtOmegaNode>::root;
599 using TaskTree<TaskView,ExtOmegaNode>::init;
600 using TaskTree<TaskView,ExtOmegaNode>::update;
601 using TaskTree<TaskView,ExtOmegaNode>::node;
602 using TaskTree<TaskView,ExtOmegaNode>::n_leaf;
603 using TaskTree<TaskView,ExtOmegaNode>::n_left;
604 using TaskTree<TaskView,ExtOmegaNode>::left;
605 using TaskTree<TaskView,ExtOmegaNode>::n_right;
606 using TaskTree<TaskView,ExtOmegaNode>::right;
607 using TaskTree<TaskView,ExtOmegaNode>::n_root;
608 using TaskTree<TaskView,ExtOmegaNode>::n_parent;
609 using TaskTree<TaskView,ExtOmegaNode>::n_nodes;
610 using TaskTree<TaskView,ExtOmegaNode>::_leaf;
612 int c, ci;
613 public:
615 template<class Node>
618 void init(int ci);
620 long long int env(int i);
621 };
622
623
625 class OmegaLambdaNode : public OmegaNode {
626 public:
628 static const int undef = -1;
630 long long int le;
632 long long int lenv;
634 int resLe;
638 void init(const OmegaLambdaNode& l, const OmegaLambdaNode& r);
640 void update(const OmegaLambdaNode& l, const OmegaLambdaNode& r);
641 };
642
644 template<class TaskView>
645 class OmegaLambdaTree : public TaskTree<TaskView,OmegaLambdaNode> {
646 protected:
647 using TaskTree<TaskView,OmegaLambdaNode>::tasks;
648 using TaskTree<TaskView,OmegaLambdaNode>::leaf;
649 using TaskTree<TaskView,OmegaLambdaNode>::root;
650 using TaskTree<TaskView,OmegaLambdaNode>::init;
651 using TaskTree<TaskView,OmegaLambdaNode>::update;
653 int c;
654 public:
658 void shift(int i);
660 void lremove(int i);
662 bool lempty(void) const;
664 int responsible(void) const;
666 long long int env(void) const;
668 long long int lenv(void) const;
669 };
670
671}}}
672
674
675namespace Gecode { namespace Int { namespace Cumulative {
676
678 template<class Task>
680 subsumed(Space& home, Propagator& p, int c, TaskArray<Task>& t);
681
683 template<class ManTask>
684 ExecStatus overload(Space& home, int c, TaskArray<ManTask>& t);
685
687 template<class Task, class Cap>
688 ExecStatus timetabling(Space& home, Propagator& p, Cap c,
689 TaskArray<Task>& t);
690
692 template<class Task>
693 ExecStatus edgefinding(Space& home, int c, TaskArray<Task>& t);
694
701 template<class ManTask, class Cap, class PL>
702 class ManProp : public TaskProp<ManTask,PL> {
703 protected:
704 using TaskProp<ManTask,PL>::t;
706 Cap c;
708 ManProp(Home home, Cap c, TaskArray<ManTask>& t);
710 ManProp(Space& home, ManProp& p);
711 public:
713 virtual Actor* copy(Space& home);
715 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
717 static ExecStatus post(Home home, Cap c, TaskArray<ManTask>& t);
719 virtual size_t dispose(Space& home);
720 };
721
728 template<class OptTask, class Cap, class PL>
729 class OptProp : public TaskProp<OptTask,PL> {
730 protected:
731 using TaskProp<OptTask,PL>::t;
733 Cap c;
735 OptProp(Home home, Cap c, TaskArray<OptTask>& t);
737 OptProp(Space& home, OptProp& p);
738 public:
740 virtual Actor* copy(Space& home);
742 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
744 static ExecStatus post(Home home, Cap c, TaskArray<OptTask>& t);
746 virtual size_t dispose(Space& home);
747 };
748
750 template<class ManTask, class Cap>
753
755 template<class OptTask, class Cap>
758
759}}}
760
768
769#endif
770
771// STATISTICS: int-prop
NNF * l
Left subtree.
Definition: bool-expr.cpp:240
NodeType t
Type of node.
Definition: bool-expr.cpp:230
int p
Number of positive literals for node type.
Definition: bool-expr.cpp:232
Base-class for both propagators and branchers.
Definition: core.hpp:628
Boolean integer variables.
Definition: int.hh:515
Home class for posting propagators
Definition: core.hpp:856
Integer variables.
Definition: int.hh:371
Node for an extended omega tree.
Definition: cumulative.hh:582
void update(const ExtOmegaNode &l, const ExtOmegaNode &r)
Update node from left child l and right child r.
Definition: tree.hpp:98
void init(const ExtOmegaNode &l, const ExtOmegaNode &r)
Initialize node from left child l and right child r.
Definition: tree.hpp:92
long long int cenv
Energy envelope for subtree.
Definition: cumulative.hh:585
Omega trees for computing ect of task sets.
Definition: cumulative.hh:594
long long int env(int i)
Compute update for task with index i.
Definition: tree.hpp:120
Cumulative (mandatory) task with fixed processing, start or end time.
Definition: cumulative.hh:112
void init(TaskType t, IntVar s, int p, int c)
Initialize task.
Definition: task.hpp:89
long long int e(void) const
Return required energy.
Definition: task.hpp:102
ManFixPSETask(void)
Default constructor.
Definition: task.hpp:84
int c(void) const
Return required capacity.
Definition: task.hpp:98
void update(Space &home, ManFixPSETask &t)
Update this task to be a clone of task t.
Definition: task.hpp:107
Cumulative (mandatory) task with fixed processing time.
Definition: cumulative.hh:70
void init(IntVar s, int p, int c)
Initialize task with start time s, processing time p, and required resource c.
Definition: task.hpp:48
long long int e(void) const
Return required energy.
Definition: task.hpp:61
ManFixPTask(void)
Default constructor.
Definition: task.hpp:43
int c(void) const
Return required capacity.
Definition: task.hpp:57
void update(Space &home, ManFixPTask &t)
Update this task to be a clone of task t.
Definition: task.hpp:66
Cumulative (mandatory) task with flexible processing time.
Definition: cumulative.hh:166
void init(IntVar s, IntVar p, IntVar e, int c)
Initialize with start time s, processing time p, end time e.
Definition: task.hpp:130
long long int e(void) const
Return required energy.
Definition: task.hpp:143
void update(Space &home, ManFlexTask &t)
Update this task to be a clone of task t.
Definition: task.hpp:148
ManFlexTask(void)
Default constructor.
Definition: task.hpp:125
int c(void) const
Return required capacity.
Definition: task.hpp:139
Scheduling propagator for cumulative resource with mandatory tasks.
Definition: cumulative.hh:702
virtual Actor * copy(Space &home)
Perform copying during cloning.
Definition: man-prop.hpp:79
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: man-prop.hpp:93
Cap c
Resource capacity.
Definition: cumulative.hh:706
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: man-prop.hpp:85
static ExecStatus post(Home home, Cap c, TaskArray< ManTask > &t)
Post propagator that schedules tasks on cumulative resource.
Definition: man-prop.hpp:54
Node for an omega lambda tree.
Definition: cumulative.hh:625
long long int le
Energy for subtree.
Definition: cumulative.hh:630
void init(const OmegaLambdaNode &l, const OmegaLambdaNode &r)
Initialize node from left child l and right child r.
Definition: tree.hpp:174
void update(const OmegaLambdaNode &l, const OmegaLambdaNode &r)
Update node from left child l and right child r.
Definition: tree.hpp:181
long long int lenv
Energy envelope for subtree.
Definition: cumulative.hh:632
int resLe
Node which is responsible for le.
Definition: cumulative.hh:634
static const int undef
Undefined task.
Definition: cumulative.hh:628
int resLenv
Node which is responsible for lenv.
Definition: cumulative.hh:636
Omega-lambda trees for computing ect of task sets.
Definition: cumulative.hh:645
int responsible(void) const
Return responsible task.
Definition: tree.hpp:254
long long int lenv(void) const
Return energy envelope of all tasks excluding lambda tasks.
Definition: tree.hpp:266
void shift(int i)
Shift task with index i from omega to lambda.
Definition: tree.hpp:221
void lremove(int i)
Remove task with index i from lambda.
Definition: tree.hpp:235
long long int env(void) const
Return energy envelope of all tasks.
Definition: tree.hpp:260
bool lempty(void) const
Whether has responsible task.
Definition: tree.hpp:248
Node for an omega tree.
Definition: cumulative.hh:547
void init(const OmegaNode &l, const OmegaNode &r)
Initialize node from left child l and right child r.
Definition: tree.hpp:46
void update(const OmegaNode &l, const OmegaNode &r)
Update node from left child l and right child r.
Definition: tree.hpp:51
long long int e
Energy for subtree.
Definition: cumulative.hh:550
long long int env
Energy envelope for subtree.
Definition: cumulative.hh:552
Omega trees for computing ect of task sets.
Definition: cumulative.hh:561
void remove(int i)
Remove task with index i.
Definition: tree.hpp:76
long long int env(void) const
Return energy envelope of all tasks.
Definition: tree.hpp:83
void insert(int i)
Insert task with index i.
Definition: tree.hpp:67
Cumulative optional task with fixed processing, start or end time.
Definition: cumulative.hh:235
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:202
OptFixPSETask(void)
Default constructor.
Definition: task.hpp:196
Cumulative optional task with fixed processing time.
Definition: cumulative.hh:209
OptFixPTask(void)
Default constructor.
Definition: task.hpp:167
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:173
Cumulative optional task with flexible processing time
Definition: cumulative.hh:261
OptFlexTask(void)
Default constructor.
Definition: task.hpp:225
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:231
Scheduling propagator for cumulative resource with optional tasks.
Definition: cumulative.hh:729
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: opt-prop.hpp:116
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: opt-prop.hpp:108
static ExecStatus post(Home home, Cap c, TaskArray< OptTask > &t)
Post propagator that schedules tasks on cumulative resource.
Definition: opt-prop.hpp:56
virtual Actor * copy(Space &home)
Perform copying during cloning.
Definition: opt-prop.hpp:102
Cap c
Resource capacity.
Definition: cumulative.hh:733
Task mapper: turns a task view into its dual.
Definition: task.hh:102
Class to define an optional from a mandatory task.
Definition: task.hh:43
Int::BoolView _m
Boolean view whether task is mandatory (= 1) or not.
Definition: task.hh:46
Task array.
Definition: task.hh:165
Propagator for tasks
Definition: task.hh:424
TaskArray< ManTask > t
Tasks.
Definition: task.hh:427
Cumulative::ManFixPSETaskBwd TaskViewBwd
The backward task view type.
Definition: cumulative.hh:483
Unary::ManFixPSETask UnaryTask
The corresponding unary task type.
Definition: cumulative.hh:485
Cumulative::ManFixPSETaskFwd TaskViewFwd
The forward task view type.
Definition: cumulative.hh:481
Cumulative::ManFixPTaskBwd TaskViewBwd
The backward task view type.
Definition: cumulative.hh:471
Unary::ManFixPTask UnaryTask
The corresponding unary task type.
Definition: cumulative.hh:473
Cumulative::ManFixPTaskFwd TaskViewFwd
The forward task view type.
Definition: cumulative.hh:469
Unary::ManFlexTask UnaryTask
The corresponding unary task type.
Definition: cumulative.hh:525
Cumulative::ManFlexTaskFwd TaskViewFwd
The forward task view type.
Definition: cumulative.hh:521
Cumulative::ManFlexTaskBwd TaskViewBwd
The backward task view type.
Definition: cumulative.hh:523
Cumulative::OptFixPSETaskBwd TaskViewBwd
The backward task view type.
Definition: cumulative.hh:509
Unary::OptFixPSETask UnaryTask
The corresponding unary task type.
Definition: cumulative.hh:513
Cumulative::ManFixPSETask ManTask
The corresponding mandatory task.
Definition: cumulative.hh:511
Cumulative::OptFixPSETaskFwd TaskViewFwd
The forward task view type.
Definition: cumulative.hh:507
Cumulative::ManFixPTask ManTask
The corresponding mandatory task.
Definition: cumulative.hh:497
Unary::OptFixPTask UnaryTask
The corresponding unary task type.
Definition: cumulative.hh:499
Cumulative::OptFixPTaskFwd TaskViewFwd
The forward task view type.
Definition: cumulative.hh:493
Cumulative::OptFixPTaskBwd TaskViewBwd
The backward task view type.
Definition: cumulative.hh:495
Cumulative::ManFlexTask ManTask
The corresponding mandatory task.
Definition: cumulative.hh:537
Unary::OptFlexTask UnaryTask
The corresponding unary task type.
Definition: cumulative.hh:539
Cumulative::OptFlexTaskBwd TaskViewBwd
The backward task view type.
Definition: cumulative.hh:535
Cumulative::OptFlexTaskFwd TaskViewFwd
The forward task view type.
Definition: cumulative.hh:533
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
int n_nodes(void) const
Return number of nodes for balanced binary tree.
Definition: tree.hpp:57
const TaskViewArray< TaskView > & tasks
The tasks from which the tree is computed.
Definition: task.hh:369
static int n_right(int i)
Return index of right child of node i.
Definition: tree.hpp:85
static bool right(int i)
Test whether node i is a right child.
Definition: tree.hpp:90
static int n_left(int i)
Return index of left child of node i.
Definition: tree.hpp:73
static bool left(int i)
Test whether node i is a left child.
Definition: tree.hpp:78
void init(void)
Initialize tree after leaves have been initialized.
Definition: tree.hpp:115
bool n_leaf(int i) const
Whether node i is leaf.
Definition: tree.hpp:68
const OmegaNode & root(void) const
Return root node.
Definition: tree.hpp:109
static int n_parent(int i)
Return index of parent of node i.
Definition: tree.hpp:97
int * _leaf
Map task number to leaf node number in right order.
Definition: task.hh:373
OmegaNode & leaf(int i)
Return leaf for task i.
Definition: tree.hpp:103
void update(void)
Update all inner nodes of tree after leaves have been initialized.
Definition: tree.hpp:122
static bool n_root(int i)
Whether node i is index of root.
Definition: tree.hpp:63
Task view array.
Definition: task.hh:233
Cumulative::ManFixPSETask Task
The task type.
Definition: cumulative.hh:396
Cumulative::ManFixPSETask Task
The task type.
Definition: cumulative.hh:388
Cumulative::ManFixPTask Task
The task type.
Definition: cumulative.hh:380
Cumulative::ManFixPTask Task
The task type.
Definition: cumulative.hh:372
Cumulative::ManFlexTask Task
The task type.
Definition: cumulative.hh:444
Cumulative::ManFlexTask Task
The task type.
Definition: cumulative.hh:436
Cumulative::OptFixPSETask Task
The task type.
Definition: cumulative.hh:428
Cumulative::OptFixPSETask Task
The task type.
Definition: cumulative.hh:420
Cumulative::OptFixPTask Task
The task type.
Definition: cumulative.hh:412
Cumulative::OptFixPTask Task
The task type.
Definition: cumulative.hh:404
Cumulative::OptFlexTask Task
The task type.
Definition: cumulative.hh:460
Cumulative::OptFlexTask Task
The task type.
Definition: cumulative.hh:452
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
Unary (mandatory) task with fixed processing time
Definition: unary.hh:54
Unary (mandatory) task with flexible processing time
Definition: unary.hh:270
IntVar p(void) const
Return processing time.
Definition: task.hpp:359
Unary optional task with fixed processing, start or end time.
Definition: unary.hh:246
Unary optional task with fixed processing time
Definition: unary.hh:222
Unary optional task with flexible processing time
Definition: unary.hh:370
ModEventDelta med
A set of modification events (used during propagation)
Definition: core.hpp:1077
Handle to region.
Definition: region.hpp:55
Computation spaces.
Definition: core.hpp:1744
int ModEventDelta
Modification event deltas.
Definition: core.hpp:89
TaskType
Type of task for scheduling constraints.
Definition: int.hh:1019
IntPropLevel
Propagation levels for integer propagators.
Definition: int.hh:989
FwdToBwd< ManFlexTaskFwd > ManFlexTaskBwd
Backward (dual) mandatory flexible task view.
Definition: cumulative.hh:320
ManFlexTask ManFlexTaskFwd
Forward mandatory flexible task view.
Definition: cumulative.hh:317
FwdToBwd< ManFixPSETaskFwd > ManFixPSETaskBwd
Backward (dual) mandatory fixed task view.
Definition: cumulative.hh:302
ExecStatus timetabling(Space &home, Propagator &p, Cap c, TaskArray< Task > &t)
Perform time-tabling propagation.
ExecStatus cmanpost(Home home, Cap c, TaskArray< ManTask > &t, IntPropLevel ipl)
Post mandatory task propagator according to propagation level.
OptFlexTask OptFlexTaskFwd
Forward optional flexible task view.
Definition: cumulative.hh:323
FwdToBwd< OptFixPTaskFwd > OptFixPTaskBwd
Backward (dual) optional fixed task view.
Definition: cumulative.hh:308
FwdToBwd< OptFlexTaskFwd > OptFlexTaskBwd
Backward (dual) optional flexible task view.
Definition: cumulative.hh:326
OptFixPTask OptFixPTaskFwd
Forward optional fixed task view.
Definition: cumulative.hh:305
FwdToBwd< OptFixPSETaskFwd > OptFixPSETaskBwd
Backward (dual) optional fixed task view.
Definition: cumulative.hh:314
void mul_check(long long int x, long long int y)
Throw exception if multiplication of x and y overflows.
Definition: limits.hpp:37
ExecStatus coptpost(Home home, Cap c, TaskArray< OptTask > &t, IntPropLevel ipl)
Post optional task propagator according to propagation level.
FwdToBwd< ManFixPTaskFwd > ManFixPTaskBwd
Backward (dual) mandatory fixed task view.
Definition: cumulative.hh:296
ManFixPSETask ManFixPSETaskFwd
Forward mandatory fixed task view.
Definition: cumulative.hh:299
ExecStatus subsumed(Space &home, Propagator &p, int c, TaskArray< Task > &t)
Check for subsumption (all tasks must be assigned)
Definition: subsumption.hpp:38
ManFixPTask ManFixPTaskFwd
Forward mandatory fixed task view.
Definition: cumulative.hh:293
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const ManFixPTaskBwd &t)
Definition: task-view.hpp:40
OptFixPSETask OptFixPSETaskFwd
Forward optional fixed task view.
Definition: cumulative.hh:311
ExecStatus edgefinding(Space &home, int c, TaskArray< Task > &t)
Propagate by edge-finding.
ExecStatus overload(Space &home, int c, TaskArray< ManTask > &t)
Check mandatory tasks t for overload.
Definition: overload.hpp:41
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar SetRelType r
Definition: set.hh:773
Post propagator for SetVar SetOpType SetVar SetRelType SetVar z
Definition: set.hh:773
Post propagator for SetVar SetOpType SetVar y
Definition: set.hh:773
ExecStatus
Definition: core.hpp:472
Post propagator for SetVar x
Definition: set.hh:773