40 #ifndef __GECODE_INT_CUMULATIVE_HH__
41 #define __GECODE_INT_CUMULATIVE_HH__
59 namespace Gecode {
namespace Int {
namespace Cumulative {
62 void mul_check(
long long int x,
long long int y);
65 void mul_check(
long long int x,
long long int y,
long long int z);
71 namespace Gecode {
namespace Int {
namespace Cumulative {
96 long long int e(
void)
const;
111 template<
class Char,
class Traits>
112 std::basic_ostream<Char,Traits>&
113 operator <<(std::basic_ostream<Char,Traits>& os,
const ManFixPTask&
t);
150 long long int e(
void)
const;
165 template<
class Char,
class Traits>
166 std::basic_ostream<Char,Traits>&
167 operator <<(std::basic_ostream<Char,Traits>& os,
const ManFixPSETask&
t);
192 long long int e(
void)
const;
207 template<
class Char,
class Traits>
208 std::basic_ostream<Char,Traits>&
209 operator <<(std::basic_ostream<Char,Traits>& os,
const ManFlexTask&
t);
234 template<
class Char,
class Traits>
235 std::basic_ostream<Char,Traits>&
236 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFixPTask&
t);
260 template<
class Char,
class Traits>
261 std::basic_ostream<Char,Traits>&
262 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFixPSETask&
t);
286 template<
class Char,
class Traits>
287 std::basic_ostream<Char,Traits>&
288 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFlexTask&
t);
294 namespace Gecode {
namespace Int {
namespace Cumulative {
337 template<
class Char,
class Traits>
338 std::basic_ostream<Char,Traits>&
339 operator <<(std::basic_ostream<Char,Traits>& os,
const ManFixPTaskBwd&
t);
345 template<
class Char,
class Traits>
346 std::basic_ostream<Char,Traits>&
347 operator <<(std::basic_ostream<Char,Traits>& os,
const ManFixPSETaskBwd&
t);
353 template<
class Char,
class Traits>
354 std::basic_ostream<Char,Traits>&
355 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFixPTaskBwd&
t);
361 template<
class Char,
class Traits>
362 std::basic_ostream<Char,Traits>&
363 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFixPSETaskBwd&
t);
369 namespace Gecode {
namespace Int {
548 namespace Gecode {
namespace Int {
namespace Cumulative {
564 template<
class TaskView>
582 long long int env(
void)
const;
597 template<
class TaskView>
624 long long int env(
int i);
648 template<
class TaskView>
670 long long int env(
void)
const;
672 long long int lenv(
void)
const;
679 namespace Gecode {
namespace Int {
namespace Cumulative {
682 template<
class Task,
class Cap>
686 template<
class ManTask>
699 template<
class ManTask,
class Cap>
726 template<
class OptTask,
class Cap>
int c(void) const
Return required capacity.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Unary (mandatory) task with fixed processing, start or end time
long long int env(void) const
Return energy envelope of all tasks.
long long int env(void) const
Return energy envelope of all tasks.
Cumulative (mandatory) task with flexible processing time.
long long int cenv
Energy envelope for subtree.
long long int env(int i)
Compute update for task with index i.
Cumulative::OptFixPSETaskBwd TaskViewBwd
The backward task view type.
Cumulative::ManFixPTaskFwd TaskViewFwd
The forward task view type.
Cumulative (mandatory) task with fixed processing, start or end time.
ManFlexTask(void)
Default constructor.
Omega-lambda trees for computing ect of task sets.
TaskType
Type of task for scheduling constraints.
Unary optional task with flexible processing time
Cumulative::OptFixPTask Task
The task type.
FwdToBwd< OptFlexTaskFwd > OptFlexTaskBwd
Backward (dual) optional flexible task view.
virtual Actor * copy(Space &home, bool share)
Perform copying during cloning.
Cumulative::OptFixPSETaskFwd TaskViewFwd
The forward task view type.
Cumulative::OptFixPTaskFwd TaskViewFwd
The forward task view type.
int c(void) const
Return required capacity.
void shift(int i)
Shift task with index i from omega to lambda.
Cumulative::ManFlexTaskFwd TaskViewFwd
The forward task view type.
static ExecStatus post(Home home, Cap c, TaskArray< OptTask > &t)
Post propagator that schedules tasks on cumulative resource.
Node for an omega lambda tree.
Cumulative::ManFlexTask Task
The task type.
Unary::ManFixPSETask UnaryTask
The corresponding unary task type.
Omega trees for computing ect of task sets.
Unary (mandatory) task with fixed processing time
long long int env
Energy envelope for subtree.
void update(Space &home, bool share, ManFixPSETask &t)
Update this task to be a clone of task t.
ManProp(Home home, Cap c, TaskArray< ManTask > &t)
Constructor for creation.
Omega trees for computing ect of task sets.
ExecStatus basic(Space &home, bool &subsumed, Cap c, TaskArray< Task > &t)
Perform basic propagation.
FwdToBwd< ManFlexTaskFwd > ManFlexTaskBwd
Backward (dual) mandatory flexible task view.
ManFixPSETask(void)
Default constructor.
ExecStatus overload(Space &home, int c, TaskArray< ManTask > &t)
Check mandatory tasks t for overload.
FwdToBwd< ManFixPTaskFwd > ManFixPTaskBwd
Backward (dual) mandatory fixed task view.
Cumulative optional task with flexible processing time
FwdToBwd< OptFixPTaskFwd > OptFixPTaskBwd
Backward (dual) optional fixed task view.
int responsible(void) const
Return responsible task.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Cumulative::ManFixPSETaskBwd TaskViewBwd
The backward task view type.
Scheduling propagator for cumulative resource with optional tasks.
static ExecStatus post(Home home, Cap c, TaskArray< ManTask > &t)
Post propagator that schedules tasks on cumulative resource.
virtual Actor * copy(Space &home, bool share)
Perform copying during cloning.
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...
OptFixPSETask(void)
Default constructor.
Traits class for mapping tasks to task views.
Base-class for both propagators and branchers.
Cumulative::ManFixPSETask ManTask
The corresponding mandatory task.
Cumulative::ManFlexTask Task
The task type.
Cumulative::OptFixPSETask Task
The task type.
Gecode::FloatVal c(-8, 8)
Unary optional task with fixed processing time
int p
Number of positive literals for node type.
void init(const OmegaNode &l, const OmegaNode &r)
Initialize node from left child l and right child r.
Gecode::IntArgs i(4, 1, 2, 3, 4)
Cumulative::OptFlexTask Task
The task type.
Cumulative::OptFixPTask Task
The task type.
OmegaTree(Region &r, int c, const TaskViewArray< TaskView > &t)
Initialize tree for tasks t and capacity c.
Cumulative::OptFixPTaskBwd TaskViewBwd
The backward task view type.
void update(const OmegaNode &l, const OmegaNode &r)
Update node from left child l and right child r.
Cumulative (mandatory) task with fixed processing time.
int resLe
Node which is responsible for le.
Cumulative::ManFixPSETask Task
The task type.
void init(void)
Initialize tree after leaves have been initialized.
bool lempty(void) const
Whether has responsible task.
Cumulative::ManFixPTask Task
The task type.
ModEventDelta med
A set of modification events (used during propagation)
int resLenv
Node which is responsible for lenv.
void update(Space &home, bool share, ManFlexTask &t)
Update this task to be a clone of task t.
Unary::OptFixPSETask UnaryTask
The corresponding unary task type.
long long int lenv(void) const
Return energy envelope of all tasks excluding lambda tasks.
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.
ManFixPSETask ManFixPSETaskFwd
Forward mandatory fixed task view.
Class to define an optional from a mandatory task.
TaskArray< ManTask > t
Tasks.
Unary::OptFlexTask UnaryTask
The corresponding unary task type.
long long int e(void) const
Return required energy.
ExtOmegaTree(Region &r, int c, const TaskTree< TaskView, Node > &t)
Initialize tree for tasks t and capacity c.
Cumulative::ManFixPSETask Task
The task type.
void init(TaskType t, IntVar s, int p, int c)
Initialize task.
Cumulative::OptFlexTaskBwd TaskViewBwd
The backward task view type.
FwdToBwd< OptFixPSETaskFwd > OptFixPSETaskBwd
Backward (dual) optional fixed task view.
OptFixPTask OptFixPTaskFwd
Forward optional fixed task view.
OptFixPSETask OptFixPSETaskFwd
Forward optional fixed task view.
void init(IntVar s, IntVar p, IntVar e, int c)
Initialize with start time s, processing time p, end time e.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
long long int e(void) const
Return required energy.
OptFlexTask(void)
Default constructor.
Boolean integer variables.
Task mapper: turns a task view into its dual.
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...
Cumulative optional task with fixed processing time.
Cumulative::ManFixPTaskBwd TaskViewBwd
The backward task view type.
Unary::ManFixPTask UnaryTask
The corresponding unary task type.
OptFixPTask(void)
Default constructor.
Unary::OptFixPTask UnaryTask
The corresponding unary task type.
Cumulative::OptFlexTaskFwd TaskViewFwd
The forward task view type.
Cumulative::ManFixPSETaskFwd TaskViewFwd
The forward task view type.
ExecStatus subsumed(Space &home, Propagator &p, TaskArray< Task > &t)
Check tasks t for subsumption.
long long int le
Energy for subtree.
void init(const ExtOmegaNode &l, const ExtOmegaNode &r)
Initialize node from left child l and right child r.
OptProp(Home home, Cap c, TaskArray< OptTask > &t)
Constructor for creation.
OptFlexTask OptFlexTaskFwd
Forward optional flexible task view.
Node * x
Pointer to corresponding Boolean expression node.
void insert(int i)
Insert task with index i.
void update(Space &home, bool share, ManFixPTask &t)
Update this task to be a clone of task t.
ManFixPTask ManFixPTaskFwd
Forward mandatory fixed task view.
static const int undef
Undefined task.
Node for an extended omega tree.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
void mul_check(long long int x, long long int y)
Throw exception if multiplication of x and y overflows.
Unary optional task with fixed processing, start or end time.
Cumulative::OptFlexTask Task
The task type.
OmegaLambdaTree(Region &r, int c, const TaskViewArray< TaskView > &t)
Initialize tree for tasks t and capcity c with all tasks included in omega.
ManFlexTask ManFlexTaskFwd
Forward mandatory flexible task view.
Traits class for mapping task views to tasks.
void init(IntVar s, int p, int c)
Initialize task with start time s, processing time p, and required resource c.
Scheduling propagator for cumulative resource with mandatory tasks.
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
FwdToBwd< ManFixPSETaskFwd > ManFixPSETaskBwd
Backward (dual) mandatory fixed task view.
Gecode toplevel namespace
Cumulative::ManFixPTask ManTask
The corresponding mandatory task.
Unary (mandatory) task with flexible processing time
long long int e(void) const
Return required energy.
Cumulative optional task with fixed processing, start or end time.
IntVar p(void) const
Return processing time.
int c(void) const
Return required capacity.
int ModEventDelta
Modification event deltas.
Cumulative::ManFlexTask ManTask
The corresponding mandatory task.
Home class for posting propagators
void update(const ExtOmegaNode &l, const ExtOmegaNode &r)
Update node from left child l and right child r.
Task trees for task views with node type Node.
Cumulative::ManFlexTaskBwd TaskViewBwd
The backward task view type.
Unary::ManFlexTask UnaryTask
The corresponding unary task type.
long long int e
Energy for subtree.
Cumulative::OptFixPSETask Task
The task type.
long long int lenv
Energy envelope for subtree.
Cumulative::ManFixPTask Task
The task type.
void init(const OmegaLambdaNode &l, const OmegaLambdaNode &r)
Initialize node from left child l and right child r.
void update(const OmegaLambdaNode &l, const OmegaLambdaNode &r)
Update node from left child l and right child r.
ExecStatus edgefinding(Space &home, int c, TaskViewArray< TaskView > &t)
ManFixPTask(void)
Default constructor.
void lremove(int i)
Remove task with index i from lambda.