Originally posted by: A.Omidi
hi
thanks a lot. but when i added this constraint to the model, i have below error:
The function endBeforeStart(int,int,int) does not exist.
my model is:
int nbJobs = ...;
int nbMchs = ...;
{int} Jobs = asSet(0..nbJobs-1);
{int} Mchs = asSet(0..nbMchs-1);
int OpDurations[j in Jobs][m in Mchs] = ...;
dvar interval itvs[j in Jobs][m in Mchs] size OpDurations[j][m];
dvar sequence mchs[m in Mchs] in all(j in Jobs) itvs[j][m];
execute {
cp.param.FailLimit = 10000;
}
minimize max(j in Jobs) endOf(itvs[j][nbMchs-1]);
subject to {
forall (m in Mchs)
noOverlap(mchs[m]);
forall ( j in Jobs, o in 0..nbMchs-2)
endBeforeStart(itvs[j][o], itvs[j][o+1]);
endBeforeStart(0,1,0);
best regards
#DecisionOptimization#OPLusingCPLEXOptimizer