<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Dear Demetrio,<br>
      <br>
      You do not have to change variable types by yourself. This is what
      the LP relaxation already does for you. The optimization problem
      formulation  that you enter to SCIP should contain the variable
      types that you expect from any feasible solution, i.e.,
      0/1-variables should be declared to be of binary type at the
      creation time of your model.<br>
      <br>
      I recommend you to have a look at <a
        href="http://scip.zib.de/doc/html/RELAX.php">How to Add
        relaxation handlers</a> in the SCIP documentation, and base your
      dynamic programming algorithm on the Relaxation handler interface.
      The basic idea of a customized relaxation handler is that you may,
      at each node, solve your own relaxation of the local node's
      problem. You may use the data structures provided by the LP
      relaxation as a starting point, only copy the relevant
      constraints/rows, and apply your algorithm. If you do not intend
      to solve node LP relaxations at all, you can set the lp/solvefreq
      parameter to -1.<br>
      <br>
      Hope this helps,<br>
      Gregor<br>
      <br>
      <br>
      Am 23.10.2014 um 10:54 schrieb Demetrio Laganą:<br>
    </div>
    <blockquote
cite="mid:CA+n5bEJ9_Rv3wOCPLf=4GD2=JV-rD+J6rSo4VrK5zre9UgurrQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">Dear SCIP list,
        <div>I have a NonLinear 0/1 Programming problem modeled with
          SCIP callable library. I need to use a continuous relaxation
          of such a problem in a dynamic programming algorithm that
          requires to solve it at each status by fixing some variables
          to be binary and other to be equal to 1, moreover some
          constraints belonging to the continuous relaxation must be
          dropped and new constraints added progressively, as well as
          the dynamic system progresses. I have look at the way to fix
          to 1 some continuous variables through SCIPfix Var(), but I
          don't know how to change the type of some continuous variables
          to be binary(SCIP_VARTYPE_BINARY instead of
          SCIP_VARTYPE_CONTINUOUS). Finally, I don't know how to drop o
          make inactive some constraints in a given state of the dynamic
          programming algortihm. Is there a way to do this without
          clearing the model and re-create it at each status?</div>
        <div>Thank you in advance</div>
        <div>Regards</div>
        <div>Demetrio Laganą<br>
          <div><br>
          </div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2014-10-23 0:58 GMT+02:00 Gerald
          Gamrath <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:gamrath@zib.de" target="_blank">gamrath@zib.de</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear
            Andrea,<br>
            <br>
            in SCIP a rounding heuristic basically does the following:<br>
            1) get the current LP solution<br>
            2) round all fractional variables to an integer value<br>
            3) check the resulting solution.<br>
            <br>
            How step 2 is performed influences the probability to find
            feasible solutions and also the running time, that's why
            there are multiple heuristics of this kind in SCIP.<br>
            <br>
            So you are right, no further LPs are solved by the
            heuristic.<br>
            <br>
            If you want to fix some variables, then optimize the
            resulting LP, fix again, solve the LP, and iterate until you
            found an integer feasible solution, you should have a look
            at the diving heuristics in SCIP, which all use this scheme.<br>
            <br>
            Best,<br>
            Gerald<br>
            <br>
            <br>
            Am 22.10.2014 um 19:04 schrieb Andrea Taverna:
            <div class="HOEnZb">
              <div class="h5"><br>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  Dear all,<br>
                  <br>
                  I'm a bit confused on how to implement a "rounding"
                  heuristic.<br>
                  <br>
                  I'm working on a column generation algorithm.<br>
                  Basically my heuristic fixes some fractional binary
                  variables to 0/1 by calling SCIPsetSolVal.<br>
                  <br>
                  What should I do after those fixings to get a feasible
                  solution?<br>
                  <br>
                  >From the examples, e.g. the TSP one, it seems that
                  no LP solver is called explicitly on the working copy
                  of the LP solution to generate a feasible solution .
                  There are just calls to functions like SCIPtrySol or
                  SCIProundSol.<br>
                  <br>
                  So, if I understand correctly, SCIP reoptimizes in
                  some way the working copy of the LP solution to obtain
                  the actual heuristic solution. Is that so?<br>
                  <br>
                  TIA<br>
                  <br>
                  Andrea<br>
                  _______________________________________________<br>
                  Scip mailing list<br>
                  <a moz-do-not-send="true" href="mailto:Scip@zib.de"
                    target="_blank">Scip@zib.de</a><br>
                  <a moz-do-not-send="true"
                    href="http://listserv.zib.de/mailman/listinfo/scip"
                    target="_blank">http://listserv.zib.de/mailman/listinfo/scip</a><br>
                </blockquote>
                <br>
                _______________________________________________<br>
                Scip mailing list<br>
                <a moz-do-not-send="true" href="mailto:Scip@zib.de"
                  target="_blank">Scip@zib.de</a><br>
                <a moz-do-not-send="true"
                  href="http://listserv.zib.de/mailman/listinfo/scip"
                  target="_blank">http://listserv.zib.de/mailman/listinfo/scip</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Scip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Scip@zib.de">Scip@zib.de</a>
<a class="moz-txt-link-freetext" href="http://listserv.zib.de/mailman/listinfo/scip">http://listserv.zib.de/mailman/listinfo/scip</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>