Dear santi,
When I use your model with opl 12.9.0 I get some errors:
*** ERROR[GENERATE_102]: Index out of bound for array "interv(4)": 0.
*** ERROR[GENERATE_103] at 44:36-63 model.mod: OPL cannot extract expression: endOf(interv[j][limite[j]]).
*** ERROR[GENERATE_103]: OPL cannot extract expression: max(j in 1..6) endOf(interv[j][limite[j]]).
*** ERROR[GENERATE_103]: CP cannot extract expression: max(j in 1..6) endOf(interv[j][limite[j]]).
*** ERROR[GENERATE_103]: CP cannot extract expression: makespan_tot.
*** ERROR[GENERATE_103]: CP cannot extract expression: makespan_tot.
*** ERROR[GENERATE_103] at 47:1-22 model.mod: CP cannot extract expression: minimize makespan_tot.
*** ERROR[GENERATE_103]: CP cannot extract expression: model model {
minimize makespan_tot;
forall(j in 1..6) (forall(op in 1..6: op < limite[j]) endBeforeStart(interv[j][op], interv[j][op+1], 0)
);
forall(m in 1..6) nooverlap(maq_secuenc[m]);
}
which is I think a consequence of the incompletely specified matrix O. 'interv' construction will hit unspecified array elements as it scans all matrix the indices. It seems that the latest version of opl detects this kind of problem and you would benefit by switching to it (12.6.0 is pretty old now).
Also, instead of adding a machine, it is better to use a cumul expression constrained to a capacity (>1) (cf. the sched_rcpsp example of the distribution).
I hope this helps.
Renaud
#DecisionOptimization#Support#SupportMigration