Ed
For example, I have named integer variables x1,x2,...,xn a name "K[i],
i=1,2,...,n", and integer variables y1,y2,...,yn a name "P[i],
i=1,2,...,n", so how can I extract them seperately because I may have
different heuristic on them.
Thanks a lot!
Best,
The following...
[x for x in model.getVars() if x.VarName.find('binvar') != -1]
...gives you a list of all variables whose names contain the string
'binvar'.