40 #ifndef __GECODE_INT_UNARY_HH__
41 #define __GECODE_INT_UNARY_HH__
55 namespace Gecode {
namespace Int {
namespace Unary {
145 template<
class Char,
class Traits>
146 std::basic_ostream<Char,Traits>&
147 operator <<(std::basic_ostream<Char,Traits>& os,
const ManFixPTask&
t);
188 int pmin(
void)
const;
190 int pmax(
void)
const;
219 template<
class Char,
class Traits>
220 std::basic_ostream<Char,Traits>&
221 operator <<(std::basic_ostream<Char,Traits>& os,
const ManFixPSETask&
t);
243 template<
class Char,
class Traits>
244 std::basic_ostream<Char,Traits>&
245 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFixPTask&
t);
267 template<
class Char,
class Traits>
268 std::basic_ostream<Char,Traits>&
269 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFixPSETask&
t);
304 int pmin(
void)
const;
306 int pmax(
void)
const;
365 template<
class Char,
class Traits>
366 std::basic_ostream<Char,Traits>&
367 operator <<(std::basic_ostream<Char,Traits>& os,
const ManFlexTask&
t);
389 template<
class Char,
class Traits>
390 std::basic_ostream<Char,Traits>&
391 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFlexTask&
t);
397 namespace Gecode {
namespace Int {
namespace Unary {
440 template<
class Char,
class Traits>
441 std::basic_ostream<Char,Traits>&
442 operator <<(std::basic_ostream<Char,Traits>& os,
const ManFixPTaskBwd&
t);
448 template<
class Char,
class Traits>
449 std::basic_ostream<Char,Traits>&
450 operator <<(std::basic_ostream<Char,Traits>& os,
const ManFixPSETaskBwd&
t);
456 template<
class Char,
class Traits>
457 std::basic_ostream<Char,Traits>&
458 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFixPTaskBwd&
t);
464 template<
class Char,
class Traits>
465 std::basic_ostream<Char,Traits>&
466 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFixPSETaskBwd&
t);
472 template<
class Char,
class Traits>
473 std::basic_ostream<Char,Traits>&
474 operator <<(std::basic_ostream<Char,Traits>& os,
const ManFlexTaskBwd&
t);
482 template<
class Char,
class Traits>
483 std::basic_ostream<Char,Traits>&
484 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFlexTaskBwd&
t);
490 namespace Gecode {
namespace Int {
657 namespace Gecode {
namespace Int {
namespace Unary {
673 template<
class TaskView>
691 int ect(
int i)
const;
714 template<
class TaskView>
741 int lect(
void)
const;
748 namespace Gecode {
namespace Int {
namespace Unary {
751 template<
class ManTask>
754 template<
class OptTask>
762 template<
class ManTask>
765 template<
class OptTask>
769 template<
class ManTask>
772 template<
class OptTask>
786 template<
class ManTask>
809 template<
class OptTask>
int lct(void) const
Return latest completion time.
Omega-lambda trees for computing ect of task sets.
int pmin(void) const
Return minimum processing time.
OptFixPTask OptFixPTaskFwd
Forward optional fixed task view.
Unary (mandatory) task with fixed processing, start or end time
void update(Space &home, bool share, ManFixPSETask &t)
Update this task to be a clone of task t.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
int resEct
Node which is responsible for lect.
FwdToBwd< ManFixPSETaskFwd > ManFixPSETaskBwd
Backward (dual) mandatory fixed task view.
void init(const OmegaLambdaNode &l, const OmegaLambdaNode &r)
Initialize node from left child l and right child r.
TaskType
Type of task for scheduling constraints.
Unary optional task with flexible processing time
bool lempty(void) const
Whether has responsible task.
Unary::OptFixPTaskBwd TaskViewBwd
The backward task view type.
void init(IntVar s, int p)
Initialize with start time s and processing time p.
int lp
Processing times for subtree.
bool excluded(void) const
Whether task is excluded.
ManProp(Home home, TaskArray< ManTask > &t)
Constructor for creation.
FwdToBwd< OptFixPTaskFwd > OptFixPTaskBwd
Backward (dual) optional fixed task view.
Unary::ManFixPTask Task
The task type.
Unary::ManFixPTask ManTask
The corresponding mandatory task.
OptFlexTask(void)
Default constructor.
Scheduling propagator for unary resource with mandatory tasks
void update(const OmegaNode &l, const OmegaNode &r)
Update node from left child l and right child r.
Unary::ManFixPTaskFwd TaskViewFwd
The forward task view type.
int lct(void) const
Return latest completion time.
Unary (mandatory) task with fixed processing time
int est(void) const
Return earliest start time.
void cancel(Space &home, Propagator &p, PropCond pc=Int::PC_INT_BND)
Cancel subscription of propagator p for task.
Unary::OptFixPTask Task
The task type.
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.
int pmax(void) const
Return maximum processing time.
ManFlexTask(void)
Default constructor.
void init(TaskType t, IntVar s, int p, BoolVar m)
Initialize with start time s, processing time p, and mandatory flag m.
int ModEvent
Type for modification events.
Base-class for propagators.
void linsert(int i)
Insert task with index i to lambda.
virtual Actor * copy(Space &home, bool share)
Perform copying during cloning.
Unary::ManFlexTask Task
The task type.
int pmax(void) const
Return maximum processing time.
ExecStatus notfirstnotlast(Space &home, TaskArray< ManTask > &t)
Propagate not-first and not-last.
Unary::OptFixPSETaskFwd TaskViewFwd
The forward task view type.
Unary::OptFixPSETaskBwd TaskViewBwd
The backward task view type.
bool assigned(void) const
Test whether task is assigned.
OptFixPSETask(void)
Default constructor.
int ect
Earliest completion time for subtree.
void insert(int i)
Insert task with index i.
int lect
Earliest completion times for subtree.
Traits class for mapping tasks to task views.
int pmax(void) const
Return maximum processing time.
ModEvent norun(Space &home, int e, int l)
Update such that task cannot run from e to l.
Base-class for both propagators and branchers.
IntVar e(void) const
Return end time.
Unary::OptFlexTask Task
The task type.
void oinsert(int i)
Insert task with index i to omega.
Unary::OptFlexTaskFwd TaskViewFwd
The forward task view type.
Unary::OptFixPTaskFwd TaskViewFwd
The forward task view type.
int ect(void) const
Return earliest completion time.
virtual Actor * copy(Space &home, bool share)
Perform copying during cloning.
Unary optional task with fixed processing time
Int::IntView _s
Start time.
int p
Number of positive literals for node type.
Omega trees for computing ect of task sets.
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.
bool mandatory(void) const
Whether task is mandatory.
int n
Number of negative literals for node type.
Unary::ManFixPTaskBwd TaskViewBwd
The backward task view type.
Unary::ManFixPTask ManTask
The corresponding mandatory task.
ManFixPTask(void)
Default constructor.
Unary::ManFixPSETaskBwd TaskViewBwd
The backward task view type.
FwdToBwd< OptFixPSETaskFwd > OptFixPSETaskBwd
Backward (dual) optional fixed task view.
void update(Space &home, bool share, ManFixPTask &t)
Update this task to be a clone of task t.
int pmin(void) const
Return minimum processing time.
Unary::ManFixPSETaskFwd TaskViewFwd
The forward task view type.
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
int PropCond
Type for propagation conditions.
Unary::OptFixPSETask Task
The task type.
ExecStatus overload(Space &home, TaskArray< ManTask > &t)
Check mandatory tasks t for overload.
ModEventDelta med
A set of modification events (used during propagation)
Unary::ManFixPTask Task
The task type.
int est(void) const
Return earliest start time.
Node for an omega lambda tree.
ModEvent norun(Space &home, int e, int l)
Update such that task cannot run from e to l.
ModEvent norun(Space &home, int e, int l)
Update such that task cannot run from e to l.
void init(IntVar s, IntVar p, IntVar e)
Initialize with start time s, processing time p, end time e.
Class to define an optional from a mandatory task.
TaskArray< ManTask > t
Tasks.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
ExecStatus detectable(Space &home, TaskViewArray< ManTaskView > &t)
FwdToBwd< ManFixPTaskFwd > ManFixPTaskBwd
Backward (dual) mandatory fixed task view.
int lect(void) const
Return earliest completion time of all tasks excluding lambda tasks.
int responsible(void) const
Return responsible task.
OptProp(Home home, TaskArray< OptTask > &t)
Constructor for creation.
bool optional(void) const
Whether task can still be optional.
FwdToBwd< OptFlexTaskFwd > OptFlexTaskBwd
Backward (dual) optional flexible task view.
int lst(void) const
Return latest start time.
Boolean integer variables.
bool optional(void) const
Whether task can still be optional.
Unary::OptFixPTask Task
The task type.
Task mapper: turns a task view into its dual.
int resLp
Node which is responsible for lp.
void init(TaskType t, IntVar s, int p)
Initialize task.
OmegaLambdaTree(Region &r, const TaskViewArray< TaskView > &t, bool inc=true)
Initialize tree for tasks t with all tasks included, if inc is true.
int ect(void) const
Return earliest completion time.
Unary::ManFlexTaskFwd TaskViewFwd
The forward task view type.
Int::IntView _p
Processing time.
Integer view for integer variables.
bool mandatory(void) const
Whether task is mandatory.
ExecStatus subsumed(Space &home, Propagator &p, TaskArray< Task > &t)
Check tasks t for subsumption.
OmegaTree(Region &r, const TaskViewArray< TaskView > &t)
Initialize tree for tasks t.
Unary::ManFixPSETask Task
The task type.
IntVar st(void) const
Return start time.
void update(Space &home, bool share, ManFlexTask &t)
Update this task to be a clone of task t.
Unary::OptFlexTaskBwd TaskViewBwd
The backward task view type.
OptFixPTask(void)
Default constructor.
Scheduling propagator for unary resource with optional tasks
ManFlexTask ManFlexTaskFwd
Forward mandatory flexible task view.
int ect(void) const
Return earliest completion time of all tasks.
OptFixPSETask OptFixPSETaskFwd
Forward optional fixed task view.
static ExecStatus post(Home home, TaskArray< OptTask > &t)
Post propagator that schedules tasks on unary resource.
Unary::ManFlexTask Task
The task type.
void lremove(int i)
Remove task with index i from lambda.
Unary optional task with fixed processing, start or end time.
void init(const OmegaNode &l, const OmegaNode &r)
Initialize node from left child l and right child r.
bool assigned(void) const
Test whether task is assigned.
void subscribe(Space &home, Propagator &p, PropCond pc=Int::PC_INT_BND)
Subscribe propagator p to task.
void shift(int i)
Shift task with index i from omega to lambda.
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.
Traits class for mapping task views to tasks.
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
Unary::OptFlexTask Task
The task type.
OptFlexTask OptFlexTaskFwd
Forward optional flexible task view.
int pmin(void) const
Return minimum processing time.
ManFixPSETask(void)
Default constructor.
Gecode toplevel namespace
static ExecStatus post(Home home, TaskArray< ManTask > &t)
Post propagator that schedules tasks on unary resource.
ManFixPSETask ManFixPSETaskFwd
Forward mandatory fixed task view.
int lct(void) const
Return latest completion time.
Unary::ManFlexTaskBwd TaskViewBwd
The backward task view type.
Unary (mandatory) task with flexible processing time
int ect(void) const
Return earliest completion time of all tasks.
void init(IntVar s, int p, BoolVar m)
Initialize with start time s, processing time p, and mandatory flag m.
Unary::ManFixPSETask Task
The task type.
int ect(void) const
Return earliest completion time.
IntVar p(void) const
Return processing time.
int ModEventDelta
Modification event deltas.
Home class for posting propagators
IntVar st(void) const
Return start time.
static const int undef
Undefined task.
Task trees for task views with node type Node.
Int::IntView _s
Start time.
ManFixPTask ManFixPTaskFwd
Forward mandatory fixed task view.
void subscribe(Space &home, Propagator &p, PropCond pc=Int::PC_INT_BND)
Subscribe propagator p to task.
FwdToBwd< ManFlexTaskFwd > ManFlexTaskBwd
Backward (dual) mandatory flexible task view.
Unary::OptFixPSETask Task
The task type.
bool excluded(void) const
Whether task is excluded.
Unary::ManFlexTask ManTask
The corresponding mandatory task.
int lst(void) const
Return latest start time.
int p
Processing time for subtree.
int est(void) const
Return earliest start time.
int lst(void) const
Return latest start time.