<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hello,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
We are using Google OR-Tools with SCIP solver and see huge differences in solve times, using exactly the same lp model file, when we call SCIP directly vs. within OR-Tools.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
We create the model inside OR-Tools, and save the lp file so we can load it into SCIP's shell.
<br>
<br>
Using OR-Tools/SCIP, solve times are (~200 secs to ~700 secs). It took 200 secs until we updated to the latest OR-Tools (to ensure OR-Tools was using SCIP 8), and now it takes 700 secs (the update more than doubled the solve time).  </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
However, if we load that same model into the SCIP shell, or call ./scip -f and pass in the file, then it only takes ~ 7 seconds to solve (100 times faster than solving it via OR-tools).  </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">Our application requires solve times < 30 seconds.  </span><span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">We'd
 appreciate any suggestions about why this is happening and what we can do to reduce our solve time within OR-Tools so it's closer to the 7 seconds we get with SCIP shell or command line?</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
My guess is perhaps the SCIP parameter settings are different between the two cases, but not sure how to load a SCIP settings file into OR-Tools. Is that possible?  Originally I thought it might be that OR-Tools and the SCIP shell are using different versions
 of SCIP, but since I updated OR-Tools, I think both cases use SCIP 8+. OR-Tool support says they are using a post v8 because it contains a bug fix. </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
OR-Tool support tells me that SCIP shell uses SOPLEX but the embedded SCIP uses GLOP, but he thought that would only account for 10% difference at most. Is this a possible cause of the problem? </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
I'm attaching 5 files, the lp file and the solver log for 2 fast cases (SCIP without OR-Tools) and 2 slow cases (OR-Tools calling SCIP):<br>
<br>
<span style="font-size:12pt;margin:0px"><span style="background-color:rgb(255, 255, 255);display:inline !important">All cases produce the same optimal objective, but t</span>he fast and slow cases show very different solver behaviors. The fast cases do a restart
 quickly after pre-solving, but the slow cases don't. </span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-size: 12pt;"> </span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-size:12pt;margin:0px">Both fast cases have only 91 nodes, while the 200 sec case has 25,000 and the 600 sec case has 117,000 nodes. <span style="font-size:12pt;margin:0px">I am hoping someone can look at the log files and figure out what settings
 would be appropriate to get OR-Tools behavior to match the SCIP standalone behavior. </span><span style="font-size:12pt;margin:0px"></span></span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<ol>
<li><b>mplan.lp: </b>The model file created within OR-Tools but then saved out and loaded into the shell/command line. When we load this into SCIP shell, it takes 7 seconds to solve.<br>
</li><li><b>scipShell.txt </b>(fast): The solver progress log when we load mplan.lp into the SCIP shell, which takes only 7 seconds to solve.</li><li><b>scipCmdLine-f.txt </b>(fast):  The solver progress log when we call scip from command line with -f option to supply mplan.lp. This also takes about 7 seconds to solve. </li><li><b>orToolsPythonCmdLine_200s.txt </b>(slow):  The solver progress log when we call your Python code (which calls OR-Tools) from a command line. This was before I updated to the latest OR-tools. </li><li><b>orToolsPythonCmdLine_660s.txt (</b>slow): Same as <span style="background-color:rgb(255, 255, 255);display:inline !important">
orToolsPythonCmdLine_200s.txt above, except this is after updating to the latest OR-Tools. This caused the solve times to more than double from 200s to 670s. <br>
</span></li></ol>
<div><span style="background-color:rgb(255, 255, 255);display:inline !important">Any suggestions are appreciated. </span></div>
<div><span style="background-color:rgb(255, 255, 255);display:inline !important"><br>
</span></div>
<div><span style="background-color:rgb(255, 255, 255);display:inline !important">Thank you, </span></div>
<div><span style="background-color:rgb(255, 255, 255);display:inline !important">      Rich Levinson</span></div>
<div><span style="background-color:rgb(255, 255, 255);display:inline !important">      NASA Ames Research Center.</span></div>
</div>
</body>
</html>