36 namespace Gecode {
namespace Int {
namespace Unary {
104 return _s.
gq(home,n);
112 return _s.
lq(home,n);
156 template<
class Char,
class Traits>
157 std::basic_ostream<Char,Traits>&
158 operator <<(std::basic_ostream<Char,Traits>& os,
const ManFixPTask&
t) {
159 std::basic_ostringstream<Char,Traits> s;
160 s.copyfmt(os); s.width(0);
161 s <<
t.est() <<
':' <<
t.pmin() <<
':' <<
t.lct();
162 return os << s.str();
283 return _s.
gr(home,l);
287 return _s.
lq(home,e);
303 template<
class Char,
class Traits>
304 std::basic_ostream<Char,Traits>&
306 std::basic_ostringstream<Char,Traits> s;
307 s.copyfmt(os); s.width(0);
308 s <<
t.est() <<
':' <<
t.pmin() <<
':' <<
t.lct();
309 return os << s.str();
387 return _s.
gq(home,n);
391 return _e.
gq(home,n);
395 return _s.
lq(home,n);
399 return _e.
lq(home,n);
450 template<
class Char,
class Traits>
451 std::basic_ostream<Char,Traits>&
452 operator <<(std::basic_ostream<Char,Traits>& os,
const ManFlexTask&
t) {
453 std::basic_ostringstream<Char,Traits> s;
454 s.copyfmt(os); s.width(0);
455 s <<
t.est() <<
':' <<
t.lst() <<
':' <<
t.pmin() <<
':' 456 <<
t.pmax() <<
':' <<
t.ect() <<
':' <<
t.lct();
457 return os << s.str();
475 template<
class Char,
class Traits>
476 std::basic_ostream<Char,Traits>&
477 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFixPTask&
t) {
478 std::basic_ostringstream<Char,Traits> s;
479 s.copyfmt(os); s.width(0);
480 s <<
t.est() <<
':' <<
t.pmin() <<
':' <<
t.lct() <<
':' 481 << (
t.mandatory() ?
'1' : (
t.optional() ?
'?' :
'0'));
482 return os << s.str();
500 template<
class Char,
class Traits>
501 std::basic_ostream<Char,Traits>&
503 std::basic_ostringstream<Char,Traits> s;
504 s.copyfmt(os); s.width(0);
505 s <<
t.est() <<
':' <<
t.pmin() <<
':' <<
t.lct() <<
':' 506 << (
t.mandatory() ?
'1' : (
t.optional() ?
'?' :
'0'));
507 return os << s.str();
525 template<
class Char,
class Traits>
526 std::basic_ostream<Char,Traits>&
527 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFlexTask&
t) {
528 std::basic_ostringstream<Char,Traits> s;
529 s.copyfmt(os); s.width(0);
530 s <<
t.est() <<
':' <<
t.lst() <<
':' <<
t.pmin() <<
':' 531 <<
t.pmax() <<
':' <<
t.ect() <<
':' <<
t.lct() <<
':' 532 << (
t.mandatory() ?
'1' : (
t.optional() ?
'?' :
'0'));
533 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, VarImpView< Var > &y)
Update this view to be a clone of view y.
TaskType
Type of task for scheduling constraints.
int pmin(void) const
Return minimum processing time.
void update(Space &home, ManFixPTask &t)
Update this task to be a clone of task t.
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.
void update(Space &home, ManFlexTask &t)
Update this task to be a clone of task t.
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.
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 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.
Post propagator for SetVar SetOpType SetVar SetRelType r
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.
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.
void update(Space &home, ManFixPSETask &t)
Update this task to be a clone of task t.
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.