I am working on a Column Generation algorithm. After pricing the new variables and calculating the reduced cost, how can I add the new variable and check if my calculated reduced cost is correct according to CPLEX?
When I add the new variable to the model and reoptimize the RMP (Reduced Master Problem), the new variable enters basis, so its reduced cost is 0, which is ok. However, I would like to check the reduced cost calculated by CPLEX before adding the variable.
I'm not sure which of CPLEX's many APIs you are using, but I think the approach you should use is more or less the same. Namely, before reoptimizing the RMP, set an iteration limit of 0 and optimize the RMP with the new columns you have added. Presumably you have the optimal basis from the previous RMP solve at that point. So, with an iteration limit of 0, CPLEX will not bring any of your new columns into the basis. Instead they will be nonbasic, but the optimization with the iteration limit of 0 will give you CPLEX's calculation of all nonbasic reduced costs, including the ones for your newly generated columns.