40 namespace Gecode {
namespace Int {
namespace Unary {
108 return _s.
gq(home,n);
116 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();
320 : _s(s), _p(p),
_e(e) {}
387 return _s.
gq(home,n);
391 return _e.
gq(home,n);
395 return _s.
lq(home,n);
399 return _e.
lq(home,n);
444 template<
class Char,
class Traits>
445 std::basic_ostream<Char,Traits>&
446 operator <<(std::basic_ostream<Char,Traits>& os,
const ManFlexTask&
t) {
447 std::basic_ostringstream<Char,Traits> s;
448 s.copyfmt(os); s.width(0);
449 s <<
t.est() <<
':' <<
t.lst() <<
':' <<
t.pmin() <<
':'
450 <<
t.pmax() <<
':' <<
t.ect() <<
':' <<
t.lct();
451 return os << s.str();
469 template<
class Char,
class Traits>
470 std::basic_ostream<Char,Traits>&
471 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFixPTask&
t) {
472 std::basic_ostringstream<Char,Traits> s;
473 s.copyfmt(os); s.width(0);
474 s <<
t.est() <<
':' <<
t.pmin() <<
':' <<
t.lct() <<
':'
475 << (
t.mandatory() ?
'1' : (
t.optional() ?
'?' :
'0'));
476 return os << s.str();
494 template<
class Char,
class Traits>
495 std::basic_ostream<Char,Traits>&
497 std::basic_ostringstream<Char,Traits> s;
498 s.copyfmt(os); s.width(0);
499 s <<
t.est() <<
':' <<
t.pmin() <<
':' <<
t.lct() <<
':'
500 << (
t.mandatory() ?
'1' : (
t.optional() ?
'?' :
'0'));
501 return os << s.str();
519 template<
class Char,
class Traits>
520 std::basic_ostream<Char,Traits>&
521 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFlexTask&
t) {
522 std::basic_ostringstream<Char,Traits> s;
523 s.copyfmt(os); s.width(0);
524 s <<
t.est() <<
':' <<
t.lst() <<
':' <<
t.pmin() <<
':'
525 <<
t.pmax() <<
':' <<
t.ect() <<
':' <<
t.lct() <<
':'
526 << (
t.mandatory() ?
'1' : (
t.optional() ?
'?' :
'0'));
527 return os << s.str();
int lct(void) const
Return latest completion time.
int pmin(void) const
Return minimum processing time.
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.
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 excluded(void) const
Whether task is excluded.
OptFlexTask(void)
Default constructor.
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.
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.
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.
bool assigned(void) const
Test whether task is assigned.
OptFixPSETask(void)
Default constructor.
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.
IntVar e(void) const
Return end time.
const Gecode::ModEvent ME_INT_FAILED
Domain operation has resulted in failure.
int max(void) const
Return maximum of domain.
int ect(void) const
Return earliest completion 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.
Int::IntView _s
Start time.
int p
Number of positive literals for node type.
bool mandatory(void) const
Whether task is mandatory.
int n
Number of negative literals for node type.
ManFixPTask(void)
Default constructor.
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.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
int PropCond
Type for propagation conditions.
int est(void) const
Return earliest start 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 min(void) const
Return minimum of domain.
void init(IntVar s, IntVar p, IntVar e)
Initialize with start time s, processing time p, end time e.
bool optional(void) const
Whether task can still be optional.
void update(Space &home, bool share, VarImpView< Var > &y)
Update this view to be a clone of view y.
int lst(void) const
Return latest start time.
Boolean integer variables.
bool optional(void) const
Whether task can still be optional.
void init(TaskType t, IntVar s, int p)
Initialize task.
int ect(void) const
Return earliest completion time.
Int::IntView _p
Processing time.
bool mandatory(void) const
Whether task is mandatory.
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.
OptFixPTask(void)
Default constructor.
Multi _e(Gecode::IntArgs(4, 4, 2, 3, 1))
bool assigned(void) const
Test whether view is assigned.
Unary optional task with fixed processing, start or end time.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
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 cancel(Space &home, Propagator &p, PropCond pc=Int::PC_INT_BND)
Cancel subscription of propagator p for task.
Int::BoolView _m
Boolean view whether task is mandatory (= 1) or not.
int pmin(void) const
Return minimum processing time.
ManFixPSETask(void)
Default constructor.
Gecode toplevel namespace
int lct(void) const
Return latest completion time.
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.
IntVar p(void) const
Return processing time.
IntVar st(void) const
Return start 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 subscribe(Space &home, Propagator &p, PropCond pc=Int::PC_INT_BND)
Subscribe propagator p to task.
bool excluded(void) const
Whether task is excluded.
bool me_failed(ModEvent me)
Check whether modification event me is failed.
int lst(void) const
Return latest start time.
int est(void) const
Return earliest start time.
int lst(void) const
Return latest start time.