40 namespace Gecode {
namespace Int {
namespace Cumulative {
66 return static_cast<long long int>(
pmin())*
c();
74 template<
class Char,
class Traits>
75 std::basic_ostream<Char,Traits>&
76 operator <<(std::basic_ostream<Char,Traits>& os,
const ManFixPTask&
t) {
77 std::basic_ostringstream<Char,Traits> s;
78 s.copyfmt(os); s.width(0);
79 s <<
t.est() <<
":[" <<
t.pmin() <<
',' <<
t.c() <<
"]:" <<
t.lct();
107 return static_cast<long long int>(
pmin())*
c();
115 template<
class Char,
class Traits>
116 std::basic_ostream<Char,Traits>&
118 std::basic_ostringstream<Char,Traits> s;
119 s.copyfmt(os); s.width(0);
120 s <<
t.est() <<
":[" <<
t.pmin() <<
',' <<
t.c() <<
"]:" <<
t.lct();
121 return os << s.str();
148 return static_cast<long long int>(
pmin())*
c();
156 template<
class Char,
class Traits>
157 std::basic_ostream<Char,Traits>&
158 operator <<(std::basic_ostream<Char,Traits>& os,
const ManFlexTask&
t) {
159 std::basic_ostringstream<Char,Traits> s;
160 s.copyfmt(os); s.width(0);
161 s <<
t.est() <<
':' <<
t.lst() <<
':' <<
t.pmin() <<
':' 162 <<
t.pmax() <<
':' <<
t.c() <<
':' <<
t.ect() <<
':' <<
t.lct();
163 return os << s.str();
185 template<
class Char,
class Traits>
186 std::basic_ostream<Char,Traits>&
187 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFixPTask&
t) {
188 std::basic_ostringstream<Char,Traits> s;
189 s.copyfmt(os); s.width(0);
190 s <<
t.est() <<
":[" <<
t.pmin() <<
',' <<
t.c() <<
"]:" <<
t.lct() <<
':' 191 << (
t.mandatory() ?
'1' : (
t.optional() ?
'?' :
'0'));
192 return os << s.str();
214 template<
class Char,
class Traits>
215 std::basic_ostream<Char,Traits>&
217 std::basic_ostringstream<Char,Traits> s;
218 s.copyfmt(os); s.width(0);
219 s <<
t.est() <<
":[" <<
t.pmin() <<
',' <<
t.c() <<
"]:" <<
t.lct() <<
':' 220 << (
t.mandatory() ?
'1' : (
t.optional() ?
'?' :
'0'));
221 return os << s.str();
243 template<
class Char,
class Traits>
244 std::basic_ostream<Char,Traits>&
245 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFlexTask&
t) {
246 std::basic_ostringstream<Char,Traits> s;
247 s.copyfmt(os); s.width(0);
248 s <<
t.est() <<
':' <<
t.lst() <<
':' <<
t.pmin() <<
':' 249 <<
t.pmax() <<
':' <<
t.c() <<
':' <<
t.ect() <<
':' <<
t.lct()
250 << (
t.mandatory() ?
'1' : (
t.optional() ?
'?' :
'0'));
251 return os << s.str();
void update(Space &home, bool share, ManFixPSETask &t)
Update this task to be a clone of task t.
Cumulative (mandatory) task with flexible processing time.
int c(void) const
Return required capacity.
Cumulative (mandatory) task with fixed processing, start or end time.
ManFlexTask(void)
Default constructor.
TaskType
Type of task for scheduling constraints.
int pmin(void) const
Return minimum processing time.
Unary optional task with flexible processing time
void init(IntVar s, int p)
Initialize with start time s and processing time p.
void update(Space &home, bool share, ManFixPSETask &t)
Update this task to be a clone of task t.
ManFixPSETask(void)
Default constructor.
Cumulative optional task with flexible processing time
long long int e(void) const
Return required energy.
void init(IntVar s, int p, int c, BoolVar m)
Initialize with start time s, processing time p, required capacity c, and mandatory flag m...
OptFixPSETask(void)
Default constructor.
long long int e(void) const
Return required energy.
int c(void) const
Return required capacity.
int pmin(void) const
Return minimum processing time.
Unary optional task with fixed processing time
int p
Number of positive literals for node type.
void update(Space &home, bool share, ManFixPTask &t)
Update this task to be a clone of task t.
Cumulative (mandatory) task with fixed processing time.
long long int e(void) const
Return required energy.
void update(Space &home, bool share, ManFlexTask &t)
Update this task to be a clone of task t.
void init(IntVar s, IntVar p, IntVar e, int c, BoolVar m)
Initialize with start time s, processing time p, end time e, and mandatory flag m.
void init(IntVar s, IntVar p, IntVar e)
Initialize with start time s, processing time p, end time e.
void init(TaskType t, IntVar s, int p, int c)
Initialize task.
void init(IntVar s, IntVar p, IntVar e, int c)
Initialize with start time s, processing time p, end time e.
OptFlexTask(void)
Default constructor.
Boolean integer variables.
void init(TaskType t, IntVar s, int p, int c, BoolVar m)
Initialize with start time s, processing time p, required capacity c, and mandatory flag m...
void init(TaskType t, IntVar s, int p)
Initialize task.
Cumulative optional task with fixed processing time.
int c(void) const
Return required capacity.
OptFixPTask(void)
Default constructor.
Int::IntView _p
Processing time.
void update(Space &home, bool share, ManFlexTask &t)
Update this task to be a clone of task t.
void update(Space &home, bool share, ManFixPTask &t)
Update this task to be a clone of task t.
Unary optional task with fixed processing, start or end time.
void init(IntVar s, int p, int c)
Initialize task with start time s, processing time p, and required resource c.
IntVar p(void) const
Return processing time.
Gecode toplevel namespace
Cumulative optional task with fixed processing, start or end time.
Int::IntView _s
Start time.
int pmin(void) const
Return minimum processing time.
ManFixPTask(void)
Default constructor.