within CPLEX you could try CPOptimizer and use intervals. In OPL (One of CPLEX API) you could write using CP; int sizeT=10; range T=1..sizeT; int d[i in T]=i; dvar interval t[i in T] size d[i]; {int} T1={i | i in T : i <=(sizeT div 2)}; {int} T2=asSet(T) diff T1; subject to { forall(i in T1,j in T2) overlapLength(t[i],t[j])==0; } and then see [![gantt view within CPLEX IDE][1]][1] [1]: https://i.sstatic.net/lKXDU.jpg