Originally posted by: p_arias
Hi there,
So I am currently working on a model that takes between 2min and 30min to build. My idea is to use a heuristic to build an initial solution and then destroy part of it and use CPLEX to optimize the destroyed part.
1) I thought about building the model, write it in a .lp file and call it in each iteration, bounding each variable to the value it corresponds and leave the rest unbounded. For example: x_1 UB=1, LB=1. X_2, LB = 0, UB = 1. X_1 is set to be 1 and then CPLEX will find the value for x_1. The problem with this is that when I try to set the bounds or initialize part of the solution when reading from a file is not straightforward as variable names and the order of them is quite messy (or I don't know how to properly do it). To do so, I use a code someone poseted in this forum about extracting variables from an .lp file.
2) I want to build the model ONCE, and then iteratevily change the bounds and solve the problem, storing the solution. ine ach iteration Then I wouldn't need to build the model and only change the bounds of variables in each iteration. Is this possible? How would you do it? I know you can add cuts but in each iteration the prior ones should be removed and new ones added, that is what is confusing me a bit about this approach.
Kind regards,
Pol
#CPLEXOptimizers#DecisionOptimization