[Scip] How to find out which constraints were active during the solving process

Stefan Vigerske stefan at math.hu-berlin.de
Thu Apr 18 14:03:14 MEST 2013


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