<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">James,<br>
      <br>
      It was a "minor" bug in CbcSOS where the integer tolerance was
      used when it should be an absolute zero/non-zero.<br>
      <br>
      Hopefully fixed in trunk.  You can just copy over CbcSOS.cpp if
      using stable.<br>
      <br>
      As to "preslope" etc - I am not sure it is worth effort of
      implementing in that way.<br>
      <br>
      The example of -<br>
      <br>
      pwl1: y = x 0.5 (0, 0) (1, 1) (2, 4) 2.0<br>
      <br>
      can be implemented (I hope I haven't made a stupid mistake) as<br>
      <br>
      -y 0.5 xpre + x1 + 4 x2 +2 xpost = 0<br>
      -x + xpre + x0 + x1 + x2 + xpost = 0 <br>
      BOUNDS<br>
      x free<br>
      xpre free<br>
      SOS<br>
      set: S2:: xpre:-10 x0:0 x1:1 x2:2 xpost:10 <br>
      <br>
      John Forrest<br>
      <br>
      On 22/02/18 01:13, James Howey wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:019d01d3ab7a$56e95b50$04bc11f0$@gmail.com">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"DejaVu Sans Mono";
        panose-1:2 11 6 9 3 8 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal">I am modeling a simple piecewise linear
          problem with an sos2:<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">MINIMIZE<o:p></o:p></p>
        <p class="MsoNormal">sol<o:p></o:p></p>
        <p class="MsoNormal">SUBJECT TO<o:p></o:p></p>
        <p class="MsoNormal">-sol + 32000 L1 +0 L2 + 0 L3 = 0<o:p></o:p></p>
        <p class="MsoNormal">-x +0 L1 +32000 L2 + 1E8 L3 = 0<o:p></o:p></p>
        <p class="MsoNormal">L1 + L2 + L3 = 1<o:p></o:p></p>
        <p class="MsoNormal">BOUNDS<o:p></o:p></p>
        <p class="MsoNormal">x = 50000<o:p></o:p></p>
        <p class="MsoNormal">SOS<o:p></o:p></p>
        <p class="MsoNormal">set1: S2:: L1:2 L2:3 L3:4<o:p></o:p></p>
        <p class="MsoNormal">END<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">With the upper bound for x set at 1e8 and
          preprocess on, this comes up proven infeasible.<o:p></o:p></p>
        <p class="MsoNormal">With the upper bound for x set at 1e 8 and
          preprocess off, this comes up with an optimum.<o:p></o:p></p>
        <p class="MsoNormal">With the upper bound for x set at 1e 10 and
          preprocess off, this comes up with an optimum.<o:p></o:p></p>
        <p class="MsoNormal">With the upper bound for x set at 1e 11 and
          preprocess off, this comes up proven infeasible.<o:p></o:p></p>
        <p class="MsoNormal">With the upper bound for x set at 1e7 and
          preprocess on or off, this comes up with an optimum.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">1e7 seems a little small, particularly if
          coefficients are O(1e5). I can work with 1e10, but I believe I
          would miss having preprocess. I would happily apply any fix
          that allowed me to slacken these constraints.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">My larger difficulty is that I don’t know
          how to model the “preslope” and “postslope” attributes as does
          cplex in their PWL section (lp format here):<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"
          style="background:#ECECEC;vertical-align:baseline"><span
            style="font-size:10.0pt;font-family:"DejaVu Sans
            Mono";color:#323232;border:none windowtext
            1.0pt;padding:0in">pwl1: y = x 0.5 (0, 0) (1, 1) (2, 4) 2.0
          </span><span style="font-size:9.0pt;font-family:"DejaVu
            Sans Mono";color:#323232"><o:p></o:p></span></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">My present problem occurs when I try to
          model postslope with an arbitrarily large bound. If there was
          a clever way to do this without the big bound, then all my
          problems would disappear and all my dreams would come true.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Thanks for listening<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">jkh<o:p></o:p></p>
      </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="https://list.coin-or.org/mailman/listinfo/cbc">https://list.coin-or.org/mailman/listinfo/cbc</a>
</pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>