60#define PRESOL_NAME "redvub"
61#define PRESOL_DESC "detect redundant variable bound constraints"
62#define PRESOL_PRIORITY -9000000
63#define PRESOL_MAXROUNDS 0
64#define PRESOL_TIMING SCIP_PRESOLTIMING_EXHAUSTIVE
66#define MAXPAIRCOMP 1000
273 uselinearscan =
TRUE;
275 uselinearscan =
FALSE;
277 for(
i = 0;
i < nvubs;
i++ )
279 for( j =
i+1; j < nvubs; j++ )
307 isvartoagg[binidxs[j]] =
TRUE;
311 deletecons[vubs[j]] =
TRUE;
324 isvartoagg[binidxs[
i]] =
TRUE;
328 deletecons[vubs[
i]] =
TRUE;
380 uselinearscan =
TRUE;
382 uselinearscan =
FALSE;
384 for(
i = 0;
i < nvlbs;
i++ )
386 for( j =
i+1; j < nvlbs; j++ )
414 isvartoagg[binidxs[j]] =
TRUE;
418 deletecons[vlbs[j]] =
TRUE;
431 isvartoagg[binidxs[
i]] =
TRUE;
435 deletecons[vlbs[
i]] =
TRUE;
481 for(
c = 0;
c < ncols;
c++ )
494 for( ; (colpnt < colend); colpnt++ )
501 if(
isVub(
scip, matrix, *colpnt, &lowthreshold, &highthreshold, &conidx, &binidx) )
503 vbcons[nvbcons] = *colpnt;
504 lowthresholds[nvbcons] = lowthreshold;
505 highthresholds[nvbcons] = highthreshold;
506 conidxs[nvbcons] = conidx;
507 binidxs[nvbcons] = binidx;
514 lowthresholds, highthresholds, conidxs, binidxs,
515 nvaragg, isvartoagg, aggvars, ndeletecons, deletecons) );
522 for( ; (colpnt < colend); colpnt++ )
529 if(
isVlb(
scip, matrix, *colpnt, &lowthreshold, &highthreshold, &conidx, &binidx) )
531 vbcons[nvbcons] = *colpnt;
532 lowthresholds[nvbcons] = lowthreshold;
533 highthresholds[nvbcons] = highthreshold;
534 conidxs[nvbcons] = conidx;
535 binidxs[nvbcons] = binidx;
542 lowthresholds, highthresholds, conidxs, binidxs,
543 nvaragg, isvartoagg, aggvars, ndeletecons, deletecons) );
596 naddconss, ndelconss, nchgcoefs, nchgbds, nfixedvars) );
608 if( initialized && complete )
638 for( v = 0; v < ncols; v++ )
648 0.0, &infeasible, &redundant, &aggregated) );
669 if( ndeletecons > 0 )
672 for(
r = 0;
r < nrows;
r++ )
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
int SCIPgetNContVars(SCIP *scip)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPincludePresolRedvub(SCIP *scip)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
SCIP_Bool SCIPisNLPEnabled(SCIP *scip)
SCIP_RETCODE SCIPsetPresolCopy(SCIP *scip, SCIP_PRESOL *presol,)
SCIP_RETCODE SCIPincludePresolBasic(SCIP *scip, SCIP_PRESOL **presolptr, const char *name, const char *desc, int priority, int maxrounds, SCIP_PRESOLTIMING timing, SCIP_DECL_PRESOLEXEC((*presolexec)), SCIP_PRESOLDATA *presoldata)
const char * SCIPpresolGetName(SCIP_PRESOL *presol)
int SCIPgetNActivePricers(SCIP *scip)
SCIP_Bool SCIPinProbing(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPaggregateVars(SCIP *scip, SCIP_VAR *varx, SCIP_VAR *vary, SCIP_Real scalarx, SCIP_Real scalary, SCIP_Real rhs, SCIP_Bool *infeasible, SCIP_Bool *redundant, SCIP_Bool *aggregated)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_Bool SCIPvarsHaveCommonClique(SCIP_VAR *var1, SCIP_Bool value1, SCIP_VAR *var2, SCIP_Bool value2, SCIP_Bool regardimplics)
assert(minobj< SCIPgetCutoffbound(scip))
int * SCIPmatrixGetColIdxPtr(SCIP_MATRIX *matrix, int col)
int SCIPmatrixGetRowNNonzs(SCIP_MATRIX *matrix, int row)
int SCIPmatrixGetColNDownlocks(SCIP_MATRIX *matrix, int col)
int SCIPmatrixGetColNNonzs(SCIP_MATRIX *matrix, int col)
SCIP_Bool SCIPmatrixIsRowRhsInfinity(SCIP_MATRIX *matrix, int row)
int SCIPmatrixGetColNUplocks(SCIP_MATRIX *matrix, int col)
SCIP_Real SCIPmatrixGetRowLhs(SCIP_MATRIX *matrix, int row)
SCIP_Real * SCIPmatrixGetRowValPtr(SCIP_MATRIX *matrix, int row)
SCIP_RETCODE SCIPmatrixCreate(SCIP *scip, SCIP_MATRIX **matrixptr, SCIP_Bool onlyifcomplete, SCIP_Bool *initialized, SCIP_Bool *complete, SCIP_Bool *infeasible, int *naddconss, int *ndelconss, int *nchgcoefs, int *nchgbds, int *nfixedvars)
int SCIPmatrixGetNColumns(SCIP_MATRIX *matrix)
SCIP_CONS * SCIPmatrixGetCons(SCIP_MATRIX *matrix, int row)
void SCIPmatrixFree(SCIP *scip, SCIP_MATRIX **matrix)
SCIP_VAR * SCIPmatrixGetVar(SCIP_MATRIX *matrix, int col)
int * SCIPmatrixGetRowIdxPtr(SCIP_MATRIX *matrix, int row)
int SCIPmatrixGetNRows(SCIP_MATRIX *matrix)
memory allocation routines
#define BMSclearMemoryArray(ptr, num)
static SCIP_RETCODE detectDominatingVlbs(SCIP *scip, SCIP_MATRIX *matrix, int nvlbs, int *vlbs, SCIP_Real *lowthresholds, SCIP_Real *highthresholds, int *conidxs, int *binidxs, int *nvaragg, SCIP_Bool *isvartoagg, SCIP_VAR **aggvars, int *ndeletecons, SCIP_Bool *deletecons)
static SCIP_Bool isVlb(SCIP *scip, SCIP_MATRIX *matrix, int row, SCIP_Real *lowthreshold, SCIP_Real *highthreshold, int *conidx, int *binidx)
static SCIP_RETCODE detectDominatingVubs(SCIP *scip, SCIP_MATRIX *matrix, int nvubs, int *vubs, SCIP_Real *lowthresholds, SCIP_Real *highthresholds, int *conidxs, int *binidxs, int *nvaragg, SCIP_Bool *isvartoagg, SCIP_VAR **aggvars, int *ndeletecons, SCIP_Bool *deletecons)
static SCIP_Bool isVub(SCIP *scip, SCIP_MATRIX *matrix, int row, SCIP_Real *lowthreshold, SCIP_Real *highthreshold, int *conidx, int *binidx)
static SCIP_RETCODE findVarAggrRedVbcons(SCIP *scip, SCIP_MATRIX *matrix, int *nvaragg, SCIP_Bool *isvartoagg, SCIP_VAR **aggvars, int *ndeletecons, SCIP_Bool *deletecons)
remove redundant variable upper bound constraints
public methods for matrix
public methods for message output
public methods for presolvers
public methods for problem variables
public methods for constraint handler plugins and constraints
public methods for memory management
public methods for message handling
public methods for nonlinear relaxation
public methods for numerical tolerances
public methods for presolving plugins
public methods for variable pricer plugins
public methods for global and local (sub)problems
public methods for the probing mode
public methods for SCIP variables
struct SCIP_Cons SCIP_CONS
struct SCIP_Matrix SCIP_MATRIX
#define SCIP_DECL_PRESOLCOPY(x)
struct SCIP_Presol SCIP_PRESOL
#define SCIP_DECL_PRESOLEXEC(x)
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_VARTYPE_CONTINUOUS
enum SCIP_Vartype SCIP_VARTYPE