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#ifdef SCIP_PRESOLLIB_ENABLE_OUTPUT
219 return builder.build();
224Presolve<SCIP_Real> setupPresolve(
227 SCIP_Bool allowconsmodification
235 presolve.getPresolveOptions().substitutebinarieswithints =
false;
240 presolve.getPresolveOptions().removeslackvars =
false;
243 presolve.getPresolveOptions().maxfillinpersubstitution = data->maxfillinpersubstitution;
244 presolve.getPresolveOptions().markowitz_tolerance = data->markowitztolerance;
245 presolve.getPresolveOptions().maxshiftperrow = data->maxshiftperrow;
246 presolve.getPresolveOptions().hugeval = data->hugebound;
249 presolve.getPresolveOptions().detectlindep = allowconsmodification ? data->detectlineardependency : 0;
256 presolve.getPresolveOptions().threads = data->threads;
258 if (data->threads != DEFAULT_THREADS)
260 "PaPILO can utilize only multiple threads if it is build with TBB.\n");
261 presolve.getPresolveOptions().threads = 1;
264#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 3)
265 presolve.getPresolveOptions().maxrounds = data->internalmaxrounds;
270 presolve.getPresolveOptions().dualreds = 2;
272 presolve.getPresolveOptions().dualreds = 1;
274 presolve.getPresolveOptions().dualreds = 0;
277 using uptr = std::unique_ptr<PresolveMethod<SCIP_Real>>;
280 presolve.addPresolveMethod( uptr(
new SingletonCols<SCIP_Real>() ) );
281 presolve.addPresolveMethod( uptr(
new CoefficientStrengthening<SCIP_Real>() ) );
282 presolve.addPresolveMethod( uptr(
new ConstraintPropagation<SCIP_Real>() ) );
285 presolve.addPresolveMethod( uptr(
new SimpleProbing<SCIP_Real>() ) );
286 if( data->enableparallelrows )
287 presolve.addPresolveMethod( uptr(
new ParallelRowDetection<SCIP_Real>() ) );
290 presolve.addPresolveMethod( uptr(
new SingletonStuffing<SCIP_Real>() ) );
291#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 1)
292 DualFix<SCIP_Real> *dualfix =
new DualFix<SCIP_Real>();
293 dualfix->set_fix_to_infinity_allowed(
false);
294 presolve.addPresolveMethod( uptr( dualfix ) );
296 presolve.addPresolveMethod( uptr(
new DualFix<SCIP_Real>() ) );
298 presolve.addPresolveMethod( uptr(
new FixContinuous<SCIP_Real>() ) );
299 presolve.addPresolveMethod( uptr(
new SimplifyInequalities<SCIP_Real>() ) );
300 presolve.addPresolveMethod( uptr(
new SimpleSubstitution<SCIP_Real>() ) );
303 presolve.addPresolveMethod( uptr(
new ImplIntDetection<SCIP_Real>() ) );
304 if( data->enabledualinfer )
305 presolve.addPresolveMethod( uptr(
new DualInfer<SCIP_Real>() ) );
306 if( data->enableprobing )
308#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 1)
309 Probing<SCIP_Real> *probing =
new Probing<SCIP_Real>();
310 if(
presolve.getPresolveOptions().runs_sequential() )
312 probing->set_max_badge_size( data->maxbadgesizeseq );
316 probing->set_max_badge_size( data->maxbadgesizepar );
318 presolve.addPresolveMethod( uptr( probing ) );
321 presolve.addPresolveMethod( uptr(
new Probing<SCIP_Real>() ) );
322 if( data->maxbadgesizeseq != DEFAULT_MAXBADGESIZE_SEQ )
324 " The parameter 'presolving/milp/maxbadgesizeseq' can only be used with PaPILO 2.1.0 or later versions.\n");
326 if( data->maxbadgesizepar != DEFAULT_MAXBADGESIZE_PAR )
328 " The parameter 'presolving/milp/maxbadgesizepar' can only be used with PaPILO 2.1.0 or later versions.\n");
332 if( data->enabledomcol )
333 presolve.addPresolveMethod( uptr(
new DominatedCols<SCIP_Real>() ) );
334 if( data->enablemultiaggr )
335 presolve.addPresolveMethod( uptr(
new Substitution<SCIP_Real>() ) );
336 if( data->enablesparsify )
337 presolve.addPresolveMethod( uptr(
new Sparsify<SCIP_Real>() ) );
343#ifndef SCIP_PRESOLLIB_ENABLE_OUTPUT
345 presolve.setVerbosityLevel((VerbosityLevel) data->verbosity);
388 data->lastncols = -1;
389 data->lastnrows = -1;
400 SCIP_Bool initialized;
402 SCIP_Bool infeasible;
412 if( data->lastncols != -1 && data->lastnrows != -1 &&
413 nvars > data->lastncols * 0.85 &&
414 nconss > data->lastnrows * 0.85 )
418 naddconss, ndelconss, nchgcoefs, nchgbds, nfixedvars) );
431 if( !initialized || !complete )
442 if( 0 != strncmp(data->filename, DEFAULT_FILENAME_PROBLEM, strlen(DEFAULT_FILENAME_PROBLEM)) )
445 " writing transformed problem to %s (only enforced constraints)\n", data->filename);
455 int oldnaggrvars = *naggrvars;
456 int oldnfixedvars = *nfixedvars;
457 int oldnchgbds = *nchgbds;
460 Problem<SCIP_Real> problem = buildProblem(
scip, matrix);
461 int oldnnz = problem.getConstraintMatrix().getNnz();
462 Presolve<SCIP_Real>
presolve = setupPresolve(
scip, data, allowconsmodification);
469#if (PAPILO_VERSION_MAJOR >= 2)
470 PresolveResult<SCIP_Real> res =
presolve.apply(problem,
false);
472 PresolveResult<SCIP_Real> res =
presolve.apply(problem);
474 data->lastncols = problem.getNCols();
475 data->lastnrows = problem.getNRows();
480 case PresolveStatus::kInfeasible:
483 " (%.1fs) MILP presolver detected infeasibility\n",
487 case PresolveStatus::kUnbndOrInfeas:
488 case PresolveStatus::kUnbounded:
491 " (%.1fs) MILP presolver detected unboundedness\n",
495 case PresolveStatus::kUnchanged:
497 data->lastncols =
nvars;
498 data->lastnrows = nconss;
500 " (%.1fs) MILP presolver found nothing\n",
504 case PresolveStatus::kReduced:
505 data->lastncols = problem.getNCols();
506 data->lastnrows = problem.getNRows();
513 VariableDomains<SCIP_Real>& varDomains = problem.getVariableDomains();
514 for(
int i = 0;
i != problem.getNCols(); ++
i )
516 assert( ! varDomains.flags[
i].test(ColFlag::kInactive) );
518 if( !varDomains.flags[
i].test(ColFlag::kLbInf) )
534 if( !varDomains.flags[
i].test(ColFlag::kUbInf) )
554 " (%.1fs) MILP presolver detected infeasibility\n",
561 std::vector<SCIP_VAR*> tmpvars;
562 std::vector<SCIP_Real> tmpvals;
565 int newnnz = problem.getConstraintMatrix().getNnz();
566 bool constraintsReplaced =
false;
567 if( newnnz == 0 || (allowconsmodification &&
570 newnnz <= data->modifyconsfac * oldnnz)) )
573 int newnrows = problem.getNRows();
575 constraintsReplaced =
true;
578 for(
int i = 0;
i < newnrows; ++
i )
585 *ndelconss += oldnrows;
586 *naddconss += newnrows;
588 for(
int i = 0;
i < oldnrows; ++
i )
595 const Vec<RowFlags>& rflags = problem.getRowFlags();
596 const auto& consmatrix = problem.getConstraintMatrix();
597 for(
int i = 0;
i < newnrows; ++
i )
599 auto rowvec = consmatrix.getRowCoefficients(
i);
600 const int* rowcols = rowvec.getIndices();
602 SCIP_Real* rowvals =
const_cast<SCIP_Real*
>(rowvec.getValues());
603 int rowlen = rowvec.getLength();
606 SCIP_Real lhs = rflags[
i].test(RowFlag::kLhsInf) ? -
SCIPinfinity(
scip) : consmatrix.getLeftHandSides()[
i];
607 SCIP_Real rhs = rflags[
i].test(RowFlag::kRhsInf) ?
SCIPinfinity(
scip) : consmatrix.getRightHandSides()[
i];
611 tmpvars.reserve(rowlen);
612 for(
int j = 0; j < rowlen; ++j )
613 tmpvars.push_back(
SCIPmatrixGetVar(matrix, res.postsolve.origcol_mapping[rowcols[j]]));
636#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 3)
637 presolve.getStatistics().single_matrix_coefficient_changes > 0
639 presolve.getStatistics().ncoefchgs > 0
641 && !constraintsReplaced;
644 for( std::size_t
i = 0;
i != res.postsolve.types.size(); ++
i )
646 ReductionType type = res.postsolve.types[
i];
647 int first = res.postsolve.start[
i];
648 int last = res.postsolve.start[
i + 1];
652 case ReductionType::kFixedCol:
656 int col = res.postsolve.indices[first];
660 SCIP_Real value = res.postsolve.values[first];
679#if (PAPILO_VERSION_MAJOR >= 2)
680 case ReductionType::kSubstitutedColWithDual:
682 case ReductionType::kSubstitutedCol:
688 int startRowCoefficients = 0;
689 int lastRowCoefficients = 0;
691 if( type == ReductionType::kSubstitutedCol )
693 rowlen = last - first - 1;
694 col = res.postsolve.indices[first];
695 side = res.postsolve.values[first];
697 startRowCoefficients = first + 1;
698 lastRowCoefficients = last;
700#if (PAPILO_VERSION_MAJOR >= 2)
701 if( type == ReductionType::kSubstitutedColWithDual )
703 rowlen = (int) res.postsolve.values[first];
704 col = res.postsolve.indices[first + 3 + rowlen];
705 side = res.postsolve.values[first + 1];
707 startRowCoefficients = first + 3;
708 lastRowCoefficients = first + 3 + rowlen;
710 assert(side == res.postsolve.values[first + 2]);
711 assert(res.postsolve.indices[first + 1] == 0);
712 assert(res.postsolve.indices[first + 2] == 0);
714 assert( type == ReductionType::kSubstitutedCol || type == ReductionType::kSubstitutedColWithDual );
716 assert( type == ReductionType::kSubstitutedCol );
719 SCIP_Bool aggregated;
720 SCIP_Bool redundant =
FALSE;
721 SCIP_Real constant = 0.0;
724 SCIP_Real updatedSide;
727 SCIP_Real scalarx = res.postsolve.values[startRowCoefficients];
728 SCIP_Real scalary = res.postsolve.values[startRowCoefficients + 1];
736 updatedSide = side - constant;
742 SCIP_Real colCoef = 0.0;
743 SCIP_Real updatedSide;
744 SCIP_Bool checklbimplied;
745 SCIP_Bool checkubimplied;
750 for( j = startRowCoefficients; j < lastRowCoefficients; ++j )
752 if( res.postsolve.indices[j] == col )
754 colCoef = res.postsolve.values[j];
761 tmpvars.reserve(rowlen);
762 tmpvals.reserve(rowlen);
770 updatedSide = side - constant;
778 impliedlb = impliedub = updatedSide / colCoef;
780 for( j = startRowCoefficients; j < lastRowCoefficients; ++j )
785 if( res.postsolve.indices[j] == col )
788 coef = - res.postsolve.values[j] / colCoef;
828 tmpvals.push_back(coef);
829 tmpvars.push_back(
var);
833 if( j < lastRowCoefficients )
843 tmpvars.data(), tmpvals.data(), updatedSide / colCoef, &infeas, &aggregated) );
848 else if( constraintsReplaced && !redundant )
853 for(
int j = startRowCoefficients; j < lastRowCoefficients; ++j )
856 tmpvals.push_back(res.postsolve.values[j]);
862 tmpvars.size(), tmpvars.data(), tmpvals.data(), side, side ) );
876 case ReductionType::kParallelCol:
878#if (PAPILO_VERSION_MAJOR <= 1 && PAPILO_VERSION_MINOR==0)
880 case ReductionType::kFixedInfCol: {
883 if(!constraintsReplaced)
889 int column = res.postsolve.indices[first];
890 bool is_negative_infinity = res.postsolve.values[first] < 0;
893 if( is_negative_infinity )
906#if (PAPILO_VERSION_MAJOR >= 2)
907 case ReductionType::kVarBoundChange :
908 case ReductionType::kRedundantRow :
909 case ReductionType::kRowBoundChange :
910 case ReductionType::kReasonForRowBoundChangeForcedByRow :
911 case ReductionType::kRowBoundChangeForcedByRow :
912 case ReductionType::kSaveRow :
913 case ReductionType::kReducedBoundsCost :
914 case ReductionType::kColumnDualValue :
915 case ReductionType::kRowDualValue :
916 case ReductionType::kCoefficientChange :
918 SCIPerrorMessage(
"PaPILO: PaPILO should not return dual postsolving reductions in SCIP!!\n");
930 " (%.1fs) MILP presolver (%d rounds): %d aggregations, %d fixings, %d bound changes\n",
932 *nfixedvars - oldnfixedvars, *nchgbds - oldnchgbds);
954#if defined(PAPILO_VERSION_TWEAK) && PAPILO_VERSION_TWEAK != 0
955 String name = fmt::format(
"PaPILO {}.{}.{}.{}", PAPILO_VERSION_MAJOR, PAPILO_VERSION_MINOR, PAPILO_VERSION_PATCH, PAPILO_VERSION_TWEAK);
957 String name = fmt::format(
"PaPILO {}.{}.{}", PAPILO_VERSION_MAJOR, PAPILO_VERSION_MINOR, PAPILO_VERSION_PATCH);
960#if defined(PAPILO_GITHASH_AVAILABLE) && defined(PAPILO_TBB)
961 String desc = fmt::format(
"parallel presolve for integer and linear optimization (github.com/scipopt/papilo) (built with TBB) [GitHash: {}]", PAPILO_GITHASH);
962#elif !defined(PAPILO_GITHASH_AVAILABLE) && !defined(PAPILO_TBB)
963 String desc(
"parallel presolve for integer and linear optimization (github.com/scipopt/papilo)");
964#elif defined(PAPILO_GITHASH_AVAILABLE) && !defined(PAPILO_TBB)
965 String desc = fmt::format(
"parallel presolve for integer and linear optimization (github.com/scipopt/papilo) [GitHash: {}]", PAPILO_GITHASH);
966#elif !defined(PAPILO_GITHASH_AVAILABLE) && defined(PAPILO_TBB)
967 String desc = fmt::format(
"parallel presolve for integer and linear optimization (github.com/scipopt/papilo) (built with TBB)");
995 "maximum number of threads presolving may use (0: automatic)",
996 &presoldata->threads,
FALSE, DEFAULT_THREADS, 0, INT_MAX,
NULL,
NULL) );
999 "presolving/" PRESOL_NAME "/maxfillinpersubstitution",
1000 "maximal possible fillin for substitutions to be considered",
1001 &presoldata->maxfillinpersubstitution,
FALSE, DEFAULT_MAXFILLINPERSUBST, INT_MIN, INT_MAX,
NULL,
NULL) );
1005 "maximal amount of nonzeros allowed to be shifted to make space for substitutions",
1006 &presoldata->maxshiftperrow,
TRUE, DEFAULT_MAXSHIFTPERROW, 0, INT_MAX,
NULL,
NULL) );
1010 "the random seed used for randomization of tie breaking",
1013 if( DependentRows<double>::Enabled )
1016 "presolving/" PRESOL_NAME "/detectlineardependency",
1017 "should linear dependent equations and free columns be removed? (0: never, 1: for LPs, 2: always)",
1018 &presoldata->detectlineardependency,
TRUE, DEFAULT_DETECTLINDEP, 0, 2,
NULL,
NULL) );
1021 presoldata->detectlineardependency = 0;
1025 "modify SCIP constraints when the number of nonzeros or rows is at most this factor "
1026 "times the number of nonzeros or rows before presolving",
1027 &presoldata->modifyconsfac,
FALSE, DEFAULT_MODIFYCONSFAC, 0.0, 1.0,
NULL,
NULL) );
1031 "the markowitz tolerance used for substitutions",
1032 &presoldata->markowitztolerance,
FALSE, DEFAULT_MARKOWITZTOLERANCE, 0.0, 1.0,
NULL,
NULL) );
1036 "absolute bound value that is considered too huge for activitity based calculations",
1039#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 1)
1041 "maximal badge size in Probing in PaPILO if PaPILO is executed in sequential mode",
1042 &presoldata->maxbadgesizeseq,
FALSE, DEFAULT_MAXBADGESIZE_SEQ, -1, INT_MAX,
NULL,
NULL));
1045 "maximal badge size in Probing in PaPILO if PaPILO is executed in parallel mode",
1046 &presoldata->maxbadgesizepar,
FALSE, DEFAULT_MAXBADGESIZE_PAR, -1, INT_MAX,
NULL,
NULL));
1048 presoldata->maxbadgesizeseq = DEFAULT_MAXBADGESIZE_SEQ;
1049 presoldata->maxbadgesizepar = DEFAULT_MAXBADGESIZE_PAR;
1052#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 3)
1054 "internal maxrounds for each milp presolving (-1: no limit, 0: model cleanup)",
1055 &presoldata->internalmaxrounds,
TRUE, DEFAULT_INTERNAL_MAXROUNDS, -1, INT_MAX,
NULL,
NULL));
1057 presoldata->internalmaxrounds = DEFAULT_INTERNAL_MAXROUNDS;
1062 "should the parallel rows presolver be enabled within the presolve library?",
1063 &presoldata->enableparallelrows,
TRUE, DEFAULT_ENABLEPARALLELROWS,
NULL,
NULL) );
1067 "should the dominated column presolver be enabled within the presolve library?",
1068 &presoldata->enabledomcol,
TRUE, DEFAULT_ENABLEDOMCOL,
NULL,
NULL) );
1072 "should the dualinfer presolver be enabled within the presolve library?",
1073 &presoldata->enabledualinfer,
TRUE, DEFAULT_ENABLEDUALINFER,
NULL,
NULL) );
1077 "should the multi-aggregation presolver be enabled within the presolve library?",
1078 &presoldata->enablemultiaggr,
TRUE, DEFAULT_ENABLEMULTIAGGR,
NULL,
NULL) );
1082 "should the probing presolver be enabled within the presolve library?",
1083 &presoldata->enableprobing,
TRUE, DEFAULT_ENABLEPROBING,
NULL,
NULL) );
1087 "should the sparsify presolver be enabled within the presolve library?",
1088 &presoldata->enablesparsify,
TRUE, DEFAULT_ENABLESPARSIFY,
NULL,
NULL) );
1091 "filename to store the problem before MILP presolving starts (only enforced constraints)",
1092 &presoldata->filename,
TRUE, DEFAULT_FILENAME_PROBLEM,
NULL,
NULL) );
1095 "verbosity level of PaPILO (0: quiet, 1: errors, 2: warnings, 3: normal, 4: detailed)",
1096 &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