Dears,
I'm facing a crazy issue in building my optimization problem.
I'm initializing a set of variable named "y" that are indexed by sets "I" and "L" where I=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] and L=[0,1,2,3,4,5,6,7]
I'm doing it with the following expression:
y=model_first.binary_var_dict({(i,l) for i in newFacilities for l in capacityLevels}, name="y")
Today, I updated the version of CPLEX APi and now this code returns me the following errors:
TypeError: 'set' object is not subscriptable
However, if I try to execute the same code on an older CPLEX version, everything is fine.
I tried to understand the problem and it seems that if I reduce the size of my set lower than 12, then everything is fine (e.g. with I=[0,1,2,3,4,5,6,7,8,9,10,11])
I'm using the Academic version of CPLEX, and it shouldn't have any limitations.
Does anyone find the same issue?
------------------------------
Riccardo Aldrighetti
------------------------------
#DecisionOptimization