Originally posted by: SystemAdmin
I have a huge number of variables which are generated and initialized in advance.
Then each subset of this set of variables is used to generate certain subproblem.
In the beginning I generate all the IloRanges needed for each subproblem. These constraints remain the same in all the iterations and only the objective function associated with each subproblem will change.
The first iteration runs fine.
In the next iteration I already have the constraints, I add them to the model and build a new objective function.
when I export the lp file , the variables in the objective function (which are the same variables I used to build my constraints set) appear differently, the names are different and do not appear in any of the constraints. They are totally different vars.
This cause my problem do not terminate to optimality as I have Free variables which are in the objective function and do not appear in any constraints.
I attach an example.
sdp[0][0][1].lp is the one from the first iterations which has optimal solution and the 0.lp is the one from the next iteration which fails.
The only change is that I created another objective with the same set of variables.
All comments are appreciated.
regards
#CPLEXOptimizers#DecisionOptimization