[Scip] How to get all feasible solutions reached during the SCIP solve ?

Gerald Gamrath gamrath at zib.de
Fri Jan 27 10:48:26 MET 2012


Dear Hélène,

you can call SCIPgetSols() which returns an array of feasible solutions 
found so far and SCIPgetNSols() to get the number of solution stored. By 
default, SCIP stores at most 100 solutions in this storage, and stores 
only the 100 best solutions, if more than 100 are found. You can change 
this by changing the parameter "limits/maxsol".

However, whenever the event SCIP_EVENTTYPE_SOLFOUND is thrown, the 
solution that causes this should be feasible. How do you check the 
feasibility of the solution? It might happen, that constraints are 
changed (e.g., scaled, shifted, etc.) in presolving, so you should 
compare the solution values of the transformed variables to the 
transformed constraints, if you get the original solution values, you 
should check against the original constraints.

Best,
Gerald

Am 27.01.2012 09:40, schrieb Hélène Toussaint:
> Hi
>
> I'd like to get all the feasible solutions that SCIP have found during 
> its solving process.
>
> I have tried to do it with a constraint handler using the event 
> SCIP_EVENTTYPE_SOLFOUND. 
> <http://scip.zib.de/doc/html/type__event_8h.html#ac4326687adf8b4175a2a2145b592401b>However 
> when I enter the scip_exec function of this class the current solution 
> often violate the constraints (I get the variable values with the 
> SCIPgetSolVal function). Moreover I never enter this function when the 
> optimal solution is found.
>
> Does it exist any method to get all the feasible solutions ?
>
> Best regards
> Hélène
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.zib.de/mailman/private/scip/attachments/20120127/c2b9d6f7/attachment.html


More information about the Scip mailing list