Originally posted by: Slater_jm
Hi , not sure if u did this, but u should use index numbers for the variables instead of names when u add them to the constraints, that decreases the execution time a lot. U could make a dictionary for that like
fromnametoindx = { n : j for j, n in enumerate(c.variables.get_names()) } and then when u start appending variables to "thevars" for the constraints ,use thevars.append(fromnametoindx [varnames]) instead of thevars.append(varnames).
Other thing u could try is to cythonize the model formulation, but I dont think that could reduce the execution time so much, maybe it could speed up the creation of the names of your variables
#CPLEXOptimizers#DecisionOptimization