<div dir="ltr"><div><div><div><div>Sorry, I should have included this in my last post:<br><br></div>I get a different error message when I try to read the same LP problem (with no Subject to section) with standalone Cbc:<br><br>[kshn@hermes Eplex]$ /mnt/decisal/third_party/Eclipse_6.2_28/Eplex/Cbc/x86_64_linux/bin/cbc testlp <br>Welcome to the CBC MILP Solver <br>Version: 2.9 <br>Build Date: Feb 12 2018 <br>Revision Number: 2362 <br><br>command line - /mnt/decisal/third_party/Eclipse_6.2_28/Eplex/Cbc/x86_64_linux/bin/cbc testlp (default strategy 1)<br>At line 1 \ENCODING=ISO-8859-1<br>Unknown image \ENCODING=ISO-8859-1 at line 1 of file ./testlp<br>Coin0008I  read with -2 errors<br>There were -2 errors on input<br>Total time (CPU seconds):       0.00   (Wallclock seconds):       0.00<br><br><br></div>Is this because Cbc was unable to recognise the file as LP format due to the missing 'Subject to' section?<br><br></div></div>Kish<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 26, 2018 at 4:50 PM, Kish Shen <span dir="ltr"><<a href="mailto:kish.shen@gmail.com" target="_blank">kish.shen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>I am unable to read the following simple LP file with readLp() using Cbc:<br><br>\ENCODING=ISO-8859-1<br>\Problem name: eclipse<br><br>Minimize<br> obj: - 2 x1 - x2 - x3<br>Bounds<br> 0 <= x1 <= 1<br> 0 <= x2 <= 1<br> 0 <= x3 <= 1<br>SOS<br> s1: S1 ::  x1 : 1  x2 : 2  x3 : 3<br>End<br><br></div><div>I get the message:<br><br>[kshn@hermes Eplex]$ ./cbcreadlp<br> ### ERROR: Change MAX_OBJECTIVES to larger number.<br><br></div><div>I think the message starting from '###' comes from CoinLpIO.cpp, in read_moniom_obj:<br><br>    if (*num_objectives == MAX_OBJECTIVES){<br>       char str[8192];<br>       sprintf(str,"### ERROR: Too many objective functions.\n");<br>       sprintf(str,"### ERROR: Change MAX_OBJECTIVES to larger number.\n");<br>       throw CoinError(str, "read_monom_obj", "CoinLpIO", __FILE__, __LINE__);<br>    }<br><br></div>abd is because there is no 'subject to' section, as the only constraints on this problem is the SOS. When I added a 'Subject to' line following the objective, the file was read.<br><br></div>I include a program to reproduce this problem, and the above lp problem with the filename the program uses.<br><br></div><div>The LP file was generated by CPLEX, and it is able to read the file back in.<br><br></div>Thanks and cheers,<br><br></div>Kish<br></div>
</blockquote></div><br></div>