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
141#define DEFAULT_ENABLEGF2 FALSE
144#define DEFAULT_MAXBADGESIZE_SEQ 15000
145#define DEFAULT_MAXBADGESIZE_PAR (-1)
146#define DEFAULT_MARKOWITZTOLERANCE 0.01
147#define DEFAULT_MAXFILLINPERSUBST 3
148#define DEFAULT_MAXSHIFTPERROW 10
149#define DEFAULT_MAXEDGESPARALLEL 1000000
150#define DEFAULT_MAXEDGESSEQUENTIAL 100000
151#define DEFAULT_MAXCLIQUESIZE 100
152#define DEFAULT_MAXGREEDYCALLS 10000
155#define DEFAULT_FILENAME_PROBLEM "-"
156#define DEFAULT_VERBOSITY 0
164struct SCIP_PresolMilpData
169 int maxfillinpersubstitution;
172 int internalmaxrounds;
174 int detectlineardependency;
175#if PAPILO_APIVERSION >= 6
176 int maxedgesparallel;
177 int maxedgessequential;
190#if PAPILO_APIVERSION >= 6
193#if PAPILO_APIVERSION >= 13
204 char* filename =
NULL;
206typedef struct SCIP_PresolMilpData SCIP_PRESOLMILPDATA;
208using namespace papilo;
214#if defined(PAPILO_WITH_EXACTPRESOLVE)
220 papilo::Rational papiloval
226 res->
val = papilo::Rational(papiloval.backend().data());
236Problem<papilo::Rational> buildProblemRational(
241 ProblemBuilder<papilo::Rational> builder;
247 builder.reserve(nnz, nrows, ncols);
250 builder.setNumCols(ncols);
251 for(
int i = 0;
i != ncols; ++
i )
256 builder.setColLb(
i, lb->
val);
257 builder.setColUb(
i, ub->
val);
266 builder.setNumRows(nrows);
267 for(
int i = 0;
i != nrows; ++
i )
271 Vec<papilo::Rational> rowvals;
273 for(
int j = 0; j < rowlen; ++j )
274 rowvals.emplace_back(rowvalsscip[j]->val);
275 builder.addRowEntries(
i, rowlen, rowcols, rowvals.data());
279 builder.setRowLhs(
i, lhs->
val);
280 builder.setRowRhs(
i, rhs->
val);
285 builder.setObjOffset(0);
287 return builder.build();
293Problem<SCIP_Real> buildProblemReal(
298 ProblemBuilder<SCIP_Real> builder;
304 builder.reserve(nnz, nrows, ncols);
307 builder.setNumCols(ncols);
308 for(
int i = 0;
i != ncols; ++
i )
313 builder.setColLb(
i, lb);
314 builder.setColUb(
i, ub);
318#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 1)
325 builder.setNumRows(nrows);
326 for(
int i = 0;
i != nrows; ++
i )
331 builder.addRowEntries(
i, rowlen, rowcols, rowvals);
335 builder.setRowLhs(
i, lhs);
336 builder.setRowRhs(
i, rhs);
342 builder.setObjOffset(0);
344#ifdef SCIP_PRESOLLIB_ENABLE_OUTPUT
349 return builder.build();
358 SCIP_PRESOLMILPDATA* data,
366 presolve.getPresolveOptions().substitutebinarieswithints =
false;
371 presolve.getPresolveOptions().removeslackvars =
false;
374 presolve.getPresolveOptions().maxfillinpersubstitution = data->maxfillinpersubstitution;
375 presolve.getPresolveOptions().markowitz_tolerance = data->markowitztolerance;
376 presolve.getPresolveOptions().maxshiftperrow = data->maxshiftperrow;
377 presolve.getPresolveOptions().hugeval = data->hugebound;
380 presolve.getPresolveOptions().detectlindep = allowconsmodification ? data->detectlineardependency : 0;
386 presolve.getPresolveOptions().threads = data->threads;
388#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 3)
389 presolve.getPresolveOptions().maxrounds = data->internalmaxrounds;
394 presolve.getPresolveOptions().dualreds = 2;
396 presolve.getPresolveOptions().dualreds = 1;
398 presolve.getPresolveOptions().dualreds = 0;
401 using uptr = std::unique_ptr<PresolveMethod<T>>;
404 presolve.addPresolveMethod( uptr(
new SingletonCols<T>() ) );
405 presolve.addPresolveMethod( uptr(
new CoefficientStrengthening<T>() ) );
406 presolve.addPresolveMethod( uptr(
new ConstraintPropagation<T>() ) );
409 presolve.addPresolveMethod( uptr(
new SimpleProbing<T>() ) );
410 if( data->enableparallelrows )
411 presolve.addPresolveMethod( uptr(
new ParallelRowDetection<T>() ) );
414 presolve.addPresolveMethod( uptr(
new SingletonStuffing<T>() ) );
415#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 1)
416 DualFix<T> *dualfix =
new DualFix<T>();
417 dualfix->set_fix_to_infinity_allowed(
false);
418 presolve.addPresolveMethod( uptr( dualfix ) );
420 presolve.addPresolveMethod( uptr(
new DualFix<T>() ) );
422 presolve.addPresolveMethod( uptr(
new FixContinuous<T>() ) );
423 presolve.addPresolveMethod( uptr(
new SimplifyInequalities<T>() ) );
424 presolve.addPresolveMethod( uptr(
new SimpleSubstitution<T>() ) );
425#if PAPILO_APIVERSION >= 6
426 if( data->enablecliquemerging )
428 CliqueMerging<T>* cliquemerging =
new CliqueMerging<T>();
429 cliquemerging->setParameters( data->maxedgesparallel, data->maxedgessequential,
430 data->maxcliquesize, data->maxgreedycalls );
431 presolve.addPresolveMethod( uptr( cliquemerging ) );
434#if PAPILO_APIVERSION >= 13
435 if( data->enableGF2 )
436 presolve.addPresolveMethod( uptr(
new GF2<T>() ) );
440 presolve.addPresolveMethod( uptr(
new ImplIntDetection<T>() ) );
441 if( data->enabledualinfer )
442 presolve.addPresolveMethod( uptr(
new DualInfer<T>() ) );
443 if( data->enableprobing )
445#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 1)
446 Probing<T> *probing =
new Probing<T>();
447 if(
presolve.getPresolveOptions().runs_sequential() )
449 probing->set_max_badge_size( data->maxbadgesizeseq );
453 probing->set_max_badge_size( data->maxbadgesizepar );
455#if PAPILO_APIVERSION >= 12
457 probing->set_numcliquefails(0);
459 presolve.addPresolveMethod( uptr( probing ) );
461 presolve.addPresolveMethod( uptr(
new Probing<T>() ) );
462 if( data->maxbadgesizeseq != DEFAULT_MAXBADGESIZE_SEQ )
464 " The parameter 'presolving/milp/maxbadgesizeseq' can only be used with PaPILO 2.1.0 or later versions.\n");
466 if( data->maxbadgesizepar != DEFAULT_MAXBADGESIZE_PAR )
468 " The parameter 'presolving/milp/maxbadgesizepar' can only be used with PaPILO 2.1.0 or later versions.\n");
471 if( data->enabledomcol )
472 presolve.addPresolveMethod( uptr(
new DominatedCols<T>() ) );
473 if( data->enablemultiaggr )
474 presolve.addPresolveMethod( uptr(
new Substitution<T>() ) );
475 if( data->enablesparsify )
476 presolve.addPresolveMethod( uptr(
new Sparsify<T>() ) );
479#if PAPILO_APIVERSION >= 3
480 presolve.getPresolveOptions().useabsfeas =
false;
484 presolve.getPresolveOptions().epsilon = 0.0;
485 presolve.getPresolveOptions().feastol = 0.0;
493#ifndef SCIP_PRESOLLIB_ENABLE_OUTPUT
495 presolve.setVerbosityLevel((VerbosityLevel) data->verbosity);
498#if PAPILO_APIVERSION >= 2
499 presolve.getPresolveOptions().abortfac = data->abortfacexhaustive;
500 presolve.getPresolveOptions().abortfacmedium = data->abortfacmedium;
501 presolve.getPresolveOptions().abortfacfast = data->abortfacfast;
513#if defined(PAPILO_WITH_EXACTPRESOLVE)
519 SCIP_PRESOLMILPDATA* data,
542 int oldnaggrvars = *naggrvars;
543 int oldnfixedvars = *nfixedvars;
544 int oldnchgbds = *nchgbds;
546 Problem<papilo::Rational> problem = buildProblemRational(
scip, matrix);
547 Presolve<papilo::Rational>
presolve;
548 setupPresolve(
scip,
presolve, data, allowconsmodification);
553 presolve.getPresolveOptions().threads == 1 ?
"" :
" on multiple threads");
555 int oldnnz = problem.getConstraintMatrix().getNnz();
557#if (PAPILO_VERSION_MAJOR >= 2)
558 PresolveResult<papilo::Rational> res =
presolve.apply(problem,
false);
560 PresolveResult<papilo::Rational> res =
presolve.apply(problem);
562 data->lastncols = problem.getNCols();
563 data->lastnrows = problem.getNRows();
568 case PresolveStatus::kInfeasible:
571 " (%.1fs) MILP presolver detected infeasibility\n",
575 case PresolveStatus::kUnbndOrInfeas:
576 case PresolveStatus::kUnbounded:
579 " (%.1fs) MILP presolver detected unboundedness\n",
583 case PresolveStatus::kUnchanged:
585 data->lastncols =
nvars;
586 data->lastnrows = nconss;
588 " (%.1fs) MILP presolver found nothing\n",
592 case PresolveStatus::kReduced:
593 data->lastncols = problem.getNCols();
594 data->lastnrows = problem.getNRows();
599 Vec<SCIP_VAR*> tmpvars;
600 Vec<SCIP_Real> tmpvalsreal;
603 int newnnz = problem.getConstraintMatrix().getNnz();
604 bool constraintsReplaced =
false;
605 if( newnnz == 0 || (allowconsmodification &&
606 (problem.getNRows() <= data->modifyconsfac * data->lastnrows ||
607 newnnz <= data->modifyconsfac * oldnnz)) )
610 int newnrows = problem.getNRows();
612 constraintsReplaced =
true;
615 for(
int i = 0;
i < newnrows; ++
i )
622 *ndelconss += oldnrows;
623 *naddconss += newnrows;
625 for(
int i = 0;
i < oldnrows; ++
i )
633 const Vec<RowFlags>& rflags = problem.getRowFlags();
634 const auto& consmatrix = problem.getConstraintMatrix();
635 for(
int i = 0;
i < newnrows; ++
i )
637 auto rowvec = consmatrix.getRowCoefficients(
i);
638 const int* rowcols = rowvec.getIndices();
640 papilo::Rational* rowvals =
const_cast<papilo::Rational*
>(rowvec.getValues());
641 int rowlen = rowvec.getLength();
644 papilo::Rational lhs = rflags[
i].test(RowFlag::kLhsInf) ? -
SCIPinfinity(
scip) : consmatrix.getLeftHandSides()[
i];
645 papilo::Rational rhs = rflags[
i].test(RowFlag::kRhsInf) ?
SCIPinfinity(
scip) : consmatrix.getRightHandSides()[
i];
649 tmpvars.reserve(rowlen);
650 for(
int j = 0; j < rowlen; ++j )
651 tmpvars.push_back(
SCIPmatrixGetVar(matrix, res.postsolve.origcol_mapping[rowcols[j]]));
664 for(
int j = 0; j < rowlen; j++ )
665 setRational(
scip, tmpvals[j], rowvals[j]);
667 setRational(
scip, tmprhs, rhs);
668 setRational(
scip, tmplhs, lhs);
669 if( rflags[
i].test(RowFlag::kLhsInf) )
671 if( rflags[
i].test(RowFlag::kRhsInf) )
688 for( std::size_t
i = 0;
i != res.postsolve.types.size(); ++
i )
691 res.postsolve.types[
i];
692 int first = res.postsolve.start[
i];
693 int last = res.postsolve.start[
i + 1];
697 case ReductionType::kFixedCol:
702 int col = res.postsolve.indices[first];
706 papilo::Rational value = res.postsolve.values[first];
709 setRational(
scip, tmpval, value);
758#if (PAPILO_VERSION_MAJOR >= 2)
759 case ReductionType::kSubstitutedColWithDual:
761 case ReductionType::kSubstitutedCol:
764 papilo::Rational side = 0;
767 int startRowCoefficients = 0;
768 int lastRowCoefficients = 0;
770 if( type == ReductionType::kSubstitutedCol )
772 rowlen = last - first - 1;
773 col = res.postsolve.indices[first];
774 side = res.postsolve.values[first];
776 startRowCoefficients = first + 1;
777 lastRowCoefficients = last;
779#if (PAPILO_VERSION_MAJOR >= 2)
780 if( type == ReductionType::kSubstitutedColWithDual )
782 rowlen = (int) res.postsolve.values[first];
783 col = res.postsolve.indices[first + 3 + rowlen];
784 side = res.postsolve.values[first + 1];
786 startRowCoefficients = first + 3;
787 lastRowCoefficients = first + 3 + rowlen;
789 assert(side == res.postsolve.values[first + 2]);
790 assert(res.postsolve.indices[first + 1] == 0);
791 assert(res.postsolve.indices[first + 2] == 0);
793 assert( type == ReductionType::kSubstitutedCol || type == ReductionType::kSubstitutedColWithDual );
795 assert( type == ReductionType::kSubstitutedCol );
805 papilo::Rational scalarx = res.postsolve.values[startRowCoefficients];
806 papilo::Rational scalary = res.postsolve.values[startRowCoefficients + 1];
816 setRational(
scip, tmpscalarx, scalarx);
817 setRational(
scip, tmpscalary, scalary);
825 setRational(
scip, tmpside, side);
829 tmpscalarx, tmpscalary, constant);
850 for(
int j = startRowCoefficients; j < lastRowCoefficients; ++j )
852 if( res.postsolve.indices[j] == col )
854 setRational(
scip, colCoef, res.postsolve.values[j]);
860 tmpvars.reserve(rowlen);
868 for(
int j = startRowCoefficients; j < lastRowCoefficients; ++j )
870 if( res.postsolve.indices[j] == col )
874 setRational(
scip, tmpvals[
c], -res.postsolve.values[j] / colCoef->
val);
877 setRational(
scip, updatedSide, side);
884 tmpvars.data(), tmpvals, updatedSide, &infeas, &aggregated) );
894 else if( constraintsReplaced && !redundant )
903 setRational(
scip, tmpside, side);
906 for(
int j = startRowCoefficients; j < lastRowCoefficients; ++j )
908 int idx = j - startRowCoefficients;
910 setRational(
scip, tmpvals[idx], res.postsolve.values[j]);
916 tmpvars.size(), tmpvars.data(), tmpvals, tmpside, tmpside ) );
936 case ReductionType::kParallelCol:
938#if (PAPILO_VERSION_MAJOR <= 1 && PAPILO_VERSION_MINOR==0)
940 case ReductionType::kFixedInfCol: {
941 if(!constraintsReplaced)
950 int column = res.postsolve.indices[first];
951 bool is_negative_infinity = res.postsolve.values[first] < 0;
954 if( is_negative_infinity )
970#if (PAPILO_VERSION_MAJOR >= 2)
971 case ReductionType::kVarBoundChange :
972 case ReductionType::kRedundantRow :
973 case ReductionType::kRowBoundChange :
974 case ReductionType::kReasonForRowBoundChangeForcedByRow :
975 case ReductionType::kRowBoundChangeForcedByRow :
976 case ReductionType::kSaveRow :
977 case ReductionType::kReducedBoundsCost :
978 case ReductionType::kColumnDualValue :
979 case ReductionType::kRowDualValue :
980 case ReductionType::kCoefficientChange :
982 SCIPerrorMessage(
"PaPILO: PaPILO should not return dual postsolving reductions in SCIP!!\n");
995 VariableDomains<papilo::Rational>& varDomains = problem.getVariableDomains();
1000 for(
int i = 0;
i != problem.getNCols(); ++
i )
1003 if( !varDomains.flags[
i].test(ColFlag::kLbInf) )
1008 setRational(
scip, varbound, varDomains.lower_bounds[
i]);
1025 if( !varDomains.flags[
i].test(ColFlag::kUbInf) )
1029 setRational(
scip, varbound, varDomains.upper_bounds[
i]);
1052 " (%.1fs) MILP presolver (%d rounds): %d aggregations, %d fixings, %d bound changes\n",
1054 *nfixedvars - oldnfixedvars, *nchgbds - oldnchgbds);
1069 SCIP_PRESOLMILPDATA* data,
1093 int oldnaggrvars = *naggrvars;
1094 int oldnfixedvars = *nfixedvars;
1095 int oldnchgbds = *nchgbds;
1098 Problem<SCIP_Real> problem = buildProblemReal(
scip, matrix);
1099 int oldnnz = problem.getConstraintMatrix().getNnz();
1101 setupPresolve(
scip,
presolve, data, allowconsmodification);
1106 presolve.getPresolveOptions().threads == 1 ?
"" :
" on multiple threads");
1109#if (PAPILO_VERSION_MAJOR >= 2)
1110 PresolveResult<SCIP_Real> res =
presolve.apply(problem,
false);
1112 PresolveResult<SCIP_Real> res =
presolve.apply(problem);
1114 data->lastncols = problem.getNCols();
1115 data->lastnrows = problem.getNRows();
1118 switch( res.status )
1120 case PresolveStatus::kInfeasible:
1123 " (%.1fs) MILP presolver detected infeasibility\n",
1127 case PresolveStatus::kUnbndOrInfeas:
1128 case PresolveStatus::kUnbounded:
1131 " (%.1fs) MILP presolver detected unboundedness\n",
1135 case PresolveStatus::kUnchanged:
1137 data->lastncols =
nvars;
1138 data->lastnrows = nconss;
1140 " (%.1fs) MILP presolver found nothing\n",
1144 case PresolveStatus::kReduced:
1145 data->lastncols = problem.getNCols();
1146 data->lastnrows = problem.getNRows();
1153 VariableDomains<SCIP_Real>& varDomains = problem.getVariableDomains();
1154 for(
int i = 0;
i != problem.getNCols(); ++
i )
1156 assert( ! varDomains.flags[
i].test(ColFlag::kInactive) );
1158 if( !varDomains.flags[
i].test(ColFlag::kLbInf) )
1174 if( !varDomains.flags[
i].test(ColFlag::kUbInf) )
1194 " (%.1fs) MILP presolver detected infeasibility\n",
1201 Vec<SCIP_VAR*> tmpvars;
1202 Vec<SCIP_Real> tmpvals;
1205 int newnnz = problem.getConstraintMatrix().getNnz();
1206 bool constraintsReplaced =
false;
1207 if( newnnz == 0 || (allowconsmodification &&
1210 newnnz <= data->modifyconsfac * oldnnz)) )
1213 int newnrows = problem.getNRows();
1215 constraintsReplaced =
true;
1218 for(
int i = 0;
i < newnrows; ++
i )
1225 *ndelconss += oldnrows;
1226 *naddconss += newnrows;
1228 for(
int i = 0;
i < oldnrows; ++
i )
1235 const Vec<RowFlags>& rflags = problem.getRowFlags();
1236 const auto& consmatrix = problem.getConstraintMatrix();
1237 for(
int i = 0;
i < newnrows; ++
i )
1239 auto rowvec = consmatrix.getRowCoefficients(
i);
1240 const int* rowcols = rowvec.getIndices();
1243 int rowlen = rowvec.getLength();
1251 tmpvars.reserve(rowlen);
1252 for(
int j = 0; j < rowlen; ++j )
1253 tmpvars.push_back(
SCIPmatrixGetVar(matrix, res.postsolve.origcol_mapping[rowcols[j]]));
1275 bool checkmultaggr =
1276#if PAPILO_APIVERSION >= 1
1277 presolve.getStatistics().single_matrix_coefficient_changes > 0
1279 presolve.getStatistics().ncoefchgs > 0
1281 && !constraintsReplaced;
1284 for( std::size_t
i = 0;
i != res.postsolve.types.size(); ++
i )
1286 ReductionType type = res.postsolve.types[
i];
1287 int first = res.postsolve.start[
i];
1288 int last = res.postsolve.start[
i + 1];
1292 case ReductionType::kFixedCol:
1296 int col = res.postsolve.indices[first];
1300 SCIP_Real value = res.postsolve.values[first];
1319#if (PAPILO_VERSION_MAJOR >= 2)
1320 case ReductionType::kSubstitutedColWithDual:
1322 case ReductionType::kSubstitutedCol:
1328 int startRowCoefficients = 0;
1329 int lastRowCoefficients = 0;
1331 if( type == ReductionType::kSubstitutedCol )
1333 rowlen = last - first - 1;
1334 col = res.postsolve.indices[first];
1335 side = res.postsolve.values[first];
1337 startRowCoefficients = first + 1;
1338 lastRowCoefficients = last;
1340#if (PAPILO_VERSION_MAJOR >= 2)
1341 if( type == ReductionType::kSubstitutedColWithDual )
1343 rowlen = (int) res.postsolve.values[first];
1344 col = res.postsolve.indices[first + 3 + rowlen];
1345 side = res.postsolve.values[first + 1];
1347 startRowCoefficients = first + 3;
1348 lastRowCoefficients = first + 3 + rowlen;
1350 assert(side == res.postsolve.values[first + 2]);
1351 assert(res.postsolve.indices[first + 1] == 0);
1352 assert(res.postsolve.indices[first + 2] == 0);
1354 assert( type == ReductionType::kSubstitutedCol || type == ReductionType::kSubstitutedColWithDual );
1356 assert( type == ReductionType::kSubstitutedCol );
1367 SCIP_Real scalarx = res.postsolve.values[startRowCoefficients];
1368 SCIP_Real scalary = res.postsolve.values[startRowCoefficients + 1];
1382 SCIPdebugMsg(
scip,
"Aggregation of <%s> and <%s> rejected because they are already fixed.\n",
1388 updatedSide = side - constant;
1402 for( j = startRowCoefficients; j < lastRowCoefficients; ++j )
1404 if( res.postsolve.indices[j] == col )
1406 colCoef = res.postsolve.values[j];
1413 tmpvars.reserve(rowlen);
1414 tmpvals.reserve(rowlen);
1428 SCIPdebugMsg(
scip,
"Multi-aggregation of <%s> rejected because it is already fixed.\n",
1434 updatedSide = side - constant;
1442 impliedlb = impliedub = updatedSide / colCoef;
1444 for( j = startRowCoefficients; j < lastRowCoefficients; ++j )
1449 if( res.postsolve.indices[j] == col )
1452 coef = - res.postsolve.values[j] / colCoef;
1455 if( checklbimplied )
1474 if( checkubimplied )
1492 tmpvals.push_back(coef);
1493 tmpvars.push_back(
var);
1497 if( j < lastRowCoefficients )
1507 tmpvars.data(), tmpvals.data(), updatedSide / colCoef, &infeas, &aggregated) );
1512 else if( constraintsReplaced && !redundant )
1517 for(
int j = startRowCoefficients; j < lastRowCoefficients; ++j )
1520 tmpvals.push_back(res.postsolve.values[j]);
1526 tmpvars.size(), tmpvars.data(), tmpvals.data(), side, side ) );
1540 case ReductionType::kParallelCol:
1542#if PAPILO_VERSION_MAJOR > 1 || (PAPILO_VERSION_MAJOR == 1 && PAPILO_VERSION_MINOR >= 1)
1543 case ReductionType::kFixedInfCol: {
1546 if(!constraintsReplaced)
1552 int column = res.postsolve.indices[first];
1553 bool is_negative_infinity = res.postsolve.values[first] < 0;
1556 if( is_negative_infinity )
1569#if (PAPILO_VERSION_MAJOR >= 2)
1570 case ReductionType::kVarBoundChange :
1571 case ReductionType::kRedundantRow :
1572 case ReductionType::kRowBoundChange :
1573 case ReductionType::kReasonForRowBoundChangeForcedByRow :
1574 case ReductionType::kRowBoundChangeForcedByRow :
1575 case ReductionType::kSaveRow :
1576 case ReductionType::kReducedBoundsCost :
1577 case ReductionType::kColumnDualValue :
1578 case ReductionType::kRowDualValue :
1579 case ReductionType::kCoefficientChange :
1581 SCIPerrorMessage(
"PaPILO: PaPILO should not return dual postsolving reductions in SCIP!!\n");
1593 " (%.1fs) MILP presolver (%d rounds): %d aggregations, %d fixings, %d bound changes\n",
1595 *nfixedvars - oldnfixedvars, *nchgbds - oldnchgbds);
1622 SCIP_PRESOLMILPDATA* data =
reinterpret_cast<SCIP_PRESOLMILPDATA*
>(
SCIPpresolGetData(presol));
1634 SCIP_PRESOLMILPDATA* data =
reinterpret_cast<SCIP_PRESOLMILPDATA*
>(
SCIPpresolGetData(presol));
1637 data->lastncols = -1;
1638 data->lastnrows = -1;
1649 SCIP_PRESOLMILPDATA* data;
1662 if( data->lastncols != -1 && data->lastnrows != -1 &&
1663 nvars > data->lastncols * 0.85 &&
1664 nconss > data->lastnrows * 0.85 )
1668 naddconss, ndelconss, nchgcoefs, nchgbds, nfixedvars) );
1681 if( !initialized || !complete )
1683 data->lastncols = 0;
1684 data->lastnrows = 0;
1692 if( 0 != strncmp(data->filename, DEFAULT_FILENAME_PROBLEM, strlen(DEFAULT_FILENAME_PROBLEM)) )
1695 " writing transformed problem to %s (only enforced constraints)\n", data->filename);
1700 return performRealPresolving(
scip, matrix, data, initialized, nfixedvars, naggrvars, nchgvartypes, nchgbds,
1701 naddholes, ndelconss, naddconss, nupgdconss, nchgcoefs, nchgsides,
result);
1702#if defined(PAPILO_WITH_EXACTPRESOLVE)
1704 return performRationalPresolving(
scip, matrix, data, initialized, nfixedvars, naggrvars, nchgvartypes, nchgbds,
1705 naddholes, ndelconss, naddconss, nupgdconss, nchgcoefs, nchgsides,
result);
1721 SCIP_PRESOLMILPDATA* presoldata;
1724#if defined(PAPILO_VERSION_TWEAK) && PAPILO_VERSION_TWEAK != 0
1725 String name = fmt::format(
"PaPILO {}.{}.{}.{}", PAPILO_VERSION_MAJOR, PAPILO_VERSION_MINOR, PAPILO_VERSION_PATCH, PAPILO_VERSION_TWEAK);
1727 String name = fmt::format(
"PaPILO {}.{}.{}", PAPILO_VERSION_MAJOR, PAPILO_VERSION_MINOR, PAPILO_VERSION_PATCH);
1730#if defined(PAPILO_GITHASH_AVAILABLE) && defined(PAPILO_TBB)
1731 String desc = fmt::format(
"parallel presolve for integer and linear optimization (github.com/scipopt/papilo) (built with TBB) [GitHash: {}]", PAPILO_GITHASH);
1732#elif !defined(PAPILO_GITHASH_AVAILABLE) && !defined(PAPILO_TBB)
1733 String desc(
"parallel presolve for integer and linear optimization (github.com/scipopt/papilo)");
1734#elif defined(PAPILO_GITHASH_AVAILABLE) && !defined(PAPILO_TBB)
1735 String desc = fmt::format(
"parallel presolve for integer and linear optimization (github.com/scipopt/papilo) [GitHash: {}]", PAPILO_GITHASH);
1736#elif !defined(PAPILO_GITHASH_AVAILABLE) && defined(PAPILO_TBB)
1737 String desc = fmt::format(
"parallel presolve for integer and linear optimization (github.com/scipopt/papilo) (built with TBB)");
1762#if defined(PAPILO_WITH_EXACTPRESOLVE)
1771 "maximum number of threads presolving may use (0: automatic)",
1772 &presoldata->threads,
FALSE, DEFAULT_THREADS, 0, INT_MAX,
NULL,
NULL) );
1774 presoldata->threads = 1;
1778 "presolving/" PRESOL_NAME "/maxfillinpersubstitution",
1779 "maximal possible fillin for substitutions to be considered",
1780 &presoldata->maxfillinpersubstitution,
FALSE, DEFAULT_MAXFILLINPERSUBST, INT_MIN, INT_MAX,
NULL,
NULL) );
1784 "maximal amount of nonzeros allowed to be shifted to make space for substitutions",
1785 &presoldata->maxshiftperrow,
TRUE, DEFAULT_MAXSHIFTPERROW, 0, INT_MAX,
NULL,
NULL) );
1789 "the random seed used for randomization of tie breaking",
1792 if( DependentRows<double>::Enabled )
1795 "presolving/" PRESOL_NAME "/detectlineardependency",
1796 "should linear dependent equations and free columns be removed? (0: never, 1: for LPs, 2: always)",
1797 &presoldata->detectlineardependency,
TRUE, DEFAULT_DETECTLINDEP, 0, 2,
NULL,
NULL) );
1800 presoldata->detectlineardependency = DEFAULT_DETECTLINDEP;
1804 "modify SCIP constraints when the number of nonzeros or rows is at most this factor "
1805 "times the number of nonzeros or rows before presolving",
1806 &presoldata->modifyconsfac,
FALSE, DEFAULT_MODIFYCONSFAC, 0.0, 1.0,
NULL,
NULL) );
1810 "the markowitz tolerance used for substitutions",
1811 &presoldata->markowitztolerance,
FALSE, DEFAULT_MARKOWITZTOLERANCE, 0.0, 1.0,
NULL,
NULL) );
1815 "absolute bound value that is considered too huge for activity based calculations",
1818#if PAPILO_APIVERSION >= 2
1820 "abort threshold for exhaustive presolving in PAPILO",
1821 &presoldata->abortfacexhaustive,
TRUE, DEFAULT_ABORTFAC_EXHAUSTIVE, 0.0, 1.0,
NULL,
NULL) );
1823 "abort threshold for medium presolving in PAPILO",
1824 &presoldata->abortfacmedium,
TRUE, DEFAULT_ABORTFAC_MEDIUM, 0.0, 1.0,
NULL,
NULL) );
1826 "abort threshold for fast presolving in PAPILO",
1827 &presoldata->abortfacfast,
TRUE, DEFAULT_ABORTFAC_FAST, 0.0, 1.0,
NULL,
NULL) );
1829 presoldata->abortfacexhaustive = DEFAULT_ABORTFAC_EXHAUSTIVE;
1830 presoldata->abortfacmedium = DEFAULT_ABORTFAC_MEDIUM;
1831 presoldata->abortfacfast = DEFAULT_ABORTFAC_FAST;
1834#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 1)
1836 "maximal badge size in Probing in PaPILO if PaPILO is executed in sequential mode",
1837 &presoldata->maxbadgesizeseq,
FALSE, DEFAULT_MAXBADGESIZE_SEQ, -1, INT_MAX,
NULL,
NULL) );
1840 "maximal badge size in Probing in PaPILO if PaPILO is executed in parallel mode",
1841 &presoldata->maxbadgesizepar,
FALSE, DEFAULT_MAXBADGESIZE_PAR, -1, INT_MAX,
NULL,
NULL) );
1843 presoldata->maxbadgesizeseq = DEFAULT_MAXBADGESIZE_SEQ;
1844 presoldata->maxbadgesizepar = DEFAULT_MAXBADGESIZE_PAR;
1847#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 3)
1849 "internal maxrounds for each milp presolving (-1: no limit, 0: model cleanup)",
1850 &presoldata->internalmaxrounds,
TRUE, DEFAULT_INTERNAL_MAXROUNDS, -1, INT_MAX,
NULL,
NULL) );
1852 presoldata->internalmaxrounds = DEFAULT_INTERNAL_MAXROUNDS;
1857 "should the parallel rows presolver be enabled within the presolve library?",
1858 &presoldata->enableparallelrows,
TRUE, DEFAULT_ENABLEPARALLELROWS,
NULL,
NULL) );
1862 "should the dominated column presolver be enabled within the presolve library?",
1863 &presoldata->enabledomcol,
TRUE, DEFAULT_ENABLEDOMCOL,
NULL,
NULL) );
1867 "should the dualinfer presolver be enabled within the presolve library?",
1868 &presoldata->enabledualinfer,
TRUE, DEFAULT_ENABLEDUALINFER,
NULL,
NULL) );
1872 "should the multi-aggregation presolver be enabled within the presolve library?",
1873 &presoldata->enablemultiaggr,
TRUE, DEFAULT_ENABLEMULTIAGGR,
NULL,
NULL) );
1877 "should the probing presolver be enabled within the presolve library?",
1878 &presoldata->enableprobing,
TRUE, DEFAULT_ENABLEPROBING,
NULL,
NULL) );
1882 "should the sparsify presolver be enabled within the presolve library?",
1883 &presoldata->enablesparsify,
TRUE, DEFAULT_ENABLESPARSIFY,
NULL,
NULL) );
1886 "filename to store the problem before MILP presolving starts (only enforced constraints)",
1887 &presoldata->filename,
TRUE, DEFAULT_FILENAME_PROBLEM,
NULL,
NULL) );
1890 "verbosity level of PaPILO (0: quiet, 1: errors, 2: warnings, 3: normal, 4: detailed)",
1891 &presoldata->verbosity,
FALSE, DEFAULT_VERBOSITY, 0, 4,
NULL,
NULL) );
1892#if PAPILO_APIVERSION >= 6
1895 "should the clique merging presolver be enabled within the presolve library?",
1896 &presoldata->enablecliquemerging,
TRUE, DEFAULT_ENABLECLIQUEMERGE,
NULL,
NULL) );
1899 "maximal amount of edges in the parallel clique merging graph",
1900 &presoldata->maxedgesparallel,
FALSE, DEFAULT_MAXEDGESPARALLEL, -1, INT_MAX,
NULL,
NULL) );
1903 "maximal amount of edges in the sequential clique merging graph",
1904 &presoldata->maxedgessequential,
FALSE, DEFAULT_MAXEDGESSEQUENTIAL, -1, INT_MAX,
NULL,
NULL) );
1907 "maximal size of clique considered for clique merging",
1908 &presoldata->maxcliquesize,
FALSE, DEFAULT_MAXCLIQUESIZE, -1, INT_MAX,
NULL,
NULL) );
1911 "maximal number of greedy max clique calls in a single thread",
1912 &presoldata->maxgreedycalls,
FALSE, DEFAULT_MAXGREEDYCALLS, -1, INT_MAX,
NULL,
NULL) );
1914#if PAPILO_APIVERSION >= 13
1917 "should the GF2 presolver be enabled within the presolve library?",
1918 &presoldata->enableGF2,
TRUE, DEFAULT_ENABLEGF2,
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