I have the following restriction implemented on CPLEX OPL.
forall (i in N)
forall (j in M)
forall (k in 1..i)
sum(z in 1 ..i)(p[z]*(x[z][j][k]+y[z][j][k])) + (t[k]*max(z in 1 ..i)(x[z][j][k]+y[z][j][k]))<= d[i];
And I already tried to implement it in Docplex (python)but I don't know if it actually works, does anyone know how can I switch the max function from CPLEX OPL to Docplex, or if what I did is ok?
for i in N:
for j in M:
for k in range(i):
mdl.sum((x[(i,j,k)]+y[(i,j,k)])*p[z] for z in range(i))+(t[k]*mdl.max(x[(z,j,k)]+y[(z,j,k)] for z in range(i)) <= d[i]