[Scip] How to find out which constraints were active during the solving process
Rostislav Stanek
rostislav.stanek at uni-graz.at
Thu Apr 18 17:32:14 MEST 2013
Dear Stefan,
thank you very much for your quick response. I tried this solution now
but I still get false for all constraints. Is it correct that the
function does not ask the SCIP-solver as parameter?
Best regards
Rostislav
Dne 18.4.2013 14:03, Stefan Vigerske napsal(a):
> Hi,
>
> probably you look at the constraints in the original problem, but you
> want the one from the transformed problem.
>
> Try getting the transformed cons first:
> SCIP_CONS* tconstraint;
> SCIP_CALL( SCIPgetTransformedCons(scip, constraint, &tconstraint) );
> if( tconstraint && SCIPconsIsActive(tconstraint) )
> {
> /* found one */
> }
>
> See also
> http://scip.zib.de/doc/html/scip_8h.shtml#ac783997fa88d9b38b4bb7cfc0c101e95
>
> Best,
> Stefan
>
> On 04/18/2013 01:50 PM, Rostislav Stanek wrote:
>> Dear SCIP community,
>>
>> I have the following problem: I would like to find out which constraints
>> were active during the solving process and which did not at all.
>>
>> Thus I defined an event handler and set the events
>> SCIP_EVENTTYPE_FIRSTLPSOLVED and SCIP_EVENTTYPE_LPSOLVED and
>> SCIP_EVENTTYPE_NODESOLVED.
>>
>> Then I call SCIPconsIsActive(constraint) in the method
>> SCIP_DECL_EVENTEXEC(EventHandlerLPSolved::scip_exec) and always obtain
>> false. (I have references to all constraints (std::vector<SCIP_CONS *>
>> &constraints;) in the class).
>>
>> Am I doing something wrong? Is it possible to get out all constraints
>> used during the solving process?
>>
>> Thank you very much for all hints and tips.
>>
>> Yours faithfully
>> Rostislav Stanek
>> _______________________________________________
>> Scip mailing list
>> Scip at zib.de
>> http://listserv.zib.de/mailman/listinfo/scip
>>
More information about the Scip
mailing list