<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Emily,<br>
      <br>
      it looks like in the second log file, no restart is performed at
      all. As far as I can see in your code snippet, you did not
      deactivate the pricer using SCIPdeactivatePricer(), but just
      internally set a flag such that it always just returns.<br>
      <br>
      However, with an active pricer, restarts are not allowed, so SCIP
      just does not do a restart ("number of runs" is 1) and just
      continues solving. This was changed compared to the old mails you
      are referencing. Therefore, you do not do presolving again, and if
      you did not set the result pointer to SCIP_SUCCESS before
      returning in the pricer while it is pseudo-deactivated, SCIP might
      even not be able to use the node LP relaxation values as lower
      bound (because your pricer returns SCIP_DIDNOTRUN by default,
      meaning that there might still be improving columns and the dual
      bound must not be used).<br>
      <br>
      The problem is that you are currently not allowed to deactivate a
      pricer during solving. You could try to change this by changing
      line 5048 in src/scip/scip.c from<br>
         SCIP_CALL( checkStage(scip, "SCIPdeactivatePricer", FALSE,
      TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
      FALSE, TRUE, FALSE, FALSE) );<br>
      to<br>
         SCIP_CALL( checkStage(scip, "SCIPdeactivatePricer", FALSE,
      TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE,
      FALSE, TRUE, FALSE, FALSE) );<br>
      (set the fifth-last parameter to TRUE). However, I'm not
      completely sure if deactivating a pricer during solving may
      corrupt internal data structures.<br>
      <br>
      If you run into any troubles after the change, please try the
      following:<br>
      In src/scip/solve.c lines 3605 and 3609, change <br>
      "set->nactivepricers == 0" to "(set->nactivepricers == 0 ||
      stat->userrestart)".<br>
      <br>
      This will allow a user restart even if pricers are active. Then,
      you need to follow the advice given in the old mail and implement
      the exitsol callback to change the modifiable flags and deactivate
      your pricer.<br>
      <br>
      Best,<br>
      Gerald<br>
      <br>
      On 01.09.2015 17:50, Aao Du wrote:<br>
    </div>
    <blockquote
cite="mid:CAEa_GvO4BPk2+uE_YjAyj_Ndnj9Ry2AvHOqgv2QhPihZ7faTQQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>Hi Jakob,<br>
          </div>
          <div><br>
          </div>
          I have attached the log files. For the instance solved by the
          first method, the log file is for the second part of the
          solving process where the final master problem is fed to SCIP.
          (So the time does not include the root node time)<br>
          For the instance solved by the second method, the solving time
          does include the root node time (which is around ~100
          seconds).<br>
        </div>
        <div>Note that in larger instances. the difference become more
          significant. <br>
        </div>
        <div><br>
        </div>
        <div>Just to check whether the way I am doing is correct. In the
          scip_redcost method, I have the following code lines at the
          beginning: <br>
        </div>
        <div>if(SCIPgetDepth(scip) == 1)<br>
        </div>
        <div>    Change the modifiable flag of the constraints, and<br>
              SCIPrestartSolve(scip)<br>
        </div>
        <div>    isrestart = true;   (isrestart is a pricer variable
          which is initialized to false) <br>
        </div>
        <div>    return SCIP_OKAY<br>
        </div>
        <div>if (isrestart)<br>
        </div>
        <div>    return<br>
          <br>
          <br>
        </div>
        <div>In the previous emails, it was instructed to change the
          flag of constraints at the scip_exitsol method, but that
          method is not entered until the mixed integer master problem
          is solved optimally. So trying that did not work either. (<a
            moz-do-not-send="true"
            href="http://listserv.zib.de/pipermail/scip/2011-September/000754.html"><a class="moz-txt-link-freetext" href="http://listserv.zib.de/pipermail/scip/2011-September/000754.html">http://listserv.zib.de/pipermail/scip/2011-September/000754.html</a></a>)<br>
        </div>
        <div><br>
        </div>
        <div>Emily<br>
        </div>
        <br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, Sep 1, 2015 at 3:41 AM, Jakob
          Witzig <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:witzig@zib.de" target="_blank">witzig@zib.de</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Emily,<br>
            <br>
            probably the presolving in the second case is finished
            earlier because [i] presolving after a restarts is reduced
            (but I'm not sure) [ii] the presolver itself remember that
            they could not find anything (because your constraints were
            modifiable) and they do not run.<br>
            <br>
            If you want, you can send me your two log-files and I will
            have a look at it.<br>
            <br>
            Best,<br>
            Jakob<span class=""><br>
              <br>
              On 08/31/15 15:57, Aao Du wrote:<br>
            </span>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex"><span
                class="">
                Hi Jacob,<br>
                <br>
                I believe I did not explain my question well. Here are
                the two methods I<br>
                have tried:<br>
                1) Solve the master problem at the root node. Change the
                variables type<br>
                and write it as an lp file.Then solve the MIP separately
                with SCIP.<br>
                2) Define the variables as integer from the beginning.
                After the root<br>
                node, restart the scip and change the modifiable flag of
                constraints.<br>
                <br>
                Now these two methods solve in two significantly
                different solution<br>
                time. From the log files, I figured the number of
                variables in the final<br>
                master problem is decreased in the first method after
                presolving by<br>
                SCIP. However, in the second method, after the scip is
                restarted(which I<br>
                think does the presolving too), the number of variables
                stay the same.<br>
                I would appreciate if you can help me figure out the
                reason<br>
                <br>
                Thanks,<br>
                Emily<br>
                <br>
                On Mon, Aug 31, 2015 at 4:19 AM, Jakob Witzig <<a
                  moz-do-not-send="true" href="mailto:witzig@zib.de"
                  target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:witzig@zib.de">witzig@zib.de</a></a><br>
              </span>
              <div>
                <div class="h5">
                  <mailto:<a moz-do-not-send="true"
                    href="mailto:witzig@zib.de" target="_blank">witzig@zib.de</a>>>
                  wrote:<br>
                  <br>
                      Hi Jens,<br>
                  <br>
                      what do you mean was 'differ in the results'? Only
                  solving time and<br>
                      nodes? The problem is, that the variable order can
                  change if you<br>
                      write the problem is an lp file. You can try to
                  write your problem<br>
                      as an mps or cip file.<br>
                  <br>
                      If you want, you can send me the log-files
                  including the statistics<br>
                      of the two solves (1: copy into a subscip, 2:
                  write as an lp and<br>
                      solve separately) and I will have a look on it.<br>
                  <br>
                      Best,<br>
                      Jakob<br>
                  <br>
                  <br>
                      On 08/31/15 08:33, Jens Leoff wrote:<br>
                  <br>
                          Hi,<br>
                  <br>
                          I also tried to write a heuristic to solve my
                  Branch & Price<br>
                          problem as<br>
                          Price & Branch. I tried to copy the node
                  problem to a subscip<br>
                          where I<br>
                          change the constraints to be non-modifiable.
                  Apart from that the<br>
                          scips<br>
                          differ in what plugins are included (no
                  pricer, but e.g.<br>
                          separators).<br>
                          However, I also wasn't able to produce the
                  same results this way<br>
                          as one<br>
                          can obtain by writing the node problem as a
                  MIP and solving this<br>
                          separately with scip.<br>
                  <br>
                          I guess this kind of heuristic would be
                  interesting for lots of<br>
                          Branch &<br>
                          Price applications.<br>
                          So, I would like to know how to do this
                  properly as well.<br>
                  <br>
                          Best,<br>
                  <br>
                          Jens<br>
                  <br>
                  <br>
                </div>
              </div>
              <div>
                <div class="h5">
                          On <a moz-do-not-send="true"
                    href="tel:31.08.2015%2008" value="+13108201508"
                    target="_blank">31.08.2015 08</a>
                  <tel:31.08.2015%2008>:06, Jakob Witzig wrote:<br>
                  <br>
                              Hi Emily,<br>
                  <br>
                              you can use the method SCIPvarChgType to
                  convert the<br>
                              variables into<br>
                              integers, but the method can only be
                  called if the variables<br>
                              are not<br>
                              part of the problem, e.g., before you call<br>
                              SCIPtransformProb. Do you<br>
                              use sub-SCIPs to solve your subproblems?
                  If yes, than you<br>
                              can call the<br>
                              method mentioned above before you start
                  solving the subproblem.<br>
                  <br>
                              I don't get the connection between your
                  two ways. Why is<br>
                              changing the<br>
                              variables and changing the modifiability
                  flag of the constraint<br>
                              equivalent?<br>
                  <br>
                              If you restart your problem SCIP tries to
                  transform cuts<br>
                              into globally<br>
                              valid constraints and will fix all
                  variables that have equal<br>
                              global<br>
                              upper and lower bounds, i.e., the
                  variables can removed from the<br>
                              problem. Hence, if you could not tighten
                  the bounds of your<br>
                              variables<br>
                              enough or you didn't found global valid
                  cuts a restart<br>
                              directly after<br>
                              the root will give you the same problem as
                  before.<br>
                  <br>
                              I think changing the flags of a constraint
                  should be done<br>
                              before you<br>
                              start solving your subproblem.<br>
                  <br>
                              Best,<br>
                              Jakob<br>
                  <br>
                  <br>
                              On 08/31/15 04:38, Aao Du wrote:<br>
                  <br>
                                  Dear all,<br>
                  <br>
                                  I have a decomposed model, a master
                  problem and<br>
                                  subproblems. I am trying<br>
                                  to perform pricing only at the root
                  node, and then<br>
                                  change the variables<br>
                                  to integer and solve it again. I have
                  tried two ways.<br>
                                  One is to print<br>
                                  the lp format of the problem after
                  root node, with<br>
                                  variables as integer,<br>
                                  and give it to SCIP binaries. In this
                  way, the second<br>
                                  part of the<br>
                                  solving process ( solving the final
                  master problem with<br>
                                  binaries) is<br>
                                  performed fast.<br>
                                  The other way, is to define the
                  variables as integer<br>
                                  from begining, and<br>
                                  stop pricing at the root node, and
                  change the constarints to<br>
                                  unmodifiable. In this way, after the
                  lp of master<br>
                                  problem is solved, it<br>
                                  takes way more than the first method
                  to solve it.<br>
                                  Following a previous<br>
                                  email, I tried to restart the master
                  problem after root<br>
                                  node, but it did<br>
                                  not make any change in the time. I
                  thought maybe i am<br>
                                  doing sth wrong.<br>
                                  What is the proper place in the
                  pricerobj to change the<br>
                                  modifiable flag<br>
                                  of constraints? I think it should be
                  somewhere before<br>
                                  redcost, or maybe<br>
                                  in it.<br>
                  <br>
                                  Sorry for the long email.<br>
                  <br>
                                  Thanks,<br>
                                  Emily<br>
                  <br>
                  <br>
                                 
                  _______________________________________________<br>
                                  Scip mailing list<br>
                </div>
              </div>
                              <a moz-do-not-send="true"
                href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a>
              <mailto:<a moz-do-not-send="true"
                href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a>><span
                class=""><br>
                                <a moz-do-not-send="true"
                  href="http://listserv.zib.de/mailman/listinfo/scip"
                  rel="noreferrer" target="_blank">http://listserv.zib.de/mailman/listinfo/scip</a><br>
                <br>
                <br>
                <br>
                <br>
                <br>
                <br>
                    --<br>
                    Jakob Witzig<br>
                <br>
                    Konrad-Zuse-Zentrum für<br>
                    Informationstechnik Berlin (ZIB)<br>
                <br>
                    Division Mathematical Optimization and Scientific
                Information<br>
                    Research Group Mathematical Optimization Methods<br>
                <br>
                    Takustrasse 7<br>
                    14195 Berlin<br>
                <br>
              </span>
                  Tel. : <a moz-do-not-send="true"
                href="tel:%2B49%20%280%2930%2084185-416"
                value="+493084185416" target="_blank">+49 (0)30
                84185-416</a> <tel:%2B49%20%280%2930%2084185-416><br>
                  Fax  : <a moz-do-not-send="true"
                href="tel:%2B49%20%280%2930%2084185-269"
                value="+493084185269" target="_blank">+49 (0)30
                84185-269</a> <tel:%2B49%20%280%2930%2084185-269><br>
                  email: <a moz-do-not-send="true"
                href="mailto:witzig@zib.de" target="_blank">witzig@zib.de</a>
              <mailto:<a moz-do-not-send="true"
                href="mailto:witzig@zib.de" target="_blank">witzig@zib.de</a>><br>
                  _______________________________________________<br>
                  Scip mailing list<br>
                  <a moz-do-not-send="true" href="mailto:Scip@zib.de"
                target="_blank">Scip@zib.de</a> <mailto:<a
                moz-do-not-send="true" href="mailto:Scip@zib.de"
                target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:Scip@zib.de">Scip@zib.de</a></a>><br>
                  <a moz-do-not-send="true"
                href="http://listserv.zib.de/mailman/listinfo/scip"
                rel="noreferrer" target="_blank">http://listserv.zib.de/mailman/listinfo/scip</a><br>
              <br>
              <br>
            </blockquote>
            <div class="HOEnZb">
              <div class="h5">
                <br>
                <br>
                -- <br>
                Jakob Witzig<br>
                <br>
                Konrad-Zuse-Zentrum für<br>
                Informationstechnik Berlin (ZIB)<br>
                <br>
                Division Mathematical Optimization and Scientific
                Information<br>
                Research Group Mathematical Optimization Methods<br>
                <br>
                Takustrasse 7<br>
                14195 Berlin<br>
                <br>
                Tel. : <a moz-do-not-send="true"
                  href="tel:%2B49%20%280%2930%2084185-416"
                  value="+493084185416" target="_blank">+49 (0)30
                  84185-416</a><br>
                Fax  : <a moz-do-not-send="true"
                  href="tel:%2B49%20%280%2930%2084185-269"
                  value="+493084185269" target="_blank">+49 (0)30
                  84185-269</a><br>
                email: <a moz-do-not-send="true"
                  href="mailto:witzig@zib.de" target="_blank">witzig@zib.de</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>