I'm new to CPLEX, I wonder how to define decision variables like xijk
but only those with subscript i < j
or i ≠ j
using OPL.
The code is like
int jobsNum = ...;
int machinesNum = ...;
range jobs = 0..jobsNum-1
range machines = 0..machinesNum-1;
dvar boolean x[jobs][jobs][machines];
x[jobs][jobs][machines]
is the relative processing sequence of job i and job j on machine k, but if I put it like this it will introduce some redundant variables, so I wonder if I can write something like
dvar boolean x[i in jobs][j in jobs: j < i][machines];