I have a series of jobs. For each job I have a series of operations and each operation requires a machine. But there are some operations that have the ability to choose multiple machines.
Ex:
job 1: operation 1 machine 4 operation 2 machine 2 operation 3 (machine 2 or machine 3)
I have a binary decision variable Y (ijm) where i is the operation, j the job and m the machine.
What must happen is that Y(114) = 1, Y (212) = 1 but for operation 3 we have two choices Y(312) = 0 and Y(313) = 1 or the opposite.
How can I implement it on Cplex? I can't find a way.
CodePudding user response:
You could use a logical constraint like
((x==2) && (y==1)) || ((x==1) && (y==2));
in OPL
but you could also have a look at CPOptimizer within CPLEX because your model looks like a scheduling problem.
regards