[SCIP] Handling Inactive multiaggregated/fixed variables

Stefan Vigerske svigerske at gams.com
Fri Nov 26 09:36:15 CET 2021


Hi,

if there are still inactive variables, then you cannot just ignore them.
But there are functions that should make it easier to work with these. 
In particular, SCIPgetProbvarLinearSum() should be useful for you:
https://www.scipopt.org/doc-7.0.3/html/group__PublicVariableMethods.php#ga307a0e2fa84fc143795177bef13e6e07
It is taking an sum_i a_i x_i + c and gives you back an equivalent
sum_j b_j x_j + d, where now every x_j is an active variable.

Also of interest could be
https://www.scipopt.org/doc-7.0.3/html/pub__misc__linear_8h.php
https://www.scipopt.org/doc-7.0.3/html/pub__matrix_8h.php

Stefan

On 11/24/21 15:26, Hulst, Rolf van der (UT-EEMCS) wrote:
> Dear SCIP-community,
> 
> 
> I'd like to read the constraint matrix from SCIP after presolving into a sparse matrix format (e.g. Ax <= b) after running SCIP to presolve the instance.
> 
> I get the variables of the transformed problem using "SCIPgetVars(scip)" and "SCIPgetNVars(scip)".
> However, when I read the constraints, some inactive variables which were fixed or aggregated during presolving are still present in some of the constraints.
> 
> After fixing/aggregating these variables, are the lhs/rhs and/or variable coefficients updated correspondingly, and can I ignore this variable entry in the constraint when determining the corresponding sparse matrix row? (e.g. I would simply call  "SCIPconsGetRhs()" to determine b_i and skip any inactive variables when determining coefficients for a_i). Or should I call SCIPgetMultiAggrVars() and SCIPgetMultiAggrConstant() in order to update the coefficient of the aggregated variables and rhs in that constraint? And are these aggregated variables pointing to the original or the transformed variables? How should I handle these in order to correctly read the problem into matrix format Ax<=b?
> 
> Best,
> 
> Rolf
> 
> 
> 
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip
> 



More information about the Scip mailing list