<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (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:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 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:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@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]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Richard,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I can’t really comment on CLP’s API, since we didn’t attempt to use it. COIN-OR OSI fit our needs perfectly.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I don’t know how you would handle this situation in Windows, but if you were running Linux, I would recommend that you use the COIN-OR OSI (“Open Solver Interface”, in your document it’s called “Optimization
 Solver Interface”). It’s part of the CLP source tarball, and builds automatically when you compile and install CLP. Any of several solvers can be linked to your application through the OSI.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><a href="https://projects.coin-or.org/Osi/">https://projects.coin-or.org/Osi/</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">We added OSI to our C-based solver interface when looking for a replacement for the creaky old MINOS 5.1 (Fortran) solver. It was a few days work to modify our custom API for MINOS to talk to the OSI, and we
 were able to test our application unmodified with both CPLEX and CLP (and MINOS, through the old interface). OSI lacked a way to save and load a basis with GUROBI as far as we could tell. We settled on using CLP 1.14.8. It’s about $250,000 cheaper than a dedicated
 CPLEX license for a 12-core Xeon server, has comparable speed through the OSI, and produced identical results in our testing. Poor old (25 years old) MINOS 5.1 ran Simplex 5 to 8 times slower on the same machine.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Speed, cost, and maintainability are selling points of CLP, but demonstrating that it works reliably is essential. After compiling CLP, “make test” gives you confidence that the build worked by running over 1700
 unit tests. After installing it, you must validate your interface by comparing the results from your application using CLP, against results from your application using other solvers. If they don’t look the same and you can’t explain or fix the differences,
 then you should not use CLP.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">CLP has been pretty reliable for us. I doesn’t have a performance guarantee like CPLEX, but in practice it is good enough. In our testing CLP managed to solve problems that MINOS 5.1 gave up on. We started using
 CLP 18 months ago to optimize production runs on a weekly basis. Infrequently, we calibrate our model using batches of around 80,000 variations of a somewhat larger version of the LP (46K rows and 111K columns), &nbsp;finishing a batch in about 8 hours of real
 time on 24 2.7 GHz cores. In one of these batches there was a single LP that CLP couldn’t solve (CLP ran for 89 hours before I killed the process). Since then we loosened a comparison tolerance and the problem hasn’t reappeared.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Robert Lacroix<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> clp-bounces@list.coin-or.org [mailto:clp-bounces@list.coin-or.org]
<b>On Behalf Of </b>Richard Hammer<br>
<b>Sent:</b> Wednesday, December 03, 2014 10:57 PM<br>
<b>To:</b> clp@list.coin-or.org; msvisualstudio@list.coin-or.org<br>
<b>Subject:</b> [Clp] calling clp library routines from Fortran in MSVS<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas">I’m hoping to test and evaluate COIN-OR CLP by linking the available pre-compiled libraries into some mining-optimisation software.&nbsp; This software already works with CPLEX, LINDO, GUROBI,
 and XA.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas">I’m using MSVS 9 and Intel Fortran, under Windows.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas"><o:p>&nbsp;</o:p></span></p>
<p class="MsoPlainText">CPLEX, LINDO, GUROBI and XA are LP solvers that are supplied by their publishers on a commercial basis.&nbsp; Supply is in the form of ready-to-link libraries, ie DLLs and LIBs.&nbsp; No source code.&nbsp; To build a release, I compile our mining optimization
 code only;&nbsp; I do not compile anything supplied by any of these solvers.&nbsp; Then I link it all together.<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">The interface to each solver is specified by the supplier in detail, including how to call it from Fortran.&nbsp; We have Fortran code that is dedicated to each solver.&nbsp; The interfaces are similar, but not identical.&nbsp; Users specify at run
 time which solver to use.<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas">I’ve not found any DLLs or LIBs specifically for CLP.&nbsp; I have found CoinMP.dll and CoinMP.lib on
<a href="​https:/projects.coin-or.org/CoinMP/browser/stable/1.7/CoinMP/CoinMP.zip?format=raw">
<span style="font-family:&quot;Cambria Math&quot;,&quot;serif&quot;">​</span>https://projects.coin-or.org/CoinMP/browser/stable/1.7/CoinMP/CoinMP.zip?format=raw</a>.&nbsp;
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas">Related web pages say that much of the CLP functionality is included.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas">I have also found “A Gentle Introduction to Optimization Solver Interface.pdf” and “Clp-refman.pdf” in 1.7.4\doc.&nbsp;
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas">It would be very helpful if there was a guide to the CLP solver with explanations of how to use it—how to submit an LP problem, what form it needs to be in, the form of the returned solution,
 etc.&nbsp; Which routines to call in what order?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas">Interface or .sln files would be valuable to have.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas">Your comments and suggestions would be appreciated.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas">Richard Hammer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas"><o:p>&nbsp;</o:p></span></p>
</div>
</body>
</html>