Originally posted by: stathis_d
Hello guys,
I am wondering if there is a way to write a nested conditional expression on opl. I am trying to formulate the following:
forall (t in Period:t<g) , forall (v in Vehicles), forall (j in Destinations), forall (<v,g , capacity> in available :(v in Vehicles), (g in Period))
if x[j][v][t] =1 then c[v][g]=0 except if capacity>0 then c[v][g]=capacity
x[j][v][t] is a binary variable, c[v][g] is variable capacity and capacity is given. I am trying to avoid to use the capacity of a truck in the next period if it has already been used one period before except if it seems available in the data for a future period.
Regards
#DecisionOptimization#OPLusingCPLEXOptimizer