[SCIP] Exporting the solution to a file.

Gregor Hendel hendel at zib.de
Tue Apr 18 21:30:33 CEST 2017


Dear Daniel,

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().

Happy printing,
Gregor

Am 18.04.2017 um 20:57 schrieb Daniel Herl Carrero:
> Dear SCIPers,
>
> 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:
>
> FILE* file;
>     if ((file = fopen("Solution.sol", "w")) != nullptr){
>         SCIP_CALL(SCIPprintBestSol(scip, file, FALSE));
>         fclose(file);
>     }
>
> 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).
>
> Has anyone encountered the same problem before? I really need to 
> export the solutions and any help will be much appreciated.
>
> Thanks!
> Daniel
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20170418/11abb867/attachment.html>


More information about the Scip mailing list