[Scip] Accessing the dual variables after SCIPsolve() returns

Ambros Gleixner gleixner at zib.de
Wed Mar 23 15:30:22 MET 2011


Hi Daniel,

can you give more information on how SCIP detects the infeasibility of
the client?  I would want to make sure that it is actually due to an
infeasible LP and not presolving.  If the latter is the case, the LP
would not even be constructed.

ambros



Am 23.03.2011 15:20, schrieb Daniel Karch:
> Hello,
> 
> I'm new to SCIP and I have the following problem:
> 
> The problem I am working on decomposes into a master problem (IP) and a
> client problem (LP). I have implemented the client problem in a constraint
> handler. When the IP is solved to optimality, the constraint handler is
> called. If the LP detects infeasibility, I want to generate a cut that will
> be added to the master IP in turn.
> Now, I am interested in the LP dual variables that are zero when
> infeasibility is detected, as they correspond to constraints in the (primal)
> LP that are "not needed" to make it infeasible.
> 
> So, this is essentially what I do to access the dual variables:
> 
> ...
> SCIP_CALL( SCIPsolve( client_scip ) );
> 
> ... <problem is detected to be infeasible> ...
> 
> // conss[i] holds the i'th constraint of the client LP
> SCIP_Real z_i = SCIPgetDualfarkasLinear( client_scip, conss[i] );
> 
> Now, the call to SCIPgetDualfarkasLinear(...) returns 0.0 for each
> constraint, rhich should not happen. I also tried SCIPgetDualsolLinear(...),
> to the same effect.
> I suspect that the SCIP instance gets cleaned up before I try to access the
> dual variables, so that they are not there anymore. Can someone confirm that
> this is true? The dual variables are not really all zero -- I stepped into
> the function SCIPgetDualsolLinear(...) with gdb, and it always takes the
> else-branch here:
> 
> if( consdata->row != NULL )
>   return SCIProwGetDualsol(consdata->row);
> else
>   return 0.0;
> 
> Does someone have a solution for my problem?
> 
> Thanks in advance
> 
>   Daniel
> 
> 
> 
> 
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip

-- 
____________________________________________________________
Ambros M. Gleixner
Zuse Institute Berlin - Matheon - Berlin Mathematical School
http://www.zib.de/gleixner


More information about the Scip mailing list