Originally posted by: clemsonmacrone
I am getting the message Error 1217 No Solution Exists but I know that there is a solution. I am working on a large sparse lp problem that optimizes a small subset of the constraints and then adds in violated constraints of the larger model and resolves. If I solve the full model then a feasible solution is found but when I add constraints to the previously solved smaller model I get the error. In addition if I build a new model with the constraints of the smaller model and the constraints that I wish to add, then it will work. However, this does not take advantage of the previous models basis which is the whole reason that I am solving it like this. I am using cplex 12.5 and running the code with python. Any help would be greatly appreciated.
This gives me the error that no solution exists (error occurs when I add new constraints to the model):
create a model with only a small amount of the constraints of the larger model
turn off dual reductions and allow only linear reductions in preprocessing
solve the model
while constraints of the larger model are violated:
add the violated constraints to the model
solve the model
However this does work:
create a model with only a small amount of the constraints of the larger model
create a copy of the model
solve the model
while constraints of the larger model are violated in the model:
add the violated constraints to the copy of the model
set the model equal to a copy of the copy of the model
solve the model
And this also works:
create the full model
solve the full model
#CPLEXOptimizers#DecisionOptimization