43#ifndef SCIP_WITH_PAPILO
58#pragma GCC diagnostic ignored "-Wshadow"
59#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
60#pragma GCC diagnostic ignored "-Wredundant-decls"
63#if __GNUC__ == 12 && __GNUC__MINOR__ <= 2
64#pragma GCC diagnostic ignored "-Wstringop-overflow"
88#if defined(SCIP_WITH_EXACTSOLVE)
92#include "papilo/core/Presolve.hpp"
93#include "papilo/core/ProblemBuilder.hpp"
94#include "papilo/Config.hpp"
97#if !defined(PAPILO_API_VERSION)
98#define PAPILO_APIVERSION 0
99#elif !(PAPILO_API_VERSION + 0)
100#define PAPILO_APIVERSION 1
102#define PAPILO_APIVERSION PAPILO_API_VERSION
105#if defined(SCIP_WITH_GMP) && defined(SCIP_WITH_EXACTSOLVE) && !defined(PAPILO_HAVE_GMP)
106#warning SCIP built with GMP and exact solving, but PaPILO without GMP disables exact presolving.
109#if defined(SCIP_WITH_GMP) && defined(SCIP_WITH_EXACTSOLVE) && defined(PAPILO_HAVE_GMP)
110#define PAPILO_WITH_EXACTPRESOLVE
113#define PRESOL_NAME "milp"
114#define PRESOL_DESC "MILP specific presolving methods"
115#define PRESOL_PRIORITY 9999999
116#define PRESOL_MAXROUNDS (-1)
117#define PRESOL_TIMING SCIP_PRESOLTIMING_MEDIUM
120#define DEFAULT_THREADS 1
121#define DEFAULT_ABORTFAC_EXHAUSTIVE 0.0008
122#define DEFAULT_ABORTFAC_MEDIUM 0.0008
123#define DEFAULT_ABORTFAC_FAST 0.0008
124#define DEFAULT_DETECTLINDEP 0
125#define DEFAULT_INTERNAL_MAXROUNDS (-1)
126#define DEFAULT_MODIFYCONSFAC 0.8
128#define DEFAULT_RANDOMSEED 0
131#define DEFAULT_HUGEBOUND 1e8
134#define DEFAULT_ENABLEDOMCOL TRUE
135#define DEFAULT_ENABLEDUALINFER TRUE
136#define DEFAULT_ENABLEMULTIAGGR TRUE
137#define DEFAULT_ENABLEPARALLELROWS TRUE
138#define DEFAULT_ENABLEPROBING TRUE
139#define DEFAULT_ENABLESPARSIFY FALSE
140#define DEFAULT_ENABLECLIQUEMERGE FALSE
143#define DEFAULT_MAXBADGESIZE_SEQ 15000
144#define DEFAULT_MAXBADGESIZE_PAR (-1)
145#define DEFAULT_MARKOWITZTOLERANCE 0.01
146#define DEFAULT_MAXFILLINPERSUBST 3
147#define DEFAULT_MAXSHIFTPERROW 10
148#define DEFAULT_MAXEDGESPARALLEL 1000000
149#define DEFAULT_MAXEDGESSEQUENTIAL 100000
150#define DEFAULT_MAXCLIQUESIZE 100
151#define DEFAULT_MAXGREEDYCALLS 10000
154#define DEFAULT_FILENAME_PROBLEM "-"
155#define DEFAULT_VERBOSITY 0
163struct SCIP_PresolMilpData
168 int maxfillinpersubstitution;
171 int internalmaxrounds;
173 int detectlineardependency;
174#if PAPILO_APIVERSION >= 6
175 int maxedgesparallel;
176 int maxedgessequential;
189#if PAPILO_APIVERSION >= 6
200 char* filename =
NULL;
202typedef struct SCIP_PresolMilpData SCIP_PRESOLMILPDATA;
204using namespace papilo;
210#if defined(PAPILO_WITH_EXACTPRESOLVE)
216 papilo::Rational papiloval
222 res->
val = papilo::Rational(papiloval.backend().data());
232Problem<papilo::Rational> buildProblemRational(
237 ProblemBuilder<papilo::Rational> builder;
243 builder.reserve(nnz, nrows, ncols);
246 builder.setNumCols(ncols);
247 for(
int i = 0;
i != ncols; ++
i )
252 builder.setColLb(
i, lb->
val);
253 builder.setColUb(
i, ub->
val);
262 builder.setNumRows(nrows);
263 for(
int i = 0;
i != nrows; ++
i )
267 Vec<papilo::Rational> rowvals;
269 for(
int j = 0; j < rowlen; ++j )
270 rowvals.emplace_back(rowvalsscip[j]->val);
271 builder.addRowEntries(
i, rowlen, rowcols, rowvals.data());
275 builder.setRowLhs(
i, lhs->
val);
276 builder.setRowRhs(
i, rhs->
val);
281 builder.setObjOffset(0);
283 return builder.build();
289Problem<SCIP_Real> buildProblemReal(
294 ProblemBuilder<SCIP_Real> builder;
300 builder.reserve(nnz, nrows, ncols);
303 builder.setNumCols(ncols);
304 for(
int i = 0;
i != ncols; ++
i )
309 builder.setColLb(
i, lb);
310 builder.setColUb(
i, ub);
314#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 1)
321 builder.setNumRows(nrows);
322 for(
int i = 0;
i != nrows; ++
i )
327 builder.addRowEntries(
i, rowlen, rowcols, rowvals);
331 builder.setRowLhs(
i, lhs);
332 builder.setRowRhs(
i, rhs);
338 builder.setObjOffset(0);
340#ifdef SCIP_PRESOLLIB_ENABLE_OUTPUT
345 return builder.build();
354 SCIP_PRESOLMILPDATA* data,
362 presolve.getPresolveOptions().substitutebinarieswithints =
false;
367 presolve.getPresolveOptions().removeslackvars =
false;
370 presolve.getPresolveOptions().maxfillinpersubstitution = data->maxfillinpersubstitution;
371 presolve.getPresolveOptions().markowitz_tolerance = data->markowitztolerance;
372 presolve.getPresolveOptions().maxshiftperrow = data->maxshiftperrow;
373 presolve.getPresolveOptions().hugeval = data->hugebound;
376 presolve.getPresolveOptions().detectlindep = allowconsmodification ? data->detectlineardependency : 0;
382 presolve.getPresolveOptions().threads = data->threads;
384#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 3)
385 presolve.getPresolveOptions().maxrounds = data->internalmaxrounds;
390 presolve.getPresolveOptions().dualreds = 2;
392 presolve.getPresolveOptions().dualreds = 1;
394 presolve.getPresolveOptions().dualreds = 0;
397 using uptr = std::unique_ptr<PresolveMethod<T>>;
400 presolve.addPresolveMethod( uptr(
new SingletonCols<T>() ) );
401 presolve.addPresolveMethod( uptr(
new CoefficientStrengthening<T>() ) );
402 presolve.addPresolveMethod( uptr(
new ConstraintPropagation<T>() ) );
405 presolve.addPresolveMethod( uptr(
new SimpleProbing<T>() ) );
406 if( data->enableparallelrows )
407 presolve.addPresolveMethod( uptr(
new ParallelRowDetection<T>() ) );
410 presolve.addPresolveMethod( uptr(
new SingletonStuffing<T>() ) );
411#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 1)
412 DualFix<T> *dualfix =
new DualFix<T>();
413 dualfix->set_fix_to_infinity_allowed(
false);
414 presolve.addPresolveMethod( uptr( dualfix ) );
416 presolve.addPresolveMethod( uptr(
new DualFix<SCIP_Real>() ) );
418 presolve.addPresolveMethod( uptr(
new FixContinuous<T>() ) );
419 presolve.addPresolveMethod( uptr(
new SimplifyInequalities<T>() ) );
420 presolve.addPresolveMethod( uptr(
new SimpleSubstitution<T>() ) );
421#if PAPILO_APIVERSION >= 6
422 if( data->enablecliquemerging )
424 CliqueMerging<T>* cliquemerging =
new CliqueMerging<T>();
425 cliquemerging->setParameters( data->maxedgesparallel, data->maxedgessequential,
426 data->maxcliquesize, data->maxgreedycalls );
427 presolve.addPresolveMethod( uptr( cliquemerging ) );
432 presolve.addPresolveMethod( uptr(
new ImplIntDetection<T>() ) );
433 if( data->enabledualinfer )
434 presolve.addPresolveMethod( uptr(
new DualInfer<T>() ) );
435 if( data->enableprobing )
437#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 1)
438 Probing<T> *probing =
new Probing<T>();
439 if(
presolve.getPresolveOptions().runs_sequential() )
441 probing->set_max_badge_size( data->maxbadgesizeseq );
445 probing->set_max_badge_size( data->maxbadgesizepar );
447#if PAPILO_APIVERSION >= 12
449 probing->set_numcliquefails(0);
451 presolve.addPresolveMethod( uptr( probing ) );
453 presolve.addPresolveMethod( uptr(
new Probing<T>() ) );
454 if( data->maxbadgesizeseq != DEFAULT_MAXBADGESIZE_SEQ )
456 " The parameter 'presolving/milp/maxbadgesizeseq' can only be used with PaPILO 2.1.0 or later versions.\n");
458 if( data->maxbadgesizepar != DEFAULT_MAXBADGESIZE_PAR )
460 " The parameter 'presolving/milp/maxbadgesizepar' can only be used with PaPILO 2.1.0 or later versions.\n");
463 if( data->enabledomcol )
464 presolve.addPresolveMethod( uptr(
new DominatedCols<T>() ) );
465 if( data->enablemultiaggr )
466 presolve.addPresolveMethod( uptr(
new Substitution<T>() ) );
467 if( data->enablesparsify )
468 presolve.addPresolveMethod( uptr(
new Sparsify<T>() ) );
471#if PAPILO_APIVERSION >= 3
472 presolve.getPresolveOptions().useabsfeas =
false;
476 presolve.getPresolveOptions().epsilon = 0.0;
477 presolve.getPresolveOptions().feastol = 0.0;
485#ifndef SCIP_PRESOLLIB_ENABLE_OUTPUT
487 presolve.setVerbosityLevel((VerbosityLevel) data->verbosity);
490#if PAPILO_APIVERSION >= 2
491 presolve.getPresolveOptions().abortfac = data->abortfacexhaustive;
492 presolve.getPresolveOptions().abortfacmedium = data->abortfacmedium;
493 presolve.getPresolveOptions().abortfacfast = data->abortfacfast;
505#if defined(PAPILO_WITH_EXACTPRESOLVE)
511 SCIP_PRESOLMILPDATA* data,
534 int oldnaggrvars = *naggrvars;
535 int oldnfixedvars = *nfixedvars;
536 int oldnchgbds = *nchgbds;
538 Problem<papilo::Rational> problem = buildProblemRational(
scip, matrix);
539 Presolve<papilo::Rational>
presolve;
540 setupPresolve(
scip,
presolve, data, allowconsmodification);
545 presolve.getPresolveOptions().threads == 1 ?
"" :
" on multiple threads");
547 int oldnnz = problem.getConstraintMatrix().getNnz();
549#if (PAPILO_VERSION_MAJOR >= 2)
550 PresolveResult<papilo::Rational> res =
presolve.apply(problem,
false);
552 PresolveResult<papilo::Rational> res =
presolve.apply(problem);
554 data->lastncols = problem.getNCols();
555 data->lastnrows = problem.getNRows();
560 case PresolveStatus::kInfeasible:
563 " (%.1fs) MILP presolver detected infeasibility\n",
567 case PresolveStatus::kUnbndOrInfeas:
568 case PresolveStatus::kUnbounded:
571 " (%.1fs) MILP presolver detected unboundedness\n",
575 case PresolveStatus::kUnchanged:
577 data->lastncols =
nvars;
578 data->lastnrows = nconss;
580 " (%.1fs) MILP presolver found nothing\n",
584 case PresolveStatus::kReduced:
585 data->lastncols = problem.getNCols();
586 data->lastnrows = problem.getNRows();
591 Vec<SCIP_VAR*> tmpvars;
592 Vec<SCIP_Real> tmpvalsreal;
595 int newnnz = problem.getConstraintMatrix().getNnz();
596 bool constraintsReplaced =
false;
597 if( newnnz == 0 || (allowconsmodification &&
598 (problem.getNRows() <= data->modifyconsfac * data->lastnrows ||
599 newnnz <= data->modifyconsfac * oldnnz)) )
602 int newnrows = problem.getNRows();
604 constraintsReplaced =
true;
607 for(
int i = 0;
i < newnrows; ++
i )
614 *ndelconss += oldnrows;
615 *naddconss += newnrows;
617 for(
int i = 0;
i < oldnrows; ++
i )
625 const Vec<RowFlags>& rflags = problem.getRowFlags();
626 const auto& consmatrix = problem.getConstraintMatrix();
627 for(
int i = 0;
i < newnrows; ++
i )
629 auto rowvec = consmatrix.getRowCoefficients(
i);
630 const int* rowcols = rowvec.getIndices();
632 papilo::Rational* rowvals =
const_cast<papilo::Rational*
>(rowvec.getValues());
633 int rowlen = rowvec.getLength();
636 papilo::Rational lhs = rflags[
i].test(RowFlag::kLhsInf) ? -
SCIPinfinity(
scip) : consmatrix.getLeftHandSides()[
i];
637 papilo::Rational rhs = rflags[
i].test(RowFlag::kRhsInf) ?
SCIPinfinity(
scip) : consmatrix.getRightHandSides()[
i];
641 tmpvars.reserve(rowlen);
642 for(
int j = 0; j < rowlen; ++j )
643 tmpvars.push_back(
SCIPmatrixGetVar(matrix, res.postsolve.origcol_mapping[rowcols[j]]));
656 for(
int j = 0; j < rowlen; j++ )
657 setRational(
scip, tmpvals[j], rowvals[j]);
659 setRational(
scip, tmprhs, rhs);
660 setRational(
scip, tmplhs, lhs);
661 if( rflags[
i].test(RowFlag::kLhsInf) )
663 if( rflags[
i].test(RowFlag::kRhsInf) )
680 for( std::size_t
i = 0;
i != res.postsolve.types.size(); ++
i )
683 res.postsolve.types[
i];
684 int first = res.postsolve.start[
i];
685 int last = res.postsolve.start[
i + 1];
689 case ReductionType::kFixedCol:
694 int col = res.postsolve.indices[first];
698 papilo::Rational value = res.postsolve.values[first];
701 setRational(
scip, tmpval, value);
750#if (PAPILO_VERSION_MAJOR >= 2)
751 case ReductionType::kSubstitutedColWithDual:
753 case ReductionType::kSubstitutedCol:
756 papilo::Rational side = 0;
759 int startRowCoefficients = 0;
760 int lastRowCoefficients = 0;
762 if( type == ReductionType::kSubstitutedCol )
764 rowlen = last - first - 1;
765 col = res.postsolve.indices[first];
766 side = res.postsolve.values[first];
768 startRowCoefficients = first + 1;
769 lastRowCoefficients = last;
771#if (PAPILO_VERSION_MAJOR >= 2)
772 if( type == ReductionType::kSubstitutedColWithDual )
774 rowlen = (int) res.postsolve.values[first];
775 col = res.postsolve.indices[first + 3 + rowlen];
776 side = res.postsolve.values[first + 1];
778 startRowCoefficients = first + 3;
779 lastRowCoefficients = first + 3 + rowlen;
781 assert(side == res.postsolve.values[first + 2]);
782 assert(res.postsolve.indices[first + 1] == 0);
783 assert(res.postsolve.indices[first + 2] == 0);
785 assert( type == ReductionType::kSubstitutedCol || type == ReductionType::kSubstitutedColWithDual );
787 assert( type == ReductionType::kSubstitutedCol );
797 papilo::Rational scalarx = res.postsolve.values[startRowCoefficients];
798 papilo::Rational scalary = res.postsolve.values[startRowCoefficients + 1];
808 setRational(
scip, tmpscalarx, scalarx);
809 setRational(
scip, tmpscalary, scalary);
817 setRational(
scip, tmpside, side);
821 tmpscalarx, tmpscalary, constant);
842 for(
int j = startRowCoefficients; j < lastRowCoefficients; ++j )
844 if( res.postsolve.indices[j] == col )
846 setRational(
scip, colCoef, res.postsolve.values[j]);
852 tmpvars.reserve(rowlen);
860 for(
int j = startRowCoefficients; j < lastRowCoefficients; ++j )
862 if( res.postsolve.indices[j] == col )
866 setRational(
scip, tmpvals[
c], -res.postsolve.values[j] / colCoef->
val);
869 setRational(
scip, updatedSide, side);
876 tmpvars.data(), tmpvals, updatedSide, &infeas, &aggregated) );
886 else if( constraintsReplaced && !redundant )
895 setRational(
scip, tmpside, side);
898 for(
int j = startRowCoefficients; j < lastRowCoefficients; ++j )
900 int idx = j - startRowCoefficients;
902 setRational(
scip, tmpvals[idx], res.postsolve.values[j]);
908 tmpvars.size(), tmpvars.data(), tmpvals, tmpside, tmpside ) );
928 case ReductionType::kParallelCol:
930#if (PAPILO_VERSION_MAJOR <= 1 && PAPILO_VERSION_MINOR==0)
932 case ReductionType::kFixedInfCol: {
933 if(!constraintsReplaced)
942 int column = res.postsolve.indices[first];
943 bool is_negative_infinity = res.postsolve.values[first] < 0;
946 if( is_negative_infinity )
962#if (PAPILO_VERSION_MAJOR >= 2)
963 case ReductionType::kVarBoundChange :
964 case ReductionType::kRedundantRow :
965 case ReductionType::kRowBoundChange :
966 case ReductionType::kReasonForRowBoundChangeForcedByRow :
967 case ReductionType::kRowBoundChangeForcedByRow :
968 case ReductionType::kSaveRow :
969 case ReductionType::kReducedBoundsCost :
970 case ReductionType::kColumnDualValue :
971 case ReductionType::kRowDualValue :
972 case ReductionType::kCoefficientChange :
974 SCIPerrorMessage(
"PaPILO: PaPILO should not return dual postsolving reductions in SCIP!!\n");
987 VariableDomains<papilo::Rational>& varDomains = problem.getVariableDomains();
992 for(
int i = 0;
i != problem.getNCols(); ++
i )
995 if( !varDomains.flags[
i].test(ColFlag::kLbInf) )
1000 setRational(
scip, varbound, varDomains.lower_bounds[
i]);
1017 if( !varDomains.flags[
i].test(ColFlag::kUbInf) )
1021 setRational(
scip, varbound, varDomains.upper_bounds[
i]);
1044 " (%.1fs) MILP presolver (%d rounds): %d aggregations, %d fixings, %d bound changes\n",
1046 *nfixedvars - oldnfixedvars, *nchgbds - oldnchgbds);
1061 SCIP_PRESOLMILPDATA* data,
1085 int oldnaggrvars = *naggrvars;
1086 int oldnfixedvars = *nfixedvars;
1087 int oldnchgbds = *nchgbds;
1090 Problem<SCIP_Real> problem = buildProblemReal(
scip, matrix);
1091 int oldnnz = problem.getConstraintMatrix().getNnz();
1093 setupPresolve(
scip,
presolve, data, allowconsmodification);
1098 presolve.getPresolveOptions().threads == 1 ?
"" :
" on multiple threads");
1101#if (PAPILO_VERSION_MAJOR >= 2)
1102 PresolveResult<SCIP_Real> res =
presolve.apply(problem,
false);
1104 PresolveResult<SCIP_Real> res =
presolve.apply(problem);
1106 data->lastncols = problem.getNCols();
1107 data->lastnrows = problem.getNRows();
1110 switch( res.status )
1112 case PresolveStatus::kInfeasible:
1115 " (%.1fs) MILP presolver detected infeasibility\n",
1119 case PresolveStatus::kUnbndOrInfeas:
1120 case PresolveStatus::kUnbounded:
1123 " (%.1fs) MILP presolver detected unboundedness\n",
1127 case PresolveStatus::kUnchanged:
1129 data->lastncols =
nvars;
1130 data->lastnrows = nconss;
1132 " (%.1fs) MILP presolver found nothing\n",
1136 case PresolveStatus::kReduced:
1137 data->lastncols = problem.getNCols();
1138 data->lastnrows = problem.getNRows();
1145 VariableDomains<SCIP_Real>& varDomains = problem.getVariableDomains();
1146 for(
int i = 0;
i != problem.getNCols(); ++
i )
1148 assert( ! varDomains.flags[
i].test(ColFlag::kInactive) );
1150 if( !varDomains.flags[
i].test(ColFlag::kLbInf) )
1166 if( !varDomains.flags[
i].test(ColFlag::kUbInf) )
1186 " (%.1fs) MILP presolver detected infeasibility\n",
1193 Vec<SCIP_VAR*> tmpvars;
1194 Vec<SCIP_Real> tmpvals;
1197 int newnnz = problem.getConstraintMatrix().getNnz();
1198 bool constraintsReplaced =
false;
1199 if( newnnz == 0 || (allowconsmodification &&
1202 newnnz <= data->modifyconsfac * oldnnz)) )
1205 int newnrows = problem.getNRows();
1207 constraintsReplaced =
true;
1210 for(
int i = 0;
i < newnrows; ++
i )
1217 *ndelconss += oldnrows;
1218 *naddconss += newnrows;
1220 for(
int i = 0;
i < oldnrows; ++
i )
1227 const Vec<RowFlags>& rflags = problem.getRowFlags();
1228 const auto& consmatrix = problem.getConstraintMatrix();
1229 for(
int i = 0;
i < newnrows; ++
i )
1231 auto rowvec = consmatrix.getRowCoefficients(
i);
1232 const int* rowcols = rowvec.getIndices();
1235 int rowlen = rowvec.getLength();
1243 tmpvars.reserve(rowlen);
1244 for(
int j = 0; j < rowlen; ++j )
1245 tmpvars.push_back(
SCIPmatrixGetVar(matrix, res.postsolve.origcol_mapping[rowcols[j]]));
1267 bool checkmultaggr =
1268#if PAPILO_APIVERSION >= 1
1269 presolve.getStatistics().single_matrix_coefficient_changes > 0
1271 presolve.getStatistics().ncoefchgs > 0
1273 && !constraintsReplaced;
1276 for( std::size_t
i = 0;
i != res.postsolve.types.size(); ++
i )
1278 ReductionType type = res.postsolve.types[
i];
1279 int first = res.postsolve.start[
i];
1280 int last = res.postsolve.start[
i + 1];
1284 case ReductionType::kFixedCol:
1288 int col = res.postsolve.indices[first];
1292 SCIP_Real value = res.postsolve.values[first];
1311#if (PAPILO_VERSION_MAJOR >= 2)
1312 case ReductionType::kSubstitutedColWithDual:
1314 case ReductionType::kSubstitutedCol:
1320 int startRowCoefficients = 0;
1321 int lastRowCoefficients = 0;
1323 if( type == ReductionType::kSubstitutedCol )
1325 rowlen = last - first - 1;
1326 col = res.postsolve.indices[first];
1327 side = res.postsolve.values[first];
1329 startRowCoefficients = first + 1;
1330 lastRowCoefficients = last;
1332#if (PAPILO_VERSION_MAJOR >= 2)
1333 if( type == ReductionType::kSubstitutedColWithDual )
1335 rowlen = (int) res.postsolve.values[first];
1336 col = res.postsolve.indices[first + 3 + rowlen];
1337 side = res.postsolve.values[first + 1];
1339 startRowCoefficients = first + 3;
1340 lastRowCoefficients = first + 3 + rowlen;
1342 assert(side == res.postsolve.values[first + 2]);
1343 assert(res.postsolve.indices[first + 1] == 0);
1344 assert(res.postsolve.indices[first + 2] == 0);
1346 assert( type == ReductionType::kSubstitutedCol || type == ReductionType::kSubstitutedColWithDual );
1348 assert( type == ReductionType::kSubstitutedCol );
1359 SCIP_Real scalarx = res.postsolve.values[startRowCoefficients];
1360 SCIP_Real scalary = res.postsolve.values[startRowCoefficients + 1];
1374 SCIPdebugMsg(
scip,
"Aggregation of <%s> and <%s> rejected because they are already fixed.\n",
1380 updatedSide = side - constant;
1394 for( j = startRowCoefficients; j < lastRowCoefficients; ++j )
1396 if( res.postsolve.indices[j] == col )
1398 colCoef = res.postsolve.values[j];
1405 tmpvars.reserve(rowlen);
1406 tmpvals.reserve(rowlen);
1420 SCIPdebugMsg(
scip,
"Multi-aggregation of <%s> rejected because it is already fixed.\n",
1426 updatedSide = side - constant;
1434 impliedlb = impliedub = updatedSide / colCoef;
1436 for( j = startRowCoefficients; j < lastRowCoefficients; ++j )
1441 if( res.postsolve.indices[j] == col )
1444 coef = - res.postsolve.values[j] / colCoef;
1447 if( checklbimplied )
1466 if( checkubimplied )
1484 tmpvals.push_back(coef);
1485 tmpvars.push_back(
var);
1489 if( j < lastRowCoefficients )
1499 tmpvars.data(), tmpvals.data(), updatedSide / colCoef, &infeas, &aggregated) );
1504 else if( constraintsReplaced && !redundant )
1509 for(
int j = startRowCoefficients; j < lastRowCoefficients; ++j )
1512 tmpvals.push_back(res.postsolve.values[j]);
1518 tmpvars.size(), tmpvars.data(), tmpvals.data(), side, side ) );
1532 case ReductionType::kParallelCol:
1534#if PAPILO_VERSION_MAJOR > 1 || (PAPILO_VERSION_MAJOR == 1 && PAPILO_VERSION_MINOR >= 1)
1535 case ReductionType::kFixedInfCol: {
1538 if(!constraintsReplaced)
1544 int column = res.postsolve.indices[first];
1545 bool is_negative_infinity = res.postsolve.values[first] < 0;
1548 if( is_negative_infinity )
1561#if (PAPILO_VERSION_MAJOR >= 2)
1562 case ReductionType::kVarBoundChange :
1563 case ReductionType::kRedundantRow :
1564 case ReductionType::kRowBoundChange :
1565 case ReductionType::kReasonForRowBoundChangeForcedByRow :
1566 case ReductionType::kRowBoundChangeForcedByRow :
1567 case ReductionType::kSaveRow :
1568 case ReductionType::kReducedBoundsCost :
1569 case ReductionType::kColumnDualValue :
1570 case ReductionType::kRowDualValue :
1571 case ReductionType::kCoefficientChange :
1573 SCIPerrorMessage(
"PaPILO: PaPILO should not return dual postsolving reductions in SCIP!!\n");
1585 " (%.1fs) MILP presolver (%d rounds): %d aggregations, %d fixings, %d bound changes\n",
1587 *nfixedvars - oldnfixedvars, *nchgbds - oldnchgbds);
1629 data->lastncols = -1;
1630 data->lastnrows = -1;
1641 SCIP_PRESOLMILPDATA* data;
1654 if( data->lastncols != -1 && data->lastnrows != -1 &&
1655 nvars > data->lastncols * 0.85 &&
1656 nconss > data->lastnrows * 0.85 )
1660 naddconss, ndelconss, nchgcoefs, nchgbds, nfixedvars) );
1673 if( !initialized || !complete )
1675 data->lastncols = 0;
1676 data->lastnrows = 0;
1684 if( 0 != strncmp(data->filename, DEFAULT_FILENAME_PROBLEM, strlen(DEFAULT_FILENAME_PROBLEM)) )
1687 " writing transformed problem to %s (only enforced constraints)\n", data->filename);
1692 return performRealPresolving(
scip, matrix, data, initialized, nfixedvars, naggrvars, nchgvartypes, nchgbds,
1693 naddholes, ndelconss, naddconss, nupgdconss, nchgcoefs, nchgsides,
result);
1694#if defined(PAPILO_WITH_EXACTPRESOLVE)
1696 return performRationalPresolving(
scip, matrix, data, initialized, nfixedvars, naggrvars, nchgvartypes, nchgbds,
1697 naddholes, ndelconss, naddconss, nupgdconss, nchgcoefs, nchgsides,
result);
1713 SCIP_PRESOLMILPDATA* presoldata;
1716#if defined(PAPILO_VERSION_TWEAK) && PAPILO_VERSION_TWEAK != 0
1717 String name = fmt::format(
"PaPILO {}.{}.{}.{}", PAPILO_VERSION_MAJOR, PAPILO_VERSION_MINOR, PAPILO_VERSION_PATCH, PAPILO_VERSION_TWEAK);
1719 String name = fmt::format(
"PaPILO {}.{}.{}", PAPILO_VERSION_MAJOR, PAPILO_VERSION_MINOR, PAPILO_VERSION_PATCH);
1722#if defined(PAPILO_GITHASH_AVAILABLE) && defined(PAPILO_TBB)
1723 String desc = fmt::format(
"parallel presolve for integer and linear optimization (github.com/scipopt/papilo) (built with TBB) [GitHash: {}]", PAPILO_GITHASH);
1724#elif !defined(PAPILO_GITHASH_AVAILABLE) && !defined(PAPILO_TBB)
1725 String desc(
"parallel presolve for integer and linear optimization (github.com/scipopt/papilo)");
1726#elif defined(PAPILO_GITHASH_AVAILABLE) && !defined(PAPILO_TBB)
1727 String desc = fmt::format(
"parallel presolve for integer and linear optimization (github.com/scipopt/papilo) [GitHash: {}]", PAPILO_GITHASH);
1728#elif !defined(PAPILO_GITHASH_AVAILABLE) && defined(PAPILO_TBB)
1729 String desc = fmt::format(
"parallel presolve for integer and linear optimization (github.com/scipopt/papilo) (built with TBB)");
1754#if defined(PAPILO_WITH_EXACTPRESOLVE)
1763 "maximum number of threads presolving may use (0: automatic)",
1764 &presoldata->threads,
FALSE, DEFAULT_THREADS, 0, INT_MAX,
NULL,
NULL) );
1766 presoldata->threads = 1;
1770 "presolving/" PRESOL_NAME "/maxfillinpersubstitution",
1771 "maximal possible fillin for substitutions to be considered",
1772 &presoldata->maxfillinpersubstitution,
FALSE, DEFAULT_MAXFILLINPERSUBST, INT_MIN, INT_MAX,
NULL,
NULL) );
1776 "maximal amount of nonzeros allowed to be shifted to make space for substitutions",
1777 &presoldata->maxshiftperrow,
TRUE, DEFAULT_MAXSHIFTPERROW, 0, INT_MAX,
NULL,
NULL) );
1781 "the random seed used for randomization of tie breaking",
1784 if( DependentRows<double>::Enabled )
1787 "presolving/" PRESOL_NAME "/detectlineardependency",
1788 "should linear dependent equations and free columns be removed? (0: never, 1: for LPs, 2: always)",
1789 &presoldata->detectlineardependency,
TRUE, DEFAULT_DETECTLINDEP, 0, 2,
NULL,
NULL) );
1792 presoldata->detectlineardependency = DEFAULT_DETECTLINDEP;
1796 "modify SCIP constraints when the number of nonzeros or rows is at most this factor "
1797 "times the number of nonzeros or rows before presolving",
1798 &presoldata->modifyconsfac,
FALSE, DEFAULT_MODIFYCONSFAC, 0.0, 1.0,
NULL,
NULL) );
1802 "the markowitz tolerance used for substitutions",
1803 &presoldata->markowitztolerance,
FALSE, DEFAULT_MARKOWITZTOLERANCE, 0.0, 1.0,
NULL,
NULL) );
1807 "absolute bound value that is considered too huge for activity based calculations",
1810#if PAPILO_APIVERSION >= 2
1812 "abort threshold for exhaustive presolving in PAPILO",
1813 &presoldata->abortfacexhaustive,
TRUE, DEFAULT_ABORTFAC_EXHAUSTIVE, 0.0, 1.0,
NULL,
NULL) );
1815 "abort threshold for medium presolving in PAPILO",
1816 &presoldata->abortfacmedium,
TRUE, DEFAULT_ABORTFAC_MEDIUM, 0.0, 1.0,
NULL,
NULL) );
1818 "abort threshold for fast presolving in PAPILO",
1819 &presoldata->abortfacfast,
TRUE, DEFAULT_ABORTFAC_FAST, 0.0, 1.0,
NULL,
NULL) );
1821 presoldata->abortfacexhaustive = DEFAULT_ABORTFAC_EXHAUSTIVE;
1822 presoldata->abortfacmedium = DEFAULT_ABORTFAC_MEDIUM;
1823 presoldata->abortfacfast = DEFAULT_ABORTFAC_FAST;
1826#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 1)
1828 "maximal badge size in Probing in PaPILO if PaPILO is executed in sequential mode",
1829 &presoldata->maxbadgesizeseq,
FALSE, DEFAULT_MAXBADGESIZE_SEQ, -1, INT_MAX,
NULL,
NULL) );
1832 "maximal badge size in Probing in PaPILO if PaPILO is executed in parallel mode",
1833 &presoldata->maxbadgesizepar,
FALSE, DEFAULT_MAXBADGESIZE_PAR, -1, INT_MAX,
NULL,
NULL) );
1835 presoldata->maxbadgesizeseq = DEFAULT_MAXBADGESIZE_SEQ;
1836 presoldata->maxbadgesizepar = DEFAULT_MAXBADGESIZE_PAR;
1839#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 3)
1841 "internal maxrounds for each milp presolving (-1: no limit, 0: model cleanup)",
1842 &presoldata->internalmaxrounds,
TRUE, DEFAULT_INTERNAL_MAXROUNDS, -1, INT_MAX,
NULL,
NULL) );
1844 presoldata->internalmaxrounds = DEFAULT_INTERNAL_MAXROUNDS;
1849 "should the parallel rows presolver be enabled within the presolve library?",
1850 &presoldata->enableparallelrows,
TRUE, DEFAULT_ENABLEPARALLELROWS,
NULL,
NULL) );
1854 "should the dominated column presolver be enabled within the presolve library?",
1855 &presoldata->enabledomcol,
TRUE, DEFAULT_ENABLEDOMCOL,
NULL,
NULL) );
1859 "should the dualinfer presolver be enabled within the presolve library?",
1860 &presoldata->enabledualinfer,
TRUE, DEFAULT_ENABLEDUALINFER,
NULL,
NULL) );
1864 "should the multi-aggregation presolver be enabled within the presolve library?",
1865 &presoldata->enablemultiaggr,
TRUE, DEFAULT_ENABLEMULTIAGGR,
NULL,
NULL) );
1869 "should the probing presolver be enabled within the presolve library?",
1870 &presoldata->enableprobing,
TRUE, DEFAULT_ENABLEPROBING,
NULL,
NULL) );
1874 "should the sparsify presolver be enabled within the presolve library?",
1875 &presoldata->enablesparsify,
TRUE, DEFAULT_ENABLESPARSIFY,
NULL,
NULL) );
1878 "filename to store the problem before MILP presolving starts (only enforced constraints)",
1879 &presoldata->filename,
TRUE, DEFAULT_FILENAME_PROBLEM,
NULL,
NULL) );
1882 "verbosity level of PaPILO (0: quiet, 1: errors, 2: warnings, 3: normal, 4: detailed)",
1883 &presoldata->verbosity,
FALSE, DEFAULT_VERBOSITY, 0, 4,
NULL,
NULL) );
1884#if PAPILO_APIVERSION >= 6
1887 "should the clique merging presolver be enabled within the presolve library?",
1888 &presoldata->enablecliquemerging,
TRUE, DEFAULT_ENABLECLIQUEMERGE,
NULL,
NULL) );
1891 "maximal amount of edges in the parallel clique merging graph",
1892 &presoldata->maxedgesparallel,
FALSE, DEFAULT_MAXEDGESPARALLEL, -1, INT_MAX,
NULL,
NULL) );
1895 "maximal amount of edges in the sequential clique merging graph",
1896 &presoldata->maxedgessequential,
FALSE, DEFAULT_MAXEDGESSEQUENTIAL, -1, INT_MAX,
NULL,
NULL) );
1899 "maximal size of clique considered for clique merging",
1900 &presoldata->maxcliquesize,
FALSE, DEFAULT_MAXCLIQUESIZE, -1, INT_MAX,
NULL,
NULL) );
1903 "maximal number of greedy max clique calls in a single thread",
1904 &presoldata->maxgreedycalls,
FALSE, DEFAULT_MAXGREEDYCALLS, -1, INT_MAX,
NULL,
NULL) );
Constraint handler for linear constraints in their most general form, .
Constraint handler for linear constraints in their most general form, .
SCIP_RETCODE SCIPcreateConsBasicLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs)
SCIP_RETCODE SCIPcreateConsBasicExactLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_RATIONAL **vals, SCIP_RATIONAL *lhs, SCIP_RATIONAL *rhs)
const char * SCIPgetProbName(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNConss(SCIP *scip)
SCIP_RETCODE SCIPwriteTransProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddStringParam(SCIP *scip, const char *name, const char *desc, char **valueptr, SCIP_Bool isadvanced, const char *defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPincludePresolMILP(SCIP *scip)
int SCIPconshdlrGetNCheckConss(SCIP_CONSHDLR *conshdlr)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_RETCODE SCIPcaptureCons(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPisExact(SCIP *scip)
SCIP_RETCODE SCIPincludeExternalCodeInformation(SCIP *scip, const char *name, const char *description)
BMS_BUFMEM * SCIPbuffer(SCIP *scip)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_RETCODE SCIPsetPresolFree(SCIP *scip, SCIP_PRESOL *presol,)
void SCIPpresolMarkExact(SCIP_PRESOL *presol)
void SCIPpresolSetData(SCIP_PRESOL *presol, SCIP_PRESOLDATA *presoldata)
SCIP_PRESOLDATA * SCIPpresolGetData(SCIP_PRESOL *presol)
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)
SCIP_RETCODE SCIPsetPresolInit(SCIP *scip, SCIP_PRESOL *presol,)
void SCIPrationalSetInfinity(SCIP_RATIONAL *res)
SCIP_Real SCIPrationalGetReal(SCIP_RATIONAL *rational)
#define SCIPrationalDebugMessage
void SCIPrationalDiv(SCIP_RATIONAL *res, SCIP_RATIONAL *op1, SCIP_RATIONAL *op2)
SCIP_Bool SCIPrationalIsAbsInfinity(SCIP_RATIONAL *rational)
void SCIPrationalFreeBuffer(BMS_BUFMEM *bufmem, SCIP_RATIONAL **rational)
void SCIPrationalDiff(SCIP_RATIONAL *res, SCIP_RATIONAL *op1, SCIP_RATIONAL *op2)
SCIP_RETCODE SCIPrationalCreateBuffer(BMS_BUFMEM *bufmem, SCIP_RATIONAL **rational)
SCIP_Bool SCIPrationalIsZero(SCIP_RATIONAL *rational)
void SCIPrationalSetNegInfinity(SCIP_RATIONAL *res)
SCIP_Bool SCIPrationalIsNegative(SCIP_RATIONAL *rational)
SCIP_Bool SCIPrationalIsInfinity(SCIP_RATIONAL *rational)
SCIP_RETCODE SCIPrationalCreateBufferArray(BMS_BUFMEM *mem, SCIP_RATIONAL ***rational, int size)
SCIP_Bool SCIPrationalIsNegInfinity(SCIP_RATIONAL *rational)
void SCIPrationalMultReal(SCIP_RATIONAL *res, SCIP_RATIONAL *op1, SCIP_Real op2)
void SCIPrationalFreeBufferArray(BMS_BUFMEM *mem, SCIP_RATIONAL ***ratbufarray, int size)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeastol(SCIP *scip)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPepsilon(SCIP *scip)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_RETCODE SCIPtightenVarUbExact(SCIP *scip, SCIP_VAR *var, SCIP_RATIONAL *newbound, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_RATIONAL * SCIPvarGetAggrScalarExact(SCIP_VAR *var)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_Bool SCIPvarIsImpliedIntegral(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPaggregateVarsExact(SCIP *scip, SCIP_VAR *varx, SCIP_VAR *vary, SCIP_RATIONAL *scalarx, SCIP_RATIONAL *scalary, SCIP_RATIONAL *rhs, SCIP_Bool *infeasible, SCIP_Bool *redundant, SCIP_Bool *aggregated)
SCIP_RATIONAL * SCIPvarGetAggrConstantExact(SCIP_VAR *var)
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_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_RETCODE SCIPgetProbvarSum(SCIP *scip, SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_VARSTATUS SCIPvarGetStatusExact(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPmultiaggregateVar(SCIP *scip, SCIP_VAR *var, int naggvars, SCIP_VAR **aggvars, SCIP_Real *scalars, SCIP_Real constant, SCIP_Bool *infeasible, SCIP_Bool *aggregated)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_RATIONAL * SCIPvarGetLbGlobalExact(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
SCIP_RETCODE SCIPgetProbvarSumExact(SCIP *scip, SCIP_VAR **var, SCIP_RATIONAL *scalar, SCIP_RATIONAL *constant)
SCIP_RATIONAL * SCIPvarGetObjExact(SCIP_VAR *var)
SCIP_Bool SCIPallowWeakDualReds(SCIP *scip)
SCIP_RETCODE SCIPmultiaggregateVarExact(SCIP *scip, SCIP_VAR *var, int naggvars, SCIP_VAR **aggvars, SCIP_RATIONAL **scalars, SCIP_RATIONAL *constant, SCIP_Bool *infeasible, SCIP_Bool *aggregated)
SCIP_RETCODE SCIPtightenVarLbExact(SCIP *scip, SCIP_VAR *var, SCIP_RATIONAL *newbound, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_Bool SCIPallowStrongDualReds(SCIP *scip)
SCIP_RATIONAL * SCIPvarGetUbGlobalExact(SCIP_VAR *var)
SCIP_RETCODE SCIPfixVarExact(SCIP *scip, SCIP_VAR *var, SCIP_RATIONAL *fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
SCIP_VAR * SCIPvarGetAggrVar(SCIP_VAR *var)
unsigned int SCIPinitializeRandomSeed(SCIP *scip, unsigned int initialseedvalue)
assert(minobj< SCIPgetCutoffbound(scip))
int SCIPmatrixGetNNonzs(SCIP_MATRIX *matrix)
SCIP_RATIONAL * SCIPmatrixGetRowLhsExact(SCIP_MATRIX *matrix, int row)
int SCIPmatrixGetRowNNonzs(SCIP_MATRIX *matrix, int row)
SCIP_Real SCIPmatrixGetRowLhs(SCIP_MATRIX *matrix, int row)
SCIP_Real * SCIPmatrixGetRowValPtr(SCIP_MATRIX *matrix, int row)
SCIP_RATIONAL ** SCIPmatrixGetRowValPtrExact(SCIP_MATRIX *matrix, int row)
SCIP_Real SCIPmatrixGetRowRhs(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)
SCIP_RATIONAL * SCIPmatrixGetRowRhsExact(SCIP_MATRIX *matrix, int row)
int * SCIPmatrixGetRowIdxPtr(SCIP_MATRIX *matrix, int row)
int SCIPmatrixGetNRows(SCIP_MATRIX *matrix)
#define BMSclearMemory(ptr)
MILP presolver that calls the presolve library on the constraint matrix.
public methods for managing constraints
public methods for matrix
public methods for message output
public methods for presolvers
public methods for problem variables
wrapper for rational number arithmetic
#define DEFAULT_RANDOMSEED
public methods for constraint handler plugins and constraints
public methods for exact solving
public methods for memory management
public methods for message handling
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for presolving plugins
public methods for global and local (sub)problems
public methods for random numbers
static SCIP_RETCODE presolve(SCIP *scip, SCIP_Bool *unbounded, SCIP_Bool *infeasible, SCIP_Bool *vanished)
public methods for timing
public methods for SCIP variables
unsigned int isfprepresentable
definition of wrapper class for rational numbers
struct SCIP_Cons SCIP_CONS
struct SCIP_Conshdlr SCIP_CONSHDLR
struct SCIP_Matrix SCIP_MATRIX
#define SCIP_DECL_PRESOLCOPY(x)
struct SCIP_PresolData SCIP_PRESOLDATA
#define SCIP_DECL_PRESOLFREE(x)
struct SCIP_Presol SCIP_PRESOL
#define SCIP_DECL_PRESOLINIT(x)
#define SCIP_DECL_PRESOLEXEC(x)
struct SCIP_Rational SCIP_RATIONAL
@ SCIP_ISFPREPRESENTABLE_UNKNOWN
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_VARTYPE_CONTINUOUS
@ SCIP_VARSTATUS_MULTAGGR
@ SCIP_VARSTATUS_AGGREGATED