<div dir="ltr"><div>Oscar,</div><div> </div><div>Where have you installed CMPL?</div><div> </div><div>Indrajit</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 1, 2015 at 3:40 PM, Oscar Augusto Téllez Sánchez <span dir="ltr">&lt;<a href="mailto:oskarts@gmail.com" target="_blank">oskarts@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style>Hi I am trying to solve a problem with Cplex..but i got this error<div><div><br></div><div>Error (interfaces): can not connect the solver: Cplex -&gt;/Applications/IBM/ILOG/CPLEX_Studio125/cplex/bin/x86-64_darwin/cplex</div><div><br></div><div>It seems, he can’t find the solver. Actually it is installed on myDisk/Users/oscar/Applications/IBM…</div><div><br></div><div>How can i change the address when invoking the solver through cmpl?</div><div><br></div><div>or do i have to reinstall in the given address?</div><div><br></div><div>thank you in advance and happy new year!</div><div><br></div><div>Oscar</div><div><br></div><div><br></div><div><br></div><div><blockquote type="cite"><div>On 23 Nov 2014, at 19:06, Indrajit Sen Gupta &lt;<a href="mailto:indrajitsg@gmail.com" target="_blank">indrajitsg@gmail.com</a>&gt; wrote:</div><br><div><div dir="ltr"><div><font face="monospace">I did. It is still the same. I get &quot;cplex failed - exit code&quot; message. Is there any way to check why cplex failed?</font></div><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 23, 2014 at 11:29 PM, Mike Steglich <span dir="ltr">&lt;<a href="mailto:mike.steglich@berlin.de" target="_blank">mike.steglich@berlin.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="auto"><div>Please move <span style="background-color:rgba(255,255,255,0)">cplex1260.dll </span>into Cmpl/Frameworks. Then it should work. This issues depend on the search path. The folder Cmpl\bin\Cplex is not in the search path and the DLL cannot be found.</div><div><br><br></div><div><br>Am 23.11.2014 um 18:49 schrieb Indrajit Sen Gupta &lt;<a href="mailto:indrajitsg@gmail.com" target="_blank">indrajitsg@gmail.com</a>&gt;:<br><br></div><div><div><blockquote type="cite"><div><div dir="ltr"><div><font face="monospace">Hi Mike, </font></div><div><font face="monospace"> </font></div><div><font face="monospace">This example is from your manual:</font></div><div><font face="monospace"></font> </div><div><font face="Courier New">--------------------------------------------------------------</font></div><div><font face="monospace">%arg -solver cbc<br></font></div><div><font face="monospace">parameters:<br> c[] := (1,2,3);<br> b[] := (15,20);<br> A[,] := ((5.6, 7.7, 10.5),<br>   (9.8, 4.2, 11.1));<br> <br>variables:<br> x[defset(c[])] : real[0..];<br> <br>objectives:<br> c[]T * x[] -&gt; max;</font></div><div><font face="monospace">constraints:<br> A[,] * x[] &lt;= b[];</font></div><div> </div><div><div><font face="Courier New">--------------------------------------------------------------</font></div></div><div> </div><div><font face="monospace">Regards,</font></div><div><font face="monospace">Indrajit</font></div><div> </div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 23, 2014 at 10:40 PM, Mike Steglich <span dir="ltr">&lt;<a href="mailto:mike.steglich@th-wildau.de" target="_blank">mike.steglich@th-wildau.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="auto"><div>Hi Indrajit,</div><div><br></div><div>Could try to solve it with Cbc and could you also send your model so that I can check it?</div><div><br></div><div>Cheers,</div><div><br></div><div>Mike<br><br><br></div><div><br>Am 23.11.2014 um 18:06 schrieb Indrajit Sen Gupta &lt;<a href="mailto:indrajitsg@gmail.com" target="_blank">indrajitsg@gmail.com</a>&gt;:<br><br></div><div><div><blockquote type="cite"><div><div dir="ltr"><div><font face="monospace">Hi Mike,</font></div><div><font face="monospace"></font> </div><div><font face="monospace">I did as you said. Here is what I did after installing Cmpl in C:\Program Files (x86)\.</font></div><div><font face="monospace"></font> </div><div><font face="monospace">1. Copied the CPLEX folder containing cplex.exe and cplex1260.dll inside \Cmpl\bin\</font></div><div><font face="monospace">2. In cmpl.opt, I put: CplexFileName = CPLEX/cplex.exe</font></div><div><font face="monospace"></font> </div><div><font face="monospace">I no longer get &quot;can not connect the solver message&quot;. What I get is:</font></div><div><font face="monospace"></font> </div><div><font face="Courier New">----------------------------------------------------------------------------------------</font></div><div><font face="monospace">Cmpl: cmpl prob04.cmpl<br>CMPL model generation - running</font></div><div><font face="monospace">CMPL version: 1.10.0<br>Authors: Thomas Schleiff, Mike Steglich<br>Distributed under the GPLv3</font></div><div><font face="monospace">create model instance ...<br>write model instance ...<br>CMPL model generation - finished</font></div><div><font face="monospace">Solver - running</font></div><div><font face="monospace">Error (interfaces):  cplex failed - exit code ☺</font></div><div><font face="Courier New">----------------------------------------------------------------------------------------</font></div><div><font face="Courier New"></font> </div><div><font face="Courier New">Regards,</font></div><div><font face="Courier New">Indrajit</font></div><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 23, 2014 at 3:43 PM, Mike Steglich <span dir="ltr">&lt;<a href="mailto:mike.steglich@berlin.de" target="_blank">mike.steglich@berlin.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="auto"><div>Hi Indrajit,</div><div><br></div><div>Please install Cmpl in c:\program files\Cmpl (for win32) or<span style="background-color:rgba(255,255,255,0)"> in c:\program files (x86)\Cmpl (under win64) and use the .bat files (coliop.bat, cmplShell.bat, cmpl.bat) in the root of the Cmpl installation folder. I would like to suggest to use either Coliop for having a simple UI or CmplShell.bat to use Cmpl on the command line. All of these simple scripts set the environment for Cmpl. The intention was to prevent that a Cmpl user has to set a couple of environment variables on his/her own and not to change the original windows setting.</span></div><div><br></div><div>If you use the Cmpl binary or the Coliop jar file directly then it fails as we have seen for your problems to invoke Cplex an Scip. </div><div><br></div><div>Please take a look at the installation hints at <a href="http://coliop.org/download.html" target="_blank">coliop.org/download.html</a> or in the manual.</div><div><br></div><div>Thanks,</div><div><br></div><div>Mike<br><br><br></div><div><br>Am 23.11.2014 um 03:23 schrieb Indrajit Sen Gupta &lt;<a href="mailto:indrajitsg@gmail.com" target="_blank">indrajitsg@gmail.com</a>&gt;:<br><br></div><div><div><blockquote type="cite"><div><div dir="ltr"><div><font face="monospace">Hi Mike,</font></div><div><font face="monospace"></font> </div><div><font face="monospace">Here is something that I noticed when executing a CMPL problem with the default options. The first 27 lines of output that comes out:</font></div><div> </div><div><font face="monospace">---------------------------------------------------------------------------------------------------</font></div><div><font face="monospace">Cmpl: cmpl prob04.cmpl<br>CMPL model generation - running</font></div><div><font face="monospace">CMPL version: 1.10.0<br>Authors: Thomas Schleiff, Mike Steglich<br>Distributed under the GPLv3</font></div><div><font face="monospace">create model instance ...<br>write model instance ...<br>CMPL model generation - finished</font></div><div><font face="monospace">Solver - running</font></div><div><font face="monospace">Welcome to the CBC MILP Solver<br>Version: 2.8.8<br>Build Date: Dec 21 2013<br>Revision Number: 1998</font></div><div><font face="monospace">command line - C:\Program Files (x86)\Cmpl\bin\..\Thirdparty\CBC\cbc prob04.mps max solve gsolu prob04.gsol (default strategy 1)<br>At line 2 NAME          prob04.cmpl<br>At line 3 ROWS<br>At line 7 COLUMNS<br>At line 16 RHS<br>At line 18 RANGES<br>At line 19 BOUNDS<br>At line 23 ENDATA<br>Problem prob04.cmpl has 2 rows, 3 columns and 6 elements</font></div><div><div><font face="monospace">---------------------------------------------------------------------------------------------------</font></div><div><font face="Courier New"></font> </div><div><font face="Courier New">Notice the line 19 which starts of with: command line - C:\Program File (x86) ....</font></div><div><font face="Courier New"></font> </div><div><font face="Courier New">Here is my question. I did not install CMPL in Program Files, instead in D:\DPF\CMPL. So why should the command line start with C:\... Any thoughts.</font></div><div><font face="Courier New"></font> </div><div><font face="Courier New">Regards,</font></div><div><font face="Courier New">Indrajit</font></div><div> </div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 23, 2014 at 12:07 AM, Indrajit Sen Gupta <span dir="ltr">&lt;<a href="mailto:indrajitsg@gmail.com" target="_blank">indrajitsg@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div>Hi Mike,</div><div> </div><div>You are right. I will stick with CBC. All this started when I tried to connect to CPLEX. SCIP was just another optimizer that I downloaded to figure out why this problem is happening. </div><div> </div><div>Thanks for your help anyway.</div><div> </div><div>Regards,</div><div>Indrajit</div><div> </div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 23, 2014 at 12:00 AM, Mike Steglich <span dir="ltr">&lt;<a href="mailto:mike.steglich@berlin.de" target="_blank">mike.steglich@berlin.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="auto"><div><span></span></div><div><div>Hi Indraji,</div><div><br></div><div>I&#39;m not sure why scip is not working with Cmpl on your system with a setting that seems fine.  It sounds a bit like Murphy&#39;s Law. The hardcore workarround  is to copy all scip files into Cmpl/bin and remove the path in the scip entry in cmpl.opt.</div><div><br></div><div>Why don&#39;t you use Cbc? The performance is similar to Scip.</div><div><br></div><div>Cheers,</div><div><br></div><div>Mike</div><div><br><br><br></div><div><br>Am 22.11.2014 um 19:07 schrieb Indrajit Sen Gupta &lt;<a href="mailto:indrajitsg@gmail.com" target="_blank">indrajitsg@gmail.com</a>&gt;:<br><br></div><div><div><blockquote type="cite"><div><div dir="ltr"><div>Hi Mike,</div><div> </div><div>SCIP works out of the box. I am using command line for all purposes. But here is the funny thing. I exported the problem from CMPL to MPS format and ran it through SCIP and got a sub optimal solution!!! I am not familiar with SCIP - just read the mps file and entered optimize. Its actually a small text book problem and the results shouldn&#39;t be different.</div><div> </div><div>Regards,</div><div>Indrajit</div><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 22, 2014 at 11:12 PM, Mike Steglich <span dir="ltr">&lt;<a href="mailto:mike.steglich@th-wildau.de" target="_blank">mike.steglich@th-wildau.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div style><br><div><br><blockquote type="cite"><div>Anfang der weitergeleiteten Nachricht:</div><br><div style="margin:0px"><span style="font-family:-webkit-system-font,&quot;Helvetica Neue&quot;,Helvetica,sans-serif"><b>Von: </b></span><span style="font-family:-webkit-system-font,Helvetica Neue,Helvetica,sans-serif">Mike Steglich &lt;<a href="mailto:mike.steglich@th-wildau.de" target="_blank">mike.steglich@th-wildau.de</a>&gt;<br></span></div><div style="margin:0px"><span style="font-family:-webkit-system-font,&quot;Helvetica Neue&quot;,Helvetica,sans-serif"><b>Betreff: </b></span><span style="font-family:-webkit-system-font,Helvetica Neue,Helvetica,sans-serif"><b>Aw: [Cmpl] Error connecting to CPLEX</b><br></span></div><div style="margin:0px"><span style="font-family:-webkit-system-font,&quot;Helvetica Neue&quot;,Helvetica,sans-serif"><b>Datum: </b></span><span style="font-family:-webkit-system-font,Helvetica Neue,Helvetica,sans-serif">22. November 2014 18:42:16 MEZ<br></span></div><div style="margin:0px"><span style="font-family:-webkit-system-font,&quot;Helvetica Neue&quot;,Helvetica,sans-serif"><b>An: </b></span><span style="font-family:-webkit-system-font,Helvetica Neue,Helvetica,sans-serif">Indrajit Sen Gupta &lt;<a href="mailto:indrajitsg@gmail.com" target="_blank">indrajitsg@gmail.com</a>&gt;<br></span></div><div><div><br><div><div style>Hi Indrajit,<div><br></div><div>Framework is still in the (temporary) search path if you use Coliop.bat or cmplShell.bat. Does scip work out of the box w/o Cmpl?  </div><div><br></div><div>Cheers,</div><div><br></div><div>Mike</div><div><br></div><div><br><div><blockquote type="cite"><div>Am 22.11.2014 um 18:36 schrieb Indrajit Sen Gupta &lt;<a href="mailto:indrajitsg@gmail.com" target="_blank">indrajitsg@gmail.com</a>&gt;:</div><br><div><div dir="ltr"><div>Still no luck. :( Copied all the dlls and lib files to the Frameworks folder. I made sure that Frameworks is in search path. Am giving up for tonight.</div><div> </div><div>Regards,</div><div>Indrajit</div><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 22, 2014 at 10:45 PM, Mike Steglich <span dir="ltr">&lt;<a href="mailto:mike.steglich@th-wildau.de" target="_blank">mike.steglich@th-wildau.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div style>The entry <i>ScipFileName = ../Thirdparty/scip/scip-3.1.0.win.x86.msvc.opt.spx.ld.exe</i> is fine.  <div><br><div>As mentioned before, please move the required libs (scip-3.1.0.win.x86.msvc.opt.spx.ld.dll and scip-3.1.0.win.x86.msvc.opt.spx.ld.lib)  into Cmpl/Frameworks …  </div><div><br><div><blockquote type="cite"><div>Am 22.11.2014 um 18:08 schrieb Indrajit Sen Gupta &lt;<a href="mailto:indrajitsg@gmail.com" target="_blank">indrajitsg@gmail.com</a>&gt;:</div><div><div><br><div><div dir="ltr"><div>These are the three files that I have in /Thirdparty/SCIP/</div><div> </div><div>scip-3.1.0.win.x86.msvc.opt.spx.ld.dll</div><div>scip-3.1.0.win.x86.msvc.opt.spx.ld.exe</div><div>scip-3.1.0.win.x86.msvc.opt.spx.ld.lib</div><div> </div><div>And this is the line in /bin/cmpl.opt</div><div> </div><div>ScipFileName = ../Thirdparty/SCIP/scip-3.1.0.win.x86.msvc.opt.spx.ld.exe</div><div> </div><div>Regards,</div><div>Indrajit</div><div> </div><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 22, 2014 at 10:20 PM, Mike Steglich <span dir="ltr">&lt;<a href="mailto:mike.steglich@th-wildau.de" target="_blank">mike.steglich@th-wildau.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div style>The following entries are working on my Windows test system:<div><br></div><div><div>CbcPath = ../Thirdparty/CBC/</div><div>GlpkPath =  ../Thirdparty/GLPK/</div><div>ScipFileName = ../Thirdparty/scip/scip.exe</div><div>CplexFileName = </div><div><br></div><div><br></div><div>It works as expected when I include the CMPL header entry <i>%arg -solver scip</i> in my model.</div><div><br></div><div>Please copy the required DLLs into CMPL/Frameworks or in another folder that is in the search path.</div><div><br></div><div>This should work similar for Cplex.</div><div><br></div><div>Cheers,</div><div><br></div><div>Mike</div><div><br></div><div><br></div><div><br></div><div><blockquote type="cite"><div>Am 22.11.2014 um 16:41 schrieb Indrajit Sen Gupta &lt;<a href="mailto:indrajitsg@gmail.com" target="_blank">indrajitsg@gmail.com</a>&gt;:</div><div><div><br><div><div dir="ltr"><div>I tried all of the above and some more - but none worked. </div><div> </div><div>I tried putting ../../ before the path to filename. So the full path would look like: ../../AMPL/ampl/cplex.exe</div><div> </div><div>I even copied cplex.exe and cplex1260.dll into a folder under Thirdparty and tried running it with filename path as: ../Thirdparty/CPLEX/cplex.exe</div><div> </div><div>Regards,</div><div>Indrajit</div><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 22, 2014 at 3:02 PM, Mike Steglich <span dir="ltr">&lt;<a href="mailto:mike.steglich@th-wildau.de" target="_blank">mike.steglich@th-wildau.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">Hi Indrajit,<br>
<br>
It is unfortunately not possible to use drive letters to specify where Cplex is located.  Furthermore please use / instead of \. e.g. /DPF/Ampl/ampl/cplex.exe.<br>
<br>
Cheers,<br>
<br>
Mike<br>
<br>
<br>
<br>
&gt; Am 22.11.2014 um 09:29 schrieb Kamil Figiela &lt;<a href="mailto:kfigiela@agh.edu.pl" target="_blank">kfigiela@agh.edu.pl</a>&gt;:<br>
<div><div>&gt;<br>
&gt; Probably it should say:<br>
&gt;<br>
&gt; CplexFileName = D:\DPF\AMPL\ampl\cplex.exe<br>
&gt;<br>
&gt; Best,<br>
&gt; Kamil<br>
&gt;<br>
&gt;&gt; Wiadomość napisana przez Indrajit Sen Gupta &lt;<a href="mailto:indrajitsg@gmail.com" target="_blank">indrajitsg@gmail.com</a>&gt; w dniu 22 lis 2014, o godz. 05:56:<br>
&gt;&gt;<br>
&gt;&gt; Hi Mike,<br>
&gt;&gt;<br>
&gt;&gt; I have a CPLEX demo version which came with AMPL demo version. I tried to use this solver with the option:<br>
&gt;&gt;<br>
&gt;&gt; %arg -solver cplex<br>
&gt;&gt;<br>
&gt;&gt; and with the following line in cmpl.opt file:<br>
&gt;&gt;<br>
&gt;&gt; CplexFileName = D:\DPF\AMPL\ampl\<br>
&gt;&gt;<br>
&gt;&gt; This is the path to the folder where cplex.exe is located. When I try to execute a model it says<br>
&gt;&gt;<br>
&gt;&gt; Error (interfaces): can not connect the solver: Cplex -&gt;<br>
&gt;&gt;<br>
&gt;&gt; Any idea why this is happening?<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Indrajit<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Cmpl mailing list<br>
&gt;&gt; <a href="mailto:Cmpl@list.coin-or.org" target="_blank">Cmpl@list.coin-or.org</a><br>
&gt;&gt; <a href="http://list.coin-or.org/mailman/listinfo/cmpl" target="_blank">http://list.coin-or.org/mailman/listinfo/cmpl</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Cmpl mailing list<br>
&gt; <a href="mailto:Cmpl@list.coin-or.org" target="_blank">Cmpl@list.coin-or.org</a><br>
&gt; <a href="http://list.coin-or.org/mailman/listinfo/cmpl" target="_blank">http://list.coin-or.org/mailman/listinfo/cmpl</a><br>
</div></div></blockquote></div><br></div>
_______________________________________________<br>Cmpl mailing list<br><a href="mailto:Cmpl@list.coin-or.org" target="_blank">Cmpl@list.coin-or.org</a><br><a href="http://list.coin-or.org/mailman/listinfo/cmpl" target="_blank">http://list.coin-or.org/mailman/listinfo/cmpl</a></div></div></div></blockquote></div><br></div></div></blockquote></div><br></div>
_______________________________________________<br>Cmpl mailing list<br><a href="mailto:Cmpl@list.coin-or.org" target="_blank">Cmpl@list.coin-or.org</a><br><a href="http://list.coin-or.org/mailman/listinfo/cmpl" target="_blank">http://list.coin-or.org/mailman/listinfo/cmpl</a></div></div></div></blockquote></div><br></div></div></div></blockquote></div><br></div>
</div></blockquote></div><br></div></div></div></div></div></blockquote></div><br></div><br>_______________________________________________<br>
Cmpl mailing list<br>
<a href="mailto:Cmpl@list.coin-or.org" target="_blank">Cmpl@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/cmpl" target="_blank">http://list.coin-or.org/mailman/listinfo/cmpl</a><br></blockquote></div><br></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Cmpl mailing list</span><br><span><a href="mailto:Cmpl@list.coin-or.org" target="_blank">Cmpl@list.coin-or.org</a></span><br><span><a href="http://list.coin-or.org/mailman/listinfo/cmpl" target="_blank">http://list.coin-or.org/mailman/listinfo/cmpl</a></span></div></blockquote></div></div></div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></blockquote></div></div></div></blockquote></div><br></div>
</div></blockquote></div></div></div></blockquote></div><br></div></div>
</div></blockquote></div></div></div></blockquote></div><br></div>
_______________________________________________<br>Cmpl mailing list<br><a href="mailto:Cmpl@list.coin-or.org" target="_blank">Cmpl@list.coin-or.org</a><br><a href="http://list.coin-or.org/mailman/listinfo/cmpl" target="_blank">http://list.coin-or.org/mailman/listinfo/cmpl</a></div></blockquote></div><br></div></div></blockquote></div><br></div>