Originally posted by: SystemAdmin
I am not able to completely understand your indexes because you mention that d has n*n(n+1)/2 elements, but in your forall statement d's index k, seems to be iterating over n*(n+1)/2 elements. In any case, you may want to use a syntax like the following and see if that works:
forall(i,j in 1..n,k in 1..ftoi(n*(n+1)/2):j>i)
d[k]==abs(x[i] - x[j]);
If you are still having problems, please post your code within {code} tags so that the formatting is maintained.
#DecisionOptimization#OPLusingCPLEXOptimizer