[SCIP] Exporting the solution toa file.

Daniel Herl Carrero dherl at fen.uchile.cl
Tue Apr 18 20:57:43 CEST 2017


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20170418/7ab53484/attachment.html>


More information about the Scip mailing list