[Scip] How to get all transformed and presolved variables?

Martin Bergner mbergner at mathematik.tu-darmstadt.de
Wed Mar 24 09:39:33 MET 2010


Hello Tobias,

> Do you really want to have the aggregated variables as well? If so, the methods of choice 
> will be SCIPgetFixedVars() and SCIPgetNFixedVars(). Note that these methods always return 
> NULL and 0 for the original problem, i.e., if you are still in the SCIP_STAGE_PROBLEM stage.
The question is indeed interesting. But I'm afraid I don't quite
understand the concept of active and fixed variables.

My understanding was that active variables are variables that are
currently in the problem and in the LP-relaxation and are not priced out
or maybe fixed to some value. Fixed variables are variables which have a
fixed value and need not to be considered for during the pricing and in
the problem anymore. 

However, the aggregated variables that I have have bounds 0 and 1 and
are negations of some original integer variables. When I loop over the
variables of a constraint, I get these transformed and aggregated
variables. These are, as far as I could tell, not fixed to a particular
value. I want to know the original transformed variable which belongs to
this aggregated variable. 

I just wondered why I get access to a variable, which is not in the vars
array. If it is just fixed to a specific value, I thought that SCIP
would modify the constraint in such a way that the fixed variable
disappears and the rhs and lhs are updated accordingly. Furthermore, I
thought that the same invariants (there is no var in a constraint that
is not in the var array) would hold. 

I could just get the "original" transformed variable for this aggregated
variable. However, I want to collect statistics like the sign of the
variable coefficient but if the variable is negated and I need to track
all kinds of aggregation steps, that would lead to a bit more work,
provided that I can track all of the steps.

I don't know if my problem became somewhat clearer, however if you could
at least check if my understanding of active and fixed variables is
correct (which I doubt) then maybe I can figure out the solution myself.

Thanks in advance and best regards,
   Martin



More information about the Scip mailing list