Originally posted by: AndyHam
Dear IBM,
I am working on a material transfer problem in semiconductor industry. In particular, there is an auxiliary resource called reticle. The auxiliary resource must be present with a machine for job processing. Furthermore, the auxiliary resource needs to be transferred by vehicles to other machines. The enclosed code and figure illustrate the problem and my concern.
The upper figure shows job-machine schedule with auxiliary resources. The lower figure shows reticle schedule which is derived from the upper based model. I need this derived reticle schedule in order to model the reticle transfer. For instance, pick up R2 from M2 after 10 and drop it off to M1 by 18. Then, pick up R2 from M1 after 28 and drop it off to M2 by 30. The question is how to create intervals like this. I have tried "typeOfNext" and "SPAN", but failed. Any help will be appreciated. Thanks, Andy
using CP;
int nj=5;
int nm=2;
int nr=2;
int StkIdx=3;
range Machines = 1..nm;
range Reticles = 1..nr;
tuple par_Job {
int job;
int pt;
int release;
};
{par_Job} par_Jobs ={
<1,5,0>,
<2,5,18>,
<3,5,0>,
<4,5,18>,
<5,5,0>,
<6,5,18>
};
tuple par_J2M2R {
int job;
int mch;
int ret;
};
{par_J2M2R} par_J2M2Rs = {
<1,2,1>,
<2,1,2>,
<3,2,1>,
<3,1,1>,
<4,2,2>,
<5,2,2>,
<6,1,2>
};
int t[1..StkIdx][1..StkIdx]=[
[0, 2, 2],
[2, 0, 2],
[2, 2, 0]
];
tuple t_D {
key int m1;
key int m2;
int dist;
}; {t_D} D;
execute {
for(var m2 in Machines)
D.add(StkIdx, m2, t[StkIdx][m2]);
for(var m1 in Machines) for(var m2 in Machines)
D.add(m1, m2, t[m1][m2]);
};
dvar interval itvJob[j in par_Jobs] size j.pt;
dvar interval itvMach[j2m in par_J2M2Rs] optional;
dvar sequence seqMach[m in Machines]
in all(j2m in par_J2M2Rs: j2m.mch==m) itvMach[j2m]
types all(j2m in par_J2M2Rs: j2m.mch==m) j2m.ret;
dvar sequence seqRet[r in Reticles]
in all(j2m in par_J2M2Rs: j2m.ret==r) itvMach[j2m]
types all(j2m in par_J2M2Rs: j2m.ret==r) j2m.mch;
dexpr int Cmax = max(j in par_Jobs) endOf(itvJob[j]);
execute {
cp.param.LogVerbosity=21;
cp.param.LogPeriod = 1000000;
cp.param.TimeLimit = 2;
}
minimize Cmax;
subject to {
forall(j in par_Jobs)
startOf(itvJob[j]) >= j.release;
forall (j in par_Jobs)
alternative(itvJob[j], all(j2m in par_J2M2Rs: j2m.job==j.job) itvMach[j2m]);
forall(m in Machines)
noOverlap(seqMach[m]);
forall(r in Reticles)
noOverlap(seqRet[r],D);
}
#DecisionOptimization#OPLusingCPOptimizer