Originally posted by: SystemAdmin
[prubin said:]
[quote author=elisa link=topic=1399.msg3889#msg3889 date=1254561924]
I'm using C++ API, the version of CPLEX is 12.1, but AddMIPStart should exist also in 11.0.
Perhaps, but if so it's undocumented (I can't find it in the 11.0 manuals).
[quote author=elisa link=topic=1399.msg3889#msg3889 date=1254561924]
The instance of cplex that I invoked extract all variables in var, so var[0], var[1] ... until var[n].
... unless there's a bug in the code somewhere, so that it's not extracting everything you think it's extracting. For instance, for n=3, var[1] is an array of 3 variables; are all three (var[1][0], var[1][1], var[1][2]) used in the model?
You might try surrounding the code that extracts and solves the model with a try-catch, catching exceptions of class IloAlgorithm::NotExtractedException. If e is the exception, then e.getExtractable() should reference whatever it is that CPLEX thinks has not been extracted, and e.getExtractable().getName() should give you it's name (if you named it -- so I would name everything in sight).
[quote author=elisa link=topic=1399.msg3889#msg3889 date=1254561924]
To move around the problem I was thinking to write the matrix var as an array with n[sup]2[/sup] elements, use AddMIPStart on it, and then transform it in a matrix, but I don't know if variables keep information given by AddMIPStart during the "transformation" from array mono-dimensional to bi-dimensional, and further I use this function a lot of times, so this kind of approach is not optimum.
I do not foresee a problem with "vectorizing" the matrix, but I would be surprised if it cured the problem. I think you need to identify what is not being extracted (if in fact that is what the message means).
/Paul
#CPLEXOptimizers#DecisionOptimization