<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Dear Daniel,<br>
<br>
I can definitely tell that this file is open. However, you may have
overread the profi advise to your stack overflow question to check
if there is a best solution. Please check this using either
SCIPgetBestSol() or SCIPgetNSols() prior to calling
SCIPprintBestSol().<br>
<br>
Happy printing,<br>
Gregor<br>
<br>
<div class="moz-cite-prefix">Am 18.04.2017 um 20:57 schrieb Daniel
Herl Carrero:<br>
</div>
<blockquote
cite="mid:CAGKwByxa3PnSfNmaeocRVhFni1iBgt9oxWYuZ=S0eb1RE5u9jA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>Dear SCIPers,<br>
<br>
</div>
I`m using the scip (3.2.1) API for C++ (in VS 2013) and
resolving a simple LP. After SCIP reaches a solution I try to
store the results in a file with the following code:<br>
<br>
FILE* file;<br>
if ((file = fopen("Solution.sol", "w")) != nullptr){<br>
SCIP_CALL(SCIPprintBestSol(scip, file, FALSE));<br>
fclose(file);<br>
}<br>
<br>
</div>
<div>But the code throws me an Access Violation Error. The code
succesfully creates the file but fails trying to execute the
SCIPprintBestSol() function. I used the function to print the
solution in the console and it works (
SCIP_CALL(SCIPprintBestSol(scip, NULL, FALSE)); ) but it fails
when I try to use it to write this solution to a file (like in
the code above).<br>
<br>
</div>
<div>Has anyone encountered the same problem before? I really
need to export the solutions and any help will be much
appreciated.<br>
<br>
</div>
<div>Thanks!<br>
</div>
<div>Daniel<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Scip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Scip@zib.de">Scip@zib.de</a>
<a class="moz-txt-link-freetext" href="https://listserv.zib.de/mailman/listinfo/scip">https://listserv.zib.de/mailman/listinfo/scip</a>
</pre>
</blockquote>
<br>
</body>
</html>