[SCIP] collecting feasible solutions in SCIP

Jakob Witzig witzig at zib.de
Mon Jan 25 18:14:40 CET 2016


Hi James,

you need a hashmap mapping active variable (SCIPgetNVars and 
SCIPgetVars) to their position in the returned array. You get the 
position of the active variable by calling SCIPvarGetProbindex, all 
variables that are not active have probindex = -1.

Best
Jakob

Am 25.01.2016 um 17:26 schrieb James Cussens:
> I'm using SCIP as a callable library and am using it to count and
> collect feasible solutions. I have no problem returning the count of
> feasible solutions.
>
> Collecting per se is also easy. However I'm not sure how to dump the
> collected solutions to a file. I understand, from previous
> correspondence in the SCIP mail archive
> http://listserv.zib.de/pipermail/scip/2012-May/000962.html
> and the relevant webpage ( http://scip.zib.de/doc/html/COUNTER.php )
> that the best option is to basically copy the code in countsols.c which
> implements the  SCIPdialogExecWriteAllsolutions() dialogue.
>
> But that code uses conshdlrdata->hashmap (in the call to
> writeExpandedSolutions) which is not, I think, accessible by public
> methods. Is there a way around this? I would rather not alter my copy of
> countsols.c
>
> James
>
>
> --
> James Cussens
> Dept of Computer Science &
> York Centre for Complex Systems Analysis
> Room 326, The Hub, Deramore Lane            Tel    +44 (0)1904 325371
> University of York                                        Fax  +44
> (0)1904 500159
> York YO10 5GE, UK http://www.cs.york.ac.uk/~jc
> http://www.york.ac.uk/docs/disclaimer/email.htm
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
>


-- 
Jakob Witzig

Zuse Institute Berlin (ZIB)

Division Mathematical Optimization and Scientific Information
Research Group Mathematical Optimization Methods

Takustrasse 7
14195 Berlin

Tel. : +49 (0)30 84185-416
Fax  : +49 (0)30 84185-269
email: witzig at zib.de


More information about the Scip mailing list