Originally posted by: Suryahatmaja
Dear all,
I have question about fixing variable values.
For example, I have a model with 20 variables x.
I do the step like this:
1. Solve the model and stop in the first feasible solution.
2. with that result, I add new constraint that set some (i.e. 10) variables x (random selection) to the existing result.
3. Solve again and search the first feasible improve solution.
Is this method is correct or is there any method in cplex to do this? I'm using Concert C++.
In the selection of variable x, for example, I want to select 10 variables to be fixed, and the remaining will be searched. In the variable to be searched, I have criteria to select: 5 from the worst (from the existing) and 5 from the best value.
So I need to sort the previous result, then take the 5 best and worst value each. How to sort the previous value of the cplex array? Or is there any other method to do the selection (without sorting it)?
thank you for the help...
regards,
#CPLEXOptimizers#DecisionOptimization