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

Daniel Karch karch at math.tu-berlin.de
Wed Mar 23 15:20:56 MET 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.zib.de/mailman/private/scip/attachments/20110323/e0c06844/attachment.html


More information about the Scip mailing list