<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Mona,<br>
    <br>
    To enter MIPStart programatically you should call<br>
    <br>
    CbcModel  method<br>
        void setMIPStart( const std::vector< std::pair<
    std::string, double > > &mips ) {<br>
           this->mipStart_ = mips;<br>
        }<br>
    <br>
    MIPstart is used when you an initial feasible solution to enter to
    the solver.<br>
    <br>
    You need to inform shit solution using pairs<br>
    <br>
        variableName   value<br>
    <br>
    variable names are used because the initial solution may be used in
    the pre-processed model (variable indexes change).<br>
    <br>
    You only need to enter the main active decision variables. Auxiliary
    variables are computed if they exist.<br>
    <br>
    Cheers,<br>
    <br>
    Haroldo<br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 11-11-2015 12:38, Mona Rahn wrote:<br>
    </div>
    <blockquote
cite="mid:CAJW3XA+q_c=PzVzMM+-zyjX=v8RTbCywshmMd9LLsEutFgq4xg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>@ John:</div>
        <div>Thanks for your answer.</div>
        <div>Is there a function to save the mipstart (as getMIPStart
          doesn't seem to do it)? And do you have an example about
          mipstart?</div>
        <div>The event handler works perfectly btw! :) Thanks.</div>
        <div><br>
        </div>
        <div>@ Ted, Babak: thank you too!</div>
        <div><br>
        </div>
        <div>Btw, can anybody tell me is the precise difference is
          between</div>
        <div>- hotstart</div>
        <div>- warmstart</div>
        <div>- resolve </div>
        <div>- mipstart?</div>
        <div><br>
        </div>
        <div>Kind regards,</div>
        <div>Mona</div>
        <div><br>
        </div>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Sat, Nov 7, 2015 at 3:46 PM, John
            Forrest <span dir="ltr"><<a moz-do-not-send="true"
                href="mailto:john.forrest@fastercoin.com"
                target="_blank">john.forrest@fastercoin.com</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
              <div text="#000000" bgcolor="#FFFFFF">
                <div>Mona,<span><br>
                    <br>
                    On 06/11/15 13:45, Mona Rahn wrote:<br>
                  </span></div>
                <span>
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div>Hi!<br>
                      </div>
                      <div><br>
                      </div>
                      <div>I have three questions:</div>
                      <div><br>
                      </div>
                      <div>1) I am pretty new in using CBC with C++. Do
                        you have a tip on a good way to start, i.e. a
                        documentation / tutorial / handbook for
                        beginners? Most of the stuff I found online was
                        aimed at a much higher level of knowledge. The
                        documentation link that can be found on the
                        COIN-OR website (<a moz-do-not-send="true"
                          href="https://projects.coin-or.org/Cbc"
                          target="_blank">https://projects.coin-or.org/Cbc</a>
                        at the bottom) doesn't work.</div>
                      <div><br>
                      </div>
                    </div>
                  </blockquote>
                </span> Documentation has never been the strong point of
                Cbc.  It can be useful to invoke cbc and try ? and then
                look at individual options - see 2)<span><br>
                  <br>
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div>2) I have an minimization LP that I resolve
                        several times with different objectives. That
                        is, I solve it, upper bound the unique variable
                        appearing in my first objective function to the
                        calculated value, and set another variable as my
                        objective.</div>
                      <div>Now, my question is: The solver appears to
                        start from scratch every time I call it, but I
                        would like to keep the old solution and start
                        from there. Is there a way to do this? I have
                        seen the warm start in OsiCbcSolverinterface,
                        but I am not sure how to use it.</div>
                      <div><br>
                      </div>
                    </div>
                  </blockquote>
                  <br>
                </span> If you do cbc and then mipstart?? you will see
                that you can save the solution from one run and then use
                it as an input solution to next.<span><br>
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div>3) I would like to have set a time limit that
                        only stops the program if there is already a
                        solution found (which isn't necessarily
                        optimal), but not if it is still searching for a
                        solution. The only time limit I have found is
                        CbcModel::setMaximumSeconds, but this stops the
                        program no matter what. Do you have a solution
                        for this?</div>
                      <div><br>
                      </div>
                    </div>
                  </blockquote>
                  <br>
                </span> You may wish to use the drivers that allow you
                to call cbc as normal but with changes.  Look at
                driver6.cpp.  If you have a driver like that then you
                could check if you have a solution and then stop on
                time.  I would suggest modifying MyEventHandler3::event
                to check if event was treeStatus and solution found and
                too many seconds.<span><font color="#888888"><br>
                    <br>
                    John Forrest<br>
                  </font></span>
                <blockquote type="cite"><span>
                    <div dir="ltr">
                      <div>Thanks a lot in advance.</div>
                      <div><br>
                      </div>
                      <div>Kind regards,</div>
                      <div>Mona</div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </span><span>
                    <pre>_______________________________________________
Cbc mailing list
<a moz-do-not-send="true" href="mailto:Cbc@list.coin-or.org" target="_blank">Cbc@list.coin-or.org</a>
<a moz-do-not-send="true" href="http://list.coin-or.org/mailman/listinfo/cbc" target="_blank">http://list.coin-or.org/mailman/listinfo/cbc</a>
</pre>
                  </span></blockquote>
                <br>
              </div>
              <br>
              _______________________________________________<br>
              Cbc mailing list<br>
              <a moz-do-not-send="true"
                href="mailto:Cbc@list.coin-or.org" target="_blank">Cbc@list.coin-or.org</a><br>
              <a moz-do-not-send="true"
                href="http://list.coin-or.org/mailman/listinfo/cbc"
                rel="noreferrer" target="_blank">http://list.coin-or.org/mailman/listinfo/cbc</a><br>
              <br>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Cbc mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/cbc">http://list.coin-or.org/mailman/listinfo/cbc</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
==================================================
Haroldo Gambini Santos
D.Sc, Computer Science
Universidade Federal de Ouro Preto
<a class="moz-txt-link-freetext" href="http://www.decom.ufop.br/haroldo/">http://www.decom.ufop.br/haroldo/</a></pre>
  </body>
</html>