Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 namespace Gecode { namespace Scheduling { namespace Cumulative {
00041
00042 template<class ManTask>
00043 forceinline
00044 ManProp<ManTask>::ManProp(Home home, int c0, TaskArray<ManTask>& t)
00045 : TaskProp<ManTask,Int::PC_INT_DOM>(home,t), c(c0) {}
00046
00047 template<class ManTask>
00048 forceinline
00049 ManProp<ManTask>::ManProp(Space& home, bool shared,
00050 ManProp<ManTask>& p)
00051 : TaskProp<ManTask,Int::PC_INT_DOM>(home,shared,p), c(p.c) {}
00052
00053 template<class ManTask>
00054 forceinline ExecStatus
00055 ManProp<ManTask>::post(Home home, int c, TaskArray<ManTask>& t) {
00056
00057 for (int i=t.size(); i--; )
00058 if (t[i].c() > c)
00059 return ES_FAILED;
00060 if (t.size() > 1)
00061 (void) new (home) ManProp<ManTask>(home,c,t);
00062 return ES_OK;
00063 }
00064
00065 template<class ManTask>
00066 Actor*
00067 ManProp<ManTask>::copy(Space& home, bool share) {
00068 return new (home) ManProp<ManTask>(home,share,*this);
00069 }
00070
00071 template<class ManTask>
00072 forceinline size_t
00073 ManProp<ManTask>::dispose(Space& home) {
00074 (void) TaskProp<ManTask,Int::PC_INT_DOM>::dispose(home);
00075 return sizeof(*this);
00076 }
00077
00078 template<class ManTask>
00079 ExecStatus
00080 ManProp<ManTask>::propagate(Space& home, const ModEventDelta& med) {
00081
00082 if (Int::IntView::me(med) != Int::ME_INT_DOM)
00083 GECODE_ES_CHECK(overload(home,c,t));
00084 GECODE_ES_CHECK(edgefinding(home,c,t));
00085 return basic(home,*this,c,t);
00086 }
00087
00088 }}}
00089
00090