From cc812cbaa89c5813192a492652bbec518b9a4639 Mon Sep 17 00:00:00 2001 From: Dominik Kamp Date: Sun, 29 Dec 2024 18:31:08 +0100 Subject: [PATCH 1/4] Copy implint presolver --- src/scip/presol_implint.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/scip/presol_implint.c b/src/scip/presol_implint.c index 5fbda0ceef..e3547c25a5 100644 --- a/src/scip/presol_implint.c +++ b/src/scip/presol_implint.c @@ -724,6 +724,20 @@ SCIP_RETCODE findImpliedIntegers( * Callback methods of presolver */ +/** copy method for presolver plugins (called when SCIP copies plugins) */ +static +SCIP_DECL_PRESOLCOPY(presolCopyImplint) +{ /*lint --e{715}*/ + assert(scip != NULL); + assert(presol != NULL); + assert(strcmp(SCIPpresolGetName(presol), PRESOL_NAME) == 0); + + /* call inclusion method of presolver */ + SCIP_CALL( SCIPincludePresolImplint(scip) ); + + return SCIP_OKAY; +} + /** destructor of presolver to free user data (called when SCIP is exiting) */ static SCIP_DECL_PRESOLFREE(presolFreeImplint) @@ -855,6 +869,7 @@ SCIP_RETCODE SCIPincludePresolImplint( assert(presol != NULL); /* set non fundamental callbacks via setter functions */ + SCIP_CALL( SCIPsetPresolCopy(scip, presol, presolCopyImplint) ); SCIP_CALL( SCIPsetPresolFree(scip, presol, presolFreeImplint) ); SCIP_CALL( SCIPaddRealParam(scip, From c479e01bd718406be7a646fd2f1b24d511bb9533 Mon Sep 17 00:00:00 2001 From: Dominik Kamp Date: Sun, 29 Dec 2024 18:36:33 +0100 Subject: [PATCH 2/4] Declare implint copied --- tests/src/scip/copy.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/src/scip/copy.c b/tests/src/scip/copy.c index c3f4283b83..ac200f4fb0 100644 --- a/tests/src/scip/copy.c +++ b/tests/src/scip/copy.c @@ -43,7 +43,6 @@ const char* const missing[] = "table", "compression", "solvingphases", - "presolving/implint", "propagating/symmetry" }; const int nmissing = sizeof(missing) / sizeof(missing[0]); From d9da1773737d2b6e2c34e46a1bda81ad70a7f74d Mon Sep 17 00:00:00 2001 From: Dominik Kamp Date: Sun, 29 Dec 2024 19:12:42 +0100 Subject: [PATCH 3/4] Enable implint presolver --- src/scip/presol_implint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scip/presol_implint.c b/src/scip/presol_implint.c index e3547c25a5..7165714d6c 100644 --- a/src/scip/presol_implint.c +++ b/src/scip/presol_implint.c @@ -57,7 +57,7 @@ #define PRESOL_NAME "implint" #define PRESOL_DESC "detects implicit integer variables" #define PRESOL_PRIORITY 100 /**< priority of the presolver (>= 0: before, < 0: after constraint handlers); combined with propagators */ -#define PRESOL_MAXROUNDS 0 /**< maximal number of presolving rounds the presolver participates in (-1: no limit) */ +#define PRESOL_MAXROUNDS -1 /**< maximal number of presolving rounds the presolver participates in (-1: no limit) */ #define PRESOL_TIMING SCIP_PRESOLTIMING_EXHAUSTIVE /* timing of the presolver (fast, medium, or exhaustive) */ #define DEFAULT_COLUMNROWRATIO 50.0 From 1eea48f672cbef4a41a749979951cc088d1f841b Mon Sep 17 00:00:00 2001 From: Dominik Kamp Date: Sun, 29 Dec 2024 20:13:22 +0100 Subject: [PATCH 4/4] Revert "Enable implint presolver" This reverts commit d9da1773737d2b6e2c34e46a1bda81ad70a7f74d --- src/scip/presol_implint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scip/presol_implint.c b/src/scip/presol_implint.c index 7165714d6c..e3547c25a5 100644 --- a/src/scip/presol_implint.c +++ b/src/scip/presol_implint.c @@ -57,7 +57,7 @@ #define PRESOL_NAME "implint" #define PRESOL_DESC "detects implicit integer variables" #define PRESOL_PRIORITY 100 /**< 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_MAXROUNDS 0 /**< maximal number of presolving rounds the presolver participates in (-1: no limit) */ #define PRESOL_TIMING SCIP_PRESOLTIMING_EXHAUSTIVE /* timing of the presolver (fast, medium, or exhaustive) */ #define DEFAULT_COLUMNROWRATIO 50.0