Go to the documentation of this file.
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>&
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);
450 template<
class Char,
class Traits>
451 std::basic_ostream<Char,Traits>&
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>&
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>&
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();
void init(TaskType t, IntVar s, int p)
Initialize task.
ModEvent norun(Space &home, int e, int l)
Update such that task cannot run from e to l.
bool me_failed(ModEvent me)
Check whether modification event me is failed.
bool assigned(void) const
Test whether view is assigned.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p for task.
int est(void) const
Return earliest start time.
int pmax(void) const
Return maximum processing time.
void update(Space &home, ManFixPTask &t)
Update this task to be a clone of task t.
const Gecode::ModEvent ME_INT_FAILED
Domain operation has resulted in failure.
ManFlexTask(void)
Default constructor.
IntVar p(void) const
Return processing time.
int pmax(void) const
Return maximum processing time.
int min(void) const
Return minimum of domain.
Unary (mandatory) task with fixed processing, start or end time
int lst(void) const
Return latest start time.
OptFixPTask(void)
Default constructor.
Unary (mandatory) task with flexible processing time
void init(IntVar s, IntVar p, IntVar e)
Initialize with start time s, processing time p, end time e.
const Gecode::ModEvent ME_INT_NONE
Domain operation has not changed domain.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to view.
bool assigned(void) const
Test whether task is assigned.
int lct(void) const
Return latest completion time.
void init(IntVar s, int p)
Initialize with start time s and processing time p.
OptFixPSETask(void)
Default constructor.
void subscribe(Space &home, Propagator &p, PropCond pc)
Subscribe propagator p to task.
ManFixPTask(void)
Default constructor.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to view.
Int::IntView _s
Start time.
OptFlexTask(void)
Default constructor.
void update(Space &home, VarImpView< Var > &y)
Update this view to be a clone of view y.
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.
Unary (mandatory) task with fixed processing time
void update(Space &home, ManFixPSETask &t)
Update this task to be a clone of task t.
Gecode toplevel namespace
int max(void) const
Return maximum of domain.
Base-class for propagators.
Unary optional task with flexible processing time
ModEvent norun(Space &home, int e, int l)
Update such that task cannot run from e to l.
int ect(void) const
Return earliest completion time.
bool optional(void) const
Whether task can still be optional.
bool excluded(void) const
Whether task is excluded.
int lst(void) const
Return latest start time.
int pmin(void) const
Return minimum processing time.
bool mandatory(void) const
Whether task is mandatory.
Post propagator for SetVar SetOpType SetVar SetRelType r
Boolean integer variables.
bool assigned(void) const
Test whether task is assigned.
Unary optional task with fixed processing time
int lct(void) const
Return latest completion time.
int lct(void) const
Return latest completion time.
int ect(void) const
Return earliest completion time.
bool optional(void) const
Whether task can still be optional.
#define GECODE_NEVER
Assert that this command is never executed.
Multi _e(Gecode::IntArgs({4, 2, 3, 1}))
void subscribe(Space &home, Propagator &p, PropCond pc)
Subscribe propagator p to task.
IntVar st(void) const
Return start time.
int ModEvent
Type for modification events.
Int::IntView _s
Start time.
IntVar st(void) const
Return start time.
void init(TaskType t, IntVar s, int p, BoolVar m)
Initialize with start time s, processing time p, and mandatory flag m.
bool mandatory(void) const
Whether task is mandatory.
ModEvent norun(Space &home, int e, int l)
Update such that task cannot run from e to l.
void init(IntVar s, int p, BoolVar m)
Initialize with start time s, processing time p, and mandatory flag m.
int pmin(void) const
Return minimum processing time.
int PropCond
Type for propagation conditions.
TaskType
Type of task for scheduling constraints.
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p with propagation condition pc.
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
ManFixPSETask(void)
Default constructor.
int pmax(void) const
Return maximum processing time.
int lst(void) const
Return latest start time.
Int::BoolView _m
Boolean view whether task is mandatory (= 1) or not.
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const ManFixPTaskBwd &t)
Range iterator for singleton range.
bool excluded(void) const
Whether task is excluded.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
void reschedule(Space &home, Propagator &p, PropCond pc)
Schedule propagator p.
int n
Number of negative literals for node type.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p for task.
int est(void) const
Return earliest start time.
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
Unary optional task with fixed processing, start or end time.
int ect(void) const
Return earliest completion time.
int est(void) const
Return earliest start time.
int p
Number of positive literals for node type.
Int::IntView _p
Processing time.
IntVar e(void) const
Return end time.
void reschedule(Space &home, Propagator &p, PropCond pc)
Schedule propagator p.
int pmin(void) const
Return minimum processing time.
void update(Space &home, ManFlexTask &t)
Update this task to be a clone of task t.