<div dir="ltr">Hi Jan<div><br></div><div>Java interface doesn't support counting. </div><div><br></div><div>The Python interface only supports getting the number of feasible solution, but not accessing them (see <a href="https://github.com/SCIP-Interfaces/PySCIPOpt">https://github.com/SCIP-Interfaces/PySCIPOpt</a> commit <a class="gmail-commit-tease-sha" href="https://github.com/SCIP-Interfaces/PySCIPOpt/commit/5384440d808bdb8767bd934724118ff023ceb2b0" style="box-sizing:border-box;background-color:rgb(242,249,252);color:rgb(68,80,85);text-decoration:none;display:inline-block;font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:11.7px">5384440</a>)</div><div><br></div><div>I suspect that it should be simple to implement some functionality that allows writing the solutions to a file. However, I can imagine it is a little bit more complicated to access them through the interface. You are of course welcome to try to support any of these functionalities.</div><div><br></div><div>A small example:</div><div><br></div><div><div>from pyscipopt import Model</div><div>m = Model()</div><div>varx = m.addVar("x", "I", 0, 5)</div><div>m.count()</div><div>print("found ", m.getNCountedSols(), " solutions")</div></div><div><br></div><div>When ran I got: found  6  solutions</div><div><br></div><div>Best</div><div>Felipe</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 7, 2016 at 11:07 PM, Jan Goos <span dir="ltr"><<a href="mailto:jan.goos@vub.ac.be" target="_blank">jan.goos@vub.ac.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hello Jonathan,</div><div><br></div><div>Many thanks for your swift response. For now, I’ll try and use a different approach. Nevertheless, I’d rather stay away from C. Do the Java and Python interfaces support the collection of multiple solutions?</div><div><br></div><div>Keep up the good work!</div><span class=""><div>Best regards,</div><div>J a n</div><div><br></div><br></span><div><div class="h5"><div><blockquote type="cite"><div>On 7 Dec 2016, at 22:58, Jonathan Currie <<a href="mailto:jonathan.currie@aut.ac.nz" target="_blank">jonathan.currie@aut.ac.nz</a>> wrote:</div><br class="m_-6338284947899811981Apple-interchange-newline"><div><div class="m_-6338284947899811981WordSection1" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Hi Jan,<u></u><u></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">That functionality does not exist via OPTI at present, but it sounds like it should! I’ll have a look this weekend.<u></u><u></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Jonathan<u></u><u></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></div><div><div style="border-style:solid none none;border-top-color:rgb(225,225,225);border-top-width:1pt;padding:3pt 0cm 0cm"><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><b><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif"><span class="m_-6338284947899811981Apple-converted-space"> </span>Scip [<a href="mailto:scip-bounces@zib.de" style="color:rgb(149,79,114);text-decoration:underline" target="_blank">mailto:scip-bounces@zib.de</a>]<span class="m_-6338284947899811981Apple-converted-space"> </span><b>O<wbr>n Behalf Of<span class="m_-6338284947899811981Apple-converted-space"> </span></b>Jan Goos<br><b>Sent:</b><span class="m_-6338284947899811981Apple-converted-space"> </span>Thursday, 8 December 2016 10:54 AM<br><b>To:</b><span class="m_-6338284947899811981Apple-converted-space"> </span><a href="mailto:scip@zib.de" style="color:rgb(149,79,114);text-decoration:underline" target="_blank">scip@zib.de</a><br><b>Subject:</b><span class="m_-6338284947899811981Apple-converted-space"> </span>[SCIP] multiple SCIP solutions in Matlab<u></u><u></u></span></div></div></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><u></u> <u></u></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-family:Verdana,sans-serif">Dear SCIPers,<u></u><u></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-family:Verdana,sans-serif">I am using SCIP via OPTI Toolbox in Matlab, and I'd like to enumerate multiple solutions. After thoroughly reading the documentation, I formulated the following example IP:<u></u><u></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-family:Verdana,sans-serif">opts = scipset('scipopts',{'<wbr>constraints/countsols/collect'<wbr>,1});<br>opts = optiset('solver','scip','<wbr>solverOpts',opts);<br>Opt = opti('f',0,'bounds',0,4,'<wbr>xtype','I','options',opts)<br>x = solve(Opt)<u></u><u></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-family:Verdana,sans-serif">I would like to get the 5 equally valid solutions [0,1,2,3,4], but I only get 1 [0]. Can you please tell me what I'm missing?<u></u><u></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-family:Verdana,sans-serif">Best regards,<br>J a n</span></div></div></div></blockquote></div><br></div></div></div><br>______________________________<wbr>_________________<br>
Scip mailing list<br>
<a href="mailto:Scip@zib.de">Scip@zib.de</a><br>
<a href="http://listserv.zib.de/mailman/listinfo/scip" rel="noreferrer" target="_blank">http://listserv.zib.de/<wbr>mailman/listinfo/scip</a><br>
<br></blockquote></div><br></div>