Kipp - the example you sent finds the optimal solution after a few passes of pricing and therefore never calls the cut generator. By default, the PC solver, in the root node starts with pricing, and does not stop until it prices out (or finds optimal, or within gap limits). <br>
<br>If it prices out and has not yet found optimal, then it will proceed to cuts. <br><br>This is parameter driven.<br><br><br>You'll see in the log file (LogDebugLevel = 3), <br>PRICE_AND_CUT LimitRoundCutIters 2147483647<br>
PRICE_AND_CUT LimitRoundPriceIters 2147483647<br><br>This is the number of Price/Cut iterations to take before switching off (i.e., MAXINT).<br><br>To force it to cut before pricing out, change this parameter in the parm file. For example, if you change to :<br>
<br>[DECOMP]<br>LimitRoundPriceIters = 1<br>LimitRoundCutIters = 1<br><br>It will then go into your generateCuts after one pricing iteration.<br><br><br><br><br><br><br><br><div class="gmail_quote">On Tue, Oct 5, 2010 at 7:24 PM, Kipp Martin <span dir="ltr"><<a href="mailto:kmartin@chicagobooth.edu">kmartin@chicagobooth.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi:<br>
<br>
The class DecompApp has a virtual function<br>
<br>
<br>
virtual int generateCuts(const double * x,<br>
DecompCutList & newCuts);<br>
<br>
<br>
I have implemented this function in a class that derives from DecompApp.<br>
When solving an integer program that has an integer LP relaxation<br>
value, generateCuts() does not get called. This seems like a potential<br>
problem for routing problems where I might want generateCuts() to<br>
generate subtour elimination constraints. It is possible to have an<br>
integer solution and a subtour so I want generateCuts called even with<br>
an integer solution.<br>
<br>
Indeed, in the sample code, TSP_DecompApp.cpp I see the implementation<br>
of generateCuts() calls in turn generateCutsSubtour(). But will<br>
generateCuts() get called if there is an integer solution? It seems like<br>
it should, yet I have an example where generateCuts() is not being<br>
called when the LP is integer.<br>
<br>
Thanks<br>
<br>
</blockquote></div><br>