Originally posted by: qtbgo
Hi, GGR, I check the error, but still cannot figure out why. I build a simplified version of the model as follows, the error message is attached also, it is in Chinese. In the following code, when I use append(1,2), no error, when I use append(i*100+j, nn*100+mm), error occurs.
//Quay Crane Scheduling Problem
using CP;
int n=10;
int b=10;
int q=2;
range T = 1..n; //tasks set
range B = 1..b; //bays set
range C = 1..q; //quay cranes set
int l[T] = [2,10,3,2,6,2,7,7,3,5]; //li bay of task i
tuple triplet { int loc1; int loc2; int value; };
{triplet} W = { <t1, t2, t1+t2> | t1, t2 in 1..10000}; //
dvar interval Y[i in T][j in C] optional in 0..10000 size 10 ;
dvar sequence sq[i in T][j in C][nn in T][mm in C] in append(Y[i][j],Y[nn][mm]) types append(i*100+j, nn*100+mm);//append(1,2);
////////////////////////
minimize max(i in T, j in C) endOf(Y[i][j]); //objective
subject to {
forall(i, nn in T, j, mm in C : mm>j && l[nn]<l[i]+2*(mm-j))
noOverlap(sq[i][j][nn][mm], W);
};
#DecisionOptimization#OPLusingCPOptimizer