36 namespace Gecode {
namespace Int {
namespace Cumulative {
62 return static_cast<long long int>(
pmin())*
c();
70 template<
class Char,
class Traits>
71 std::basic_ostream<Char,Traits>&
72 operator <<(std::basic_ostream<Char,Traits>& os,
const ManFixPTask&
t) {
73 std::basic_ostringstream<Char,Traits> s;
74 s.copyfmt(os); s.width(0);
75 s <<
t.est() <<
":[" <<
t.pmin() <<
',' <<
t.c() <<
"]:" <<
t.lct();
103 return static_cast<long long int>(
pmin())*
c();
111 template<
class Char,
class Traits>
112 std::basic_ostream<Char,Traits>&
114 std::basic_ostringstream<Char,Traits> s;
115 s.copyfmt(os); s.width(0);
116 s <<
t.est() <<
":[" <<
t.pmin() <<
',' <<
t.c() <<
"]:" <<
t.lct();
117 return os << s.str();
144 return static_cast<long long int>(
pmin())*
c();
152 template<
class Char,
class Traits>
153 std::basic_ostream<Char,Traits>&
154 operator <<(std::basic_ostream<Char,Traits>& os,
const ManFlexTask&
t) {
155 std::basic_ostringstream<Char,Traits> s;
156 s.copyfmt(os); s.width(0);
157 s <<
t.est() <<
':' <<
t.lst() <<
':' <<
t.pmin() <<
':' 158 <<
t.pmax() <<
':' <<
t.c() <<
':' <<
t.ect() <<
':' <<
t.lct();
159 return os << s.str();
181 template<
class Char,
class Traits>
182 std::basic_ostream<Char,Traits>&
183 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFixPTask&
t) {
184 std::basic_ostringstream<Char,Traits> s;
185 s.copyfmt(os); s.width(0);
186 s <<
t.est() <<
":[" <<
t.pmin() <<
',' <<
t.c() <<
"]:" <<
t.lct() <<
':' 187 << (
t.mandatory() ?
'1' : (
t.optional() ?
'?' :
'0'));
188 return os << s.str();
210 template<
class Char,
class Traits>
211 std::basic_ostream<Char,Traits>&
213 std::basic_ostringstream<Char,Traits> s;
214 s.copyfmt(os); s.width(0);
215 s <<
t.est() <<
":[" <<
t.pmin() <<
',' <<
t.c() <<
"]:" <<
t.lct() <<
':' 216 << (
t.mandatory() ?
'1' : (
t.optional() ?
'?' :
'0'));
217 return os << s.str();
239 template<
class Char,
class Traits>
240 std::basic_ostream<Char,Traits>&
241 operator <<(std::basic_ostream<Char,Traits>& os,
const OptFlexTask&
t) {
242 std::basic_ostringstream<Char,Traits> s;
243 s.copyfmt(os); s.width(0);
244 s <<
t.est() <<
':' <<
t.lst() <<
':' <<
t.pmin() <<
':' 245 <<
t.pmax() <<
':' <<
t.c() <<
':' <<
t.ect() <<
':' <<
t.lct()
246 << (
t.mandatory() ?
'1' : (
t.optional() ?
'?' :
'0'));
247 return os << s.str();
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.
void update(Space &home, ManFixPTask &t)
Update this task to be a clone of task t.
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, ManFixPTask &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...
void update(Space &home, ManFlexTask &t)
Update this task to be a clone of task t.
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.
Cumulative (mandatory) task with fixed processing time.
long long int e(void) const
Return required energy.
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 update(Space &home, ManFixPSETask &t)
Update this task to be a clone of task t.
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.
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.
void update(Space &home, ManFixPSETask &t)
Update this task to be a clone of task t.
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.
void update(Space &home, ManFlexTask &t)
Update this task to be a clone of task t.
int pmin(void) const
Return minimum processing time.
ManFixPTask(void)
Default constructor.