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