<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi,<br>
    <br>
    I'm working to customize my branching rules using a the <b>betterBranch</b>
    method in a class derived from <b>CbcBranchDynamicDecision</b>.<br>
    <br>
    This method has the following signature:<br>
    <b><font color="#000066"><tt>betterBranch(CbcBranchingObject
          *thisOne,<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CbcBranchingObject *bestSoFar,<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double changeUp, int numInfUp,<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double changeDown, int numInfDown)<br>
        </tt></font></b><br>
    To decide which variable to branch I need to check:<br>
    &nbsp; - fractional value which variables take in current LP solution;<br>
    &nbsp; - variable names (some variables are more important than others
    and I can check this by looking at their names.<br>
    <br>
    I think I succeed to check for their names with the following code:<br>
    <b><tt><font color="#000066">&nbsp;&nbsp; OsiSolverInterface *lp =
          thisOne-&gt;model()-&gt;referenceSolver();<br>
          &nbsp;&nbsp; CbcIntegerBranchingObject *ibo =
          dynamic_cast&lt;CbcIntegerBranchingObject *&gt; (thisOne);<br>
          &nbsp;&nbsp; if (ibo)<br>
          &nbsp;&nbsp; {<br>
          &nbsp; &nbsp; &nbsp; int idxInt = ibo-&gt;variable();<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int idxVar =
          ibo-&gt;model()-&gt;integerVariable()[idxInt];<br>
          &nbsp; &nbsp; &nbsp; // name is in lp-&gt;getColName(idxVar)<br>
        </font></tt></b><br>
    To check for the fractional value I though I could pick the value
    in:<br>
    <b><font color="#000066"><tt>&nbsp;&nbsp; lp-&gt;getColSolution()[idxVar]<br>
        </tt></font></b><br>
    But this value appears to be an integer value in many calls - I
    though that only fractional variables where considered for <b>thisOne</b>
    object.<br>
    <br>
    Is this the correct way to get the fractional value of the variable
    ???<br>
    <br>
    <pre class="moz-signature" cols="72">-- 
=============================================================
Haroldo Gambini Santos
Computing Department - Universidade Federal de Ouro Preto - UFOP
email: haroldo [at ] iceb.ufop.br
home/research page: <a class="moz-txt-link-abbreviated" href="http://www.decom.ufop.br/haroldo/">www.decom.ufop.br/haroldo/</a>

</pre>
  </body>
</html>