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"
86#include "papilo/core/Presolve.hpp"
87#include "papilo/core/ProblemBuilder.hpp"
88#include "papilo/Config.hpp"
90#define PRESOL_NAME "milp"
91#define PRESOL_DESC "MILP specific presolving methods"
92#define PRESOL_PRIORITY 9999999
93#define PRESOL_MAXROUNDS -1
94#define PRESOL_TIMING SCIP_PRESOLTIMING_MEDIUM
97#define DEFAULT_THREADS 1
98#define DEFAULT_MAXFILLINPERSUBST 3
99#define DEFAULT_MAXSHIFTPERROW 10
100#define DEFAULT_DETECTLINDEP 0
101#define DEFAULT_MAXBADGESIZE_SEQ 15000
102#define DEFAULT_MAXBADGESIZE_PAR -1
103#define DEFAULT_INTERNAL_MAXROUNDS -1
104#define DEFAULT_RANDOMSEED 0
105#define DEFAULT_MODIFYCONSFAC 0.8
107#define DEFAULT_MARKOWITZTOLERANCE 0.01
108#define DEFAULT_VERBOSITY 0
109#define DEFAULT_HUGEBOUND 1e8
110#define DEFAULT_ENABLEPARALLELROWS TRUE
111#define DEFAULT_ENABLEDOMCOL TRUE
112#define DEFAULT_ENABLEDUALINFER TRUE
113#define DEFAULT_ENABLEMULTIAGGR TRUE
114#define DEFAULT_ENABLEPROBING TRUE
115#define DEFAULT_ENABLESPARSIFY FALSE
116#define DEFAULT_FILENAME_PROBLEM "-"
123struct SCIP_PresolData
128 int maxfillinpersubstitution;
131 int internalmaxrounds;
133 int detectlineardependency;
137 SCIP_Bool enablesparsify;
138 SCIP_Bool enabledomcol;
139 SCIP_Bool enableprobing;
140 SCIP_Bool enabledualinfer;
141 SCIP_Bool enablemultiaggr;
142 SCIP_Bool enableparallelrows;
143 SCIP_Real modifyconsfac;
145 SCIP_Real markowitztolerance;
148 char* filename =
NULL;
151using namespace papilo;
159Problem<SCIP_Real> buildProblem(
164 ProblemBuilder<SCIP_Real> builder;
170 builder.reserve(nnz, nrows, ncols);
173 builder.setNumCols(ncols);
174 for(
int i = 0;
i != ncols; ++
i)
179 builder.setColLb(
i, lb);
180 builder.setColUb(
i, ub);
183#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 1)
185 builder.setColImplInt(
i,
TRUE);
195 builder.setNumRows(nrows);
196 for(
int i = 0;
i != nrows; ++
i)
201 builder.addRowEntries(
i, rowlen, rowcols, rowvals);
205 builder.setRowLhs(
i, lhs);
206 builder.setRowRhs(
i, rhs);
212 builder.setObjOffset(0);
214 return builder.build();
249 data->lastncols = -1;
250 data->lastnrows = -1;
261 SCIP_Bool initialized;
263 SCIP_Bool infeasible;
274 if( data->lastncols != -1 && data->lastnrows != -1 &&
275 nvars > data->lastncols * 0.85 &&
276 nconss > data->lastnrows * 0.85 )
280 naddconss, ndelconss, nchgcoefs, nchgbds, nfixedvars) );
293 if( !initialized || !complete )
309 Problem<SCIP_Real> problem = buildProblem(
scip, matrix);
313 int oldnaggrvars = *naggrvars;
314 int oldnfixedvars = *nfixedvars;
315 int oldnchgbds = *nchgbds;
319 presolve.getPresolveOptions().substitutebinarieswithints =
false;
324 presolve.getPresolveOptions().removeslackvars =
false;
327 presolve.getPresolveOptions().maxfillinpersubstitution = data->maxfillinpersubstitution;
328 presolve.getPresolveOptions().markowitz_tolerance = data->markowitztolerance;
329 presolve.getPresolveOptions().maxshiftperrow = data->maxshiftperrow;
330 presolve.getPresolveOptions().hugeval = data->hugebound;
333 presolve.getPresolveOptions().detectlindep = allowconsmodification ? data->detectlineardependency : 0;
340 presolve.getPresolveOptions().threads = data->threads;
342 if (data->threads != DEFAULT_THREADS)
344 "PaPILO can utilize only multiple threads if it is build with TBB.\n");
345 presolve.getPresolveOptions().threads = 1;
348#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 3)
349 presolve.getPresolveOptions().maxrounds = data->internalmaxrounds;
354 presolve.getPresolveOptions().dualreds = 0;
356 presolve.getPresolveOptions().dualreds = 2;
358 presolve.getPresolveOptions().dualreds = 1;
360 presolve.getPresolveOptions().dualreds = 0;
363 using uptr = std::unique_ptr<PresolveMethod<SCIP_Real>>;
366 presolve.addPresolveMethod( uptr(
new SingletonCols<SCIP_Real>() ) );
367 presolve.addPresolveMethod( uptr(
new CoefficientStrengthening<SCIP_Real>() ) );
368 presolve.addPresolveMethod( uptr(
new ConstraintPropagation<SCIP_Real>() ) );
371 presolve.addPresolveMethod( uptr(
new SimpleProbing<SCIP_Real>() ) );
372 if( data->enableparallelrows )
373 presolve.addPresolveMethod( uptr(
new ParallelRowDetection<SCIP_Real>() ) );
376 presolve.addPresolveMethod( uptr(
new SingletonStuffing<SCIP_Real>() ) );
377#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 1)
378 DualFix<SCIP_Real> *dualfix =
new DualFix<SCIP_Real>();
379 dualfix->set_fix_to_infinity_allowed(
false);
380 presolve.addPresolveMethod( uptr( dualfix ) );
382 presolve.addPresolveMethod( uptr(
new DualFix<SCIP_Real>() ) );
384 presolve.addPresolveMethod( uptr(
new FixContinuous<SCIP_Real>() ) );
385 presolve.addPresolveMethod( uptr(
new SimplifyInequalities<SCIP_Real>() ) );
386 presolve.addPresolveMethod( uptr(
new SimpleSubstitution<SCIP_Real>() ) );
389 presolve.addPresolveMethod( uptr(
new ImplIntDetection<SCIP_Real>() ) );
390 if( data->enabledualinfer )
391 presolve.addPresolveMethod( uptr(
new DualInfer<SCIP_Real>() ) );
392 if( data->enableprobing )
394#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 1)
395 Probing<SCIP_Real> *probing =
new Probing<SCIP_Real>();
396 if(
presolve.getPresolveOptions().runs_sequential() )
398 probing->set_max_badge_size( data->maxbadgesizeseq );
402 probing->set_max_badge_size( data->maxbadgesizepar );
404 presolve.addPresolveMethod( uptr( probing ) );
407 presolve.addPresolveMethod( uptr(
new Probing<SCIP_Real>() ) );
408 if( data->maxbadgesizeseq != DEFAULT_MAXBADGESIZE_SEQ )
410 " The parameter 'presolving/milp/maxbadgesizeseq' can only be used with PaPILO 2.1.0 or later versions.\n");
412 if( data->maxbadgesizepar != DEFAULT_MAXBADGESIZE_PAR )
414 " The parameter 'presolving/milp/maxbadgesizepar' can only be used with PaPILO 2.1.0 or later versions.\n");
418 if( data->enabledomcol )
419 presolve.addPresolveMethod( uptr(
new DominatedCols<SCIP_Real>() ) );
420 if( data->enablemultiaggr )
421 presolve.addPresolveMethod( uptr(
new Substitution<SCIP_Real>() ) );
422 if( data->enablesparsify )
423 presolve.addPresolveMethod( uptr(
new Sparsify<SCIP_Real>() ) );
430#ifdef SCIP_PRESOLLIB_ENABLE_OUTPUT
433 presolve.setVerbosityLevel((VerbosityLevel) data->verbosity);
441 if( 0 != strncmp(data->filename, DEFAULT_FILENAME_PROBLEM, strlen(DEFAULT_FILENAME_PROBLEM)) )
444 " writing transformed problem to %s (only enforced constraints)\n", data->filename);
451 int oldnnz = problem.getConstraintMatrix().getNnz();
454#if (PAPILO_VERSION_MAJOR >= 2)
455 PresolveResult<SCIP_Real> res =
presolve.apply(problem,
false);
457 PresolveResult<SCIP_Real> res =
presolve.apply(problem);
459 data->lastncols = problem.getNCols();
460 data->lastnrows = problem.getNRows();
465 case PresolveStatus::kInfeasible:
468 " (%.1fs) MILP presolver detected infeasibility\n",
472 case PresolveStatus::kUnbndOrInfeas:
473 case PresolveStatus::kUnbounded:
476 " (%.1fs) MILP presolver detected unboundedness\n",
480 case PresolveStatus::kUnchanged:
482 data->lastncols =
nvars;
483 data->lastnrows = nconss;
485 " (%.1fs) MILP presolver found nothing\n",
489 case PresolveStatus::kReduced:
490 data->lastncols = problem.getNCols();
491 data->lastnrows = problem.getNRows();
498 VariableDomains<SCIP_Real>& varDomains = problem.getVariableDomains();
499 for(
int i = 0;
i != problem.getNCols(); ++
i )
501 assert( ! varDomains.flags[
i].test(ColFlag::kInactive) );
503 if( !varDomains.flags[
i].test(ColFlag::kLbInf) )
519 if( !varDomains.flags[
i].test(ColFlag::kUbInf) )
539 " (%.1fs) MILP presolver detected infeasibility\n",
546 std::vector<SCIP_VAR*> tmpvars;
547 std::vector<SCIP_Real> tmpvals;
550 int newnnz = problem.getConstraintMatrix().getNnz();
551 bool constraintsReplaced =
false;
552 if( newnnz == 0 || (allowconsmodification &&
555 newnnz <= data->modifyconsfac * oldnnz)) )
558 int newnrows = problem.getNRows();
560 constraintsReplaced =
true;
563 for(
int i = 0;
i < newnrows; ++
i )
570 *ndelconss += oldnrows;
571 *naddconss += newnrows;
573 for(
int i = 0;
i < oldnrows; ++
i )
580 const Vec<RowFlags>& rflags = problem.getRowFlags();
581 const auto& consmatrix = problem.getConstraintMatrix();
582 for(
int i = 0;
i < newnrows; ++
i )
584 auto rowvec = consmatrix.getRowCoefficients(
i);
585 const int* rowcols = rowvec.getIndices();
587 SCIP_Real* rowvals =
const_cast<SCIP_Real*
>(rowvec.getValues());
588 int rowlen = rowvec.getLength();
591 SCIP_Real lhs = rflags[
i].test(RowFlag::kLhsInf) ? -
SCIPinfinity(
scip) : consmatrix.getLeftHandSides()[
i];
592 SCIP_Real rhs = rflags[
i].test(RowFlag::kRhsInf) ?
SCIPinfinity(
scip) : consmatrix.getRightHandSides()[
i];
596 tmpvars.reserve(rowlen);
597 for(
int j = 0; j < rowlen; ++j )
598 tmpvars.push_back(
SCIPmatrixGetVar(matrix, res.postsolve.origcol_mapping[rowcols[j]]));
621#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 3)
622 presolve.getStatistics().single_matrix_coefficient_changes > 0
624 presolve.getStatistics().ncoefchgs > 0
626 && !constraintsReplaced;
629 for( std::size_t
i = 0;
i != res.postsolve.types.size(); ++
i )
631 ReductionType type = res.postsolve.types[
i];
632 int first = res.postsolve.start[
i];
633 int last = res.postsolve.start[
i + 1];
637 case ReductionType::kFixedCol:
641 int col = res.postsolve.indices[first];
645 SCIP_Real value = res.postsolve.values[first];
664#if (PAPILO_VERSION_MAJOR >= 2)
665 case ReductionType::kSubstitutedColWithDual:
667 case ReductionType::kSubstitutedCol:
673 int startRowCoefficients = 0;
674 int lastRowCoefficients = 0;
676 if( type == ReductionType::kSubstitutedCol )
678 rowlen = last - first - 1;
679 col = res.postsolve.indices[first];
680 side = res.postsolve.values[first];
682 startRowCoefficients = first + 1;
683 lastRowCoefficients = last;
685#if (PAPILO_VERSION_MAJOR >= 2)
686 if( type == ReductionType::kSubstitutedColWithDual )
688 rowlen = (int) res.postsolve.values[first];
689 col = res.postsolve.indices[first + 3 + rowlen];
690 side = res.postsolve.values[first + 1];
692 startRowCoefficients = first + 3;
693 lastRowCoefficients = first + 3 + rowlen;
695 assert(side == res.postsolve.values[first + 2]);
696 assert(res.postsolve.indices[first + 1] == 0);
697 assert(res.postsolve.indices[first + 2] == 0);
699 assert( type == ReductionType::kSubstitutedCol || type == ReductionType::kSubstitutedColWithDual );
701 assert( type == ReductionType::kSubstitutedCol );
704 SCIP_Bool aggregated;
705 SCIP_Bool redundant =
FALSE;
706 SCIP_Real constant = 0.0;
709 SCIP_Real updatedSide;
712 SCIP_Real scalarx = res.postsolve.values[startRowCoefficients];
713 SCIP_Real scalary = res.postsolve.values[startRowCoefficients + 1];
721 updatedSide = side - constant;
727 SCIP_Real colCoef = 0.0;
728 SCIP_Real updatedSide;
729 SCIP_Bool checklbimplied;
730 SCIP_Bool checkubimplied;
735 for( j = startRowCoefficients; j < lastRowCoefficients; ++j )
737 if( res.postsolve.indices[j] == col )
739 colCoef = res.postsolve.values[j];
746 tmpvars.reserve(rowlen);
747 tmpvals.reserve(rowlen);
755 updatedSide = side - constant;
763 impliedlb = impliedub = updatedSide / colCoef;
765 for( j = startRowCoefficients; j < lastRowCoefficients; ++j )
770 if( res.postsolve.indices[j] == col )
773 coef = - res.postsolve.values[j] / colCoef;
813 tmpvals.push_back(coef);
814 tmpvars.push_back(
var);
818 if( j < lastRowCoefficients )
828 tmpvars.data(), tmpvals.data(), updatedSide / colCoef, &infeas, &aggregated) );
833 else if( constraintsReplaced && !redundant )
838 for(
int j = startRowCoefficients; j < lastRowCoefficients; ++j )
841 tmpvals.push_back(res.postsolve.values[j]);
847 tmpvars.size(), tmpvars.data(), tmpvals.data(), side, side ) );
861 case ReductionType::kParallelCol:
863#if (PAPILO_VERSION_MAJOR <= 1 && PAPILO_VERSION_MINOR==0)
865 case ReductionType::kFixedInfCol: {
868 if(!constraintsReplaced)
874 int column = res.postsolve.indices[first];
875 bool is_negative_infinity = res.postsolve.values[first] < 0;
878 if( is_negative_infinity )
891#if (PAPILO_VERSION_MAJOR >= 2)
892 case ReductionType::kVarBoundChange :
893 case ReductionType::kRedundantRow :
894 case ReductionType::kRowBoundChange :
895 case ReductionType::kReasonForRowBoundChangeForcedByRow :
896 case ReductionType::kRowBoundChangeForcedByRow :
897 case ReductionType::kSaveRow :
898 case ReductionType::kReducedBoundsCost :
899 case ReductionType::kColumnDualValue :
900 case ReductionType::kRowDualValue :
901 case ReductionType::kCoefficientChange :
903 SCIPerrorMessage(
"PaPILO: PaPILO should not return dual postsolving reductions in SCIP!!\n");
915 " (%.1fs) MILP presolver (%d rounds): %d aggregations, %d fixings, %d bound changes\n",
917 *nfixedvars - oldnfixedvars, *nchgbds - oldnchgbds);
939#if defined(PAPILO_VERSION_TWEAK) && PAPILO_VERSION_TWEAK != 0
940 String name = fmt::format(
"PaPILO {}.{}.{}.{}", PAPILO_VERSION_MAJOR, PAPILO_VERSION_MINOR, PAPILO_VERSION_PATCH, PAPILO_VERSION_TWEAK);
942 String name = fmt::format(
"PaPILO {}.{}.{}", PAPILO_VERSION_MAJOR, PAPILO_VERSION_MINOR, PAPILO_VERSION_PATCH);
945#if defined(PAPILO_GITHASH_AVAILABLE) && defined(PAPILO_TBB)
946 String desc = fmt::format(
"parallel presolve for integer and linear optimization (github.com/scipopt/papilo) (built with TBB) [GitHash: {}]", PAPILO_GITHASH);
947#elif !defined(PAPILO_GITHASH_AVAILABLE) && !defined(PAPILO_TBB)
948 String desc(
"parallel presolve for integer and linear optimization (github.com/scipopt/papilo)");
949#elif defined(PAPILO_GITHASH_AVAILABLE) && !defined(PAPILO_TBB)
950 String desc = fmt::format(
"parallel presolve for integer and linear optimization (github.com/scipopt/papilo) [GitHash: {}]", PAPILO_GITHASH);
951#elif !defined(PAPILO_GITHASH_AVAILABLE) && defined(PAPILO_TBB)
952 String desc = fmt::format(
"parallel presolve for integer and linear optimization (github.com/scipopt/papilo) (built with TBB)");
980 "maximum number of threads presolving may use (0: automatic)",
981 &presoldata->threads,
FALSE, DEFAULT_THREADS, 0, INT_MAX,
NULL,
NULL) );
984 "presolving/" PRESOL_NAME "/maxfillinpersubstitution",
985 "maximal possible fillin for substitutions to be considered",
986 &presoldata->maxfillinpersubstitution,
FALSE, DEFAULT_MAXFILLINPERSUBST, INT_MIN, INT_MAX,
NULL,
NULL) );
990 "maximal amount of nonzeros allowed to be shifted to make space for substitutions",
991 &presoldata->maxshiftperrow,
TRUE, DEFAULT_MAXSHIFTPERROW, 0, INT_MAX,
NULL,
NULL) );
995 "the random seed used for randomization of tie breaking",
998 if( DependentRows<double>::Enabled )
1001 "presolving/" PRESOL_NAME "/detectlineardependency",
1002 "should linear dependent equations and free columns be removed? (0: never, 1: for LPs, 2: always)",
1003 &presoldata->detectlineardependency,
TRUE, DEFAULT_DETECTLINDEP, 0, 2,
NULL,
NULL) );
1006 presoldata->detectlineardependency = 0;
1010 "modify SCIP constraints when the number of nonzeros or rows is at most this factor "
1011 "times the number of nonzeros or rows before presolving",
1012 &presoldata->modifyconsfac,
FALSE, DEFAULT_MODIFYCONSFAC, 0.0, 1.0,
NULL,
NULL) );
1016 "the markowitz tolerance used for substitutions",
1017 &presoldata->markowitztolerance,
FALSE, DEFAULT_MARKOWITZTOLERANCE, 0.0, 1.0,
NULL,
NULL) );
1021 "absolute bound value that is considered too huge for activitity based calculations",
1024#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 1)
1026 "maximal badge size in Probing in PaPILO if PaPILO is executed in sequential mode",
1027 &presoldata->maxbadgesizeseq,
FALSE, DEFAULT_MAXBADGESIZE_SEQ, -1, INT_MAX,
NULL,
NULL));
1030 "maximal badge size in Probing in PaPILO if PaPILO is executed in parallel mode",
1031 &presoldata->maxbadgesizepar,
FALSE, DEFAULT_MAXBADGESIZE_PAR, -1, INT_MAX,
NULL,
NULL));
1033 presoldata->maxbadgesizeseq = DEFAULT_MAXBADGESIZE_SEQ;
1034 presoldata->maxbadgesizepar = DEFAULT_MAXBADGESIZE_PAR;
1037#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 3)
1039 "internal maxrounds for each milp presolving (-1: no limit, 0: model cleanup)",
1040 &presoldata->internalmaxrounds,
TRUE, DEFAULT_INTERNAL_MAXROUNDS, -1, INT_MAX,
NULL,
NULL));
1042 presoldata->internalmaxrounds = DEFAULT_INTERNAL_MAXROUNDS;
1047 "should the parallel rows presolver be enabled within the presolve library?",
1048 &presoldata->enableparallelrows,
TRUE, DEFAULT_ENABLEPARALLELROWS,
NULL,
NULL) );
1052 "should the dominated column presolver be enabled within the presolve library?",
1053 &presoldata->enabledomcol,
TRUE, DEFAULT_ENABLEDOMCOL,
NULL,
NULL) );
1057 "should the dualinfer presolver be enabled within the presolve library?",
1058 &presoldata->enabledualinfer,
TRUE, DEFAULT_ENABLEDUALINFER,
NULL,
NULL) );
1062 "should the multi-aggregation presolver be enabled within the presolve library?",
1063 &presoldata->enablemultiaggr,
TRUE, DEFAULT_ENABLEMULTIAGGR,
NULL,
NULL) );
1067 "should the probing presolver be enabled within the presolve library?",
1068 &presoldata->enableprobing,
TRUE, DEFAULT_ENABLEPROBING,
NULL,
NULL) );
1072 "should the sparsify presolver be enabled within the presolve library?",
1073 &presoldata->enablesparsify,
TRUE, DEFAULT_ENABLESPARSIFY,
NULL,
NULL) );
1076 "filename to store the problem before MILP presolving starts (only enforced constraints)",
1077 &presoldata->filename,
TRUE, DEFAULT_FILENAME_PROBLEM,
NULL,
NULL) );
1080 "verbosity level of PaPILO (0: quiet, 1: errors, 2: warnings, 3: normal, 4: detailed)",
1081 &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
#define SCIP_DECL_PRESOLCOPY(x)
struct SCIP_PresolData SCIP_PRESOLDATA
#define SCIP_DECL_PRESOLFREE(x)
#define SCIP_DECL_PRESOLINIT(x)
#define SCIP_DECL_PRESOLEXEC(x)
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_VARSTATUS_MULTAGGR
@ SCIP_VARSTATUS_AGGREGATED