44#ifndef SCIP_WITH_PAPILO
59#pragma GCC diagnostic ignored "-Wshadow"
60#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
61#pragma GCC diagnostic ignored "-Wredundant-decls"
64#if __GNUC__ == 12 && __GNUC__MINOR__ <= 2
65#pragma GCC diagnostic ignored "-Wstringop-overflow"
87#include "papilo/core/Presolve.hpp"
88#include "papilo/core/ProblemBuilder.hpp"
89#include "papilo/Config.hpp"
92#if !defined(PAPILO_API_VERSION)
93#define PAPILO_APIVERSION 0
94#elif !(PAPILO_API_VERSION + 0)
95#define PAPILO_APIVERSION 1
97#define PAPILO_APIVERSION PAPILO_API_VERSION
100#define PRESOL_NAME "milp"
101#define PRESOL_DESC "MILP specific presolving methods"
102#define PRESOL_PRIORITY 9999999
103#define PRESOL_MAXROUNDS (-1)
104#define PRESOL_TIMING SCIP_PRESOLTIMING_MEDIUM
107#define DEFAULT_THREADS 1
108#define DEFAULT_ABORTFAC_EXHAUSTIVE 0.0008
109#define DEFAULT_ABORTFAC_MEDIUM 0.0008
110#define DEFAULT_ABORTFAC_FAST 0.0008
111#define DEFAULT_DETECTLINDEP 0
112#define DEFAULT_INTERNAL_MAXROUNDS (-1)
113#define DEFAULT_MODIFYCONSFAC 0.8
115#define DEFAULT_RANDOMSEED 0
118#define DEFAULT_HUGEBOUND 1e8
121#define DEFAULT_ENABLEDOMCOL TRUE
122#define DEFAULT_ENABLEDUALINFER TRUE
123#define DEFAULT_ENABLEMULTIAGGR TRUE
124#define DEFAULT_ENABLEPARALLELROWS TRUE
125#define DEFAULT_ENABLEPROBING TRUE
126#define DEFAULT_ENABLESPARSIFY FALSE
129#define DEFAULT_MAXBADGESIZE_SEQ 15000
130#define DEFAULT_MAXBADGESIZE_PAR (-1)
131#define DEFAULT_MARKOWITZTOLERANCE 0.01
132#define DEFAULT_MAXFILLINPERSUBST 3
133#define DEFAULT_MAXSHIFTPERROW 10
136#define DEFAULT_FILENAME_PROBLEM "-"
137#define DEFAULT_VERBOSITY 0
144struct SCIP_PresolData
149 int maxfillinpersubstitution;
152 int internalmaxrounds;
154 int detectlineardependency;
172 char* filename =
NULL;
175using namespace papilo;
183Problem<SCIP_Real> buildProblem(
188 ProblemBuilder<SCIP_Real> builder;
194 builder.reserve(nnz, nrows, ncols);
197 builder.setNumCols(ncols);
198 for(
int i = 0;
i != ncols; ++
i)
203 builder.setColLb(
i, lb);
204 builder.setColUb(
i, ub);
207#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 1)
209 builder.setColImplInt(
i,
TRUE);
219 builder.setNumRows(nrows);
220 for(
int i = 0;
i != nrows; ++
i)
225 builder.addRowEntries(
i, rowlen, rowcols, rowvals);
229 builder.setRowLhs(
i, lhs);
230 builder.setRowRhs(
i, rhs);
236 builder.setObjOffset(0);
238#ifdef SCIP_PRESOLLIB_ENABLE_OUTPUT
243 return builder.build();
248Presolve<SCIP_Real> setupPresolve(
259 presolve.getPresolveOptions().substitutebinarieswithints =
false;
264 presolve.getPresolveOptions().removeslackvars =
false;
267 presolve.getPresolveOptions().maxfillinpersubstitution = data->maxfillinpersubstitution;
268 presolve.getPresolveOptions().markowitz_tolerance = data->markowitztolerance;
269 presolve.getPresolveOptions().maxshiftperrow = data->maxshiftperrow;
270 presolve.getPresolveOptions().hugeval = data->hugebound;
273 presolve.getPresolveOptions().detectlindep = allowconsmodification ? data->detectlineardependency : 0;
279 presolve.getPresolveOptions().threads = data->threads;
281#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 3)
282 presolve.getPresolveOptions().maxrounds = data->internalmaxrounds;
287 presolve.getPresolveOptions().dualreds = 2;
289 presolve.getPresolveOptions().dualreds = 1;
291 presolve.getPresolveOptions().dualreds = 0;
294 using uptr = std::unique_ptr<PresolveMethod<SCIP_Real>>;
297 presolve.addPresolveMethod( uptr(
new SingletonCols<SCIP_Real>() ) );
298 presolve.addPresolveMethod( uptr(
new CoefficientStrengthening<SCIP_Real>() ) );
299 presolve.addPresolveMethod( uptr(
new ConstraintPropagation<SCIP_Real>() ) );
302 presolve.addPresolveMethod( uptr(
new SimpleProbing<SCIP_Real>() ) );
303 if( data->enableparallelrows )
304 presolve.addPresolveMethod( uptr(
new ParallelRowDetection<SCIP_Real>() ) );
307 presolve.addPresolveMethod( uptr(
new SingletonStuffing<SCIP_Real>() ) );
308#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 1)
309 DualFix<SCIP_Real> *dualfix =
new DualFix<SCIP_Real>();
310 dualfix->set_fix_to_infinity_allowed(
false);
311 presolve.addPresolveMethod( uptr( dualfix ) );
313 presolve.addPresolveMethod( uptr(
new DualFix<SCIP_Real>() ) );
315 presolve.addPresolveMethod( uptr(
new FixContinuous<SCIP_Real>() ) );
316 presolve.addPresolveMethod( uptr(
new SimplifyInequalities<SCIP_Real>() ) );
317 presolve.addPresolveMethod( uptr(
new SimpleSubstitution<SCIP_Real>() ) );
320 presolve.addPresolveMethod( uptr(
new ImplIntDetection<SCIP_Real>() ) );
321 if( data->enabledualinfer )
322 presolve.addPresolveMethod( uptr(
new DualInfer<SCIP_Real>() ) );
323 if( data->enableprobing )
325#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 1)
326 Probing<SCIP_Real> *probing =
new Probing<SCIP_Real>();
327 if(
presolve.getPresolveOptions().runs_sequential() )
329 probing->set_max_badge_size( data->maxbadgesizeseq );
333 probing->set_max_badge_size( data->maxbadgesizepar );
335 presolve.addPresolveMethod( uptr( probing ) );
337 presolve.addPresolveMethod( uptr(
new Probing<SCIP_Real>() ) );
338 if( data->maxbadgesizeseq != DEFAULT_MAXBADGESIZE_SEQ )
340 " The parameter 'presolving/milp/maxbadgesizeseq' can only be used with PaPILO 2.1.0 or later versions.\n");
342 if( data->maxbadgesizepar != DEFAULT_MAXBADGESIZE_PAR )
344 " The parameter 'presolving/milp/maxbadgesizepar' can only be used with PaPILO 2.1.0 or later versions.\n");
347 if( data->enabledomcol )
348 presolve.addPresolveMethod( uptr(
new DominatedCols<SCIP_Real>() ) );
349 if( data->enablemultiaggr )
350 presolve.addPresolveMethod( uptr(
new Substitution<SCIP_Real>() ) );
351 if( data->enablesparsify )
352 presolve.addPresolveMethod( uptr(
new Sparsify<SCIP_Real>() ) );
357#if PAPILO_APIVERSION >= 3
358 presolve.getPresolveOptions().useabsfeas =
false;
361#ifndef SCIP_PRESOLLIB_ENABLE_OUTPUT
363 presolve.setVerbosityLevel((VerbosityLevel) data->verbosity);
366#if PAPILO_APIVERSION >= 2
367 presolve.getPresolveOptions().abortfac = data->abortfacexhaustive;
368 presolve.getPresolveOptions().abortfacmedium = data->abortfacmedium;
369 presolve.getPresolveOptions().abortfacfast = data->abortfacfast;
412 data->lastncols = -1;
413 data->lastnrows = -1;
436 if( data->lastncols != -1 && data->lastnrows != -1 &&
437 nvars > data->lastncols * 0.85 &&
438 nconss > data->lastnrows * 0.85 )
442 naddconss, ndelconss, nchgcoefs, nchgbds, nfixedvars) );
455 if( !initialized || !complete )
466 if( 0 != strncmp(data->filename, DEFAULT_FILENAME_PROBLEM, strlen(DEFAULT_FILENAME_PROBLEM)) )
469 " writing transformed problem to %s (only enforced constraints)\n", data->filename);
479 int oldnaggrvars = *naggrvars;
480 int oldnfixedvars = *nfixedvars;
481 int oldnchgbds = *nchgbds;
484 Problem<SCIP_Real> problem = buildProblem(
scip, matrix);
485 int oldnnz = problem.getConstraintMatrix().getNnz();
486 Presolve<SCIP_Real>
presolve = setupPresolve(
scip, data, allowconsmodification);
493#if (PAPILO_VERSION_MAJOR >= 2)
494 PresolveResult<SCIP_Real> res =
presolve.apply(problem,
false);
496 PresolveResult<SCIP_Real> res =
presolve.apply(problem);
498 data->lastncols = problem.getNCols();
499 data->lastnrows = problem.getNRows();
504 case PresolveStatus::kInfeasible:
507 " (%.1fs) MILP presolver detected infeasibility\n",
511 case PresolveStatus::kUnbndOrInfeas:
512 case PresolveStatus::kUnbounded:
515 " (%.1fs) MILP presolver detected unboundedness\n",
519 case PresolveStatus::kUnchanged:
521 data->lastncols =
nvars;
522 data->lastnrows = nconss;
524 " (%.1fs) MILP presolver found nothing\n",
528 case PresolveStatus::kReduced:
529 data->lastncols = problem.getNCols();
530 data->lastnrows = problem.getNRows();
537 VariableDomains<SCIP_Real>& varDomains = problem.getVariableDomains();
538 for(
int i = 0;
i != problem.getNCols(); ++
i )
540 assert( ! varDomains.flags[
i].test(ColFlag::kInactive) );
542 if( !varDomains.flags[
i].test(ColFlag::kLbInf) )
558 if( !varDomains.flags[
i].test(ColFlag::kUbInf) )
578 " (%.1fs) MILP presolver detected infeasibility\n",
585 std::vector<SCIP_VAR*> tmpvars;
586 std::vector<SCIP_Real> tmpvals;
589 int newnnz = problem.getConstraintMatrix().getNnz();
590 bool constraintsReplaced =
false;
591 if( newnnz == 0 || (allowconsmodification &&
594 newnnz <= data->modifyconsfac * oldnnz)) )
597 int newnrows = problem.getNRows();
599 constraintsReplaced =
true;
602 for(
int i = 0;
i < newnrows; ++
i )
609 *ndelconss += oldnrows;
610 *naddconss += newnrows;
612 for(
int i = 0;
i < oldnrows; ++
i )
619 const Vec<RowFlags>& rflags = problem.getRowFlags();
620 const auto& consmatrix = problem.getConstraintMatrix();
621 for(
int i = 0;
i < newnrows; ++
i )
623 auto rowvec = consmatrix.getRowCoefficients(
i);
624 const int* rowcols = rowvec.getIndices();
627 int rowlen = rowvec.getLength();
635 tmpvars.reserve(rowlen);
636 for(
int j = 0; j < rowlen; ++j )
637 tmpvars.push_back(
SCIPmatrixGetVar(matrix, res.postsolve.origcol_mapping[rowcols[j]]));
660#if PAPILO_APIVERSION >= 1
661 presolve.getStatistics().single_matrix_coefficient_changes > 0
663 presolve.getStatistics().ncoefchgs > 0
665 && !constraintsReplaced;
668 for( std::size_t
i = 0;
i != res.postsolve.types.size(); ++
i )
670 ReductionType type = res.postsolve.types[
i];
671 int first = res.postsolve.start[
i];
672 int last = res.postsolve.start[
i + 1];
676 case ReductionType::kFixedCol:
680 int col = res.postsolve.indices[first];
684 SCIP_Real value = res.postsolve.values[first];
703#if (PAPILO_VERSION_MAJOR >= 2)
704 case ReductionType::kSubstitutedColWithDual:
706 case ReductionType::kSubstitutedCol:
712 int startRowCoefficients = 0;
713 int lastRowCoefficients = 0;
715 if( type == ReductionType::kSubstitutedCol )
717 rowlen = last - first - 1;
718 col = res.postsolve.indices[first];
719 side = res.postsolve.values[first];
721 startRowCoefficients = first + 1;
722 lastRowCoefficients = last;
724#if (PAPILO_VERSION_MAJOR >= 2)
725 if( type == ReductionType::kSubstitutedColWithDual )
727 rowlen = (int) res.postsolve.values[first];
728 col = res.postsolve.indices[first + 3 + rowlen];
729 side = res.postsolve.values[first + 1];
731 startRowCoefficients = first + 3;
732 lastRowCoefficients = first + 3 + rowlen;
734 assert(side == res.postsolve.values[first + 2]);
735 assert(res.postsolve.indices[first + 1] == 0);
736 assert(res.postsolve.indices[first + 2] == 0);
738 assert( type == ReductionType::kSubstitutedCol || type == ReductionType::kSubstitutedColWithDual );
740 assert( type == ReductionType::kSubstitutedCol );
751 SCIP_Real scalarx = res.postsolve.values[startRowCoefficients];
752 SCIP_Real scalary = res.postsolve.values[startRowCoefficients + 1];
766 SCIPdebugMsg(
scip,
"Aggregation of <%s> and <%s> rejected because they are already fixed.\n",
772 updatedSide = side - constant;
786 for( j = startRowCoefficients; j < lastRowCoefficients; ++j )
788 if( res.postsolve.indices[j] == col )
790 colCoef = res.postsolve.values[j];
797 tmpvars.reserve(rowlen);
798 tmpvals.reserve(rowlen);
812 SCIPdebugMsg(
scip,
"Multi-aggregation of <%s> rejected because it is already fixed.\n",
818 updatedSide = side - constant;
826 impliedlb = impliedub = updatedSide / colCoef;
828 for( j = startRowCoefficients; j < lastRowCoefficients; ++j )
833 if( res.postsolve.indices[j] == col )
836 coef = - res.postsolve.values[j] / colCoef;
876 tmpvals.push_back(coef);
877 tmpvars.push_back(
var);
881 if( j < lastRowCoefficients )
891 tmpvars.data(), tmpvals.data(), updatedSide / colCoef, &infeas, &aggregated) );
896 else if( constraintsReplaced && !redundant )
901 for(
int j = startRowCoefficients; j < lastRowCoefficients; ++j )
904 tmpvals.push_back(res.postsolve.values[j]);
910 tmpvars.size(), tmpvars.data(), tmpvals.data(), side, side ) );
924 case ReductionType::kParallelCol:
926#if PAPILO_VERSION_MAJOR > 1 || (PAPILO_VERSION_MAJOR == 1 && PAPILO_VERSION_MINOR >= 1)
927 case ReductionType::kFixedInfCol: {
930 if(!constraintsReplaced)
936 int column = res.postsolve.indices[first];
937 bool is_negative_infinity = res.postsolve.values[first] < 0;
940 if( is_negative_infinity )
953#if (PAPILO_VERSION_MAJOR >= 2)
954 case ReductionType::kVarBoundChange :
955 case ReductionType::kRedundantRow :
956 case ReductionType::kRowBoundChange :
957 case ReductionType::kReasonForRowBoundChangeForcedByRow :
958 case ReductionType::kRowBoundChangeForcedByRow :
959 case ReductionType::kSaveRow :
960 case ReductionType::kReducedBoundsCost :
961 case ReductionType::kColumnDualValue :
962 case ReductionType::kRowDualValue :
963 case ReductionType::kCoefficientChange :
965 SCIPerrorMessage(
"PaPILO: PaPILO should not return dual postsolving reductions in SCIP!!\n");
977 " (%.1fs) MILP presolver (%d rounds): %d aggregations, %d fixings, %d bound changes\n",
979 *nfixedvars - oldnfixedvars, *nchgbds - oldnchgbds);
1001#if defined(PAPILO_VERSION_TWEAK) && PAPILO_VERSION_TWEAK != 0
1002 String name = fmt::format(
"PaPILO {}.{}.{}.{}", PAPILO_VERSION_MAJOR, PAPILO_VERSION_MINOR, PAPILO_VERSION_PATCH, PAPILO_VERSION_TWEAK);
1004 String name = fmt::format(
"PaPILO {}.{}.{}", PAPILO_VERSION_MAJOR, PAPILO_VERSION_MINOR, PAPILO_VERSION_PATCH);
1007#if defined(PAPILO_GITHASH_AVAILABLE) && defined(PAPILO_TBB)
1008 String desc = fmt::format(
"parallel presolve for integer and linear optimization (github.com/scipopt/papilo) (built with TBB) [GitHash: {}]", PAPILO_GITHASH);
1009#elif !defined(PAPILO_GITHASH_AVAILABLE) && !defined(PAPILO_TBB)
1010 String desc(
"parallel presolve for integer and linear optimization (github.com/scipopt/papilo)");
1011#elif defined(PAPILO_GITHASH_AVAILABLE) && !defined(PAPILO_TBB)
1012 String desc = fmt::format(
"parallel presolve for integer and linear optimization (github.com/scipopt/papilo) [GitHash: {}]", PAPILO_GITHASH);
1013#elif !defined(PAPILO_GITHASH_AVAILABLE) && defined(PAPILO_TBB)
1014 String desc = fmt::format(
"parallel presolve for integer and linear optimization (github.com/scipopt/papilo) (built with TBB)");
1043 "maximum number of threads presolving may use (0: automatic)",
1044 &presoldata->threads,
FALSE, DEFAULT_THREADS, 0, INT_MAX,
NULL,
NULL) );
1046 presoldata->threads = DEFAULT_THREADS;
1050 "presolving/" PRESOL_NAME "/maxfillinpersubstitution",
1051 "maximal possible fillin for substitutions to be considered",
1052 &presoldata->maxfillinpersubstitution,
FALSE, DEFAULT_MAXFILLINPERSUBST, INT_MIN, INT_MAX,
NULL,
NULL) );
1056 "maximal amount of nonzeros allowed to be shifted to make space for substitutions",
1057 &presoldata->maxshiftperrow,
TRUE, DEFAULT_MAXSHIFTPERROW, 0, INT_MAX,
NULL,
NULL) );
1061 "the random seed used for randomization of tie breaking",
1064 if( DependentRows<double>::Enabled )
1067 "presolving/" PRESOL_NAME "/detectlineardependency",
1068 "should linear dependent equations and free columns be removed? (0: never, 1: for LPs, 2: always)",
1069 &presoldata->detectlineardependency,
TRUE, DEFAULT_DETECTLINDEP, 0, 2,
NULL,
NULL) );
1072 presoldata->detectlineardependency = DEFAULT_DETECTLINDEP;
1076 "modify SCIP constraints when the number of nonzeros or rows is at most this factor "
1077 "times the number of nonzeros or rows before presolving",
1078 &presoldata->modifyconsfac,
FALSE, DEFAULT_MODIFYCONSFAC, 0.0, 1.0,
NULL,
NULL) );
1082 "the markowitz tolerance used for substitutions",
1083 &presoldata->markowitztolerance,
FALSE, DEFAULT_MARKOWITZTOLERANCE, 0.0, 1.0,
NULL,
NULL) );
1087 "absolute bound value that is considered too huge for activity based calculations",
1090#if PAPILO_APIVERSION >= 2
1092 "abort threshold for exhaustive presolving in PAPILO",
1093 &presoldata->abortfacexhaustive,
TRUE, DEFAULT_ABORTFAC_EXHAUSTIVE, 0.0, 1.0,
NULL,
NULL) );
1095 "abort threshold for medium presolving in PAPILO",
1096 &presoldata->abortfacmedium,
TRUE, DEFAULT_ABORTFAC_MEDIUM, 0.0, 1.0,
NULL,
NULL) );
1098 "abort threshold for fast presolving in PAPILO",
1099 &presoldata->abortfacfast,
TRUE, DEFAULT_ABORTFAC_FAST, 0.0, 1.0,
NULL,
NULL) );
1101 presoldata->abortfacexhaustive = DEFAULT_ABORTFAC_EXHAUSTIVE;
1102 presoldata->abortfacmedium = DEFAULT_ABORTFAC_MEDIUM;
1103 presoldata->abortfacfast = DEFAULT_ABORTFAC_FAST;
1106#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 1)
1108 "maximal badge size in Probing in PaPILO if PaPILO is executed in sequential mode",
1109 &presoldata->maxbadgesizeseq,
FALSE, DEFAULT_MAXBADGESIZE_SEQ, -1, INT_MAX,
NULL,
NULL));
1112 "maximal badge size in Probing in PaPILO if PaPILO is executed in parallel mode",
1113 &presoldata->maxbadgesizepar,
FALSE, DEFAULT_MAXBADGESIZE_PAR, -1, INT_MAX,
NULL,
NULL));
1115 presoldata->maxbadgesizeseq = DEFAULT_MAXBADGESIZE_SEQ;
1116 presoldata->maxbadgesizepar = DEFAULT_MAXBADGESIZE_PAR;
1119#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 3)
1121 "internal maxrounds for each milp presolving (-1: no limit, 0: model cleanup)",
1122 &presoldata->internalmaxrounds,
TRUE, DEFAULT_INTERNAL_MAXROUNDS, -1, INT_MAX,
NULL,
NULL));
1124 presoldata->internalmaxrounds = DEFAULT_INTERNAL_MAXROUNDS;
1129 "should the parallel rows presolver be enabled within the presolve library?",
1130 &presoldata->enableparallelrows,
TRUE, DEFAULT_ENABLEPARALLELROWS,
NULL,
NULL) );
1134 "should the dominated column presolver be enabled within the presolve library?",
1135 &presoldata->enabledomcol,
TRUE, DEFAULT_ENABLEDOMCOL,
NULL,
NULL) );
1139 "should the dualinfer presolver be enabled within the presolve library?",
1140 &presoldata->enabledualinfer,
TRUE, DEFAULT_ENABLEDUALINFER,
NULL,
NULL) );
1144 "should the multi-aggregation presolver be enabled within the presolve library?",
1145 &presoldata->enablemultiaggr,
TRUE, DEFAULT_ENABLEMULTIAGGR,
NULL,
NULL) );
1149 "should the probing presolver be enabled within the presolve library?",
1150 &presoldata->enableprobing,
TRUE, DEFAULT_ENABLEPROBING,
NULL,
NULL) );
1154 "should the sparsify presolver be enabled within the presolve library?",
1155 &presoldata->enablesparsify,
TRUE, DEFAULT_ENABLESPARSIFY,
NULL,
NULL) );
1158 "filename to store the problem before MILP presolving starts (only enforced constraints)",
1159 &presoldata->filename,
TRUE, DEFAULT_FILENAME_PROBLEM,
NULL,
NULL) );
1162 "verbosity level of PaPILO (0: quiet, 1: errors, 2: warnings, 3: normal, 4: detailed)",
1163 &presoldata->verbosity,
FALSE, DEFAULT_VERBOSITY, 0, 4,
NULL,
NULL));
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)
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)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_RETCODE SCIPcaptureCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPincludeExternalCodeInformation(SCIP *scip, const char *name, const char *description)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_RETCODE SCIPsetPresolFree(SCIP *scip, 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,)
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_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(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)
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_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
SCIP_Bool SCIPallowWeakDualReds(SCIP *scip)
SCIP_Bool SCIPallowStrongDualReds(SCIP *scip)
unsigned int SCIPinitializeRandomSeed(SCIP *scip, unsigned int initialseedvalue)
assert(minobj< SCIPgetCutoffbound(scip))
int SCIPmatrixGetNNonzs(SCIP_MATRIX *matrix)
int SCIPmatrixGetRowNNonzs(SCIP_MATRIX *matrix, int row)
SCIP_Real SCIPmatrixGetRowLhs(SCIP_MATRIX *matrix, int row)
SCIP_Real * SCIPmatrixGetRowValPtr(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)
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
#define DEFAULT_RANDOMSEED
public methods for constraint handler plugins and constraints
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
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)
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_VARSTATUS_MULTAGGR
@ SCIP_VARSTATUS_AGGREGATED