Originally posted by: SatishA
Hi All,
I am trying to solve a job shop scheduling problem with the following sequence variable and no overlap variable with changeover time.
int taskType[k in PO_TASK_AR_SEQ_ALT_COMB]= k.po;
int taskType2[k in Machine_Shutdown_Details_Comb]= 999;
tuple triplet { int p1; int p2; int time; }
{triplet} tt[m in all_machines] =
{ <t1.po,t2.po,SeqDepSetup[<m,t1.po,t2.po>].time> | t1,t2 in PO_TASK_AR_SEQ_ALT_COMB:
<m,t1.po,t2.po> in Setup_Comb && m==ProdTime[t1].machineindex && m==ProdTime[t2].machineindex} ;
dvar sequence all_sequences[m in all_machines]
in append(all(k in PO_TASK_AR_SEQ_ALT_COMB:m==ProdTime[k].machineindex) all_tasks[k],
all(k1 in Machine_Shutdown_Details_Comb:k1.machineindex==m)all_shutdowns[k1])
types append(all(k in PO_TASK_AR_SEQ_ALT_COMB:m==ProdTime[k].machineindex) taskType[k],
all(k1 in Machine_Shutdown_Details_Comb:k1.machineindex==m) taskType2[k1]);
forall(m in all_machines)
noOverlap(all_sequences[m],tt[m],1);
After solving the problem, I would like to find out between which two tasks, changeover is applied. For that I need to know the sequence variable details like on each machine, task position, next task/previous task. When I printed the following, I could see the details. But how can I access each of it and export this data just like we do for any other integer variable ?
execute{
for(m in all_machines)
writeln("all_sequences: ", all_sequences[m]) };
Please help me out.
Thanks,
Satish
#DecisionOptimization#OPLusingCPOptimizer