[SCIP] Exporting the solution to a file.
Gregor Hendel
hendel at zib.de
Fri Apr 21 10:51:00 CEST 2017
Hi Daniel,
then, that is indeed unexpected behavior. Is it possible for you to
rebuild your application in debug mode and send me a full backtrace
after launching it inside a debugging tool?
Best,
Gregor
Am 21.04.2017 um 03:28 schrieb Daniel Herl Carrero:
> I already did that, I printed the solution in the console with
> SCIPprintBestSol(scip,NULL,FALSE) and worked fine. The function fails
> when I try to use it giving it a file to write in.
>
> 2017-04-18 16:30 GMT-03:00 Gregor Hendel <hendel at zib.de
> <mailto:hendel at zib.de>>:
>
> 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 <mailto:Scip at zib.de>
>> https://listserv.zib.de/mailman/listinfo/scip
>> <https://listserv.zib.de/mailman/listinfo/scip>
> _______________________________________________ Scip mailing list
> Scip at zib.de <mailto:Scip at zib.de>
> https://listserv.zib.de/mailman/listinfo/scip
> <https://listserv.zib.de/mailman/listinfo/scip>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20170421/712e9dde/attachment.html>
More information about the Scip
mailing list