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();
int c(void) const
Return required capacity.
int pmin(void) const
Return minimum processing time.
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.
Cumulative (mandatory) task with fixed processing, start or end time.
ManFlexTask(void)
Default constructor.
TaskType
Type of task for scheduling constraints.
Unary optional task with flexible processing time
void init(IntVar s, int p)
Initialize with start time s and processing time p.
int c(void) const
Return required capacity.
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
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.
Gecode::FloatVal c(-8, 8)
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.
int pmin(void) const
Return minimum processing time.
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.
long long int e(void) const
Return required energy.
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.
long long int e(void) const
Return required energy.
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.
OptFixPTask(void)
Default constructor.
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.
Multi _e(Gecode::IntArgs(4, 4, 2, 3, 1))
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.
Int::BoolView _m
Boolean view whether task is mandatory (= 1) or not.
int pmin(void) const
Return minimum processing time.
Gecode toplevel namespace
long long int e(void) const
Return required energy.
Cumulative optional task with fixed processing, start or end time.
int c(void) const
Return required capacity.
Multi _c(Gecode::IntArgs(3, 1, 2, 3))
ManFixPTask(void)
Default constructor.