<div dir="ltr"><div><div>John,<br><br>
      >In trunk stand-alone cbc does seem to write SOS information<br><br></div>I think one of the reason for the SOS information not being written is because I am writing from a problem in OsiXxxSolverInterface, which does not have the SOS added to it. The SOS are in a CbcModel, but I can't find anyway of writing out LP or MPS file for this class. Can it be done?<br><br></div>--Kish<br><br><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 19, 2018 at 4:36 PM, John Forrest <span dir="ltr"><<a href="mailto:john.forrest@fastercoin.com" target="_blank">john.forrest@fastercoin.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div class="m_498719028866091292moz-cite-prefix">Kish,<br>
      <br>
      In trunk stand-alone cbc does seem to write SOS information - I
      think I did something a few months ago to make it do that - but I
      can't remember what it was!<br>
      <br>
      I am always interested in why Cbc is not doing well with SOS - if
      you feel you can send me the file, I can look at why it is taking
      so long.<span class="HOEnZb"><font color="#888888"><br>
      <br>
      John <br></font></span><div><div class="h5">
      On 19/02/18 15:36, Kish Shen wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      
      <div dir="ltr">
        <div>
          <div>
            <div>John,<br>
              <br>
            </div>
            Many thanks for your fix. I have downloaded abd copied the
            CoinLpIO files as you suggested, and it does seem to work
            with the LP file -- I had to reintroduce the spaces, as I
            had edited the file to remove the spaces so that Cbc can
            read the file.<br>
            <br>
          </div>
          On a somewhat related topic, I think the SOS information is
          not included in a LP or MPS formatted file written by Cbc (I
          assume via CoinUtils again). Is there anyway to include them,
          or is that not currently supported?<br>
          <br>
          This was in fact the reason I was reading a LP file written by
          CPLEX, as the file written by Cbc did not include the SOS
          information. I was trying to compare a problem that CPLEX
          solved much faster than Cbc - under 10 seconds compared to
          something like 30,000 seconds for Cbc.<br>
          <br>
        </div>
        <div>Thanks again!<br>
          <br>
        </div>
        <div>Kish<br>
          <br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Sun, Feb 18, 2018 at 7:40 PM, John
          Forrest <span dir="ltr"><<a href="mailto:john.forrest@fastercoin.com" target="_blank">john.forrest@fastercoin.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote">
            <div>
              <div class="m_498719028866091292m_-3232761942460507219moz-cite-prefix">Kish,<br>
                <br>
                This was more difficult to fix than I expected.  The
                coding for readLp uses fscanf("%s") which is totally
                dependent on space as a separator. <br>
                <br>
                I think I have fixed in trunk (you can just copy over
                CoinLpIO.?pp to stable.  I have tried it on all the .lp
                files I have - which is not that many.  Some files had
                lines with more than 100K characters which caused some
                problems.<br>
                <br>
                Please can people check I have not introduced any bugs. 
                Also if you want any other cosmetic changes - now is the
                time to ask for them.<br>
                <br>
                John Forrest
                <div>
                  <div class="m_498719028866091292h5"><br>
                    On 16/02/18 11:51, Kish Shen wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="m_498719028866091292h5">
                    <div dir="ltr">
                      <div>
                        <div>Hi,<br>
                          <br>
                        </div>
                        I posted about this to coin-discuss mailing list
                        yesterday, but it has not appear there, and
                        there seems to be no messages for the list since
                        Sept 2017, so I am posting this here as well, in
                        case something is wrong with the coin-discuss
                        mailing list.<br>
                        <br>
                        I am getting errors from Cbc when reading an LP
                        format file generated by CPLEX 12:<br>
                        <br>
                        ### CoinLpIO::readLp(): bad SOS item S1<br>
                        <br>
                        I assume this is from reading the SOS items in
                        the LP file like:<br>
                        <br>
                         s999:  S1 ::  x1154 : 1  x5539 : 2<br>
                        <br>
                        Looking at CoinLpIO.cpp, the code expects no
                        space between S1 and ::<br>
                        <br>
                                    if
                        (next>=buff&&(!strncmp(next,"S<wbr>1::",4)||!strncmp(next,"S2::",<wbr>4)))
                        {<br>
                                      setType = next[1]-'0';<br>
                                      gotStart=true;<br>
                                    } else {<br>
                                      // error<br>
                                      goodLine=0;<br>
                                    }<br>
                        <br>
                        <div>I edited the LP file and changed all the
                          'S1 ::' to 'S1::', and I then got errors about
                          x1154: repeatedly.<br>
                        </div>
                        <div>So it looks like the error handling does
                          not advance to the next line after finding an
                          error.<br>
                          <br>
                        </div>
                        <div>I edited removed all the spaces before ':'
                          for the SOS items, and the file was then read
                          without errors.<br>
                        </div>
                        <div> <br>
                        </div>
                        <div>Should ReadLp be changed to read the SOS
                          items generated by CPLEX with the extra
                          spaces?<br>
                          <br>
                        </div>
                        I am running the latest stable branch of Cbc
                        2.9, downloaded via svn co about 2 days ago.<br>
                        <br>
                      </div>
                      <div>Thanks and cheers,<br>
                        <br>
                      </div>
                      <div>Kish<br>
                        <br>
                      </div>
                    </div>
                    <br>
                    <fieldset class="m_498719028866091292m_-3232761942460507219mimeAttachmentHeader"></fieldset>
                    <br>
                  </div>
                </div>
                <pre>______________________________<wbr>_________________
Cbc mailing list
<a class="m_498719028866091292m_-3232761942460507219moz-txt-link-abbreviated" href="mailto:Cbc@list.coin-or.org" target="_blank">Cbc@list.coin-or.org</a>
<a class="m_498719028866091292m_-3232761942460507219moz-txt-link-freetext" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_mailman_listinfo_cbc&d=DwMDaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=hUwLPdHoUFhiZJnIH9lsq5WI66yqeNZGH_bh0U52-6Y&m=PTVwK7gCQ94nEgK5tqlJ5itu74UVQngOuy0Y4Nocyv0&s=v8v1KeZXn8bgawzs5cud59QfTf6HUrYGnA3_Bc0lyGM&e=" target="_blank">https://list.coin-or.org/mailm<wbr>an/listinfo/cbc</a>
</pre>
              </blockquote>
              <p><br>
              </p>
            </div>
            <br>
            ______________________________<wbr>_________________<br>
            Cbc mailing list<br>
            <a href="mailto:Cbc@list.coin-or.org" target="_blank">Cbc@list.coin-or.org</a><br>
            <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_mailman_listinfo_cbc&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=hUwLPdHoUFhiZJnIH9lsq5WI66yqeNZGH_bh0U52-6Y&m=PTVwK7gCQ94nEgK5tqlJ5itu74UVQngOuy0Y4Nocyv0&s=v8v1KeZXn8bgawzs5cud59QfTf6HUrYGnA3_Bc0lyGM&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=https-3A__list.co<wbr>in-2Dor.org_mailman_listinfo_<wbr>cbc&d=DwICAg&c=Ngd-ta5yRYsqeUs<wbr>EDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&<wbr>r=hUwLPdHoUFhiZJnIH9lsq5WI66yq<wbr>eNZGH_bh0U52-6Y&m=PTVwK7gCQ94n<wbr>EgK5tqlJ5itu74UVQngOuy0Y4Nocyv<wbr>0&s=v8v1KeZXn8bgawzs5cud59QfTf<wbr>6HUrYGnA3_Bc0lyGM&e=</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="m_498719028866091292mimeAttachmentHeader"></fieldset>
      <br>
      <pre>______________________________<wbr>_________________
Cbc mailing list
<a class="m_498719028866091292moz-txt-link-abbreviated" href="mailto:Cbc@list.coin-or.org" target="_blank">Cbc@list.coin-or.org</a>
<a class="m_498719028866091292moz-txt-link-freetext" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_mailman_listinfo_cbc&d=DwMDaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=hUwLPdHoUFhiZJnIH9lsq5WI66yqeNZGH_bh0U52-6Y&m=TslMSZNCcK2uXDEYYQND8SK3sZBd2LD4hr88cXsTii8&s=AXJUFPQIZ3uCackr6PZukKAdWeWIuUr4-itO76DQXJk&e=" target="_blank">https://list.coin-or.org/<wbr>mailman/listinfo/cbc</a>
</pre>
    </blockquote>
    <p><br>
    </p>
  </div></div></div>

<br>______________________________<wbr>_________________<br>
Cbc mailing list<br>
<a href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_mailman_listinfo_cbc&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=hUwLPdHoUFhiZJnIH9lsq5WI66yqeNZGH_bh0U52-6Y&m=TslMSZNCcK2uXDEYYQND8SK3sZBd2LD4hr88cXsTii8&s=AXJUFPQIZ3uCackr6PZukKAdWeWIuUr4-itO76DQXJk&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=https-3A__list.<wbr>coin-2Dor.org_mailman_<wbr>listinfo_cbc&d=DwICAg&c=Ngd-<wbr>ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLx<wbr>WPA_2Wlc4&r=<wbr>hUwLPdHoUFhiZJnIH9lsq5WI66yqeN<wbr>ZGH_bh0U52-6Y&m=<wbr>TslMSZNCcK2uXDEYYQND8SK3sZBd2L<wbr>D4hr88cXsTii8&s=<wbr>AXJUFPQIZ3uCackr6PZukKAdWeWIuU<wbr>r4-itO76DQXJk&e=</a><br>
<br></blockquote></div><br></div></div></div></div>