[Scip] How to get all feasible solutions reached during the SCIP solve ?
Hélène Toussaint
helene.toussaint at isima.fr
Fri Jan 27 13:15:06 MET 2012
Hi
Thank you very much.
Best
Hélène
Le 27/01/2012 11:39, Stefan Heinz a écrit :
> Dear Hélène,
>
> Regarding the event SCIP_EVENTTYPE_SOLFOUND. You also could check our
> event handler example:
>
> http://scip.zib.de/doc/examples/Eventhdlr/index.html
>
> Besides that SCIP is also capable of counting/collecting all feasible
> solution. For that you call SCIPcount() instead of SCIPsolve():
>
> http://scip.zib.de/doc/html/cons__countsols_8h.html#aef183d6883f1917bffb15159f7b856fd
>
>
> http://scip.zib.de/doc/html/COUNTER.html
>
> Best Stefan
>
> On 01/27/12 10:48, Gerald Gamrath wrote:
>> 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
>>
>>
>>
>> _______________________________________________
>> Scip mailing list
>> Scip at zib.de
>> http://listserv.zib.de/mailman/listinfo/scip
>
>
>
More information about the Scip
mailing list