Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v9-minor'
Browse files Browse the repository at this point in the history
  • Loading branch information
scip-ci committed Mar 19, 2024
2 parents 96c9990 + d53e256 commit 582aa38
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ Interface changes

- limits/primal to terminate the solve as soon as the primal bound is at least as good as this value, same as limits/objectivestop (deprecated)
- limits/dual to terminate the solve as soon as the dual bound is at least as good as this value
- presolving/milp/internalmaxrounds to control the maximal rounds for each call of the milp presolver (PaPILO)

### New data structures

Expand Down
29 changes: 21 additions & 8 deletions src/scip/presol_milp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,20 @@ SCIP_RETCODE SCIPincludePresolMILP(
#include "papilo/core/ProblemBuilder.hpp"
#include "papilo/Config.hpp"

#define PRESOL_NAME "milp"
#define PRESOL_DESC "MILP specific presolving methods"
#define PRESOL_PRIORITY 9999999 /**< priority of the presolver (>= 0: before, < 0: after constraint handlers); combined with propagators */
#define PRESOL_MAXROUNDS -1 /**< maximal number of presolving rounds the presolver participates in (-1: no limit) */
#define PRESOL_TIMING SCIP_PRESOLTIMING_MEDIUM /* timing of the presolver (fast, medium, or exhaustive) */
#define PRESOL_NAME "milp"
#define PRESOL_DESC "MILP specific presolving methods"
#define PRESOL_PRIORITY 9999999 /**< priority of the presolver (>= 0: before, < 0: after constraint handlers); combined with propagators */
#define PRESOL_MAXROUNDS -1 /**< maximal number of presolving rounds the presolver participates in (-1: no limit) */
#define PRESOL_TIMING SCIP_PRESOLTIMING_MEDIUM /* timing of the presolver (fast, medium, or exhaustive) */

/* default parameter values */
#define DEFAULT_THREADS 1 /**< maximum number of threads presolving may use (0: automatic) */
#define DEFAULT_MAXFILLINPERSUBST 3 /**< maximal possible fillin for substitutions to be considered */
#define DEFAULT_MAXSHIFTPERROW 10 /**< maximal amount of nonzeros allowed to be shifted to make space for substitutions */
#define DEFAULT_DETECTLINDEP 0 /**< should linear dependent equations and free columns be removed? (0: never, 1: for LPs, 2: always) */
#define DEFAULT_MAXBADGESIZE_SEQ 15000 /**< the max badge size in Probing if PaPILO is executed in sequential mode*/
#define DEFAULT_MAXBADGESIZE_PAR -1 /**< the max badge size in Probing if PaPILO is executed in parallel mode*/
#define DEFAULT_MAXBADGESIZE_SEQ 15000 /**< the max badge size in Probing if PaPILO is executed in sequential mode */
#define DEFAULT_MAXBADGESIZE_PAR -1 /**< the max badge size in Probing if PaPILO is executed in parallel mode */
#define DEFAULT_INTERNAL_MAXROUNDS -1 /**< internal max rounds in PaPILO (-1: no limit, 0: model cleanup) */
#define DEFAULT_RANDOMSEED 0 /**< the random seed used for randomization of tie breaking */
#define DEFAULT_MODIFYCONSFAC 0.8 /**< modify SCIP constraints when the number of nonzeros or rows is at most this
* factor times the number of nonzeros or rows before presolving */
Expand All @@ -125,8 +126,9 @@ struct SCIP_PresolData
int lastnrows; /**< the number of rows from the last call */
int threads; /**< maximum number of threads presolving may use (0: automatic) */
int maxfillinpersubstitution; /**< maximal possible fillin for substitutions to be considered */
int maxbadgesizeseq; /**< the max badge size in Probing if PaPILO is called in sequential mode*/
int maxbadgesizeseq; /**< the max badge size in Probing if PaPILO is called in sequential mode */
int maxbadgesizepar; /**< the max badge size in Probing if PaPILO is called in parallel mode */
int internalmaxrounds; /**< internal max rounds in PaPILO (-1: no limit, 0: model cleanup) */
int maxshiftperrow; /**< maximal amount of nonzeros allowed to be shifted to make space for substitutions */
int detectlineardependency; /**< should linear dependent equations and free columns be removed? (0: never, 1: for LPs, 2: always) */
int randomseed; /**< the random seed used for randomization of tie breaking */
Expand Down Expand Up @@ -343,6 +345,9 @@ SCIP_DECL_PRESOLEXEC(presolExecMILP)
presolve.getPresolveOptions().threads = 1;
#endif

#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 3)
presolve.getPresolveOptions().maxrounds = data->internalmaxrounds;
#endif

/* disable dual reductions that are not permitted */
if( !complete )
Expand Down Expand Up @@ -936,6 +941,14 @@ SCIP_RETCODE SCIPincludePresolMILP(
presoldata->maxbadgesizepar = DEFAULT_MAXBADGESIZE_PAR;
#endif

#if PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR >= 3)
SCIP_CALL(SCIPaddIntParam(scip, "presolving/" PRESOL_NAME "/internalmaxrounds",
"internal maxrounds for each milp presolving (-1: no limit, 0: model cleanup)",
&presoldata->internalmaxrounds, TRUE, DEFAULT_INTERNAL_MAXROUNDS, -1, INT_MAX, NULL, NULL));
#else
presoldata->internalmaxrounds = DEFAULT_INTERNAL_MAXROUNDS;
#endif

SCIP_CALL( SCIPaddBoolParam(scip,
"presolving/" PRESOL_NAME "/enableparallelrows",
"should the parallel rows presolver be enabled within the presolve library?",
Expand Down

0 comments on commit 582aa38

Please sign in to comment.