[Cbc] Possible to get information about eliminated variables from CglPreProcess

Bo Jensen jensen.bo at gmail.com
Thu Feb 5 11:12:00 EST 2015


Hi,

I don't know much about CglPreProcess, but what you ask is sort of a
general question. Having a one to one mapping between the presolved and
original  model is something users often want. The problem is such an extra
requirement would exclude several presolve tricks and hurt performance. The
presolve module doesn't only fix variables, it also does aggregation and
other fancy stuff, so the original variable X may now be apart of an
expression say Z = X+Y+3*V and possibly eliminated from the problem. So to
get the original variable, you would need to know the exact elimination
tree used in the presolve module. Could be many layers deep.. I think some
commercial vendors offer the possibility to get the one to one variables,
in case they were not aggregated by the presolve. To the best of my memory
it's done by using variable names. But this is still no guarantee you can
get it from all the variables, unless you switch off certain presolve
features.

As a fix one could fetch the presolved problem initially, switch off
presolve and run on this problem instead. Once the problem is solved, then
you call postsolve.

Hope this general reply helped.

/Bo



On Thu, Feb 5, 2015 at 4:34 PM, fpeng <fpeng at imap.srv.cs.cmu.edu> wrote:

> Hello Cbc community,
>
> Is there an easy way to extract information about variables that are
> eliminated from preprocessing? Say I do something like:
>
> CglPreProcess process;
> OsiSolverInterface * solver2 = process.preProcess(*solver_, false, 8);
>
> at this point the variables in solver2 may be different from what were in
> solver_ because CglPreProcess did some smart things to determine that
> certain variables are not needed. However, some of these eliminated
> variables may be set to 0 or 1 (e.g. for a binary variable), and if I have
> a custom cbcHeuristic that relies on the original set of variables in
> solve_, I want to know which variables are eliminated, and what they are
> set to. I can figure out what variables are eliminated with
> originalColumns(), but I don't see an easy way to do the latter?
>
> Thanks!
> Fei
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cbc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20150205/1e880feb/attachment.html>


More information about the Cbc mailing list