I am trying to implement an optimization algorithm using cplex C++ Concert Technology and I have two questions: 1) Is it possible to use a callback (e.g. a lazy constraint) to change an existing constraint of the problem? From what I understand this is not possible, but I am wondering if there is a work around. 2) Can I add new variables to the model with a callback? Encoding some constraints in my lazy constraint callback would be much more convenient if I could define helper variables. Similar as before, I think it is not possible, but perhaps there are some alternatives. In short, during the callback I can learn some information about the problem and based on this I would like to add some constraints. I have a constraint b = b1 + b2 + .... , but there are exponentially many bi plus I do not know all of them in advance. However, every time I compute a feasible solution I could add one of the bi to the sum that defines b. Clearly there can be a memory blowup here, but I am hoping that I will find a suitable solution before that happens. p.s. One solution that I have is that I can simply abort the current solving, add and modify the constraints, and then call solve() again. This is one possibility, but I assume there is a better way. Thank you in advance! asked 20 Oct '16, 13:42 Emir 
1) It is not possible to change a constraint midsolve, with one exception: you can tighten a constraint, by leaving it in place and piling the tighter version on top of it. For instance, if the original model contains \(a'x \le 20\) and you decide you want \(a'x \le 10\), just add the latter constraint (in a lazy constraint callback) and don't worry about the looser version. 2) No, you cannot add variables midsolve. There are, however, frameworks for doing this (known as branchandprice or branchcutandprice), some of which can use CPLEX as the solver engine. You might want to look at BCP or Symphony. answered 21 Oct '16, 19:49 Paul Rubin ♦♦ Thank you for the information.
(22 Oct '16, 06:52)
Emir
