Hello all, I have Gecode 3.7.3 on Ubuntu. I'm working in a scheduling problem with optmization, therefore, I'm using MaximizeScript and the cumulatives constraint.
Right now, I'm having problems with the cumulatives constraint, because, It doesn't works properly. I have something like take into account that: size = listVarMachines.size = listVarTStarts = listVarTEnds = listDuration = listResources = listMachinesCapacity for(int i = 0; i < size; i++){ cumulatives( *this, listVarMachines[i], listVarTStarts[i], listDuration[i], listVarTEnds[i], listResources[i], listMachinesCapacity[i], true, ICL_BND); } where listVarMachines, listVarTStarts, listVarTEnds are declared in this way -> vector<IntVarArray> listVar... And listDuration, listResources and listMachinesCapacity are declared in this way -> vector<IntArgs> list... When I force the elements in the vector listMachinesCapacity to take a value of 1. The program assign more than 1 task at the same time. This is wrong, because with the Limit of resource equals to 1, the cumulatives constraint should assign one and only one task in the same unit of time. I think that the problems is that the cumulatives constraint isn't being propagated for any reason. And I have doubts with the way in that the variables are being updated. In the update function I have something like this: MyClass(bool share, MyClasss) : MaximizeScript(share, s) { listVarMachines = s.listVarMachines; listVarTStarts = s.listVarTStarts; listVarTEnds = s.listVarTEnds; for( int i=0; i < size; i++) { listVarMachines.update(*this, share, s.listVarMachines[i]); listVarTStarts.update(*this, share, s.listVarTStarts[i]); listVarTEnds .update(*this, share, s.listVarTEnds[i]); } } Dou you think that the problem can be the way of I'm updating the variables, or do you have another idea? Thank you in advance!. Best regards, Holmes -- *"El secreto del éxito, está en la disciplina"* Holmes Giovanny Salazar Osorio Ingeniería de Sistemas Estudiante 10mo Semestre Universidad del Valle - Sede Tuluá
_______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users