40 namespace Gecode {
namespace Int {
namespace Unary {
108 return _s.
gq(home,n);
116 return _s.
lq(home,n);
160 template<
class Char,
class Traits>
161 std::basic_ostream<Char,Traits>&
162 operator <<(std::basic_ostream<Char,Traits>& os,
const ManFixPTask&
t) {
163 std::basic_ostringstream<Char,Traits> s;
164 s.copyfmt(os); s.width(0);
165 s <<
t.est() <<
':' <<
t.pmin() <<
':' <<
t.lct();
166 return os << s.str();
287 return _s.
gr(home,l);
291 return _s.
lq(home,e);
307 template<
class Char,
class Traits>
308 std::basic_ostream<Char,Traits>&
310 std::basic_ostringstream<Char,Traits> s;
311 s.copyfmt(os); s.width(0);
312 s <<
t.est() <<
':' <<
t.pmin() <<
':' <<
t.lct();
313 return os << s.str();
391 return _s.
gq(home,n);
395 return _e.
gq(home,n);
399 return _s.
lq(home,n);
403 return _e.
lq(home,n);
454 template<
class Char,
class Traits>
455 std::basic_ostream<Char,Traits>&
456 operator <<(std::basic_ostream<Char,Traits>& os,
const ManFlexTask&
t) {
457 std::basic_ostringstream<Char,Traits> s;
458 s.copyfmt(os); s.width(0);
459 s <<
t.est() <<
':' <<
t.lst() <<
':' <<
t.pmin() <<
':' 460 <<
t.pmax() <<
':' <<
t.ect() <<
':' <<
t.lct();
461 return os << s.str();
479 template<
class Char,
class Traits>
480 std::basic_ostream<Char,Traits>&
481 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFixPTask&
t) {
482 std::basic_ostringstream<Char,Traits> s;
483 s.copyfmt(os); s.width(0);
484 s <<
t.est() <<
':' <<
t.pmin() <<
':' <<
t.lct() <<
':' 485 << (
t.mandatory() ?
'1' : (
t.optional() ?
'?' :
'0'));
486 return os << s.str();
504 template<
class Char,
class Traits>
505 std::basic_ostream<Char,Traits>&
507 std::basic_ostringstream<Char,Traits> s;
508 s.copyfmt(os); s.width(0);
509 s <<
t.est() <<
':' <<
t.pmin() <<
':' <<
t.lct() <<
':' 510 << (
t.mandatory() ?
'1' : (
t.optional() ?
'?' :
'0'));
511 return os << s.str();
529 template<
class Char,
class Traits>
530 std::basic_ostream<Char,Traits>&
531 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFlexTask&
t) {
532 std::basic_ostringstream<Char,Traits> s;
533 s.copyfmt(os); s.width(0);
534 s <<
t.est() <<
':' <<
t.lst() <<
':' <<
t.pmin() <<
':' 535 <<
t.pmax() <<
':' <<
t.ect() <<
':' <<
t.lct() <<
':' 536 << (
t.mandatory() ?
'1' : (
t.optional() ?
'?' :
'0'));
537 return os << s.str();
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
Unary (mandatory) task with fixed processing, start or end time
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to view.
void update(Space &home, bool share, ManFixPSETask &t)
Update this task to be a clone of task t.
TaskType
Type of task for scheduling constraints.
int pmin(void) const
Return minimum processing time.
Unary optional task with flexible processing time
Range iterator for singleton range.
void init(IntVar s, int p)
Initialize with start time s and processing time p.
bool optional(void) const
Whether task can still be optional.
bool optional(void) const
Whether task can still be optional.
bool excluded(void) const
Whether task is excluded.
void subscribe(Space &home, Propagator &p, PropCond pc)
Subscribe propagator p to task.
IntVar st(void) const
Return start time.
OptFlexTask(void)
Default constructor.
Unary (mandatory) task with fixed processing time
int lct(void) const
Return latest completion time.
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.
bool mandatory(void) const
Whether task is mandatory.
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 reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p with propagation condition pc.
int pmax(void) const
Return maximum processing time.
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
int est(void) const
Return earliest start time.
OptFixPSETask(void)
Default constructor.
ModEvent norun(Space &home, int e, int l)
Update such that task cannot run from e to l.
const Gecode::ModEvent ME_INT_FAILED
Domain operation has resulted in failure.
int pmin(void) const
Return minimum processing time.
Unary optional task with fixed processing time
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to view.
void reschedule(Space &home, Propagator &p, PropCond pc)
Schedule propagator p.
Int::IntView _s
Start time.
int p
Number of positive literals for node type.
int n
Number of negative literals for node type.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p for task.
ManFixPTask(void)
Default constructor.
void update(Space &home, bool share, ManFixPTask &t)
Update this task to be a clone of task t.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
int PropCond
Type for propagation conditions.
int lct(void) const
Return latest completion time.
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.
int lst(void) const
Return latest start time.
void init(IntVar s, IntVar p, IntVar e)
Initialize with start time s, processing time p, end time e.
int min(void) const
Return minimum of domain.
bool assigned(void) const
Test whether task is assigned.
int est(void) const
Return earliest start time.
void update(Space &home, bool share, VarImpView< Var > &y)
Update this view to be a clone of view y.
void subscribe(Space &home, Propagator &p, PropCond pc)
Subscribe propagator p to task.
int pmax(void) const
Return maximum processing time.
int lst(void) const
Return latest start time.
int lst(void) const
Return latest start time.
Boolean integer variables.
int ect(void) const
Return earliest completion time.
int lct(void) const
Return latest completion time.
void init(TaskType t, IntVar s, int p)
Initialize task.
Int::IntView _p
Processing time.
bool assigned(void) const
Test whether view is assigned.
int ect(void) const
Return earliest completion time.
void update(Space &home, bool share, ManFlexTask &t)
Update this task to be a clone of task t.
OptFixPTask(void)
Default constructor.
bool excluded(void) const
Whether task is excluded.
Unary optional task with fixed processing, start or end time.
bool mandatory(void) const
Whether task is mandatory.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
IntVar st(void) const
Return start time.
int pmax(void) const
Return maximum processing time.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p for task.
int est(void) const
Return earliest start time.
ManFixPSETask(void)
Default constructor.
bool assigned(void) const
Test whether task is assigned.
IntVar e(void) const
Return end time.
IntVar p(void) const
Return processing time.
Gecode toplevel namespace
int max(void) const
Return maximum of domain.
Multi _e(Gecode::IntArgs(4, 4, 2, 3, 1))
Unary (mandatory) task with flexible processing time
void init(IntVar s, int p, BoolVar m)
Initialize with start time s, processing time p, and mandatory flag m.
int ect(void) const
Return earliest completion time.
Int::IntView _s
Start time.
#define GECODE_NEVER
Assert that this command is never executed.
const Gecode::ModEvent ME_INT_NONE
Domain operation has not changed domain.
void reschedule(Space &home, Propagator &p, PropCond pc)
Schedule propagator p.
bool me_failed(ModEvent me)
Check whether modification event me is failed.
int pmin(void) const
Return minimum processing time.