lundi 29 mars 2021

OPL CPLEX If statement usage with boolean

I'm a beginner user of CPLEX OPL. Here is my piece of code:

forall(e in employee, d in day:1<=d<=19, t in task, p in period) (x[e][d][p][t]==0)=>(x[e][d+7][p][t]+x[e][d+8][p][t]+x[e][d+9][p][t]==2);

x[e][d][p][t] is a boolean decision variable. This is a small part of code. Is it okay to write a code like this structure?

I appreciate if you would help me. Have a nice day for all.

Aucun commentaire:

Enregistrer un commentaire